Passed
Push — master ( 6fbfce...cca126 )
by Simon
01:26
created

GoogleClientServiceTest::testException()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
class GoogleClientServiceTest extends SapphireTest
4
{
5
    /**
6
     * We want this process to be run in a separate process
7
     * for constant definition reasons
8
     * @var bool
9
     */
10
    protected $runTestInSeparateProcess = true;
11
    protected $preserveGlobalState = false;
12
13
14
    /**
15
     * @expectedException LogicException
16
     */
17
    public function testException()
18
    {
19
        new GoogleClientService();
20
    }
21
22
    /**
23
     * Validate it's constructed
24
     */
25
    public function testCreation()
26
    {
27
        define('SS_ANALYTICS_KEY', 'google-api/tests/fixtures/test.json');
28
        $client = new GoogleClientService();
29
        $this->assertInstanceOf(Google_Client::class, $client->getClient());
30
    }
31
}
32