CheckoutControllerTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 12
dl 0
loc 31
rs 10
c 1
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A testUpdateAction() 0 8 1
A testConfirmAction() 0 7 1
A testIndexAction() 0 8 1
1
<?php
2
3
class CheckoutControllerTest extends AimeosTestAbstract
4
{
5
	public function testConfirmAction()
6
	{
7
		View::addLocation( dirname( __DIR__ ) . '/fixtures/views' );
8
9
		$response = $this->action( 'GET', '\Aimeos\Shop\Controller\CheckoutController@confirmAction', ['site' => 'unittest'] );
0 ignored issues
show
Unused Code introduced by
The assignment to $response is dead and can be removed.
Loading history...
10
11
		$this->assertResponseOk();
12
	}
13
14
15
	public function testIndexAction()
16
	{
17
		View::addLocation( dirname( __DIR__ ) . '/fixtures/views' );
18
19
		$response = $this->action( 'GET', '\Aimeos\Shop\Controller\CheckoutController@indexAction', ['site' => 'unittest'] );
20
21
		$this->assertResponseOk();
22
		$this->assertStringContainsString( '<div class="section checkout-standard-address"', $response->getContent() );
23
	}
24
25
26
	public function testUpdateAction()
27
	{
28
		View::addLocation( dirname( __DIR__ ) . '/fixtures/views' );
29
30
		$response = $this->action( 'GET', '\Aimeos\Shop\Controller\CheckoutController@updateAction', ['site' => 'unittest'], ['code' => 'paypalexpress'] );
31
32
		$this->assertResponseOk();
33
		$this->assertEquals( '', $response->getContent() );
34
	}
35
}