/** @dataProvider provideJson */ public function testShouldExecuteHttpRequestAndAlwaysReturnResponse($url, $hasSucceed, $expectedJson) { $logger = $this->prophesize('GoPay\\Http\\Log\\Logger'); $logger->logHttpCommunication(Argument::cetera())->shouldBeCalled(); $timeout = 1; $browser = new JsonBrowser($logger->reveal(), $timeout); $response = $browser->send(new Request($url)); assertThat($response->hasSucceed(), is($hasSucceed)); assertThat((string) $response, is(nonEmptyString())); assertThat($response->json, is($expectedJson)); }
public function testNonEmptyHasAReadableDescription() { $this->assertDescription('a non-empty string', nonEmptyString()); }
public function testShouldEscapePaths() { assertThat($this->fileOutput->analyzedDir, is('"./"')); assertThat($this->fileOutput->toFile('file'), is('"build//file"')); assertThat($this->fileOutput->appFile('file'), is(nonEmptyString())); }