public function testHasPlatform()
 {
     $table = $this->getTableMock('books', array('platform' => $this->getPlatformMock()));
     $column = new Column();
     $column->setTable($table);
     $this->assertTrue($column->hasPlatform());
     $this->assertInstanceOf('Propel\\Generator\\Platform\\PlatformInterface', $column->getPlatform());
 }
Exemplo n.º 2
0
 public function testHasPlatform()
 {
     $column = new Column();
     $this->assertFalse($column->hasPlatform());
     $table = new Table();
     $table->addColumn($column);
     $this->assertFalse($column->hasPlatform());
     $database = new Database();
     $database->addTable($table);
     $this->assertFalse($column->hasPlatform());
     $platform = new DefaultPlatform();
     $database->setPlatform($platform);
     $this->assertTrue($column->hasPlatform());
 }