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

CheckoutControllerTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 3
eloc 13
c 3
b 0
f 0
dl 0
loc 32
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A testUpdateAction() 0 8 1
A testConfirmAction() 0 8 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']);
10
11
		$this->assertResponseOk();
12
		$this->assertContains('<section class="aimeos checkout-confirm"', $response->getContent());
13
	}
14
15
16
	public function testIndexAction()
17
	{
18
		View::addLocation(dirname(__DIR__).'/fixtures/views');
19
20
		$response = $this->action('GET', '\Aimeos\Shop\Controller\CheckoutController@indexAction', ['site' => 'unittest']);
21
22
		$this->assertResponseOk();
23
		$this->assertContains('<section class="checkout-standard-address"', $response->getContent());
24
	}
25
26
27
	public function testUpdateAction()
28
	{
29
		View::addLocation(dirname(__DIR__).'/fixtures/views');
30
31
		$response = $this->action('GET', '\Aimeos\Shop\Controller\CheckoutController@updateAction', ['site' => 'unittest'], ['code' => 'paypalexpress']);
32
33
		$this->assertResponseOk();
34
		$this->assertEquals('', $response->getContent());
35
	}
36
}