protected function setUp() { parent::setUp(); if (!class_exists('Propel\\Bundle\\PropelBundle\\Tests\\Fixtures\\DataFixtures\\Loader\\CoolBook')) { $schema = <<<XML <database name="default" package="vendor.bundles.Propel.Bundle.PropelBundle.Tests.Fixtures.DataFixtures.Loader" namespace="Propel\\Bundle\\PropelBundle\\Tests\\Fixtures\\DataFixtures\\Loader" defaultIdMethod="native"> <table name="cool_book"> <column name="id" type="integer" primaryKey="true" /> <column name="name" type="varchar" size="255" /> <column name="description" type="varchar" /> <column name="author_id" type="integer" required="false" defaultValue="null" /> <column name="complementary_infos" required="false" type="object" description="An object column" /> <foreign-key foreignTable="cool_book_author" onDelete="CASCADE" onUpdate="CASCADE"> <reference local="author_id" foreign="id" /> </foreign-key> </table> <table name="cool_book_author"> <column name="id" type="integer" primaryKey="true" /> <column name="name" type="varchar" size="255" /> </table> </database> XML; QuickBuilder::buildSchema($schema); } $this->con = Propel::getServiceContainer()->getConnection('default'); $this->con->beginTransaction(); }
protected function setUp() { if (!class_exists('Symfony\\Component\\Form\\Form')) { $this->markTestSkipped('The "Form" component is not available'); } parent::setUp(); $this->transformer = new CollectionToArrayTransformer(); }
public function setUp() { parent::setUp(); if (!interface_exists('Sensio\\Bundle\\FrameworkExtraBundle\\Request\\ParamConverter\\ParamConverterInterface')) { $this->markTestSkipped('SensioFrameworkExtraBundle is not available.'); } // @fixme: some tests fail if instance pooling is disabled... //Propel::disableInstancePooling(); }
public function setUp() { parent::setUp(); $schema = file_get_contents(__DIR__ . '/../Resources/acl_schema.xml'); if (!class_exists('Propel\\Bundle\\PropelBundle\\Model\\Acl\\Map\\AclClassTableMap')) { $classTargets = array('tablemap', 'object', 'query'); } else { $classTargets = array(); } $builder = new QuickBuilder(); $builder->setSchema($schema); $this->con = $builder->build($dsn = null, $user = null, $pass = null, $adapter = null, $classTargets); }