1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
class JqadmControllerTest extends \LocalWebTestCase |
4
|
|
|
{ |
5
|
|
|
public function testFileActionCss() |
6
|
|
|
{ |
7
|
|
|
$response = $this->call( 'GET', '/unittest/admin/jqadm/file/css' ); |
8
|
|
|
|
9
|
|
|
$this->assertEquals( 200, $response->getStatusCode() ); |
10
|
|
|
$this->assertContains( '.aimeos', (string) $response->getBody() ); |
11
|
|
|
} |
12
|
|
|
|
13
|
|
|
|
14
|
|
|
public function testFileActionJs() |
15
|
|
|
{ |
16
|
|
|
$response = $this->call( 'GET', '/unittest/admin/jqadm/file/js' ); |
17
|
|
|
|
18
|
|
|
$this->assertEquals( 200, $response->getStatusCode() ); |
19
|
|
|
$this->assertContains( 'Aimeos = {', (string) $response->getBody() ); |
20
|
|
|
} |
21
|
|
|
|
22
|
|
|
|
23
|
|
|
public function testCopyAction() |
24
|
|
|
{ |
25
|
|
|
$response = $this->call( 'GET', '/unittest/admin/jqadm/copy/product/0' ); |
26
|
|
|
|
27
|
|
|
$this->assertEquals( 200, $response->getStatusCode() ); |
28
|
|
|
$this->assertContains( 'item-product', (string) $response->getBody() ); |
29
|
|
|
} |
30
|
|
|
|
31
|
|
|
|
32
|
|
|
public function testCreateAction() |
33
|
|
|
{ |
34
|
|
|
$response = $this->call( 'GET', '/unittest/admin/jqadm/create/product' ); |
35
|
|
|
|
36
|
|
|
$this->assertEquals( 200, $response->getStatusCode() ); |
37
|
|
|
$this->assertContains( 'item-product', (string) $response->getBody() ); |
38
|
|
|
} |
39
|
|
|
|
40
|
|
|
|
41
|
|
|
public function testDeleteAction() |
42
|
|
|
{ |
43
|
|
|
$response = $this->call( 'GET', '/unittest/admin/jqadm/delete/product/0' ); |
44
|
|
|
|
45
|
|
|
$this->assertEquals( 200, $response->getStatusCode() ); |
46
|
|
|
$this->assertContains( 'list-items', (string) $response->getBody() ); |
47
|
|
|
} |
48
|
|
|
|
49
|
|
|
|
50
|
|
|
public function testExportAction() |
51
|
|
|
{ |
52
|
|
|
$response = $this->call( 'GET', '/unittest/admin/jqadm/export/order' ); |
53
|
|
|
|
54
|
|
|
$this->assertEquals( 200, $response->getStatusCode() ); |
55
|
|
|
$this->assertContains( 'list-items', (string) $response->getBody() ); |
56
|
|
|
} |
57
|
|
|
|
58
|
|
|
|
59
|
|
|
public function testGetAction() |
60
|
|
|
{ |
61
|
|
|
$response = $this->call( 'GET', '/unittest/admin/jqadm/get/product/0' ); |
62
|
|
|
|
63
|
|
|
$this->assertEquals( 200, $response->getStatusCode() ); |
64
|
|
|
$this->assertContains( 'item-product', (string) $response->getBody() ); |
65
|
|
|
} |
66
|
|
|
|
67
|
|
|
|
68
|
|
|
public function testSaveAction() |
69
|
|
|
{ |
70
|
|
|
$response = $this->call( 'POST', '/unittest/admin/jqadm/save/product/0' ); |
71
|
|
|
|
72
|
|
|
$this->assertEquals( 200, $response->getStatusCode() ); |
73
|
|
|
$this->assertContains( 'item-product', (string) $response->getBody() ); |
74
|
|
|
} |
75
|
|
|
|
76
|
|
|
|
77
|
|
|
public function testSearchAction() |
78
|
|
|
{ |
79
|
|
|
$response = $this->call( 'GET', '/unittest/admin/jqadm/search/product' ); |
80
|
|
|
|
81
|
|
|
$this->assertEquals( 200, $response->getStatusCode() ); |
82
|
|
|
$this->assertContains( 'list-items', (string) $response->getBody() ); |
83
|
|
|
} |
84
|
|
|
} |
85
|
|
|
|