Inheritance: extends phpNamespace
Beispiel #1
0
 public function testGetFunction()
 {
     $iterator = new iterators\phpScript();
     $this->assert->variable($iterator->getFunction(rand(0, PHP_INT_MAX)))->isNull();
     $iterator->appendFunction($functionIterator = new iterators\phpFunction());
     $this->assert->variable($iterator->getFunction(0))->isIdenticalTo($functionIterator)->variable($iterator->getFunction(rand(1, PHP_INT_MAX)))->isNull();
     $iterator->appendFunction($otherFunctionIterator = new iterators\phpFunction());
     $this->assert->variable($iterator->getFunction(0))->isIdenticalTo($functionIterator)->variable($iterator->getFunction(1))->isIdenticalTo($otherFunctionIterator)->variable($iterator->getFunction(rand(2, PHP_INT_MAX)))->isNull();
 }