Permalink
Browse files

add test for class targets build

  • Loading branch information...
havvg committed Feb 1, 2012
1 parent a9d972e commit 84df995a97d0a94491eb336cfd589ea76f3f9e5a
Showing with 14 additions and 0 deletions.
  1. +14 −0 test/testsuite/generator/util/PropelQuickBuilderTest.php
@@ -101,6 +101,20 @@ public function testBuildClasses($builder)
$this->assertTrue(QuickBuildFoo1Peer::getTableMap() instanceof QuickBuildFoo1TableMap);
}
+ /**
+ * @dataProvider simpleSchemaProvider
+ */
+ public function testGetClassesLimitedClassTargets($builder)
+ {
+ $script = $builder->getClasses(array('tablemap', 'peer', 'object', 'query'));
+ $this->assertNotContains('class QuickBuildFoo1 extends BaseQuickBuildFoo1', $script);
+ $this->assertNotContains('class QuickBuildFoo1Peer extends BaseQuickBuildFoo1Peer', $script);
+ $this->assertNotContains('class QuickBuildFoo1Query extends BaseQuickBuildFoo1Query', $script);
+ $this->assertContains('class BaseQuickBuildFoo1 extends BaseObject', $script);
+ $this->assertContains('class BaseQuickBuildFoo1Peer', $script);
+ $this->assertContains('class BaseQuickBuildFoo1Query extends ModelCriteria', $script);
+ }
+
public function testBuild()
{
$schema = <<<EOF

0 comments on commit 84df995

Please sign in to comment.