Esempio n. 1
0
 public function testSettingNextResponseToAnInvalidIndex()
 {
     $indexes = array(-1, 1);
     foreach ($indexes as $i) {
         try {
             $this->adapter->setResponseIndex($i);
             $this->fail();
         } catch (\Exception $e) {
             $this->assertInstanceOf('Zend\\Http\\Client\\Adapter\\Exception', $e);
             $this->assertRegexp('/out of range/i', $e->getMessage());
         }
     }
 }
 public function testSettingNextResponseToAnInvalidIndex()
 {
     $indexes = array(-1, 1);
     foreach ($indexes as $i) {
         try {
             $this->adapter->setResponseIndex($i);
             $this->fail();
         } catch (Exception $e) {
             $class = 'Zend_Http_Client_Adapter_Exception';
             $this->assertType($class, $e);
             $this->assertRegexp('/out of range/i', $e->getMessage());
         }
     }
 }