public function testDoFinalization() { $config = $this->getMockBuilder('Propel\\Generator\\Config\\GeneratorConfig')->disableOriginalConstructor()->getMock(); $schema = $this->getSchemaMock('bookstore', ['generator_config' => $config]); $platform = $this->getPlatformMock(); $platform->expects($this->any())->method('getMaxColumnNameLength')->will($this->returnValue(64)); $platform->expects($this->any())->method('getDomainForType')->with($this->equalTo('TIMESTAMP'))->will($this->returnValue($this->getDomainMock('TIMESTAMP'))); $database = new Database(); $database->setPlatform($platform); $database->setParentSchema($schema); $database->addTable($this->getTableMock('foo')); $database->addTable($this->getTableMock('bar')); $database->doFinalInitialization(); $this->assertCount(0, $database->getBehaviors()); $this->assertSame(2, $database->countTables()); }