Completed
Push — master ( 9e2bba...f5d287 )
by Aimeos
01:55
created

JqadmControllerTest::testFileActionCss()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
3
namespace Aimeos\Shop\Tests\Functional\Controller;
4
5
6
class JqadmControllerTest extends \TYPO3\Flow\Tests\FunctionalTestCase
7
{
8
	public function testFileActionCss()
9
	{
10
		$response = $this->browser->request( 'http://localhost/unittest/jqadm/file/css', 'GET' );
11
12
		$this->assertEquals( 200, $response->getStatusCode() );
13
		$this->assertContains( '.aimeos', $response->getContent() );
14
	}
15
16
17
	public function testFileActionJs()
18
	{
19
		$response = $this->browser->request( 'http://localhost/unittest/jqadm/file/js', 'GET' );
20
21
		$this->assertEquals( 200, $response->getStatusCode() );
22
		$this->assertContains( 'Aimeos = {', $response->getContent() );
23
	}
24
25
26
	public function testCopyAction()
27
	{
28
		$response = $this->browser->request( 'http://localhost/unittest/jqadm/copy/product/0', 'GET' );
29
30
		$this->assertEquals( 200, $response->getStatusCode() );
31
		$this->assertContains( '<div class="product-item', $response->getContent() );
32
	}
33
34
35
	public function testCreateAction()
36
	{
37
		$response = $this->browser->request( 'http://localhost/unittest/jqadm/create/product', 'GET' );
38
39
		$this->assertEquals( 200, $response->getStatusCode() );
40
		$this->assertContains( '<div class="product-item', $response->getContent() );
41
	}
42
43
44
	public function testDeleteAction()
45
	{
46
		$response = $this->browser->request( 'http://localhost/unittest/jqadm/delete/product/0', 'GET' );
47
48
		$this->assertEquals( 200, $response->getStatusCode() );
49
		$this->assertContains( '<table class="list-items', $response->getContent() );
50
	}
51
52
53
	public function testGetAction()
54
	{
55
		$response = $this->browser->request( 'http://localhost/unittest/jqadm/get/product/0', 'GET' );
56
57
		$this->assertEquals( 200, $response->getStatusCode() );
58
		$this->assertContains( '<div class="product-item', $response->getContent() );
59
	}
60
61
62
	public function testSaveAction()
63
	{
64
		$response = $this->browser->request( 'http://localhost/unittest/jqadm/save/product/0', 'POST' );
65
66
		$this->assertEquals( 200, $response->getStatusCode() );
67
		$this->assertContains( '<div class="product-item', $response->getContent() );
68
	}
69
70
71
	public function testSearchAction()
72
	{
73
		$response = $this->browser->request( 'http://localhost/unittest/jqadm/search/product', 'GET' );
74
75
		$this->assertEquals( 200, $response->getStatusCode() );
76
		$this->assertContains( '<table class="list-items', $response->getContent() );
77
	}
78
79
80
	public function testSearchActionSite()
81
	{
82
		$response = $this->browser->request( 'http://localhost/invalid/jqadm/search/product', 'GET' );
83
84
		$this->assertEquals( 200, $response->getStatusCode() );
85
		$this->assertContains( '<table class="list-items', $response->getContent() );
86
	}
87
}
88