soapClient = new Zend_Service_StrikeIron_BaseTest_MockSoapClient; if (extension_loaded('soap')) { $this->markTestSkipped('SOAP extension is loaded, so cannot test for exception'); } } public function testNoSoapException() { try { $base = new Zend_Service_StrikeIron_Base(array('client' => $this->soapClient, 'username' => 'user', 'password' => 'pass')); $this->fail('Expecting exception of type Zend_Service_StrikeIron_Exception'); } catch (Zend_Exception $e) { $this->assertType('Zend_Service_StrikeIron_Exception', $e, 'Expecting exception of type Zend_Service_StrikeIron_Exception, got '.get_class($e)); $this->assertEquals('SOAP extension is not enabled', $e->getMessage()); } } }