~xibo-maintainers/xibo/tempel

« back to all changes in this revision

Viewing changes to tests/integration/DisplayTest.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\Tests\LocalWebTestCase;
10
 
use Xibo\Entity\Display;
11
9
 
12
10
class DisplayTest extends \Xibo\Tests\LocalWebTestCase
13
11
{
14
 
 
15
 
         /**
 
12
        /**
16
13
     * Shows list of all displays Test
17
14
     */
18
 
 
19
15
    public function testListAll()
20
16
    {
21
17
        $this->client->get('/display');
31
27
    /**
32
28
     * Shows specific display test with filters 
33
29
     */
34
 
 
35
 
/*
36
30
    public function testListAll2()
37
31
    {
38
32
        $this->client->get('/display', [
51
45
        $this->assertObjectHasAttribute('data', $object, $this->client->response->body());
52
46
    }
53
47
 
54
 
    */
55
 
 
56
48
    /**
57
 
     *  Delete Display Test
 
49
     * Delete Display Test
 
50
     * @group broken
58
51
     */
59
 
 
60
 
    /*
61
 
 
62
 
        public function testDelete()
 
52
    public function testDelete()
63
53
    {
64
54
        $this->client->delete('/display/' . 5);
65
55
 
66
56
        $this->assertSame(200, $this->client->response->status(), $this->client->response->body());
67
57
    }
68
 
   
69
 
*/
70
58
 
71
 
   /**
72
 
   * Edit Display test
73
 
   */
74
 
/*
75
 
        public function testEdit()
76
 
        {
77
 
             $this->client->put('/display/' . 9, [
 
59
    /**
 
60
     * Edit Display test
 
61
     * @group broken
 
62
     */
 
63
    public function testEdit()
 
64
    {
 
65
         $this->client->put('/display/' . 9, [
78
66
            'display' => 'EVILSHADYPC',
79
 
 //           'description' =>'z64',
 
67
//           'description' =>'z64',
80
68
            'isAuditing' => 0,
81
69
            'defaultLayoutId' => 51,
82
70
            'licensed' => 1,
83
 
 //           'license' => '',
 
71
//           'license' => '',
84
72
            'incSchedule' => 0,
85
73
            'emailAlert' => 0,
86
74
            'alertTimeout' =>0,
95
83
//            'clearCachedData' =>
96
84
        ], ['CONTENT_TYPE' => 'application/x-www-form-urlencoded']);
97
85
 
98
 
            $this->assertSame(200, $this->client->response->status(), 'Not successful: ' . $this->client->response->body());
99
 
 
100
 
            $object = json_decode($this->client->response->body());
101
 
//            fwrite(STDERR, $this->client->response->body());
102
 
        } 
103
 
 
104
 
        */
 
86
        $this->assertSame(200, $this->client->response->status(), 'Not successful: ' . $this->client->response->body());
 
87
 
 
88
        $object = json_decode($this->client->response->body());
 
89
//
 
90
//      fwrite(STDERR, $this->client->response->body());
 
91
    }
105
92
 
106
93
    /**
107
 
    * Request screenshot Test
108
 
    * Will tell if zeroMQ is required
109
 
    */
110
 
/*
 
94
     * Request screenshot Test
 
95
     * Will tell if zeroMQ is required
 
96
     * @group broken
 
97
     */
111
98
    public function testScreenshot()
112
99
    {
113
100
        $this->client->put('/display/requestscreenshot/' . 7);
119
106
 
120
107
    }
121
108
 
122
 
*/
123
109
    /**
124
 
    * Wake On Lan Test
125
 
    */
126
 
/*
 
110
     * Wake On Lan Test
 
111
     * @group broken
 
112
     */
127
113
    public function testWoL()
128
114
    {
129
115
        $this->client->put('/display/wol/' . 7);
133
119
        $object = json_decode($this->client->response->body());
134
120
//        fwrite(STDERR, $this->client->response->body());
135
121
    }
136
 
 
137
 
    */
138
122
}