All Dusk tests fail on Travis-ci

Hello, I have a Laravel 5.4 app with Dusk 1.0 (as recommended). All my Dusk tests pass locally but do not on Travis-CI. This is my .tr...
01

"The expected [App\Jobs\ChargeBox] job was not pushed."

Hi, I've the following test scenario: public function test_box_is_charged_after_shipment_creation() { // Arrange Que...
01

How to catch incorrect URLs in blade via tests?

I am developing a mini project to understand TDD. I recently encountered a situation where all my tests were returning green but the system had a b...
01

Testing api - DELETE request gives 404 response

Hi I am trying to test one of my api endpoints which is working in the browser but I can't get the test to pass as it returns a 404 from the...
03

Pass cookie during tests

In my Laravel unit testing, I need to give a cookie to access the page, but it doesn't seem to work. I'm using Laravel's example:...
01

Help me understand withExceptionHandling() and withoutExceptionHandling()

Can someone briefly explain when should we add $this->withExceptionHandling() and $this->withoutExceptionHandling()...
02

Invoking the Artisan Dusk command outside the CLI

Hello Guys, I can't seem to figure out how to run the Artisan Dusk Command via route. I have the following but doesn't work...
22

phpunit is reading "autoload" from composer.json instead of "autoload-dev"

I'm going through Jeffrey's series "Let's build a forum with laravel and tdd" The following doesn't work: "...
01

Method naming conventions

Hi guys. I'm working on Laravel...
03

[5.0] PHPUnit testing the POST request with csrf

Hi guys. I'm having a problem testing the POST request in Laravel 5. This snippet tries to check if the user can subscribe to the n...
11

assertJson: Unable to find JSON within response

I'm testing a JSON response from a controller. The controller method: public function index() {...
03

Do not want to disable Middleware and yet get the test to green

My test is as follows: /** @test */ public function guests_cannot_create_quiz() { //$this->withoutMiddleware();...
02

Testing a Laravel application with Cypress: 419 insufficient space on resource

I'm testing a Laravel application with Cypress. The test for the login page looks like this: desc...
00

Factories localization

I need to localize faker data. And I found that current solution eating huge amount of RAM. Right now my code looks like this one:...
09

ReflectionException: Class App\Http\Controllers\Questions does not exist

I've ran into a strange issue and I'm unable to find the fix. Here's my test that's failing: /** @test */ public function an_aut...
05

Laravel Mix is breaking a Feature test?

So I have a new Laravel 5.4 install on Valet and I'm trying to start to write tests. The test is very straight forward and the view is worki...
10

'Unauthenticated' exception while testing for simple redirect

My controller has a constructor that defines the middleware 'auth', class QuestionsController extends Controller { public functi...
01

Mac shutdown during tests. why?

Sometimes when running my phpunit tests my Mac Mini shuts down without warning. This can also happen when running dusk test as well. Without warnin...
05

How to mock a user with a Cashier/Stripe subscription?

I'm trying to test things like checking if a user on a specific subscription plan has access to a specific feature and I can't find how to mock a s...
02

Getting Error on validation, when I'm not trying to validate

I'm on Episode 18: Let's Build A Forum with Laravel and TDD: A User Can Favorite Replies (...
02