Passed
Push — master ( 3c32e6...6d1be7 )
by Adam
02:49
created

LiveDevTest::testLiveDevEnable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 0
dl 0
loc 12
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace AcquiaCloudApi\Tests\Endpoints;
4
5
use AcquiaCloudApi\Tests\CloudApiTestCase;
6
use AcquiaCloudApi\Endpoints\Environments;
7
8
class LiveDevTest extends CloudApiTestCase
9
{
10
11
    public function testLiveDevEnable()
12
    {
13
        $response = $this->getPsr7JsonResponseForFixture('Endpoints/Environments/enableLiveDev.json');
14
        $client = $this->getMockClient($response);
15
16
        /** @var \AcquiaCloudApi\CloudApi\ClientInterface $client */
17
        $environment = new Environments($client);
18
        $result = $environment->enableLiveDev('14-0c7e79ab-1c4a-424e-8446-76ae8be7e851');
19
20
        $this->assertInstanceOf('\AcquiaCloudApi\Response\OperationResponse', $result);
21
22
        $this->assertEquals('Live Dev is being enabled.', $result->message);
23
    }
24
25
    public function testLiveDevDisable()
26
    {
27
        $response = $this->getPsr7JsonResponseForFixture('Endpoints/Environments/disableLiveDev.json');
28
        $client = $this->getMockClient($response);
29
30
        /** @var \AcquiaCloudApi\CloudApi\ClientInterface $client */
31
        $environment = new Environments($client);
32
        $result = $environment->disableLiveDev('14-0c7e79ab-1c4a-424e-8446-76ae8be7e851');
33
34
        $this->assertInstanceOf('\AcquiaCloudApi\Response\OperationResponse', $result);
35
36
        $this->assertEquals('Live Dev is being disabled.', $result->message);
37
    }
38
}
39