UnitTestCase::loadFixtures()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Linio\Test;
6
7
use Nelmio\Alice\Fixtures\Loader;
8
9
abstract class UnitTestCase extends \PHPUnit_Framework_TestCase
10
{
11
    /**
12
     * @var array
13
     */
14
    protected $fixtures = [];
15
16
    public function loadFixtures($file)
17
    {
18
        $loader = new Loader();
19
        $this->fixtures = $loader->load($file);
20
    }
21
22
    public function getMockForPdo($mockedMethods = [])
23
    {
24
        return $this->getMock('Linio\Test\PDOMock', $mockedMethods);
0 ignored issues
show
Deprecated Code introduced by
The method PHPUnit_Framework_TestCase::getMock() has been deprecated with message: Method deprecated since Release 5.4.0; use createMock() or getMockBuilder() instead

This method has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.

Loading history...
25
    }
26
}
27
28
class PDOMock extends \PDO
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class should be in its own file to aid autoloaders.

Having each class in a dedicated file usually plays nice with PSR autoloaders and is therefore a well established practice. If you use other autoloaders, you might not want to follow this rule.

Loading history...
29
{
30
    public function __construct()
31
    {
32
    }
33
}
34