コード例 #1
0
 /**
  * @expectedException Fabricius\Exception\RuntimeException
  * @expectedExceptionMessage Request to Github failed: An error occured [500]
  */
 public function testExceptionThrownWhenBatchErrors()
 {
     $this->plugin->addResponse(new Response(200, null, json_encode(array(array('path' => 'mock')))));
     $this->plugin->addResponse(new Response(500, null, json_encode(array('message' => 'An error occured'))));
     $parser = Phake::mock('Fabricius\\Parser\\ParserInterface');
     $provider = new GithubLoader($this->client, 'GITHUB OWNER', 'GITHUB REPO');
     $metadata = Phake::mock('Fabricius\\Metadata\\ClassMetadata');
     $content = $provider->load($metadata, $parser);
 }