public function testGetGeneratorConfig() { $config = $this->getMockBuilder('Propel\\Generator\\Config\\GeneratorConfig')->disableOriginalConstructor()->getMock(); $database = $this->getDatabaseMock('foo'); $database->expects($this->once())->method('getGeneratorConfig')->will($this->returnValue($config)); $table = new Table(); $table->setDatabase($database); $this->assertSame($config, $table->getGeneratorConfig()); }
public function testGetGeneratorConfig() { $schema = $this->getMock('Propel\\Generator\\Model\\Schema'); $config = $this->getMock('Propel\\Generator\\Config\\GeneratorConfig'); $schema->expects($this->once())->method('getGeneratorConfig')->will($this->returnValue($config)); $database = $this->getDatabaseMock('foo'); $database->expects($this->once())->method('getParentSchema')->will($this->returnValue($schema)); $table = new Table(); $table->setDatabase($database); $this->assertInstanceOf('Propel\\Generator\\Config\\GeneratorConfig', $table->getGeneratorConfig()); }