コード例 #1
0
ファイル: phpClass.php プロジェクト: andrewolobo/mpTracker
 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);
 }
コード例 #2
0
ファイル: phpClass.php プロジェクト: xihewang/atoum
 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);
 }