mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR Added MoneyTest->testLoadFromFixture()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77633 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
cdbc501c93
commit
825362bf00
@ -15,6 +15,14 @@ class MoneyTest extends SapphireTest {
|
||||
|
||||
static $fixture_file = 'sapphire/tests/model/MoneyTest.yml';
|
||||
|
||||
function testLoadFromFixture() {
|
||||
$obj = $this->objFromFixture('MoneyTest_DataObject', 'test1');
|
||||
|
||||
$this->assertType('Money', $obj->MyMoney);
|
||||
$this->assertEquals($obj->MyMoney->getCurrency(), 'EUR');
|
||||
$this->assertEquals($obj->MyMoney->getAmount(), 1.23);
|
||||
}
|
||||
|
||||
function testCanOverwriteSettersWithNull() {
|
||||
$obj = new MoneyTest_DataObject();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user