public function setUp()
 {
     parent::setUp();
     if (!extension_loaded('iconv')) {
         throw new Exception("Character-encoding tests require iconv extension to be loaded.");
     }
 }
 protected function setUp()
 {
     parent::setUp();
     Table4Peer::disableSoftDelete();
     Table4Peer::doDeleteAll();
     Table4Peer::enableSoftDelete();
 }
 /**
  * This is run before each unit test; it empties the database.
  */
 protected function setUp()
 {
     parent::setUp();
     if (static::$isInitialized) {
         BookstoreDataPopulator::depopulate($this->con);
     }
 }
    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;
            PropelQuickBuilder::buildSchema($schema);
        }
    }
 protected function setUp()
 {
     parent::setUp();
     $this->sampleLobFiles['tin_drum.gif'] = TESTS_BASE_DIR . '/etc/lob/tin_drum.gif';
     $this->sampleLobFiles['tin_drum.txt'] = TESTS_BASE_DIR . '/etc/lob/tin_drum.txt';
     $this->sampleLobFiles['propel.gif'] = TESTS_BASE_DIR . '/etc/lob/propel.gif';
 }
    public function setUp()
    {
        parent::setUp();
        if (!class_exists('My\\NestedSet1')) {
            $schema = <<<EOF
<database name="nested_set_database" namespace="My">
    <table name="nested_set_1">
        <column name="id" required="true" primaryKey="true" autoIncrement="true" type="INTEGER" />
        <column name="title" type="VARCHAR" size="100" primaryString="true" />

        <behavior name="nested_set" />
    </table>
</database>
EOF;
            $builder = new PropelQuickBuilder();
            $builder->setSchema($schema);
            $builder->build();
        }
    }
 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
     AuthorPeer::clearInstancePool();
 }
 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;
 }
 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 PropelObjectCollection();
     $this->coll->setModel('Book');
     $this->coll[] = $book1;
     $this->coll[] = $book2;
 }
 protected function setUp()
 {
     parent::setUp();
     require_once dirname(__FILE__) . '/../../../../tools/helpers/bookstore/behavior/TestAuthor.php';
 }
Example #11
0
 protected function tearDown()
 {
     Propel::setDB(null, $this->savedAdapter);
     parent::tearDown();
 }
 protected function setUp()
 {
     parent::setUp();
     $this->databaseMap = Propel::getDatabaseMap('bookstore');
 }
 protected function tearDown()
 {
     // nothing to do for now
     parent::tearDown();
 }
 /**
  * This is run before each unit test; it empties the database.
  */
 protected function setUp()
 {
     parent::setUp();
     BookstoreDataPopulator::depopulate($this->con);
 }
Example #15
0
 protected function tearDown()
 {
     parent::tearDown();
 }
 /**
  * This is run after each unit test.  It empties the database.
  */
 protected function tearDown()
 {
     BookstoreDataPopulator::depopulate($this->con);
     parent::tearDown();
 }