public function testChangeUrl() { $d = new ServiceDescription('https://example.com/router', 'My.namespace'); $a1 = new ActionDescription('action1', array(new MethodDescription('method1'))); $d->addAction($a1); $d->setUrl('https://example.com/router2'); $this->assertEquals('https://example.com/router2', $d->getUrl()); $this->assertJsonStringEqualsJsonString(json_encode(array('type' => 'remoting', 'url' => 'https://example.com/router2', 'namespace' => 'My.namespace', 'actions' => array('action1' => array(array('name' => 'method1', 'len' => 0))))), json_encode($d)); }