public function testEncoding() { $server = new Zend_Soap_Server(); $this->assertNull($server->getEncoding()); $server->setEncoding('ISO-8859-1'); $this->assertEquals('ISO-8859-1', $server->getEncoding()); try { $server->setEncoding(array('UTF-8')); $this->fail('Non-string encoding values should fail'); } catch (Exception $e) { // success } }
public function testEncoding() { if (!extension_loaded('soap')) { $this->markTestSkipped('SOAP Extension is not loaded'); } $server = new Zend_Soap_Server(); $this->assertNull($server->getEncoding()); $server->setEncoding('ISO-8859-1'); $this->assertEquals('ISO-8859-1', $server->getEncoding()); try { $server->setEncoding(array('UTF-8')); $this->fail('Non-string encoding values should fail'); } catch (Exception $e) { // success } }