Passed
Push — master ( 859d6d...626e5a )
by Aimeos
03:35
created
tests/Controller/JqadmControllerTest.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -4,32 +4,32 @@  discard block
 block discarded – undo
4 4
 {
5 5
 	public function testFileActionCss()
6 6
 	{
7
-		View::addLocation(dirname(__DIR__).'/fixtures/views');
7
+		View::addLocation( dirname( __DIR__ ) . '/fixtures/views' );
8 8
 
9
-		$response = $this->action('GET', '\Aimeos\Shop\Controller\JqadmController@fileAction', ['site' => 'unittest', 'type' => 'css']);
9
+		$response = $this->action( 'GET', '\Aimeos\Shop\Controller\JqadmController@fileAction', ['site' => 'unittest', 'type' => 'css'] );
10 10
 
11 11
 		$this->assertResponseOk();
12
-		$this->assertContains('.aimeos', $response->getContent());
12
+		$this->assertContains( '.aimeos', $response->getContent() );
13 13
 	}
14 14
 
15 15
 
16 16
 	public function testFileActionJs()
17 17
 	{
18
-		View::addLocation(dirname(__DIR__).'/fixtures/views');
18
+		View::addLocation( dirname( __DIR__ ) . '/fixtures/views' );
19 19
 
20
-		$response = $this->action('GET', '\Aimeos\Shop\Controller\JqadmController@fileAction', ['site' => 'unittest', 'type' => 'js']);
20
+		$response = $this->action( 'GET', '\Aimeos\Shop\Controller\JqadmController@fileAction', ['site' => 'unittest', 'type' => 'js'] );
21 21
 
22 22
 		$this->assertResponseOk();
23
-		$this->assertContains('Aimeos = {', $response->getContent());
23
+		$this->assertContains( 'Aimeos = {', $response->getContent() );
24 24
 	}
25 25
 
26 26
 
27 27
 	public function testCopyAction()
28 28
 	{
29
-		View::addLocation(dirname(__DIR__).'/fixtures/views');
29
+		View::addLocation( dirname( __DIR__ ) . '/fixtures/views' );
30 30
 
31 31
 		$params = ['site' => 'unittest', 'resource' => 'product', 'id' => '0'];
32
-		$response = $this->action('GET', '\Aimeos\Shop\Controller\JqadmController@copyAction', $params);
32
+		$response = $this->action( 'GET', '\Aimeos\Shop\Controller\JqadmController@copyAction', $params );
33 33
 
34 34
 		$this->assertEquals( 200, $response->getStatusCode() );
35 35
 		$this->assertContains( 'item-product', $response->getContent() );
@@ -38,10 +38,10 @@  discard block
 block discarded – undo
38 38
 
39 39
 	public function testCreateAction()
40 40
 	{
41
-		View::addLocation(dirname(__DIR__).'/fixtures/views');
41
+		View::addLocation( dirname( __DIR__ ) . '/fixtures/views' );
42 42
 
43 43
 		$params = ['site' => 'unittest', 'resource' => 'product'];
44
-		$response = $this->action('GET', '\Aimeos\Shop\Controller\JqadmController@createAction', $params);
44
+		$response = $this->action( 'GET', '\Aimeos\Shop\Controller\JqadmController@createAction', $params );
45 45
 
46 46
 		$this->assertEquals( 200, $response->getStatusCode() );
47 47
 		$this->assertContains( 'item-product', $response->getContent() );
@@ -50,10 +50,10 @@  discard block
 block discarded – undo
50 50
 
51 51
 	public function testDeleteAction()
52 52
 	{
53
-		View::addLocation(dirname(__DIR__).'/fixtures/views');
53
+		View::addLocation( dirname( __DIR__ ) . '/fixtures/views' );
54 54
 
55 55
 		$params = ['site' => 'unittest', 'resource' => 'product', 'id' => '0'];
56
-		$response = $this->action('GET', '\Aimeos\Shop\Controller\JqadmController@deleteAction', $params);
56
+		$response = $this->action( 'GET', '\Aimeos\Shop\Controller\JqadmController@deleteAction', $params );
57 57
 
58 58
 		$this->assertEquals( 302, $response->getStatusCode() );
59 59
 	}
@@ -61,10 +61,10 @@  discard block
 block discarded – undo
61 61
 
62 62
 	public function testExportAction()
63 63
 	{
64
-		View::addLocation(dirname(__DIR__).'/fixtures/views');
64
+		View::addLocation( dirname( __DIR__ ) . '/fixtures/views' );
65 65
 
66 66
 		$params = ['site' => 'unittest', 'resource' => 'order'];
67
-		$response = $this->action('GET', '\Aimeos\Shop\Controller\JqadmController@exportAction', $params);
67
+		$response = $this->action( 'GET', '\Aimeos\Shop\Controller\JqadmController@exportAction', $params );
68 68
 
69 69
 		$this->assertEquals( 200, $response->getStatusCode() );
70 70
 		$this->assertContains( 'list-items', $response->getContent() );
@@ -73,10 +73,10 @@  discard block
 block discarded – undo
73 73
 
74 74
 	public function testGetAction()
75 75
 	{
76
-		View::addLocation(dirname(__DIR__).'/fixtures/views');
76
+		View::addLocation( dirname( __DIR__ ) . '/fixtures/views' );
77 77
 
78 78
 		$params = ['site' => 'unittest', 'resource' => 'product', 'id' => '0'];
79
-		$response = $this->action('GET', '\Aimeos\Shop\Controller\JqadmController@getAction', $params);
79
+		$response = $this->action( 'GET', '\Aimeos\Shop\Controller\JqadmController@getAction', $params );
80 80
 
81 81
 		$this->assertEquals( 200, $response->getStatusCode() );
82 82
 		$this->assertContains( 'item-product', $response->getContent() );
@@ -85,10 +85,10 @@  discard block
 block discarded – undo
85 85
 
86 86
 	public function testSaveAction()
87 87
 	{
88
-		View::addLocation(dirname(__DIR__).'/fixtures/views');
88
+		View::addLocation( dirname( __DIR__ ) . '/fixtures/views' );
89 89
 
90 90
 		$params = ['site' => 'unittest', 'resource' => 'product', 'id' => '0'];
91
-		$response = $this->action('POST', '\Aimeos\Shop\Controller\JqadmController@saveAction', $params);
91
+		$response = $this->action( 'POST', '\Aimeos\Shop\Controller\JqadmController@saveAction', $params );
92 92
 
93 93
 		$this->assertEquals( 200, $response->getStatusCode() );
94 94
 		$this->assertContains( 'item-product', $response->getContent() );
@@ -97,10 +97,10 @@  discard block
 block discarded – undo
97 97
 
98 98
 	public function testSearchAction()
99 99
 	{
100
-		View::addLocation(dirname(__DIR__).'/fixtures/views');
100
+		View::addLocation( dirname( __DIR__ ) . '/fixtures/views' );
101 101
 
102 102
 		$params = ['site' => 'unittest', 'resource' => 'product'];
103
-		$response = $this->action('GET', '\Aimeos\Shop\Controller\JqadmController@searchAction', $params);
103
+		$response = $this->action( 'GET', '\Aimeos\Shop\Controller\JqadmController@searchAction', $params );
104 104
 
105 105
 		$this->assertEquals( 200, $response->getStatusCode() );
106 106
 		$this->assertContains( 'list-items', $response->getContent() );
@@ -109,10 +109,10 @@  discard block
 block discarded – undo
109 109
 
110 110
 	public function testSearchActionSite()
111 111
 	{
112
-		View::addLocation(dirname(__DIR__).'/fixtures/views');
112
+		View::addLocation( dirname( __DIR__ ) . '/fixtures/views' );
113 113
 
114 114
 		$params = ['site' => 'invalid', 'resource' => 'product'];
115
-		$response = $this->action('GET', '\Aimeos\Shop\Controller\JqadmController@searchAction', $params);
115
+		$response = $this->action( 'GET', '\Aimeos\Shop\Controller\JqadmController@searchAction', $params );
116 116
 
117 117
 		$this->assertEquals( 500, $response->getStatusCode() );
118 118
 	}
Please login to merge, or discard this patch.