-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from lcobucci/implement-delayed-passes
Implement delayed passes
- Loading branch information
Showing
6 changed files
with
82 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,9 @@ | |
|
||
namespace Lcobucci\DependencyInjection\Config; | ||
|
||
use Lcobucci\DependencyInjection\Compiler\ParameterBag; | ||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; | ||
use Symfony\Component\DependencyInjection\Compiler\PassConfig; | ||
|
||
/** | ||
* @author Luís Otávio Cobucci Oblonczyk <[email protected]> | ||
|
@@ -100,6 +102,25 @@ public function addPassShouldAppendANewHandlerToTheList(): void | |
self::assertAttributeSame([[$this->pass, 'beforeOptimization']], 'passList', $config); | ||
} | ||
|
||
/** | ||
* @test | ||
* | ||
* @covers \Lcobucci\DependencyInjection\Config\ContainerConfiguration::addDelayedPass | ||
* | ||
* @uses \Lcobucci\DependencyInjection\Config\ContainerConfiguration::__construct | ||
*/ | ||
public function addDelayedPassShouldAppendANewCompilerPassToTheList(): void | ||
{ | ||
$config = new ContainerConfiguration(); | ||
$config->addDelayedPass(ParameterBag::class, ['a' => 'b']); | ||
|
||
self::assertAttributeSame( | ||
[[[ParameterBag::class, ['a' => 'b']], 'beforeOptimization']], | ||
'passList', | ||
$config | ||
); | ||
} | ||
|
||
/** | ||
* @test | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters