silverstripe-framework/tests/php/ORM/DBIntTest.php

19 lines
416 B
PHP
Raw Normal View History

2021-07-06 06:43:54 +02:00
<?php
namespace SilverStripe\ORM\Tests;
use SilverStripe\Dev\SapphireTest;
use SilverStripe\ORM\FieldType\DBInt;
class DBIntTest extends SapphireTest
{
public function testGetValueCastToInt()
{
$field = DBInt::create('MyField');
$field->setValue(3);
$this->assertSame(3, $field->getValue());
$field->setValue('3');
$this->assertSame(3, $field->getValue());
}
}