public function setUp() { parent::setUp(); $schema = new Schema(); $posts = $schema->createTable('posts'); $posts->addColumn('id', Type::INTEGER); $posts->setPrimaryKey(['id']); $posts->addColumn('status', Type::STRING); $this->connection->exec('DROP TABLE IF EXISTS posts'); foreach ($schema->toSql($this->connection->getDatabasePlatform()) as $sql) { $this->connection->exec($sql); } $i = 1; while ($i <= 10) { $this->posts[$i] = new PostObject($i); $this->connection->insert('posts', ['id' => $this->posts[$i]->getId(), 'status' => $this->posts[$i]->getStatus()]); $i++; } }
public function setUp() { parent::setUp(); $this->fooClass = 'Nuxia\\AclBundle\\Tests\\Model\\FooObject'; $this->barClass = 'Nuxia\\AclBundle\\Tests\\Model\\BarObject'; }