Ejemplo n.º 1
0
 public function testSetTable()
 {
     $table = $this->getTableMock('book');
     $table->expects($this->once())->method('getSchema')->will($this->returnValue('books'));
     $fk = new ForeignKey();
     $fk->setTable($table);
     $this->assertInstanceOf('Propel\\Generator\\Model\\Table', $fk->getTable());
     $this->assertSame('books', $fk->getSchemaName());
     $this->assertSame('book', $fk->getTableName());
 }