pascal78 pascal78
3

please help me configure filesystem for testing spatie/medialibrary

Hello everybody I'm using spatie/medialibrary for managing profile's avatar. It works perfectly in my app, avatar is updated and conversions are generated automatica...
Testing
3
115
untymage untymage
3

Unable to testing Many to Many Relationship Assertion Failed

Has anyone tried 'assertInstanceOf' method on Many-to-Many Relationship?After a day, I could not solve the problem after a day of search : Edit: Sorry I had to submi...
Testing
3
124
andersfloor andersfloor
3

Dusk test does not see database update

I'm trying to replicate the Email verification lesson in Laravel 5.5 using Dusk for testing. I'm r...
Testing
3
307
chrisebner chrisebner
3

Brownfield Testing

Hello Artisans, I'm looking for testing advice for Brownfield Projects. Let's assume the following scenario: - You take over a laravel project...
Testing
3
101
Maged Maged
5

could not find driver issue

when i run phpunit i get this error Illuminate\Database\QueryException: could not find driver (SQL: PRAGMA foreign_keys = ON;) i'm working o...
Testing
5
165
Tangente Tangente
1

PHPUnit with Laravel 5.8

Trying to follow along https://laracasts.com/series/phpunit-test...
imirko imirko
5

assertSee on a non existing property returns green

Hello everyone, I have a couple of years of experience with Laravel but I am completely new to TDD world. Just learning and Laracasts has been a great resource, as a...
Testing
5
210

Is this time normal for my tests?

TestingDB: mysql Processor: I7-8750H RAM: 16gb Platform: valet on macOS PHPUnit 7.3.5 by Sebastian Bergmann and contributors. .................................
Testing
6
164
dacastro4 dacastro4
7

Getting status 419 running a phpunit test

Hey Guys. I have a weird issue that i don’t understand entirely. I’m running a test but a I’m getting a ng $member = factory(User::class)-...
Testing
7
832
markandrewkato markandrewkato
2

Testing 3rd party libraries or webhooks

Is it possible to do feature testing on 3rd party libraries or webhooks? I can't seem to find an answer anywhere related to this. Any help would be appreciated. Thank you....
Catalinul Catalinul
2

I can not use actingAs to act as a logged user when testing.

So.. I am trying to learn TDD on my own using different sources, now, that I have a good understanding, I tried to do everything on my own but it seems that I can not act a...
Testing
2
105

$this->mock(..) doesn't mock the interface in the controller I'm calling

Hi trying to make this work: $this->mock(ApiContract::class, function ($mock) { $mock ->shouldReceive('getStuff') ->once(...
Testing
4
100
smnhunt smnhunt
3

Problem with assertRedirectedToRoute()

Hi, I'm probably making a daft mistake but just don't seem to be able to get assertRedirectToRoute() to work in my tests - any help would be gratefully appreciated....
Testing
3
348
RobertOs RobertOs
1

Laravel and test with JEST

Hi. I have a little problem with jest and laravel. Maybe you will be able guide me somehow. I want use jest test in laravel. I found guide how to do it:...
Testing
1
166
kennybjr87 kennybjr87
11

RuntimeException: No application encryption key has been specified 5.8

I downloaded a brand new install of laravel 5.8 before even doing any coding at all running phpunit on the ExampleTest is failing with a RuntimeException: No application en...
Testing
11
447
wesleya wesleya
7

Testing job dispatch in Laravel

Is there a way to test that a job is dispatched with the correct parameters in Laravel phpunit? For example, I have a job that searches for images that should be deleted. F...
Testing
7
3224
fureszk fureszk
2

assertDatabaseHas not working as expected

Hello Everyone, I'm having an issue with testing Laravel 5.5. I have modified phpunit.xml to use DB_CONNECTION "testing", which is a mysql database....
Testing
2
639
pilat pilat
9

Feature tests do not work (404)

Hi, I'm having this little (I'm sure) problem with testing, but I seem to be stuck as I don't know how to troubleshoot it further. There just seem to be not enough info…...
Testing
9
212
mikebronner mikebronner
6

sqLite "no such table" Error In Unit Tests With Migrations

I have set up unit tests in Laravel 5.1 using sqLite ion-memory databases. I am getting the following error when running my tests: PDOException: SQLSTATE[HY0...
Testing
6
1157

This version of ChromeDriver only supports Chrome version 74

Hi! I'm trying to learn how to test laravel and stuck with that error when I running "php artisan dusk" Tests\Browser\ExampleTest::testBasicExample F...
Testing
1
267
miggi miggi
0

How to navigate through javascript tests file in sublime text

Hi, guys! With php tests we can hit Ctrl + R in sublime text to see all methods in file, I can't do the same with my js tests cause all test names are strings. But I need t...
drewdan drewdan
2

Test starts before seeding finishes

Hey Guys, How does seeding in tests work? protected function setUp() { parent::setUp(); $this->artisan('migrate'); (new \Da...
Testing
2
120
chrisblackwell chrisblackwell
2

Testing Gate Policies

Does anyone know how to test a GatePolicy directly? For example, I want to test that my UserPolicy works a certain way given permissions. I don't want to have to hit...
Testing
2
113
canadianlover canadianlover
5

SQLite - unique constraint failed

I have a test in my aqpplication. I have the following model factory: use App\Hand; /* |----------------------------------------...
Testing
5
138
etrainerspy etrainerspy
13

Getting an error on the command: php artisan migrate

This is the message that I am getting: [Illuminate\Database\QueryException] SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from information_schema.t...
Testing
13
2660
ctyler ctyler
1

Telescope not logging Registered Event

So I am using Telescope for testing and troubleshooting. When a person registers they are to select an employer form a drop down. The employer is to get an email so...
untymage untymage
3

Why are my tests is slower than Jeffrey's tests?

OS : Windows 10 Hardware: i7 - 6700k, SSD 850 EVO - 16Gig RAM ENV : Vagrant / PHPStorm Hello everyone, I'm just wondering at why my tests are slow? Despite the fact...
Testing
3
191
supertrall supertrall
14

Laravel ignores the testing connection

I have a big and complex mysql-based schema and I want to use an in-memory sqlite database for testing using migrations for cleaning up as it's said here:...
Testing
14
1128
keizah keizah
5

Laravel table seeding using model factory

I'm trying to seed my table with fake data and the problem is when I'm trying to get data from the collection or using method. Returned data is always the same. Why I am n...
Testing
5
134
hjortur17 hjortur17
1

Expected status code 422 but received 500

Hi, any ideas why I'm getting this error message? I can't figure it out. What files do you need to see...
Testing
1
112
mohammadkaab mohammadkaab
0

Laravel dusk can't run two tests referring to one page

Hi I'm writing a couple of tests with LARAVEL dusk and I've recently dumped to a new problem. well, the problem is very famous and everyone has seen it for once at least Ac...
jacquet-clement jacquet-clement
0

Dusk testing vs. Vue unit tests

Hello everybody, I'm struggling finding the best way to test my vue SPA. I've tried using Jest & vue-test-utils to unit test my components / routes / guar...
hjortur17 hjortur17
4

Expected status code 200 but received 201.

I can't figure out why I'm receiving 201 instead of 200. Here is the test and the controller public function users_may_only_reply_a_maximum_of_once_per_minut...
Testing
4
156
hjortur17 hjortur17
12

Session is missing expected key [errors]. Failed asserting that false is true.

Hi, I can't figure out how to get this to green. I get this error message when running this method ERROR: Session is missing expected key [errors]. Fa...
Testing
12
252
Wuanshu Wuanshu
10

A facade root has not been set

Hi everyone. I am trying to run some tests on my Laravel application but I'm stuck. When I run the command ./vendor/bin/phpunit --coverage-html public/tests I...
Testing
10
217
Create a New Discussion Button