public function test_Should_GetRecipesByPage() { Factory::createList('App\\Models\\Recipe', [['name' => 'Recipe 1', 'description' => '', 'body' => ''], ['name' => 'Recipe 2', 'description' => '', 'body' => ''], ['name' => 'Recipe 3', 'description' => '', 'body' => ''], ['name' => 'Recipe 4', 'description' => '', 'body' => ''], ['name' => 'Recipe 5', 'description' => '', 'body' => '']]); $recipeRepository = new EloquentRecipe(new App\Models\Recipe()); $foundRecipes = $recipeRepository->byPage(); $this->assertCount(5, $foundRecipes->items()); }