Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | public function testPass(): void |
||
14 | { |
||
15 | $factory = new Loaders\Factory(); |
||
16 | $loader1 = $factory->getLoader(IEntry::SOURCE_GET); |
||
17 | $loader2 = $factory->getLoader(IEntry::SOURCE_GET); // intentionally same |
||
18 | $loader3 = $factory->getLoader(IEntry::SOURCE_FILES); |
||
19 | $loader4 = $factory->getLoader(IEntry::SOURCE_JSON); |
||
20 | $factory->getLoader(IEntry::SOURCE_CLI); |
||
21 | |||
22 | $this->assertInstanceOf(Loaders\Entry::class, $loader1); |
||
23 | $this->assertInstanceOf(Loaders\Entry::class, $loader2); |
||
24 | $this->assertInstanceOf(Loaders\File::class, $loader3); |
||
25 | $this->assertInstanceOf(Loaders\Json::class, $loader4); |
||
26 | $this->assertEquals($loader1, $loader2); |
||
27 | $this->assertNotEquals($loader3, $loader2); |
||
28 | $this->assertNotEquals($loader3, $loader4); |
||
29 | } |
||
31 |