| Total Complexity | 5 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 6 | class StandardTest extends \PHPUnit\Framework\TestCase |
||
| 7 | { |
||
| 8 | public function testGet() |
||
| 9 | { |
||
| 10 | $config = ['fs-media' => ['adapter' => 'Standard', 'basedir' => __DIR__]]; |
||
| 11 | $object = new \Aimeos\Base\Filesystem\Manager\Standard( $config ); |
||
| 12 | |||
| 13 | $this->assertInstanceof( 'Aimeos\Base\Filesystem\Iface', $object->get( 'fs-media' ) ); |
||
| 14 | } |
||
| 15 | |||
| 16 | |||
| 17 | public function testGetFallback() |
||
| 23 | } |
||
| 24 | |||
| 25 | |||
| 26 | public function testGetException() |
||
| 32 | } |
||
| 33 | |||
| 34 | |||
| 35 | public function tesGetNoAdapter() |
||
| 36 | { |
||
| 37 | $object = new \Aimeos\Base\Filesystem\Manager\Standard( ['fs' => ['basedir' => __DIR__]] ); |
||
| 38 | |||
| 39 | $this->expectException( \Aimeos\Base\Filesystem\Exception::class ); |
||
| 40 | $object->get(); |
||
|
|
|||
| 41 | } |
||
| 42 | |||
| 43 | |||
| 44 | public function testSleep() |
||
| 48 | } |
||
| 49 | } |
||
| 50 |
This check compares calls to functions or methods with their respective definitions. If the call has less arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.