Skip to content

Commit e94740d

Browse files
unt01dDavertMik
authored andcommitted
Adding support for custom formatting of argument output (#3408) (#4743)
* Adds support for custom formatting of argument output (#3408) * Tweaks for PSR-2 (new line at EOF) (#3408) * Fixes test to add support for older versions of PHPUnit * Adding support for FormattedOutput arguments to WebDriver (#3408)
1 parent 8265029 commit e94740d

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!DOCTYPE html>
2+
<html xmlns="http://www.w3.org/1999/html">
3+
<head></head>
4+
<body>
5+
<form action="/form/password_argument" method="post">
6+
<input type="password" id="password" name="password">
7+
<button type="submit">Submit</button>
8+
</form>
9+
</body>
10+
</html>

tests/unit/Codeception/Module/TestsForWeb.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1699,4 +1699,13 @@ public function testAttachFileThrowsCorrectMessageWhenFileDoesNotExist()
16991699
$this->module->amOnPage('/form/file');
17001700
$this->module->attachFile('Avatar', $filename);
17011701
}
1702+
1703+
public function testPasswordArgument()
1704+
{
1705+
$this->module->amOnPage('/form/password_argument');
1706+
$this->module->fillField('password', new \Codeception\Step\Argument\PasswordArgument('thisissecret'));
1707+
$this->module->click('Submit');
1708+
$data = data::get('form');
1709+
$this->assertEquals('thisissecret', $data['password']);
1710+
}
17021711
}

0 commit comments

Comments
 (0)