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);
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);
}