mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX Fixed DataObjectTest->testHasDatabaseField(), test wasn't activated due to method naming. Fixed one assertion in this test which was the wrong way around.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78424 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
b2460de140
commit
059aa76eec
@ -4,6 +4,7 @@
|
|||||||
* @subpackage tests
|
* @subpackage tests
|
||||||
*/
|
*/
|
||||||
class DataObjectTest extends SapphireTest {
|
class DataObjectTest extends SapphireTest {
|
||||||
|
|
||||||
static $fixture_file = 'sapphire/tests/DataObjectTest.yml';
|
static $fixture_file = 'sapphire/tests/DataObjectTest.yml';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -692,7 +693,7 @@ class DataObjectTest extends SapphireTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function hasDatabaseField() {
|
function testHasDatabaseField() {
|
||||||
$team = singleton('DataObjectTest_Team');
|
$team = singleton('DataObjectTest_Team');
|
||||||
$subteam = singleton('DataObjectTest_SubTeam');
|
$subteam = singleton('DataObjectTest_SubTeam');
|
||||||
|
|
||||||
@ -717,7 +718,7 @@ class DataObjectTest extends SapphireTest {
|
|||||||
"hasOwnDatabaseField() doesn't pick up fields in subclasses on parent class"
|
"hasOwnDatabaseField() doesn't pick up fields in subclasses on parent class"
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->assertFalse(
|
$this->assertTrue(
|
||||||
$subteam->hasDatabaseField('SubclassDatabaseField'),
|
$subteam->hasDatabaseField('SubclassDatabaseField'),
|
||||||
"hasOwnDatabaseField() picks up fields in subclasses"
|
"hasOwnDatabaseField() picks up fields in subclasses"
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user