Issues (43)

Tests/Unit/Controller/AdminControllerTest.php (2 issues)

Labels
1
<?php
2
3
4
namespace Aimeos\Shop\Tests\Unit\Controller;
5
6
7
class AdminControllerTest extends \Neos\Flow\Tests\UnitTestCase
0 ignored issues
show
The type Neos\Flow\Tests\UnitTestCase 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...
8
{
9
	private $object;
10
	private $request;
11
	private $view;
0 ignored issues
show
The private property $view is not used, and could be removed.
Loading history...
12
13
14
	public function setUp()
15
	{
16
		$this->object = $this->getMockBuilder( '\Aimeos\Shop\Controller\AdminController' )
17
			->setMethods( array( 'forward' ) )
18
			->disableOriginalConstructor()
19
			->getMock();
20
21
		$this->request = $this->getMockBuilder( '\Neos\Flow\Mvc\ActionRequest' )
22
			->setMethods( array( 'getArgument', 'hasArgument' ) )
23
			->disableOriginalConstructor()
24
			->getMock();
25
26
		$this->inject( $this->object, 'request', $this->request );
27
	}
28
29
30
	/**
31
	 * @test
32
	 */
33
	public function indexAction()
34
	{
35
		$this->request->expects( $this->once() )->method( 'hasArgument' );
36
		$this->object->expects( $this->once() )->method( 'forward' );
37
38
		$this->object->indexAction();
39
	}
40
}