Passed
Push — master ( f242a8...af9927 )
by Aimeos
04:38
created

AccountControllerTest::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
class AccountControllerTest extends AimeosTestAbstract
4
{
5
	public function testActions()
6
	{
7
		View::addLocation(dirname(__DIR__).'/fixtures/views');
8
9
		$response = $this->action('GET', '\Aimeos\Shop\Controller\AccountController@indexAction', ['site' => 'unittest']);
10
11
		$this->assertResponseOk();
12
		$this->assertContains('<section class="aimeos account-profile"', $response->getContent());
13
		$this->assertContains('<section class="aimeos account-history"', $response->getContent());
14
		$this->assertContains('<section class="aimeos account-favorite"', $response->getContent());
15
		$this->assertContains('<section class="aimeos account-watch"', $response->getContent());
16
	}
17
18
19
	public function testDownload()
20
	{
21
		View::addLocation(dirname(__DIR__).'/fixtures/views');
22
23
		$response = $this->action('GET', '\Aimeos\Shop\Controller\AccountController@downloadAction', ['site' => 'unittest', 'dl_id' => 0]);
24
25
		$this->assertEquals( 401, $response->getStatusCode() );
26
	}
27
}