protected function setUp() { parent::setUp(); $this->dmap = new DatabaseMap('foodb'); $this->tmap = new TableMap('foo', $this->dmap); $this->columnName = 'bar'; $this->cmap = new ColumnMap($this->columnName, $this->tmap); }
protected function setUp() { $config = sprintf('%s-conf.php', $this->databaseName); $path = 'reverse-bookstore' === $this->databaseName ? 'reverse/mysql' : $this->databaseName; include __DIR__ . '/../../../Fixtures/' . $path . '/build/conf/' . $config; $this->con = Propel::getConnection($this->databaseName); $this->parser = $this->getParser($this->con); $this->platform = $this->getPlatform(); $this->parser->setGeneratorConfig(new QuickGeneratorConfig()); $this->parser->setPlatform($this->platform); parent::setUp(); }
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 ObjectCollection(); $this->coll->setModel('\\Propel\\Tests\\Bookstore\\Book'); $this->coll[] = $book1; $this->coll[] = $book2; }
protected function setUp() { parent::setUp(); if (!class_exists('\\PkDate')) { $schema = ' <database name="test" defaultIdMethod="native" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <table name="pk_date"> <column name="created_at" type="DATE" primaryKey="true" /> <column name="name" type="VARCHAR"/> </table> <table name="pk_time"> <column name="created_at" type="TIME" primaryKey="true" /> <column name="name" type="VARCHAR"/> </table> <table name="pk_timestamp"> <column name="created_at" type="TIMESTAMP" primaryKey="true" /> <column name="name" type="VARCHAR"/> </table>'; QuickBuilder::buildSchema($schema); } }
protected function setUp() { parent::setUp(); $this->databaseMap = Propel::getServiceContainer()->getDatabaseMap('bookstore'); }
protected function setUp() { parent::setUp(); $this->databaseName = 'foodb'; $this->databaseMap = TestDatabaseBuilder::getDmap(); }