1 | <?php |
||
2 | /** |
||
3 | * DronePHP (http://www.dronephp.com) |
||
4 | * |
||
5 | * @link http://github.com/Pleets/DronePHP |
||
6 | * @copyright Copyright (c) 2016-2018 Pleets. (http://www.pleets.org) |
||
7 | * @license http://www.dronephp.com/license |
||
8 | * @author Darío Rivera <[email protected]> |
||
9 | */ |
||
10 | |||
11 | namespace DroneTest\Util; |
||
12 | |||
13 | use Drone\Mvc\ModuleFactory; |
||
14 | use PHPUnit\Framework\TestCase; |
||
15 | |||
16 | class ModuleTest extends TestCase |
||
17 | { |
||
18 | /** |
||
19 | * Tests getting module configuration |
||
20 | * |
||
21 | * @return null |
||
22 | */ |
||
23 | public function testGettingConfiguration() |
||
24 | { |
||
25 | include "test-skeleton/module/Master/Module.php"; |
||
26 | |||
27 | $module = ModuleFactory::create("Master", [ |
||
0 ignored issues
–
show
|
|||
28 | "config" => 'test-skeleton/module/Master/config/config.php', |
||
29 | ]); |
||
30 | |||
31 | $this->assertSame( |
||
32 | 'test-skeleton/module/Master/config/config.php', |
||
33 | $module->getConfigFile() |
||
34 | ); |
||
35 | |||
36 | $this->assertSame(["baz" => "foo"], $module->getConfig()); |
||
37 | } |
||
38 | } |
||
39 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()
can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.