getTape() public method

public getTape ( string $name ) : Ikwattro\GuzzleStereo\Record\Tape
$name string
return Ikwattro\GuzzleStereo\Record\Tape
コード例 #1
0
 public function testHasHeaderFilterIsRecordingResponsesWithCorrespondingFilterAndOthers()
 {
     $mock = SimpleMockHandler::create()->withMultipleResponses(5, 200, ['Content-Type' => 'application/json', 'Accept' => 'application/json'], json_encode(array('id' => 1)))->build();
     $client = SimpleMockedClient::createMockedClient($mock, $this->recorder);
     for ($i = 0; $i < 5; $i++) {
         try {
             $client->get('/');
         } catch (RequestException $e) {
         }
     }
     $this->assertCount(5, $this->recorder->getTape('filter-has-header')->getResponses());
 }
コード例 #2
0
 private function assertTapeExist($tape)
 {
     $this->assertInstanceOf('Ikwattro\\GuzzleStereo\\Record\\Tape', $this->recorder->getTape($tape));
     $this->assertEquals($tape, $this->recorder->getTape($tape)->getName());
 }