visit() public method

public visit ( $uri, $method = 'GET', $values = [] ) : Step
return Step
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);
 }