| Conditions | 1 |
| Paths | 1 |
| Total Lines | 19 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function testFormElements() |
||
| 18 | { |
||
| 19 | $objectManager = $this->getMock('Doctrine\Common\Persistence\ObjectManager'); |
||
| 20 | $user = $this->getMock('ZfcUser\Entity\UserInterface'); |
||
| 21 | $fieldset = $this->getMockBuilder('\JhFlexiTime\Form\Fieldset\BookingFieldset') |
||
| 22 | ->setMethods(['__construct', 'getName']) |
||
| 23 | ->setConstructorArgs([$objectManager, $user]) |
||
| 24 | ->getMock(); |
||
| 25 | |||
| 26 | $fieldset->expects($this->once()) |
||
| 27 | ->method('getName') |
||
| 28 | ->will($this->returnValue('time')); |
||
| 29 | |||
| 30 | |||
| 31 | $form = new BookingForm($objectManager, $fieldset); |
||
| 32 | |||
| 33 | $this->assertTrue($form->has("time")); |
||
| 34 | $this->assertTrue($form->has("submit")); |
||
| 35 | } |
||
| 36 | } |
||
| 37 |