|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Aimeos\Shop\Tests\Functional\Controller; |
|
4
|
|
|
|
|
5
|
|
|
|
|
6
|
|
|
class JqadmControllerTest extends \Neos\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( 'item-product', $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( 'item-product', $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( 'list-items', $response->getContent() ); |
|
50
|
|
|
} |
|
51
|
|
|
|
|
52
|
|
|
|
|
53
|
|
|
public function testExportAction() |
|
54
|
|
|
{ |
|
55
|
|
|
$response = $this->browser->request( 'http://localhost/unittest/jqadm/export/order', 'GET' ); |
|
56
|
|
|
|
|
57
|
|
|
$this->assertEquals( 200, $response->getStatusCode() ); |
|
58
|
|
|
$this->assertContains( 'list-items', $response->getContent() ); |
|
59
|
|
|
} |
|
60
|
|
|
|
|
61
|
|
|
|
|
62
|
|
|
public function testGetAction() |
|
63
|
|
|
{ |
|
64
|
|
|
$response = $this->browser->request( 'http://localhost/unittest/jqadm/get/product/0', 'GET' ); |
|
65
|
|
|
|
|
66
|
|
|
$this->assertEquals( 200, $response->getStatusCode() ); |
|
67
|
|
|
$this->assertContains( 'item-product', $response->getContent() ); |
|
68
|
|
|
} |
|
69
|
|
|
|
|
70
|
|
|
|
|
71
|
|
|
public function testSaveAction() |
|
72
|
|
|
{ |
|
73
|
|
|
$response = $this->browser->request( 'http://localhost/unittest/jqadm/save/product/0', 'POST' ); |
|
74
|
|
|
|
|
75
|
|
|
$this->assertEquals( 200, $response->getStatusCode() ); |
|
76
|
|
|
$this->assertContains( 'item-product', $response->getContent() ); |
|
77
|
|
|
} |
|
78
|
|
|
|
|
79
|
|
|
|
|
80
|
|
|
public function testSearchAction() |
|
81
|
|
|
{ |
|
82
|
|
|
$response = $this->browser->request( 'http://localhost/unittest/jqadm/search/product', 'GET' ); |
|
83
|
|
|
|
|
84
|
|
|
$this->assertEquals( 200, $response->getStatusCode() ); |
|
85
|
|
|
$this->assertContains( 'list-items', $response->getContent() ); |
|
86
|
|
|
} |
|
87
|
|
|
|
|
88
|
|
|
|
|
89
|
|
|
public function testSearchActionSite() |
|
90
|
|
|
{ |
|
91
|
|
|
$response = $this->browser->request( 'http://localhost/invalid/jqadm/search/product', 'GET' ); |
|
92
|
|
|
|
|
93
|
|
|
$this->assertEquals( 500, $response->getStatusCode() ); |
|
94
|
|
|
} |
|
95
|
|
|
} |
|
96
|
|
|
|