Code Duplication    Length = 12-16 lines in 2 locations

tests/DI/KdybyAliasSwitchTest.php 1 location

@@ 11-22 (lines=12) @@
8
use Symnedi\EventDispatcher\Tests\ContainerFactory;
9
10
11
final class KdybyAliasSwitchTest extends PHPUnit_Framework_TestCase
12
{
13
14
	public function test()
15
	{
16
		$container = (new ContainerFactory)->createWithConfig(__DIR__ . '/../config/aliasSwitch.neon');
17
		$eventDispatcher = $container->getByType(EventDispatcherInterface::class);
18
		$this->assertInstanceOf(EventDispatcherInterface::class, $eventDispatcher);
19
		$this->assertNotInstanceOf(EventManager::class, $eventDispatcher);
20
	}
21
22
}
23

tests/DI/SymfonyConsoleDispatcherBindTest.php 1 location

@@ 12-27 (lines=16) @@
9
use Symnedi\EventDispatcher\Tests\ContainerFactory;
10
11
12
final class SymfonyConsoleDispatcherBindTest extends PHPUnit_Framework_TestCase
13
{
14
15
	public function test()
16
	{
17
		$container = (new ContainerFactory)->createWithConfig(__DIR__ . '/../config/aliasSwitch.neon');
18
19
		/** @var Application $application */
20
		$application = $container->getByType(Application::class);
21
		$this->assertInstanceOf(Application::class, $application);
22
23
		$eventDispatcher = PHPUnit_Framework_Assert::getObjectAttribute($application, 'dispatcher');
24
		$this->assertInstanceOf(EventDispatcherInterface::class, $eventDispatcher);
25
	}
26
27
}
28