Completed
Push — master ( 1a27eb...ec4895 )
by Aimeos
08:55
created

AdminControllerTest::setLocaleException()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 33
Code Lines 20

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 33
rs 8.8571
cc 1
eloc 20
nc 1
nop 0
1
<?php
2
3
4
namespace Aimeos\Shop\Tests\Unit\Controller;
5
6
7
class AdminControllerTest extends \TYPO3\Flow\Tests\UnitTestCase
8
{
9
	private $object;
10
	private $request;
11
	private $view;
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( '\TYPO3\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
}