private function checkNamespace($name) { if (false === strpos($name, ':')) { return; } list($prefix) = explode(':', $name); // namespace registry will throw exception if namespace prefix not found $this->namespaces[$prefix] = "'" . $this->ns->getURI($prefix) . "'"; }
public function testIterator() { $this->assertTraversableImplemented($this->nr); $results = 0; foreach ($this->nr as $prefix => $url) { $results++; $this->assertInternalType('string', $prefix); $this->assertInternalType('string', $url); $this->assertEquals($url, $this->nr->getURI($prefix)); } $this->assertTrue($results > 3, 'Not enough namespaces'); }