Example #1
0
 public function testCreateNamedIndex()
 {
     $index = new Index('foo_idx');
     $index->setTable($this->getTableMock('db_books'));
     $this->assertEquals('foo_idx', $index->getName());
     $this->assertFalse($index->isUnique());
     $this->assertInstanceOf('Propel\\Generator\\Model\\Table', $index->getTable());
     $this->assertSame('db_books', $index->getTableName());
     $this->assertCount(0, $index->getColumns());
     $this->assertFalse($index->hasColumns());
 }