Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #664 from mazenovi/master
add an excluded_parent_behavior to concret_inheritance behavior
- Loading branch information
Showing
3 changed files
with
52 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
...generator/behavior/concrete_inheritance/ConcreteInheritanceExcludedParentBehaviorTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
/* | ||
* $Id: ConcreteInheritanceBehaviorTest.php 1458 2010-01-13 16:09:51Z francois $ | ||
* This file is part of the Propel package. | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* @license MIT License | ||
*/ | ||
|
||
require_once dirname(__FILE__) . '/../../../../tools/helpers/bookstore/BookstoreTestBase.php'; | ||
|
||
/** | ||
* Tests for ConcreteInheritanceParentBehavior class | ||
* | ||
* @author François Zaniontto | ||
* @version $Revision$ | ||
* @package generator.behavior.concrete_inheritance | ||
*/ | ||
class ConcreteInheritanceExcludedParentBehaviorTest extends BookstoreTestBase | ||
{ | ||
public function testHasChildObjectAddChildMethod() | ||
{ | ||
|
||
$article = new ConcreteTag(); // to autoload the BaseConcreteArticle class | ||
$r = new ReflectionClass('BaseConcreteTag'); | ||
$p =$r->getMethod('addChild')->getParameters(); | ||
$this->assertEquals('ConcreteCategory', $p[0]->getClass()->getName(), 'concrete_inheritance does not generate addChild method child object class'); | ||
} | ||
|
||
public function testHasChildPeerIsValidMethod() | ||
{ | ||
$r = new ReflectionClass('BaseConcreteTagPeer'); | ||
$p =$r->getMethod('isValid')->getParameters(); | ||
$this->assertEquals('ConcreteCategory', $p[0]->getClass()->getName(), 'concrete_inheritance does not generate isValid method child peer class'); | ||
} | ||
|
||
} |