AccountControllerTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 8
dl 0
loc 20
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testActions() 0 8 1
A testDownload() 0 7 1
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->assertStringContainsString( '<div class="section aimeos account-profile"', $response->getContent() );
13
	}
14
15
16
	public function testDownload()
17
	{
18
		View::addLocation( dirname( __DIR__ ) . '/fixtures/views' );
19
20
		$response = $this->action( 'GET', '\Aimeos\Shop\Controller\AccountController@downloadAction', ['site' => 'unittest', 'dl_id' => 0] );
21
22
		$this->assertEquals( 401, $response->getStatusCode() );
23
	}
24
}