These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | namespace Redaxscript\Tests; |
||
3 | |||
4 | use Redaxscript\Autoloader; |
||
5 | use function class_exists; |
||
6 | |||
7 | /** |
||
8 | * AutoloaderTest |
||
9 | * |
||
10 | * @since 2.1.0 |
||
11 | * |
||
12 | * @package Redaxscript |
||
13 | * @category Tests |
||
14 | * @author Henry Ruhs |
||
15 | * @author Sven Weingartner |
||
16 | * |
||
17 | * @covers Redaxscript\Autoloader |
||
18 | */ |
||
19 | |||
20 | class AutoloaderTest extends TestCaseAbstract |
||
21 | { |
||
22 | /** |
||
23 | * testInit |
||
24 | * |
||
25 | * @since 3.0.0 |
||
26 | */ |
||
27 | |||
28 | public function testInit() : void |
||
29 | { |
||
30 | /* setup */ |
||
31 | |||
32 | $autoloader = new Autoloader(); |
||
33 | $autoloader->init('test'); |
||
34 | |||
35 | /* actual */ |
||
36 | |||
37 | $actualArray = $this->getProperty($autoloader, '_autoloadArray'); |
||
0 ignored issues
–
show
|
|||
38 | |||
39 | /* compare */ |
||
40 | |||
41 | $this->assertEquals('test', $actualArray[0]); |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * testFilePath |
||
46 | * |
||
47 | * @since 2.2.0 |
||
48 | * |
||
49 | * @param string $className |
||
50 | * @param bool $expect |
||
51 | * |
||
52 | * @dataProvider providerAutoloader |
||
53 | */ |
||
54 | |||
55 | public function testFilePath(string $className = null, bool $expect = null) : void |
||
56 | { |
||
57 | /* actual */ |
||
58 | |||
59 | $actual = class_exists($className); |
||
60 | |||
61 | /* compare */ |
||
62 | |||
63 | $this->assertEquals($expect, $actual); |
||
64 | } |
||
65 | } |
||
66 | |||
67 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.