Permalink
Browse files

[Tests] fix issue with TableMap not loaded

  • Loading branch information...
1 parent f35516b commit 8fa8df2d6163525912327fd7275df99eac1c2763 @jaugustin jaugustin committed Jan 12, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 tests/Propel/Tests/Generator/Builder/Om/TableMapBuilderTest.php
@@ -135,6 +135,10 @@ public function testBehaviors()
{
$bookTable = $this->databaseMap->getTableByPhpName('Propel\Tests\Bookstore\Book');
$this->assertEquals($bookTable->getBehaviors(), array(), 'getBehaviors() returns an empty array when no behaviors are registered');
+
+ //this init tableMap for class 'Propel\Tests\Bookstore\Behavior\Table1'
+ Propel::getServiceContainer()->getDatabaseMap(Table1TableMap::DATABASE_NAME)->getTableByPhpName('Propel\Tests\Bookstore\Behavior\Table1');
+
$tmap = Propel::getServiceContainer()->getDatabaseMap(Table1TableMap::DATABASE_NAME)->getTable(Table1TableMap::TABLE_NAME);
$expectedBehaviorParams = array('timestampable' => array('create_column' => 'created_on', 'update_column' => 'updated_on'));
$this->assertEquals($tmap->getBehaviors(), $expectedBehaviorParams, 'The map builder creates a getBehaviors() method to retrieve behaviors parameters when behaviors are registered');

0 comments on commit 8fa8df2

Please sign in to comment.