Inheritance: extends mageekguy\atoum\php\tokenizer\iterator
Exemplo n.º 1
0
 public function testAppendClass()
 {
     $iterator = new iterators\phpScript();
     $classIterator = new iterators\phpClass();
     $classIterator->append($token1 = new tokenizer\token(uniqid()))->append($token2 = new tokenizer\token(uniqid()));
     $this->assert->object($iterator->appendClass($classIterator))->isIdenticalTo($iterator)->array($iterator->getClasses())->isEqualTo(array($classIterator))->castToString($iterator)->isEqualTo($token1 . $token2);
 }
Exemplo n.º 2
0
 public function testAppendClass()
 {
     $phpNamespace = new iterators\phpNamespace();
     $phpClass = new iterators\phpClass();
     $phpClass->append($token1 = new tokenizer\token(uniqid()))->append($token2 = new tokenizer\token(uniqid()));
     $this->assert->object($phpNamespace->appendClass($phpClass))->isIdenticalTo($phpNamespace)->array($phpNamespace->getClasses())->isEqualTo(array($phpClass))->castToString($phpNamespace)->isEqualTo($token1 . $token2);
 }
Exemplo n.º 3
0
 public function testAppendClass()
 {
     $this->if($this->newTestedInstance, $phpClass = new iterators\phpClass(), $phpClass->append($token1 = new tokenizer\token(uniqid()))->append($token2 = new tokenizer\token(uniqid())))->object($this->testedInstance->appendClass($phpClass))->isTestedInstance->array($this->testedInstance->getClasses())->isEqualTo(array($phpClass))->castToString($this->testedInstance)->isEqualTo($token1 . $token2);
 }
Exemplo n.º 4
0
 public function test__construct()
 {
     $iterator = new iterators\phpClass();
     $this->assert->array($iterator->getConstants())->isEmpty()->array($iterator->getMethods())->isEmpty();
 }