-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade kununu/data-fixtures to version 2.0.0 (#5)
* Upgrade kununu/data-fixtures to version 2.0.0 * Add cheap test * Assert types of compiler passses added
- Loading branch information
Showing
3 changed files
with
38 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Kununu\TestingBundle\Tests; | ||
|
||
use Kununu\TestingBundle\DependencyInjection\Compiler\CachePoolCompilerPass; | ||
use Kununu\TestingBundle\DependencyInjection\Compiler\DoctrineCompilerPass; | ||
use Kununu\TestingBundle\KununuTestingBundle; | ||
use PHPUnit\Framework\TestCase; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
|
||
final class KununuTestingBundleTest extends TestCase | ||
{ | ||
public function testBuild() | ||
{ | ||
$containerMock = $this->getMockBuilder(ContainerBuilder::class)->getMock(); | ||
$containerMock | ||
->expects($this->exactly(2)) | ||
->method('addCompilerPass') | ||
->withConsecutive( | ||
[ | ||
$this->callback(function($subject) { | ||
return $subject instanceof CachePoolCompilerPass; | ||
}), | ||
], | ||
[ | ||
$this->callback(function($subject) { | ||
return $subject instanceof DoctrineCompilerPass; | ||
}), | ||
] | ||
); | ||
|
||
$bundle = new KununuTestingBundle(); | ||
|
||
$bundle->build($containerMock); | ||
} | ||
} |