public function testEncoding() { $server = new Server(); $this->assertNull($server->getEncoding()); $server->setEncoding('ISO-8859-1'); $this->assertEquals('ISO-8859-1', $server->getEncoding()); $this->setExpectedException('Zend\\Soap\\Exception\\InvalidArgumentException', 'Invalid encoding specified'); $server->setEncoding(array('UTF-8')); }
public function testEncoding() { $server = new 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 } }