atk4\data\tests\TypecastingTest::testTryLoad PHP Method

testTryLoad() public method

public testTryLoad ( )
    public function testTryLoad()
    {
        $a = ['types' => [['date' => '2013-02-20']]];
        $this->setDB($a);
        $db = new Persistence_SQL($this->db->connection);
        $m = new Model($db, ['table' => 'types']);
        $m->addField('date', ['type' => 'date', 'dateTimeClass' => '\\atk4\\data\\tests\\MyDate']);
        $m->tryLoad(1);
        $this->assertTrue($m['date'] instanceof MyDate);
    }