Example #1
0
 public function indexAction()
 {
     $model = new Model($_POST);
     if (empty($_POST)) {
         return $model->empty_form;
     } else {
         $form = $model->index($_POST);
         return array($form, $model->getWinner());
     }
 }
 /**
  * index() should return an array if entities exist
  */
 public function test_index_returnsArray()
 {
     $client = new Api\Client();
     $model = new Model($client);
     $model1 = new Model($client);
     $model1->id = 1;
     $model1->foo = 'bar';
     $model2 = new Model($client);
     $model2->id = 2;
     $model2->foo = 'baz';
     $this->assertEquals([$model1, $model2], $model->index());
     return;
 }
Example #3
0
 function listItems()
 {
     parent::index();
 }