예제 #1
0
 public function setUp()
 {
     parent::setUp();
     $repository = new ConverterRepository();
     $repository->addConverter(new DefaultConverter());
     $this->executor = new Executor($repository);
 }
 public function setUp()
 {
     parent::setUp();
     $this->validator = $this->getMock('Symfony\\Component\\Validator\\ValidatorInterface');
     $this->validator->expects($this->never())->method('validate')->will($this->returnValue(array()));
     $this->listener = new ValidationListener($this->validator);
 }
예제 #3
0
 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);
 }
 public function setUp()
 {
     parent::setUp();
     $this->executor = $this->getMock('DavidBadura\\Fixtures\\Executor\\ExecutorInterface');
     $this->listener = new ExpressionLanguageListener(new ExpressionLanguage($this->executor));
 }