Inheritance: extends Jenssegers\Model\Model
Exemplo n.º 1
0
 public function testPaginateHydrateMethod()
 {
     ModelStub::setClient(new ClientStub());
     $model = ModelStub::find(1);
     $newModel = $model->paginateHydrate(['pagination' => ['next' => '', 'perPage' => 15, 'last' => 1], 'items' => [['name' => 'John Doe']]]);
     $this->assertEquals(1, $newModel->count());
 }
Exemplo n.º 2
0
 public function testHydrate()
 {
     $models = ModelStub::hydrate([['name' => 'John Doe']]);
     $this->assertEquals('John Doe', $models[0]->name);
 }