zenstruck / browser

A fluent interface for your Symfony functional tests.
MIT License
195 stars 19 forks source link

assertSuccessfull for pantherBrowser #63

Closed cadot-info closed 3 years ago

cadot-info commented 3 years ago

I have read the README, it says ` public function test_using_kernel_browser(): void { $this->browser() ->visit('/my/page') ->assertSuccessful() ; }

/**
 * Requires this test extend Symfony\Component\Panther\PantherTestCase.
 */
public function test_using_panther_browser(): void
{
    $this->pantherBrowser()
        ->visit('/my/page')
        ->assertSuccessful()
    ;
}`

but if i test with pantherbrowser i have this error: 1) App\Tests\HomeControllerTest::testSomething Error: Call to undefined method Zenstruck\Browser\PantherBrowser::assertSuccessful() I have read src/Browser/PantherBrowser.php and Browser.php and i has not AssertSuccessfull.

kbond commented 3 years ago

Hey! Yes, that is indeed a typo in the docs - I'll get that fixed.

For reference, Panther does not have access to the response status code so that's why that method is not available on PantherBrowser.

cadot-info commented 3 years ago

yes, i know this ;-) thanks for your fast response and your good job.