Permalink
Browse files

Fixed tests

  • Loading branch information...
1 parent f866bf6 commit c3e0e776da8614bf2d8057169b8e914c15c76df8 @willdurand willdurand committed Dec 21, 2011
@@ -8,7 +8,7 @@
* @license MIT License
*/
-namespace Propel\Tests\Generator\Behavior;
+namespace Propel\Tests\Generator\Behavior\AddClass;
use Propel\Tests\Helpers\Bookstore\BookstoreTestBase;
use Propel\Tests\Bookstore\Behavior\AddClassTableFooClass;
@@ -9,10 +9,10 @@
* @license MIT License
*/
-namespace Propel\Tests\Generator\Behavior;
+namespace Propel\Tests\Generator\Behavior\AlternativeCodingStandards;
use Propel\Generator\Model\Behavior;
-use Propel\Generator\Behavior\AlternativeCodingStandardsBehavior;
+use Propel\Generator\Behavior\AlternativeCodingStandards\AlternativeCodingStandardsBehavior;
/**
* Tests for TimestampableBehavior class
@@ -8,7 +8,7 @@
* @license MIT License
*/
-namespace Propel\Tests\Generator\Behavior;
+namespace Propel\Tests\Generator\Behavior\AutoAddPk;
use Propel\Tests\Helpers\Bookstore\BookstoreTestBase;
@@ -8,9 +8,9 @@
* @license MIT License
*/
-namespace Propel\Tests\Generator\Behavior;
+namespace Propel\Tests\Generator\Behavior\Delegate;
-use Propel\Generator\Behavior\DelegateBehavior;
+use Propel\Generator\Behavior\Delegate\DelegateBehavior;
use Propel\Generator\Util\QuickBuilder;
use Propel\Runtime\Propel;
@@ -8,7 +8,7 @@
* @license MIT License
*/
-namespace Propel\Tests\Generator\Behavior;
+namespace Propel\Tests\Generator\Behavior\Sluggable;
use Propel\Tests\Helpers\Bookstore\BookstoreTestBase;
@@ -8,7 +8,7 @@
* @license MIT License
*/
-namespace Propel\Tests\Generator\Behavior;
+namespace Propel\Tests\Generator\Behavior\Timestampable;
use Propel\Tests\Helpers\Bookstore\BookstoreTestBase;
@@ -31,12 +31,12 @@ public function testParameters()
{
$table2 = Table2Peer::getTableMap();
$this->assertEquals(count($table2->getColumns()), 4, 'Timestampable adds two columns by default');
- $this->assertTrue(method_exists('\Propel\Tests\Bookstore\Behavior\Table2', 'getCreatedAt'), 'Timestamplable adds a created_at column by default');
- $this->assertTrue(method_exists('\Propel\Tests\Bookstore\Behavior\Table2', 'getUpdatedAt'), 'Timestamplable adds an updated_at column by default');
+ $this->assertTrue(method_exists('\Propel\Tests\Bookstore\Behavior\Table2', 'getCreatedAt'), 'Timestampable adds a created_at column by default');
+ $this->assertTrue(method_exists('\Propel\Tests\Bookstore\Behavior\Table2', 'getUpdatedAt'), 'Timestampable adds an updated_at column by default');
$table1 = Table1Peer::getTableMap();
$this->assertEquals(count($table1->getColumns()), 4, 'Timestampable does not add two columns when they already exist');
- $this->assertTrue(method_exists('\Propel\Tests\Bookstore\Behavior\Table1', 'getCreatedOn'), 'Timestamplable allows customization of create_column name');
- $this->assertTrue(method_exists('\Propel\Tests\Bookstore\Behavior\Table1', 'getUpdatedOn'), 'Timestamplable allows customization of update_column name');
+ $this->assertTrue(method_exists('\Propel\Tests\Bookstore\Behavior\Table1', 'getCreatedOn'), 'Timestampable allows customization of create_column name');
+ $this->assertTrue(method_exists('\Propel\Tests\Bookstore\Behavior\Table1', 'getUpdatedOn'), 'Timestampable allows customization of update_column name');
}
public function testPreSave()
@@ -58,7 +58,7 @@ public function testGetClassnameWithClassAndNamespace()
}
/**
- * @expectedException BuildException
+ * @expectedException \Propel\Generator\Exception\BuildException
*/
public function testGetClassnameOnInexistantProperty()
{
@@ -94,7 +94,7 @@ public function testXmlToAppData()
}
/**
- * @expectedException \InvalidArgumentException
+ * @expectedException \Propel\Generator\Exception\BehaviorNotFoundException
*/
public function testUnkownBehavior()
{
@@ -102,7 +102,7 @@ public function testAddBehavior()
EOF;
$appData = $xmlToAppData->parseString($schema);
$table = $appData->getDatabase('test1')->getTable('table1');
- $this->assertThat($table->getBehavior('timestampable'), $this->isInstanceOf('\Propel\Generator\Behavior\TimestampableBehavior'), 'addBehavior() uses the behavior class defined in build.properties');
+ $this->assertThat($table->getBehavior('timestampable'), $this->isInstanceOf('\Propel\Generator\Behavior\Timestampable\TimestampableBehavior'), 'addBehavior() uses the behavior class defined in build.properties');
}
/**
@@ -275,16 +275,16 @@ propel.oracle.autoincrementSequencePattern = ${table}_SEQ
#
# -------------------------------------------------------------------
-propel.behavior.timestampable.class = \Propel\Generator\Behavior\TimestampableBehavior
-propel.behavior.alternative_coding_standards.class = \Propel\Generator\Behavior\AlternativeCodingStandardsBehavior
-propel.behavior.auto_add_pk.class = \Propel\Generator\Behavior\AutoAddPkBehavior
+propel.behavior.timestampable.class = \Propel\Generator\Behavior\Timestampable\TimestampableBehavior
+propel.behavior.alternative_coding_standards.class = \Propel\Generator\Behavior\AlternativeCodingStandards\AlternativeCodingStandardsBehavior
+propel.behavior.auto_add_pk.class = \Propel\Generator\Behavior\AutoAddPk\AutoAddPkBehavior
propel.behavior.nested_set.class = \Propel\Generator\Behavior\NestedSet\NestedSetBehavior
propel.behavior.sortable.class = \Propel\Generator\Behavior\Sortable\SortableBehavior
-propel.behavior.sluggable.class = \Propel\Generator\Behavior\SluggableBehavior
+propel.behavior.sluggable.class = \Propel\Generator\Behavior\Sluggable\SluggableBehavior
propel.behavior.concrete_inheritance.class = \Propel\Generator\Behavior\ConcreteInheritance\ConcreteInheritanceBehavior
propel.behavior.query_cache.class = \Propel\Generator\Behavior\QueryCache\QueryCacheBehavior
propel.behavior.aggregate_column.class = \Propel\Generator\Behavior\AggregateColumn\AggregateColumnBehavior
propel.behavior.versionable.class = \Propel\Generator\Behavior\Versionable\VersionableBehavior
propel.behavior.i18n.class = \Propel\Generator\Behavior\I18n\I18nBehavior
-propel.behavior.delegate.class = \Propel\Generator\Behavior\DelegateBehavior
+propel.behavior.delegate.class = \Propel\Generator\Behavior\Delegate\DelegateBehavior
propel.behavior.archivable.class = \Propel\Generator\Behavior\Archivable\ArchivableBehavior

0 comments on commit c3e0e77

Please sign in to comment.