bosnadev / repository

Laravel Repositories is a package for Laravel 5 which is used to abstract the database layer. This makes applications much easier to maintain.
https://bosnadev.com
825 stars 235 forks source link

Repository testing Fails #74

Open Mohib1992 opened 8 years ago

Mohib1992 commented 8 years ago

When i run a test to test the controller class below issues arise.

ErrorException: Argument 1 passed to Bosnadev\Repositories\Eloquent\Repository::__construct() must be an instance of Illuminate\Container\Container, none given, called in

How to get ride of that.Here is my test class

<?php

use App\Http\Controllers\ApplicationController; use App\Repo\ApplicationRepository; use Illuminate\Foundation\Testing\WithoutMiddleware; use Illuminate\Foundation\Testing\DatabaseMigrations; use Illuminate\Foundation\Testing\DatabaseTransactions;

class ApplicationTest extends TestCase { /* @test / public function testAppIndex() { $repo = new ApplicationRepository(); $controller = new ApplicationController($repo);

}

}