atk4\data\tests\FieldTest::testSystem1 PHP Method

testSystem1() public method

public testSystem1 ( )
    public function testSystem1()
    {
        $m = new Model();
        $m->addField('foo', ['system' => true]);
        $m->addField('bar');
        $this->assertEquals(false, $m->getElement('foo')->isEditable());
        $this->assertEquals(false, $m->getElement('foo')->isVisible());
        $m->onlyFields(['bar']);
        // TODO: build a query and see if the field is there
    }