appendNamespace() public method

public appendNamespace ( phpNamespace $phpNamespace )
$phpNamespace phpNamespace
Exemplo n.º 1
0
 public function testGetNamespace()
 {
     $iterator = new iterators\phpScript();
     $this->assert->variable($iterator->getNamespace(rand(0, PHP_INT_MAX)))->isNull();
     $iterator->appendNamespace($namespaceIterator = new iterators\phpNamespace());
     $this->assert->variable($iterator->getNamespace(0))->isIdenticalTo($namespaceIterator)->variable($iterator->getNamespace(rand(1, PHP_INT_MAX)))->isNull();
     $iterator->appendNamespace($otherNamespaceIterator = new iterators\phpNamespace());
     $this->assert->variable($iterator->getNamespace(0))->isIdenticalTo($namespaceIterator)->variable($iterator->getNamespace(1))->isIdenticalTo($otherNamespaceIterator)->variable($iterator->getNamespace(rand(2, PHP_INT_MAX)))->isNull();
 }