| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | public function testKnockoutPasswordField() |
||
| 14 | { |
||
| 15 | $field = KnockoutPasswordField::create("MyField", "My Field") |
||
| 16 | ->setHasFocus(true); |
||
| 17 | |||
| 18 | $this->assertEquals( |
||
| 19 | "password", |
||
| 20 | $field->getObservable(), |
||
| 21 | "observable is set to password by default" |
||
| 22 | ); |
||
| 23 | $this->assertTrue( |
||
| 24 | $field->getHasFocus(), |
||
| 25 | "Focus is set to True" |
||
| 26 | ); |
||
| 27 | $this->assertStringContainsString( |
||
| 28 | '<input data-bind="textInput: password, hasFocus: true"', |
||
| 29 | $field->Field()->getValue() |
||
| 30 | ); |
||
| 33 |