public function testMagicCallBehaviorExecuteExecutesCommands()
 {
     $client = new Mock\MockClient();
     $client->setDescription($this->service);
     $client->getEventDispatcher()->addSubscriber(new MockPlugin(array(new Response(200))));
     $result = $client->mockCommand();
     $this->assertInstanceOf('Guzzle\\Http\\Message\\Response', $result);
 }
Пример #2
0
 public function testGetCommandAfterTwoSetDescriptions()
 {
     $service1 = ServiceDescription::factory(__DIR__ . '/../TestData/test_service.json');
     $service2 = ServiceDescription::factory(__DIR__ . '/../TestData/test_service_3.json');
     $client = new Mock\MockClient();
     $client->setDescription($service1);
     $client->getCommand('foo_bar');
     $client->setDescription($service2);
     $client->getCommand('baz_qux');
 }