Commit 821574fc authored by Stan Jansen's avatar Stan Jansen

OctaveMenuBundle test added.

parent 00b2dd4b
<?php
/*
* This file is part of Octave
*
* (c) Stan Jansen <stan@stanjan.nl>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Octave\Bundle\MenuBundle\Tests;
use Octave\Bundle\MenuBundle\DependencyInjection\Compiler\BuilderPass;
use Octave\Bundle\MenuBundle\DependencyInjection\Compiler\ExtensionPass;
use Octave\Bundle\MenuBundle\DependencyInjection\Compiler\VoterPass;
use Octave\Bundle\MenuBundle\OctaveMenuBundle;
use Octave\Tests\TestCase;
use Symfony\Component\DependencyInjection\ContainerBuilder;
/**
* Tests for Octave\Bundle\MenuBundle\OctaveMenuBundle
*
* @author Stan Jansen <stan@stanjan.nl>
*/
class OctaveMenuBundleTest extends TestCase
{
/**
* Test if the bundle builds the compiler passes correctly
*/
public function testCompilerPasses()
{
$bundle = new OctaveMenuBundle();
$container = new ContainerBuilder();
$bundle->build($container);
$passes = $container->getCompiler()->getPassConfig()->getBeforeOptimizationPasses();
$passClassNames = [];
foreach ($passes as $pass)
{
$passClassNames[] = get_class($pass);
}
$this->assertTrue(in_array(BuilderPass::class, $passClassNames));
$this->assertTrue(in_array(ExtensionPass::class, $passClassNames));
$this->assertTrue(in_array(VoterPass::class, $passClassNames));
}
}
\ No newline at end of file
......@@ -29,6 +29,7 @@
<directory>./Bundle/*/Tests</directory>
<directory>./Tests</directory>
<directory>./vendor</directory>
<directory>./var</directory>
</exclude>
</whitelist>
</filter>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment