Gc\Script\ModelTest::testFromId PHP Method

testFromId() public method

Test
public testFromId ( ) : void
return void
    public function testFromId()
    {
        $array = array('name' => 'String', 'identifier' => 'string', 'description' => 'Description', 'content' => 'Content');
        $model = $this->object->fromArray($array);
        $model->save();
        $id = $model->getId();
        $model = $this->object->fromId($id);
        $this->assertEquals('string', $model->getIdentifier());
        $model->delete();
    }