|
58
|
1 |
<?php |
|
|
2 |
|
|
|
3 |
namespace Symfony\Bundle\DoctrineFixturesBundle\Tests\Common\DataFixtures; |
|
|
4 |
|
|
|
5 |
use Symfony\Bundle\DoctrineFixturesBundle\Tests\TestCase; |
|
|
6 |
use Symfony\Bundle\DoctrineFixturesBundle\Tests\Common\ContainerAwareFixture; |
|
|
7 |
use Symfony\Bundle\DoctrineFixturesBundle\Common\DataFixtures\Loader; |
|
|
8 |
|
|
|
9 |
class LoaderTest extends TestCase |
|
|
10 |
{ |
|
|
11 |
public function testShouldSetContainerOnContainerAwareFixture() |
|
|
12 |
{ |
|
|
13 |
$container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface'); |
|
|
14 |
$loader = new Loader($container); |
|
|
15 |
$fixture = new ContainerAwareFixture(); |
|
|
16 |
|
|
|
17 |
$loader->addFixture($fixture); |
|
|
18 |
|
|
|
19 |
$this->assertSame($container, $fixture->container); |
|
|
20 |
} |
|
|
21 |
} |