~xibo-maintainers/xibo/tempel

« back to all changes in this revision

Viewing changes to tests/integration/CommandTest.php

  • Committer: Dan Garner
  • Date: 2016-04-28 13:57:49 UTC
  • mfrom: (494.1.28)
  • Revision ID: git-v1:1d7f53c2f62d46799f33b7356d8f45ff10668e26
Merge pull request #167 from dasgarner/feature/test-suite

Feature/test suite

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 */
7
7
 
8
8
namespace Xibo\Tests\Integration;
9
 
use Xibo\Entity\Command;
10
 
use Xibo\Tests\LocalWebTestCase;
11
9
 
12
10
 
13
11
class CommandTest extends \Xibo\Tests\LocalWebTestCase
14
12
{
15
13
 
16
 
         /**
 
14
        /**
17
15
     * Shows this user commands
18
16
     */
19
 
 
20
17
    public function testListAll()
21
18
    {
22
19
        $this->client->get('/command');
32
29
 
33
30
    /**
34
31
     * Shows this user commands with filters
 
32
     * @group broken
35
33
     */
36
 
/*
37
34
    public function testListAll2()
38
35
    {
39
36
        $this->client->get('/command', [
49
46
    //    fwrite(STDERR, $this->client->response->body());
50
47
 
51
48
        $this->assertObjectHasAttribute('data', $object, $this->client->response->body());
52
 
      
53
49
    }
54
 
*/
55
50
 
56
 
     /**
 
51
    /**
57
52
     * Add command test
 
53
     * @group broken
58
54
     */
59
 
/*
60
55
    public function testAdd()
61
56
    {
62
57
        $this->client->post('/command', [
76
71
 
77
72
        return $object->id;
78
73
    }
79
 
*/
 
74
 
80
75
    /**
81
76
     * Edit command test
82
 
     * depends testAdd
 
77
     * @depends testAdd
 
78
     * @group broken
83
79
     */
84
 
/*
85
80
    public function testEdit($commandId)
86
81
    {
87
 
 
88
82
        $command = $this->container->displayProfileFactory->getByCommandId($commandId);
89
83
 
90
84
        $this->client->put('/command/' . $commandId, [
103
97
 
104
98
        return $commandId;
105
99
    }
106
 
*/
 
100
 
107
101
    /**
108
102
     * Delete Added command
109
 
     * depends testEdit
 
103
     * @depends testEdit
 
104
     * @group broken
110
105
     */
111
 
/*
112
106
    public function testDelete($commandId)
113
107
    {
114
108
        $this->client->delete('/command/' . $commandId);
116
110
        $this->assertSame(200, $this->client->response->status(), $this->client->response->body());
117
111
    }
118
112
 
119
 
*/
120
113
    /**
121
114
     * Delete specific command
 
115
     * @group broken
122
116
     */
123
 
 
124
 
/*
125
117
    public function testDelete2()
126
118
    {
127
119
        $this->client->delete('/command/' . 5);
128
120
 
129
121
        $this->assertSame(200, $this->client->response->status(), $this->client->response->body());
130
122
    }
131
 
*/
132
123
}