Top "Mockery" questions

Mockery is a PHP library used to create Mocks of Objects for testing purpose.

Laravel 5 - Unit testing - status code 500, expected 200

Why unit test in "test 1" returns me status code 500, not 200 ? Can somebody explain me ? Here is example in 2 tests for …

php unit-testing laravel laravel-5 mockery
Error using Mockery/phpUnit in Laravel

I'm a novice developer trying to get a test suite started for an existing laravel app but I have not …

php laravel phpunit mockery
How to mock a constructor with Mockery

I need to test, that the code creates a new instance of a class with certain parameters: $bar = new ProgressBar($…

php unit-testing mockery
php:use "Mockery" to mock a static method called in another static method

I want to mock a static method which has been used in another method using Mokcery,Just as follows: Class …

php testing phpunit mockery
How to Test Laravel Socialite

I have an application that makes use of socialite, I want to create test for Github authentication, So I used …

php laravel testing mockery
mocking out database queries laravel mockery

I am trying to wrap my head around Unit testing with PhpUnit / Mockery / Laravel. It's not coming easy. I've been …

php unit-testing laravel mockery
How to mock static methods of a Laravel Eloquent model?

I have in my code a line like this: ModelName::create($data); where ModelName is just an Eloquent model. Is …

unit-testing laravel eloquent mockery
Laravel Dependency Injection: When do you have to? When can you mock Facades? Advantages of either method?

I've been using Laravel for a while now and I have been reading a lot about Dependency Injection an testable …

php unit-testing dependency-injection laravel-4 mockery