public function testAppendProperty() { $iterator = new iterators\phpClass(); $propertyIterator = new iterators\phpProperty(); $propertyIterator->append($token1 = new tokenizer\token(uniqid()))->append($token2 = new tokenizer\token(uniqid())); $this->assert->object($iterator->appendProperty($propertyIterator))->isIdenticalTo($iterator)->array($iterator->getProperties())->isEqualTo(array($propertyIterator))->castToString($iterator)->isEqualTo($token1 . $token2); }
public function testAppendProperty() { $this->if($this->newTestedInstance, $propertyIterator = new iterators\phpProperty(), $propertyIterator->append($token1 = new tokenizer\token(uniqid()))->append($token2 = new tokenizer\token(uniqid())))->then->object($this->testedInstance->appendProperty($propertyIterator))->isTestedInstance->array($this->testedInstance->getProperties())->isEqualTo(array($propertyIterator))->castToString($this->testedInstance)->isEqualTo($token1 . $token2); }