Created
September 6, 2011 18:11
-
-
Save fabriziomachado/1198474 to your computer and use it in GitHub Desktop.
tests/models/PersonTest.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
<?php | |
include_once dirname(__FILE__) . '/../support/enviromment.php'; | |
/** | |
* @group models | |
*/ | |
class PersonTest extends CIUnit_TestCase { | |
public function setUp() { | |
$this->CI->load->spark('php-activerecord/0.0.1'); | |
parent::setUp(); | |
} | |
public function tearDown() { | |
parent::tearDown(); | |
} | |
public function testShouldImplementSingleTableInheritance() { | |
$person = new Person(); | |
$studend = new Student(); | |
$teacher = new Teacher(); | |
$expected = array($person->type, $studend->type, $teacher->type); | |
$actual = array(NULL,'Student', 'Teacher'); | |
$this->assertEquals($expected, $actual); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment