Blackfire\Player\Scenario::visit PHP Метод

visit() публичный Метод

public visit ( $uri, $method = 'GET', $values = [] ) : Step
Результат Step
    public function visit($uri, $method = 'GET', $values = [])
    {
        return $this->root->visit($uri, $method, $values);
    }

Usage Example

Пример #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);
 }