Phalcon\Test\Unit\Mvc\ModelTest::testFindersRenamed PHP Method

testFindersRenamed() public method

public testFindersRenamed ( )
    public function testFindersRenamed()
    {
        $this->specify("Models can't be found properly when using a column map", function () {
            $robot = Robotters::findFirstByCode(1);
            expect($robot)->isInstanceOf(Robotters::class);
            expect($robot->code)->equals(1);
            $robot = Robotters::findFirstByCode(2);
            expect($robot)->isInstanceOf(Robotters::class);
            expect($robot->code)->equals(2);
            $robots = Robotters::findByTheType('mechanical');
            expect($robots)->count(2);
            expect($robots[0]->code)->equals(1);
            expect(Robotters::countByTheType('mechanical'))->equals(2);
        });
    }