mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
19 lines
416 B
PHP
19 lines
416 B
PHP
<?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());
|
|
}
|
|
}
|