Laravel Repositories is a package for Laravel 5 which is used to abstract the database layer. This makes applications much easier to maintain.
823
stars
233
forks
source link
Repository::pushCriteria() does not exist on this mock object #77
Open
vdomah opened 8 years ago
Running tests got this error:
Making mock like that
$this->productRepository = \Mockery::mock('App\Repositories\ProductRepository');
In the same time
$this->productRepository->shouldReceive('paginate')
doesn't give errorsMore code:
public function setUp() { parent::setUp(); $this->productRepository = m::mock('App\Repositories\ProductRepository'); $this->variantRepository = m::mock('App\Repositories\VariantRepository'); $this->request = m::mock('Illuminate\Http\Request'); $this->productController = new \App\Http\Controllers\Admin\ProductController($this->productRepository, $this->variantRepository); } public function tearDown() { m::close(); parent::tearDown(); }