AccountTest::testIndexAction()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 6
nc 1
nop 0
dl 0
loc 9
rs 10
c 2
b 0
f 0
1
<?php
2
3
class AccountTest extends \LocalWebTestCase
4
{
5
	public function testIndexAction()
6
	{
7
		$response = $this->call( 'GET', '/unittest/profile' );
8
9
		$this->assertEquals( 200, $response->getStatusCode() );
10
		$this->assertStringContainsString( 'account-profile', (string) $response->getBody() );
11
		$this->assertStringContainsString( 'account-history', (string) $response->getBody() );
12
		$this->assertStringContainsString( 'account-favorite', (string) $response->getBody() );
13
		$this->assertStringContainsString( 'account-watch', (string) $response->getBody() );
14
	}
15
16
17
	public function testIndexActionFavorite()
18
	{
19
		$response = $this->call( 'GET', '/unittest/profile/favorite' );
20
21
		$this->assertEquals( 200, $response->getStatusCode() );
22
		$this->assertStringContainsString( 'account-favorite', (string) $response->getBody() );
23
	}
24
25
26
	public function testIndexActionWatch()
27
	{
28
		$response = $this->call( 'GET', '/unittest/profile/watch' );
29
30
		$this->assertEquals( 200, $response->getStatusCode() );
31
		$this->assertStringContainsString( 'account-watch', (string) $response->getBody() );
32
	}
33
34
35
	public function testDownloadAction()
36
	{
37
		$response = $this->call( 'GET', '/unittest/profile/download/0' );
38
39
		$this->assertEquals( 401, $response->getStatusCode() );
40
	}
41
}
42