for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Sonata Project package.
*
* (c) Thomas Rabaix <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sonata\DoctrineORMAdminBundle\Tests;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
use Sonata\DoctrineORMAdminBundle\DependencyInjection\Compiler\AddAuditEntityCompilerPass;
use Sonata\DoctrineORMAdminBundle\DependencyInjection\Compiler\AddGuesserCompilerPass;
use Sonata\DoctrineORMAdminBundle\DependencyInjection\Compiler\AddTemplatesCompilerPass;
use Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle;
use Symfony\Component\DependencyInjection\ContainerBuilder;
/**
* @author Marko Kunic <[email protected]>
class SonataDoctrineORMAdminBundleTest extends TestCase
{
public function testBuild()
$containerBuilder = $this->prophesize(ContainerBuilder::class);
$containerBuilder
->addCompilerPass(Argument::type(AddGuesserCompilerPass::class))
->shouldBeCalledTimes(1);
->addCompilerPass(Argument::type(AddTemplatesCompilerPass::class))
->addCompilerPass(Argument::type(AddAuditEntityCompilerPass::class))
$bundle = new SonataDoctrineORMAdminBundle();
$bundle->build($containerBuilder->reveal());
}