@@ 43-54 (lines=12) @@ | ||
40 | } |
|
41 | ||
42 | ||
43 | public function testFile() |
|
44 | { |
|
45 | $client = static::createClient(array(), array( |
|
46 | 'PHP_AUTH_USER' => 'admin', |
|
47 | 'PHP_AUTH_PW' => 'adminpass', |
|
48 | ) ); |
|
49 | ||
50 | $client->request( 'GET', '/unittest/extadm/file' ); |
|
51 | ||
52 | $this->assertEquals( 200, $client->getResponse()->getStatusCode() ); |
|
53 | $this->assertContains( 'EXTUTIL', $client->getResponse()->getContent() ); |
|
54 | } |
|
55 | } |
|
56 |
@@ 10-22 (lines=13) @@ | ||
7 | ||
8 | class JqadmControllerTest extends WebTestCase |
|
9 | { |
|
10 | public function testCopyAction() |
|
11 | { |
|
12 | $client = static::createClient(array(), array( |
|
13 | 'PHP_AUTH_USER' => 'admin', |
|
14 | 'PHP_AUTH_PW' => 'adminpass', |
|
15 | ) ); |
|
16 | ||
17 | $client->request( 'GET', '/unittest/jqadm/copy/product/0' ); |
|
18 | $response = $client->getResponse(); |
|
19 | ||
20 | $this->assertEquals( 200, $response->getStatusCode() ); |
|
21 | $this->assertContains( '<div class="product-item', $response->getContent() ); |
|
22 | } |
|
23 | ||
24 | ||
25 | public function testCreateAction() |
|
@@ 25-37 (lines=13) @@ | ||
22 | } |
|
23 | ||
24 | ||
25 | public function testCreateAction() |
|
26 | { |
|
27 | $client = static::createClient(array(), array( |
|
28 | 'PHP_AUTH_USER' => 'admin', |
|
29 | 'PHP_AUTH_PW' => 'adminpass', |
|
30 | ) ); |
|
31 | ||
32 | $client->request( 'GET', '/unittest/jqadm/create/product' ); |
|
33 | $response = $client->getResponse(); |
|
34 | ||
35 | $this->assertEquals( 200, $response->getStatusCode() ); |
|
36 | $this->assertContains( '<div class="product-item', $response->getContent() ); |
|
37 | } |
|
38 | ||
39 | ||
40 | public function testDeleteAction() |
|
@@ 40-52 (lines=13) @@ | ||
37 | } |
|
38 | ||
39 | ||
40 | public function testDeleteAction() |
|
41 | { |
|
42 | $client = static::createClient(array(), array( |
|
43 | 'PHP_AUTH_USER' => 'admin', |
|
44 | 'PHP_AUTH_PW' => 'adminpass', |
|
45 | ) ); |
|
46 | ||
47 | $client->request( 'GET', '/unittest/jqadm/delete/product/0' ); |
|
48 | $response = $client->getResponse(); |
|
49 | ||
50 | $this->assertEquals( 200, $response->getStatusCode() ); |
|
51 | $this->assertContains( '<table class="list-items', $response->getContent() ); |
|
52 | } |
|
53 | ||
54 | ||
55 | public function testGetAction() |
|
@@ 55-67 (lines=13) @@ | ||
52 | } |
|
53 | ||
54 | ||
55 | public function testGetAction() |
|
56 | { |
|
57 | $client = static::createClient(array(), array( |
|
58 | 'PHP_AUTH_USER' => 'admin', |
|
59 | 'PHP_AUTH_PW' => 'adminpass', |
|
60 | ) ); |
|
61 | ||
62 | $client->request( 'GET', '/unittest/jqadm/get/product/0' ); |
|
63 | $response = $client->getResponse(); |
|
64 | ||
65 | $this->assertEquals( 200, $response->getStatusCode() ); |
|
66 | $this->assertContains( '<div class="product-item', $response->getContent() ); |
|
67 | } |
|
68 | ||
69 | ||
70 | public function testSaveAction() |
|
@@ 70-82 (lines=13) @@ | ||
67 | } |
|
68 | ||
69 | ||
70 | public function testSaveAction() |
|
71 | { |
|
72 | $client = static::createClient(array(), array( |
|
73 | 'PHP_AUTH_USER' => 'admin', |
|
74 | 'PHP_AUTH_PW' => 'adminpass', |
|
75 | ) ); |
|
76 | ||
77 | $client->request( 'POST', '/unittest/jqadm/save/product/0' ); |
|
78 | $response = $client->getResponse(); |
|
79 | ||
80 | $this->assertEquals( 200, $response->getStatusCode() ); |
|
81 | $this->assertContains( '<div class="product-item', $response->getContent() ); |
|
82 | } |
|
83 | ||
84 | ||
85 | public function testSearchAction() |
|
@@ 85-97 (lines=13) @@ | ||
82 | } |
|
83 | ||
84 | ||
85 | public function testSearchAction() |
|
86 | { |
|
87 | $client = static::createClient(array(), array( |
|
88 | 'PHP_AUTH_USER' => 'admin', |
|
89 | 'PHP_AUTH_PW' => 'adminpass', |
|
90 | ) ); |
|
91 | ||
92 | $client->request( 'GET', '/unittest/jqadm/search/product' ); |
|
93 | $response = $client->getResponse(); |
|
94 | ||
95 | $this->assertEquals( 200, $response->getStatusCode() ); |
|
96 | $this->assertContains( '<table class="list-items', $response->getContent() ); |
|
97 | } |
|
98 | ||
99 | ||
100 | public function testSearchActionSite() |
|
@@ 100-112 (lines=13) @@ | ||
97 | } |
|
98 | ||
99 | ||
100 | public function testSearchActionSite() |
|
101 | { |
|
102 | $client = static::createClient(array(), array( |
|
103 | 'PHP_AUTH_USER' => 'admin', |
|
104 | 'PHP_AUTH_PW' => 'adminpass', |
|
105 | ) ); |
|
106 | ||
107 | $client->request( 'GET', '/invalid/jqadm/search/product' ); |
|
108 | $response = $client->getResponse(); |
|
109 | ||
110 | $this->assertEquals( 200, $response->getStatusCode() ); |
|
111 | $this->assertContains( '<table class="list-items', $response->getContent() ); |
|
112 | } |
|
113 | } |
|
114 |