|
@@ 23-37 (lines=15) @@
|
| 20 |
|
$this->assertTrue($reflection->isPrivate()); |
| 21 |
|
} |
| 22 |
|
|
| 23 |
|
public function testAddLoaderKey() |
| 24 |
|
{ |
| 25 |
|
$loader = $this->prophesize(LoaderInterface::class)->reveal(); |
| 26 |
|
|
| 27 |
|
$collection = new LoaderCollection(); |
| 28 |
|
$collection->add('test', $loader); |
| 29 |
|
|
| 30 |
|
$reflection = new \ReflectionProperty(LoaderCollection::class, 'loaders'); |
| 31 |
|
$reflection->setAccessible(true); |
| 32 |
|
$loaders = $reflection->getValue($collection); |
| 33 |
|
|
| 34 |
|
reset($loaders); |
| 35 |
|
|
| 36 |
|
$this->assertEquals('test', key($loaders)); |
| 37 |
|
} |
| 38 |
|
|
| 39 |
|
public function testAddLoader() |
| 40 |
|
{ |
|
@@ 39-53 (lines=15) @@
|
| 36 |
|
$this->assertEquals('test', key($loaders)); |
| 37 |
|
} |
| 38 |
|
|
| 39 |
|
public function testAddLoader() |
| 40 |
|
{ |
| 41 |
|
$loader = $this->prophesize(LoaderInterface::class)->reveal(); |
| 42 |
|
|
| 43 |
|
$collection = new LoaderCollection(); |
| 44 |
|
$collection->add('test', $loader); |
| 45 |
|
|
| 46 |
|
$reflection = new \ReflectionProperty(LoaderCollection::class, 'loaders'); |
| 47 |
|
$reflection->setAccessible(true); |
| 48 |
|
$loaders = $reflection->getValue($collection); |
| 49 |
|
|
| 50 |
|
reset($loaders); |
| 51 |
|
|
| 52 |
|
$this->assertEquals($loader, current($loaders)); |
| 53 |
|
} |
| 54 |
|
|
| 55 |
|
public function testHasLoaderPassed() |
| 56 |
|
{ |