authentication during testing

I am attempting to test some authenticated routes my web.php routes file has the following Route::middleware(['auth'])->group(func...
00

can use mail:fake

I am attempting to test a command which sends mails my test code is as follows ‚Äč``` namespace Tests\Feature; use App;...
01

This basic Dusk test won't work ?

Hello everybody, I don't know why this basic dusk test doesn't work. <?php namespace Tests\Browser; use Tests\DuskTestCa...
16

Field name doesn't have default value error when I use factories in phpunit(Laravel 5.5)

When I use Factories in a test class in phpunit, field value doesn't insert into database. It returns error General error: 1364 Fiel...
02

Asserting that mailable was sent

Hello all, I want to assert that mailable was sent. \Mail::to($email)->send(new Mailable($data)); ^ This code...
02

Change Config from test case and test routes..

HI, I have a service provider and there I register some routes.. if a given config value is true/false I register different set of routes. Can I so...
02

$model->fresh() returning null in PHPUnit

I'm trying to get a fresh copy of a model, but the fresh() function is returning null. Has anyone come across this before? Code below:...
07

How do I update Chrome on CircleCI for Laravel Dusk?

I am getting an error when running my dusk tests on CircleCI. It complains about the version on chrome that is available on the image. How can I up...
03

TokenMismatchException for Tests

Hi all. I'm starting a new project and I've just written my first test, but it's failing on CSRF validation. I was under the impression that CSRF v...
07

Unable to locate factory with name [default]??

Trying to get Auth up and running on a project and Im running into trouble making model factories for testing. Im getting the following error when...
09

actingAs works half the time

Hey, I'm testing a simple endpoint of my API, which an authenticated user is needed, but half a time I have a 401 instead of 200. Maybe I do...
02

Dusk - running multiple tests break..

i have few tests - in some of them i use the PAGE (SaveCoupon) to fill out the form to keep my tests DRY - in others i dont as i dont need it....
00

Unit testing with sqlite and multiple databases

Hi, My system uses 2 databases and my connection. I'm using sqlite in memory for testing 'sqlite_testing' => [ 'driver' => 'sqlite',...
02

Factories prevent default values being made

With factories, you can normally replace a value by passing it through in an array, however is there a way to prevent the default...
01

How to assert that the database contains a value stored as JSON

Within my PHPUnit test I'm trying to assert that an API endpoint properly stores the data sent to it. In my database I have a field called se...
03

Integration testing soft deletes

I'm trying a simple integration test to test the delete process for a model (in this case an address. Here is the test: /**...
12

CircleCI + Docker + Dusk + Hostname

I've set up some Dusk tests which run great locally, but fail when using Docker within CircleCI. The error I receive is a straightforward one;...
02

Unable to get testing to use a testing database sqlite L5.5

I thought I had this set up cracked but I haven't. It seems no matter what I do I'm unable to get my tests to use an sqlite database to use for tes...
04

Better way to submit json data in post test

I currently have this testable piece of code to submit a json filled data via post. I let my controller do its thing and respond back....
01