protected function setUp() { if (!class_exists('Doctrine\\Common\\Version')) { $this->markTestSkipped('Doctrine is not available.'); } $this->em = DoctrineOrmTestCase::createTestEntityManager(); parent::setUp(); $schemaTool = new SchemaTool($this->em); $classes = array( $this->em->getClassMetadata(self::SINGLE_IDENT_CLASS), $this->em->getClassMetadata(self::SINGLE_STRING_IDENT_CLASS), $this->em->getClassMetadata(self::COMPOSITE_IDENT_CLASS), $this->em->getClassMetadata(self::COMPOSITE_STRING_IDENT_CLASS), ); try { $schemaTool->dropSchema($classes); } catch(\Exception $e) { } try { $schemaTool->createSchema($classes); } catch(\Exception $e) { } }
protected function setUp() { parent::setUp(); $this->form = $this->factory->create('repeated', null, array( 'type' => 'field', )); $this->form->setData(null); }
protected function setUp() { $this->validator = $this->getMock('Symfony\\Component\\Validator\\ValidatorInterface'); $metadataFactory = $this->getMock('Symfony\\Component\\Validator\\Mapping\\ClassMetadataFactoryInterface'); $this->validator->expects($this->once())->method('getMetadataFactory')->will($this->returnValue($metadataFactory)); $metadata = $this->getMockBuilder('Symfony\\Component\\Validator\\Mapping\\ClassMetadata')->disableOriginalConstructor()->getMock(); $metadataFactory->expects($this->once())->method('getClassMetadata')->will($this->returnValue($metadata)); parent::setUp(); }
protected function setUp() { $this->documentManager = TestCase::createTestDocumentManager(); $this->documentManager->createQueryBuilder(self::DOCUMENT_CLASS)->remove()->getQuery()->execute(); parent::setUp(); }
protected function setUp() { $this->csrfProvider = $this->getMock('Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface'); parent::setUp(); }
protected function setUp() { $this->validator = $this->getMock('Symfony\Component\Validator\ValidatorInterface'); parent::setUp(); }
public function setUp() { parent::setUp(); \Locale::setDefault('en'); }
protected function setUp() { parent::setUp(); $this->objectChoices = array((object) array('id' => 1, 'name' => 'Bernhard'), (object) array('id' => 2, 'name' => 'Fabien'), (object) array('id' => 3, 'name' => 'Kris'), (object) array('id' => 4, 'name' => 'Jon'), (object) array('id' => 5, 'name' => 'Roman')); }
protected function setUp() { parent::setUp(); $this->form = $this->factory->create('file'); }