예제 #1
0
 public function testAppendArgument()
 {
     $iterator = new iterators\phpFunction();
     $argumentIterator = new iterators\phpArgument();
     $argumentIterator->append($token1 = new tokenizer\token(uniqid()))->append($token2 = new tokenizer\token(uniqid()));
     $this->assert->object($iterator->appendArgument($argumentIterator))->isIdenticalTo($iterator)->array($iterator->getArguments())->isEqualTo(array($argumentIterator))->castToString($iterator)->isEqualTo($token1 . $token2);
 }
예제 #2
0
 public function testAppendArgument()
 {
     $this->if($this->newTestedInstance, $argumentIterator = new iterators\phpArgument(), $argumentIterator->append($token1 = new tokenizer\token(uniqid()))->append($token2 = new tokenizer\token(uniqid())))->then->object($this->testedInstance->appendArgument($argumentIterator))->isTestedInstance->array($this->testedInstance->getArguments())->isEqualTo(array($argumentIterator))->castToString($this->testedInstance)->isEqualTo($token1 . $token2);
 }