コード例 #1
0
 /**
  * @group mock
  * @depends testFactory
  * @returns SwaggerClient
  */
 public function testMockResourceListing(SwaggerClient $client)
 {
     $plugin = new MockPlugin();
     $plugin->addResponse(new Response(200, array(), $this->resourcesJson));
     $client->addSubscriber($plugin);
     $listing = $client->getResources();
     $this->assertInstanceOf('\\Loco\\Utils\\Swizzle\\Response\\ResourceListing', $listing);
     $this->assertEquals('1.0', $listing->getApiVersion());
     $paths = $listing->getApiPaths();
     $this->assertcount(1, $paths);
     $this->assertEquals('/ping', $paths[0]);
 }