HttpBrowserTest::browser()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
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
The trait Zenstruck\Browser\Tests\BrowserKitBrowserTests requires some properties which are not provided by Zenstruck\Browser\Tests\HttpBrowserTest: $preActionsCalled, $preAssertionsCalled
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