| Conditions | 2 |
| Paths | 2 |
| Total Lines | 20 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | public function testRender() |
||
| 14 | { |
||
| 15 | if( !class_exists( '\TYPO3\CMS\Fluid\View\StandaloneView' ) ) { |
||
| 16 | $this->markTestSkipped( '\TYPO3\CMS\Fluid\View\StandaloneView not available' ); |
||
| 17 | } |
||
| 18 | |||
| 19 | $view = $this->getMockBuilder( '\TYPO3\CMS\Fluid\View\StandaloneView' ) |
||
| 20 | ->onlyMethods( ['assign', 'assignMultiple', 'render', 'setTemplatePathAndFilename', 'setPartialRootPaths', 'setLayoutRootPaths'] ) |
||
| 21 | ->disableOriginalConstructor() |
||
| 22 | ->getMock(); |
||
| 23 | |||
| 24 | $view->expects( $this->once() )->method( 'setTemplatePathAndFilename' ); |
||
| 25 | $view->expects( $this->once() )->method( 'assignMultiple' ); |
||
| 26 | $view->expects( $this->once() )->method( 'assign' ); |
||
| 27 | $view->expects( $this->once() )->method( 'render' )->willReturn( 'test' ); |
||
| 28 | |||
| 29 | $object = new \Aimeos\Base\View\Engine\Typo3( $view ); |
||
| 30 | $v = new \Aimeos\Base\View\Standard( [] ); |
||
| 31 | |||
| 32 | $this->assertEquals( 'test', $object->render( $v, 'filepath', ['key' => 'value'] ) ); |
||
| 33 | } |
||
| 35 |