Ejemplo n.º 1
0
 public function testGetLocalColumn()
 {
     $column = $this->getColumnMock('id');
     $table = $this->getTableMock('books');
     $table->expects($this->any())->method('getColumn')->with($this->equalTo('author_id'))->will($this->returnValue($column));
     $fk = new ForeignKey();
     $fk->setTable($table);
     $fk->addReference('author_id', 'id');
     $this->assertCount(1, $fk->getLocalColumnObjects());
     $this->assertInstanceOf('Propel\\Generator\\Model\\Column', $fk->getLocalColumn(0));
 }