Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
34 | public function testHandleRequest() { |
||
35 | $select = new Select(); |
||
36 | $select->setName('lang'); |
||
37 | $select->setOptions(['ru' => 'Russian', 'ua' => 'Ukrainian']); |
||
38 | |||
39 | $select->handle(new FormData('post', ['lang' => 'ru'])); |
||
40 | $this->assertEquals('ru', $select->getValue()); |
||
41 | $select->handle(new FormData('post', [])); |
||
42 | $this->assertEquals('ru', $select->getValue()); |
||
43 | $select->handle(new FormData('post', ['lang' => 'pl'])); |
||
44 | $this->assertEquals('ru', $select->getValue()); |
||
45 | } |
||
46 | } |