Blackfire\Player\Scenario::visit PHP Method

visit() public method

public visit ( $uri, $method = 'GET', $values = [] ) : Step
return Step
    public function visit($uri, $method = 'GET', $values = [])
    {
        return $this->root->visit($uri, $method, $values);
    }

Usage Example

Beispiel #1
0
 public function testFoo()
 {
     $scenario = new Scenario();
     $scenario->visit('url("/")');
     $mock = new MockHandler([new Response(200, ['X-Foo' => 'Bar']), new Response(202, ['Content-Length' => 0]), new RequestException('Error Communicating with Server', new Request('GET', 'test'))]);
     $handler = HandlerStack::create($mock);
     $guzzle = new GuzzleClient(['handler' => $handler]);
     $player = new Player($guzzle);
     $player->run($scenario);
 }