/** * @expectedException InvalidArgumentException * @expectedExceptionMessage Command was not found matching foo */ public function testMagicCallBehaviorEnsuresCommandExists() { $client = new Mock\MockClient(); $client->setDescription($this->service); $client->enableMagicMethods(true); $client->foo(); }
/** * @covers Guzzle\Service\Client::__call * @covers Guzzle\Service\Client::setMagicCallBehavior * @expectedException InvalidArgumentException * @expectedExceptionMessage Command was not found matching foo */ public function testMagicCallBehaviorEnsuresCommandExists() { $client = new Mock\MockClient(); $client->setDescription($this->service); $client->setMagicCallBehavior(Client::MAGIC_CALL_RETURN); $client->foo(); }