pest icon indicating copy to clipboard operation
pest copied to clipboard

Different behavior between phpunit and pest when using depends

Open Lukasss93 opened this issue 3 years ago • 4 comments

Hi, I don't know if this "bug" (?) is related to this plugin or to Pest itself...

When I run a single test with PHPStorm, I noticed that there is different behavior between PHPUnit and Pest when using @depends.

PHPUnit: correct behavior ✅

immagine

Pest: wrong behavior ❌

immagine

It seems the pest plugin doesn't start dependent test.

Lukasss93 avatar Apr 05 '22 23:04 Lukasss93

Hmm interesting, I think it might be a pest bug, but I'll hear the others 🤔

olivernybroe avatar Apr 06 '22 15:04 olivernybroe

I have moved this bug reported on the IntelliJ plugin to the pest repository as for me it looks like a pest issue.

If this is in fact something extra I need to do in the plugin, we can move it back 👍

olivernybroe avatar Apr 14 '22 08:04 olivernybroe

I think it's about the naming.

Can you try to use :

->depends('test foo')

It worked for me when i used it like

->depends('it foo')

pildit avatar May 18 '22 17:05 pildit

Not working for me.

Edit: It works but the message is missleading: This test depends on "P\Tests\Feature\MyPestTest::it first" which does not exist. It should be something like: This test depends on "P\Tests\Feature\MyPestTest::it first" which failed.

Edit2: Or better like in PHPUnit: This test depends on "%s" to pass.

frankroc2022 avatar Aug 31 '22 13:08 frankroc2022

Cosing due of lack of activity.

nunomaduro avatar Nov 09 '22 20:11 nunomaduro