Issues (68)

tests/unit/ConnectionTest.php (2 issues)

1
<?php
2
/**
3
 * ActiveRecord for API
4
 *
5
 * @link      https://github.com/hiqdev/yii2-hiart
6
 * @package   yii2-hiart
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2015-2019, 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
0 ignored issues
show
The type PHPUnit\Framework\TestCase was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
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();
0 ignored issues
show
Bug Best Practice introduced by
The property db does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
27
    }
28
29
    protected function tearDown()
30
    {
31
    }
32
33
    public function testShortBaseUri()
34
    {
35
        $this->db->baseUri = $this->shortUri;
36
        $this->assertSame($this->fixedUri, $this->db->getBaseUri());
37
    }
38
39
    public function testFixedBaseUri()
40
    {
41
        $this->db->baseUri = $this->fixedUri;
42
        $this->assertSame($this->fixedUri, $this->db->getBaseUri());
43
    }
44
}
45