Ejemplo n.º 1
0
 public function unitTest($phpunit)
 {
     if (get_class($this) == '\\COREPOS\\Fannie\\API\\FannieCRUDPage') {
         $this->model_name = 'FloorSectionsModel';
         $phpunit->assertEquals('floorSectionID', $this->getIdCol());
         $phpunit->assertEquals('FloorSectionsModel', get_class($this->getCRUDModel()));
         $phpunit->assertEquals(array('name', 'NEW'), $this->findPlaceholder($this->model->getColumns(), $this->getIdCol()));
         $phpunit->assertNotEquals(0, strlen($this->get_view()));
         $this->connection->throwOnFailure(true);
         ob_start();
         $phpunit->assertEquals(false, $this->put_handler());
         $json = ob_get_clean();
         $model = new \FloorSectionsModel($this->connection);
         $model->floorSectionID(1);
         $phpunit->assertEquals(true, $model->load());
         $this->id = 1;
         $this->delete_id_handler();
         $model->reset();
         $model->floorSectionID(1);
         $phpunit->assertEquals(false, $model->load());
     }
 }