| Conditions | 1 |
| Paths | 1 |
| Total Lines | 26 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public function testIndexAction() |
||
| 24 | { |
||
| 25 | $controller = new KitchensinkController( |
||
| 26 | $provider = new DataProviderFake(), |
||
| 27 | $templateEngine = $this->createMock(Environment::class), |
||
| 28 | $templateName = uniqid() |
||
| 29 | ); |
||
| 30 | |||
| 31 | $templateEngine |
||
| 32 | ->expects(static::once()) |
||
| 33 | ->method('render') |
||
| 34 | ->with( |
||
| 35 | $templateName, |
||
| 36 | [ |
||
| 37 | 'foo' => 'BestIt\KitchensinkBundle\Tests\DataProviderFake::bar', |
||
| 38 | 'foobar' => 'BestIt\KitchensinkBundle\Tests\DataProviderFake::getFoobar', |
||
| 39 | 'foobarBaz' => 'BestIt\KitchensinkBundle\Tests\DataProviderFake::getFoobarBaz' |
||
| 40 | ] |
||
| 41 | ) |
||
| 42 | ->willReturn($result = uniqid()); |
||
| 43 | |||
| 44 | $response = $controller->indexAction(); |
||
| 45 | |||
| 46 | static::assertSame($result, $response->getContent()); |
||
| 47 | static::assertSame(200, $response->getStatusCode()); |
||
| 48 | } |
||
| 49 | } |
||
| 50 |