public function setUp() { parent::setUp(); $this->loader = $this->getMock('DavidBadura\\Fixtures\\Loader\\LoaderInterface'); $this->loader->expects($this->any())->method('load')->will($this->returnValue(new FixtureCollection())); $this->executor = $this->getMock('DavidBadura\\Fixtures\\Executor\\ExecutorInterface'); $this->executor->expects($this->any())->method('execute'); $this->persister = $this->getMock('DavidBadura\\Fixtures\\Persister\\PersisterInterface'); $this->persister->expects($this->any())->method('persist'); $this->persister->expects($this->any())->method('flush'); $this->provider = $this->getMock('DavidBadura\\Fixtures\\ServiceProvider\\ServiceProviderInterface'); $this->provider->expects($this->any())->method('get'); $this->eventDispatcher = $this->getMock('Symfony\\Component\\EventDispatcher\\EventDispatcherInterface'); $this->eventDispatcher->expects($this->any())->method('dispatch'); $this->fixtureManager = new FixtureManagerPublicMethods($this->loader, $this->executor, $this->persister, $this->provider, $this->eventDispatcher); }
/** * * @param string $name * @return object */ public function getService($name) { return $this->serviceProvider->get($name); }