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()); }
public function testHydrate() { $models = ModelStub::hydrate([['name' => 'John Doe']]); $this->assertEquals('John Doe', $models[0]->name); }