mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-08-26 12:36:07 +02:00
See "Static configuration properties are now immutable, you must use Config API." in the 3.1 change log for details.
21 lines
550 B
PHP
21 lines
550 B
PHP
<?php
|
|
|
|
class HasManyListTest extends SapphireTest {
|
|
|
|
// Borrow the model from DataObjectTest
|
|
protected static $fixture_file = 'DataObjectTest.yml';
|
|
|
|
protected $extraDataObjects = array(
|
|
'DataObjectTest_Team',
|
|
'DataObjectTest_SubTeam',
|
|
'DataObjectTest_Player',
|
|
);
|
|
|
|
public function testRelationshipEmptyOnNewRecords() {
|
|
// Relies on the fact that (unrelated) comments exist in the fixture file already
|
|
$newTeam = new DataObjectTest_Team(); // has_many Comments
|
|
$this->assertEquals(array(), $newTeam->Comments()->column('ID'));
|
|
}
|
|
|
|
}
|