Example #1
0
 public function testTable()
 {
     $b = new Behavior();
     $this->assertNull($b->getTable(), 'Behavior Table is null by default');
     $t = new Table();
     $t->setCommonName('fooTable');
     $b->setTable($t);
     $this->assertEquals($b->getTable(), $t, 'setTable() sets the name, and getTable() gets it');
 }
Example #2
0
 public function testQualifiedName()
 {
     $table = new Table();
     $table->setSchema("foo");
     $table->setCommonName("bar");
     $this->assertEquals($table->getName(), "bar");
     $this->assertEquals($table->getCommonName(), "bar");
     $database = new Database();
     $database->addTable($table);
     $database->setPlatform(new NoSchemaPlatform());
     $this->assertEquals($table->getName(), "bar");
     $database->setPlatform(new SchemaPlatform());
     $this->assertEquals($table->getName(), "foo.bar");
 }