"robotters" is robots in danish
Inheritance: extends Phalcon\Mvc\Model
Exemplo n.º 1
0
 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);
     });
 }