~xibo-maintainers/xibo/tempel

« back to all changes in this revision

Viewing changes to tests/integration/DisplayProfileTest.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:
7
7
 
8
8
namespace Xibo\Tests\Integration;
9
9
//use Xibo\Entity\DisplayProfile;
10
 
use Xibo\Entity\Display;
11
 
use Xibo\Tests\LocalWebTestCase;
12
10
use Xibo\Helper\Random;
13
11
 
14
12
 
15
13
class DisplayProfileTest extends \Xibo\Tests\LocalWebTestCase
16
14
{
17
15
 
18
 
         /**
 
16
    /**
19
17
     * Shows all display pofiles
20
18
     */
21
 
    
22
19
    public function testListAll()
23
20
    {
24
21
        $this->client->get('/displayprofile');
32
29
        $this->assertObjectHasAttribute('data', $object, $this->client->response->body());
33
30
    }
34
31
 
35
 
     /**
 
32
    /**
36
33
     * Shows specific display pofiles
37
34
     */
38
 
 
39
35
    public function testListAll2()
40
36
    {
41
37
        $this->client->get('/displayprofile' , [
57
53
    /**
58
54
     *  Add new profile test
59
55
     */
60
 
 
61
 
        public function testAdd()
 
56
    public function testAdd()
62
57
    {
63
 
 
64
58
        $name = Random::generateString(8, 'phpunit');
65
59
 
66
60
        $response = $this->client->post('/displayprofile', [
83
77
    }
84
78
 
85
79
        /**
86
 
        * Edit profile Test
87
 
        * @depends testAdd
88
 
        */
89
 
 
90
 
        public function testEdit($displayProfileId)
 
80
         * Edit profile Test
 
81
         * @depends testAdd
 
82
     * @group broken
 
83
         */
 
84
    public function testEdit($displayProfileId)
91
85
    {
92
 
 
93
86
        $displayProfile = $this->container->displayProfileFactory->getById($displayProfileId);
94
87
                $name = Random::generateString(8, 'phpunit');
95
88
 
118
111
 
119
112
    /**
120
113
        * Edit specific profile Test
 
114
     * @group broken
121
115
        */
122
 
/*
123
 
        public function testEdit2()
 
116
    public function testEdit2()
124
117
    {
125
118
        $displayProfileId = 23;
126
119
        $displayProfile = $this->container->displayProfileFactory->getById($displayProfileId);
127
 
 
128
120
                
129
121
//              $name = Random::generateString(8, 'phpunit');
130
122
 
141
133
 
142
134
        $this->assertObjectHasAttribute('data', $object);
143
135
    }
144
 
*/
 
136
 
145
137
    /**
146
 
     *  delete added profile test
 
138
     * Delete added profile test
147
139
     * @depends testAdd
148
140
     */
149
 
 
150
 
        public function testDelete($displayProfileId)
 
141
    public function testDelete($displayProfileId)
151
142
    {
152
143
        $this->client->delete('/displayprofile/' . $displayProfileId);
153
144
 
156
147
 
157
148
 
158
149
    /**
159
 
     *  Delete specific profile
 
150
     * Delete specific profile
 
151
     * @group broken
160
152
     */
161
 
 
162
 
/*
163
 
        public function testDelete2()
 
153
    public function testDelete2()
164
154
    {
165
155
        $this->client->delete('/displayprofile/' . 4);
166
156
 
167
157
        $this->assertSame(200, $this->client->response->status(), $this->client->response->body());
168
158
    }
169
 
*/
170
159
}
 
 
b'\\ No newline at end of file'