Created
January 26, 2016 14:19
-
-
Save kix/855b09a63af23ed85813 to your computer and use it in GitHub Desktop.
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
services: | |
my.something: | |
class: My\Something | |
# arguments: | |
# - @... | |
my.another_thing: | |
class: My\AnotherThing | |
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
<?php | |
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; | |
class ServiceTest extends KernelTestCase | |
{ | |
public function provideExpectedDefinitions() | |
{ | |
return [ | |
['My\Something', 'my.something'], | |
['My\AnotherThing', 'my.another_thing'], | |
]; | |
} | |
/** | |
* @test | |
* @group functional | |
* @dataProvider provideExpectedDefinitions | |
*/ | |
protected function it_registers_declared_services_correctly($class, $serviceId) | |
{ | |
$kernel = static::createKernel(); | |
static::assertInstanceOf($class, $kernel->getContainer()->get($serviceId)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment