zenstruck /
browser
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Zenstruck\Browser\Tests; |
||
| 4 | |||
| 5 | use Symfony\Component\Panther\PantherTestCase; |
||
| 6 | use Zenstruck\Browser\HttpBrowser; |
||
| 7 | |||
| 8 | /** |
||
| 9 | * @author Kevin Bond <[email protected]> |
||
| 10 | */ |
||
| 11 | final class HttpBrowserTest extends PantherTestCase |
||
| 12 | { |
||
| 13 | use BrowserKitBrowserTests; |
||
|
0 ignored issues
–
show
introduced
by
Loading history...
|
|||
| 14 | |||
| 15 | /** |
||
| 16 | * @test |
||
| 17 | */ |
||
| 18 | public function can_use_http_browser_as_typehint(): void |
||
| 19 | { |
||
| 20 | $this->browser() |
||
| 21 | ->use(function(HttpBrowser $browser) { |
||
| 22 | $browser->visit('/redirect1'); |
||
| 23 | }) |
||
| 24 | ->assertOn('/page1') |
||
| 25 | ; |
||
| 26 | } |
||
| 27 | |||
| 28 | protected function browser(): HttpBrowser |
||
| 29 | { |
||
| 30 | return $this->httpBrowser(); |
||
| 31 | } |
||
| 32 | } |
||
| 33 |