public function setUp()
    {
        parent::setUp();
        if (!class_exists('ConcreteContentSetPkQuery')) {
            $schema = <<<EOF
<database name="concrete_content_set_pk">
    <table name="concrete_content_set_pk" allowPkInsert="true">
        <column name="id" required="true" primaryKey="true" autoIncrement="true" type="INTEGER" />
        <column name="title" type="VARCHAR" size="100" primaryString="true" />
        <index>
            <index-column name="title" />
        </index>

    </table>
    <table name="concrete_article_set_pk" allowPkInsert="true">
        <column name="body" type="longvarchar" />
        <column name="author_id" required="false" type="INTEGER" />
        <behavior name="concrete_inheritance">
            <parameter name="extends" value="concrete_content_set_pk" />
        </behavior>
    </table>
</database>
EOF;
            QuickBuilder::buildSchema($schema);
        }
    }
 protected function setUp()
 {
     parent::setUp();
     Table4Peer::disableSoftDelete();
     Table4Peer::doDeleteAll();
     Table4Peer::enableSoftDelete();
 }
 protected function setUp()
 {
     //prevent issue DSN not Found
     self::$isInitialized = false;
     parent::setUp();
     include_once __DIR__ . '/SluggableBehaviorTestClasses.php';
 }
Example #4
0
 public function setUp()
 {
     parent::setUp();
     if (!extension_loaded('iconv')) {
         throw new Exception("Character-encoding tests require iconv extension to be loaded.");
     }
 }
Example #5
0
 protected function setUp()
 {
     parent::setUp();
     $this->c = new ModelCriteria();
     //        $defaultDatasource = Propel::getServiceContainer()->getDefaultDatasource();
     //        $this->savedAdapter = Propel::getServiceContainer()->getAdapter($defaultDatasource);
     //        $newAdapter = Propel::getServiceContainer()->getAdapter(BookTableMap::DATABASE_NAME);
     //        Propel::getServiceContainer()->setAdapter($defaultDatasource, $newAdapter);
 }
 protected function setUp()
 {
     parent::setUp();
     $publisher = new Publisher();
     $publisher->setId(1234);
     $publisher->setName('Penguin');
     $author = new Author();
     $author->setId(5678);
     $author->setFirstName('George');
     $author->setLastName('Byron');
     $book = new Book();
     $book->setId(9012);
     $book->setTitle('Don Juan');
     $book->setISBN('0140422161');
     $book->setPrice(12.99);
     $book->setAuthor($author);
     $book->setPublisher($publisher);
     $this->book = $book;
 }
 public function setUp()
 {
     parent::setUp();
     $a = new Author();
     $a->setFirstName("Douglas");
     $a->setLastName("Adams");
     $b1 = new Book();
     $b1->setTitle("The Hitchhikers Guide To The Galaxy");
     $a->addBook($b1);
     $b2 = new Book();
     $b2->setTitle("The Restaurant At The End Of The Universe");
     $a->addBook($b2);
     $a->save();
     $this->author = $a;
     $this->books = array($b1, $b2);
     Propel::enableInstancePooling();
     // Clear author instance pool so the object would be fetched from the database
     AuthorTableMap::clearInstancePool();
 }
 protected function setUp()
 {
     parent::setUp();
     $book1 = new Book();
     $book1->setId(9012);
     $book1->setTitle('Don Juan');
     $book1->setISBN('0140422161');
     $book1->setPrice(12.99);
     $book1->setAuthorId(5678);
     $book1->setPublisherId(1234);
     $book1->resetModified();
     $book2 = new Book();
     $book2->setId(58);
     $book2->setTitle('Harry Potter and the Order of the Phoenix');
     $book2->setISBN('043935806X');
     $book2->setPrice(10.99);
     $book2->resetModified();
     $this->coll = new ObjectCollection();
     $this->coll->setModel('\\Propel\\Tests\\Bookstore\\Book');
     $this->coll[] = $book1;
     $this->coll[] = $book2;
 }
Example #9
0
 protected function setUp()
 {
     parent::setUp();
     $this->databaseMap = Propel::getServiceContainer()->getDatabaseMap('bookstore');
 }
Example #10
0
 protected function setUp()
 {
     //prevent issue DSN not Found
     self::$isInitialized = false;
     parent::setUp();
 }
Example #11
0
 public static function setUpBeforeClass()
 {
     //prevent issue DSN not Found
     self::$isInitialized = false;
     parent::setUpBeforeClass();
 }
Example #12
0
 protected function tearDown()
 {
     // nothing to do for now
     parent::tearDown();
 }
 public static function setUpBeforeClass()
 {
     //prevent issue with wrong DSN
     self::$isInitialized = false;
     parent::setUpBeforeClass();
 }
Example #14
0
 protected function tearDown()
 {
     Propel::getServiceContainer()->setAdapter(Propel::getServiceContainer()->getDefaultDatasource(), $this->savedAdapter);
     parent::tearDown();
 }
 protected function setUp()
 {
     parent::setUp();
     include_once __DIR__ . '/AggregateColumnsBehaviorTestClasses.php';
 }
 protected function setUp()
 {
     parent::setUp();
     include_once __DIR__ . '/QueryBuilderTestClasses.php';
 }
 public static function setUpBeforeClass()
 {
     static::$isInitialized = false;
     parent::setUpBeforeClass();
 }
 protected function setUp()
 {
     parent::setUp();
     require_once dirname(__FILE__) . '/../../../tools/helpers/bookstore/behavior/TestAuthor.php';
 }
 protected function setUp()
 {
     parent::setUp();
     $this->databaseMap = Propel::getDatabaseMap('bookstore');
 }
Example #20
0
 protected function setUp()
 {
     parent::setUp();
     $this->c = new ModelCriteria();
 }
Example #21
0
 protected function setUp()
 {
     parent::setUp();
     include_once __DIR__ . '/PropelQueryTestClasses.php';
 }
 protected function setUp()
 {
     parent::setUp();
     BookstoreDataPopulator::depopulate();
     BookstoreDataPopulator::populate();
 }
Example #23
0
 protected function tearDown()
 {
     Propel::setDB(null, $this->savedAdapter);
     parent::tearDown();
 }