-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
To help catch changes in symfony container such as the ones in 3.3
- Loading branch information
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
src/DMS/Bundle/FilterBundle/Tests/Integration/ContainerTest.php
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,44 @@ | ||
<?php | ||
|
||
namespace DMS\DMS\Bundle\FilterBundle\Tests\Integration; | ||
|
||
use DMS\Bundle\FilterBundle\DependencyInjection\DMSFilterExtension; | ||
use Doctrine\Common\Annotations\AnnotationReader; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
|
||
class ContainerTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
/** | ||
* @var ContainerBuilder | ||
*/ | ||
private $container; | ||
|
||
/** | ||
* @before | ||
* @return void | ||
*/ | ||
public function buildContainer() | ||
{ | ||
$this->container = new ContainerBuilder(); | ||
|
||
// Cover external dependencies | ||
$this->container->set('annotation_reader', $this->prophesize(AnnotationReader::class)->reveal()); | ||
|
||
$extension = new DMSFilterExtension(); | ||
$extension->load([], $this->container); | ||
|
||
$this->container->compile(); | ||
} | ||
|
||
public function testContainerBoots() | ||
{ | ||
$this->container->get('dms.filter'); | ||
|
||
if (method_exists($this->container, 'isCompiled')) { | ||
self::assertTrue($this->container->isCompiled()); | ||
} else { | ||
self::assertTrue($this->container->isFrozen()); | ||
} | ||
|
||
} | ||
} |