Skip to content
This repository has been archived by the owner on Jul 22, 2021. It is now read-only.

Commit

Permalink
tests: add BlueScreen factory no alias
Browse files Browse the repository at this point in the history
  • Loading branch information
Vrtak-CZ committed Jan 10, 2016
1 parent e6b35c2 commit 143b99b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/DependencyInjection/MonologTracyExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
namespace Nella\MonologTracyBundle\DependencyInjection;

use Symfony\Bundle\MonologBundle\DependencyInjection\MonologExtension;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;

class MonologTracyExtensionTest extends \Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractExtensionTestCase
{
Expand Down Expand Up @@ -67,4 +69,25 @@ public function testFactoryService()
$this->compile();
}

public function testFactoryServiceNoAlias()
{
$this->loadConfigs([
'blueScreenFactoryNoAlias.yml',
]);

$this->load();

$this->assertContainerBuilderHasService(MonologTracyExtension::BLUESCREEN_FACTORY_SERVICE_ID);

$this->compile();
}

private function loadConfigs(array $configs)
{
$loader = new YamlFileLoader($this->container, new FileLocator(__DIR__ . '/fixtures'));
foreach ($configs as $config) {
$loader->load($config);
}
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
services:
nella.monolog_tracy.tracy.blue_screen_factory:
class: Nella\MonologTracy\Tracy\BlueScreenFactory

0 comments on commit 143b99b

Please sign in to comment.