CRUDlexTests\EntityDefinitionTest::testGetType PHP Method

testGetType() public method

public testGetType ( )
    public function testGetType()
    {
        $fields = ['title', 'pages', 'release', 'library', 'id', 'created_at', 'updated_at', 'deleted_at', 'version'];
        $expected = ['text', 'integer', 'date', 'reference', 'string', 'datetime', 'datetime', 'datetime', 'integer', null];
        $read = [];
        foreach ($fields as $field) {
            $read[] = $this->definition->getType($field);
        }
        $read[] = $this->definition->getType('foo');
        $this->assertSame($read, $expected);
    }