Typo3Test::testRender()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 8
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 12
rs 10
1
<?php
2
3
/**
4
 * @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2017-2018
6
 */
7
8
namespace Aimeos\MW\View\Engine;
9
10
11
class Typo3Test extends \PHPUnit\Framework\TestCase
0 ignored issues
show
Bug introduced by
The type PHPUnit\Framework\TestCase was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
12
{
13
	private $object;
14
	private $mock;
15
16
17
	protected function setUp()
18
	{
19
		$this->mock = $this->getMockBuilder( \Neos\FluidAdaptor\View\StandaloneView::class )
20
			->setMethods( array( 'assign', 'assignMultiple', 'render', 'setTemplatePathAndFilename' ) )
21
			->disableOriginalConstructor()
22
			->getMock();
23
24
		$this->object = new \Aimeos\MW\View\Engine\Flow( $this->mock );
25
	}
26
27
28
	protected function tearDown()
29
	{
30
		unset( $this->object, $this->mock );
31
	}
32
33
34
	public function testRender()
35
	{
36
		$v = new \Aimeos\MW\View\Standard( [] );
37
38
		$this->mock->expects( $this->once() )->method( 'setTemplatePathAndFilename' );
39
		$this->mock->expects( $this->once() )->method( 'assignMultiple' );
40
		$this->mock->expects( $this->once() )->method( 'assign' );
41
		$this->mock->expects( $this->once() )->method( 'render' )
42
			->will( $this->returnValue( 'test' ) );
43
44
		$result = $this->object->render( $v, 'filepath', array( 'key' => 'value' ) );
45
		$this->assertEquals( 'test', $result );
46
	}
47
}
48