예제 #1
0
 public function testAppendConstant()
 {
     $iterator = new iterators\phpScript();
     $constantIterator = new iterators\phpConstant();
     $constantIterator->append($token1 = new tokenizer\token(uniqid()))->append($token2 = new tokenizer\token(uniqid()));
     $this->assert->object($iterator->appendConstant($constantIterator))->isIdenticalTo($iterator)->array($iterator->getConstants())->isEqualTo(array($constantIterator))->castToString($iterator)->isEqualTo($token1 . $token2);
 }
예제 #2
0
파일: phpClass.php 프로젝트: xihewang/atoum
 public function testAppendConstant()
 {
     $this->if($this->newTestedInstance, $constantIterator = new iterators\phpConstant(), $constantIterator->append($token1 = new tokenizer\token(uniqid()))->append($token2 = new tokenizer\token(uniqid())))->then->object($this->testedInstance->appendConstant($constantIterator))->isTestedInstance->array($this->testedInstance->getConstants())->isEqualTo(array($constantIterator))->castToString($this->testedInstance)->isEqualTo($token1 . $token2);
 }