|
@@ 17-27 (lines=11) @@
|
| 14 |
|
|
| 15 |
|
class PlaceholderProviderRegistryTest extends TestCase |
| 16 |
|
{ |
| 17 |
|
public function testConstructor() |
| 18 |
|
{ |
| 19 |
|
$providers = [ |
| 20 |
|
'foo' => $this->getPlaceholderProviderMock(), |
| 21 |
|
'bar' => $this->getPlaceholderProviderMock(), |
| 22 |
|
]; |
| 23 |
|
|
| 24 |
|
$registry = new PlaceholderProviderRegistry($providers); |
| 25 |
|
|
| 26 |
|
$this->assertAttributeSame($providers, 'providers', $registry); |
| 27 |
|
} |
| 28 |
|
|
| 29 |
|
public function testAddProvider() |
| 30 |
|
{ |
|
@@ 29-37 (lines=9) @@
|
| 26 |
|
$this->assertAttributeSame($providers, 'providers', $registry); |
| 27 |
|
} |
| 28 |
|
|
| 29 |
|
public function testAddProvider() |
| 30 |
|
{ |
| 31 |
|
$provider = $this->getPlaceholderProviderMock(); |
| 32 |
|
|
| 33 |
|
$registry = new PlaceholderProviderRegistry(); |
| 34 |
|
$registry->addProvider('foo', $provider); |
| 35 |
|
|
| 36 |
|
$this->assertAttributeSame(['foo' => $provider], 'providers', $registry); |
| 37 |
|
} |
| 38 |
|
|
| 39 |
|
public function testSupports() |
| 40 |
|
{ |