Completed
Push — master ( 6dd6b9...53a464 )
by Andrii
12:52
created

ConnectionTest::tearDown()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
c 2
b 1
f 0
dl 0
loc 3
rs 10
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
/**
3
 * Tools to use API as ActiveRecord for Yii2
4
 *
5
 * @link      https://github.com/hiqdev/yii2-hiart
6
 * @package   yii2-hiart
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hiqdev\hiart\tests\unit;
12
13
use hiqdev\hiart\rest\Connection;
14
15
/**
16
 * Connection test class.
17
 */
18
class ConnectionTest extends \PHPUnit_Framework_TestCase
19
{
20
    protected $shortUri = 'http://api.dev';
21
22
    protected $fixedUri = 'http://api.dev/';
23
24
    protected function setUp()
25
    {
26
        $this->db = new Connection();
27
    }
28
29
    protected function tearDown()
30
    {
31
    }
32
33
    public function testGetBaseUri()
34
    {
35
        $this->db->baseUri = $this->shortUri;
36
        $this->assertSame($this->fixedUri, $this->db->getBaseUri());
37
        $this->db->baseUri = $this->fixedUri;
38
        $this->assertSame($this->fixedUri, $this->db->getBaseUri());
39
    }
40
}
41