mageekguy\atoum\php\tokenizer\iterator::current PHP Метод

current() публичный Метод

public current ( )
    public function current()
    {
        $value = null;
        if ($this->valid() === true) {
            $value = current($this->values)->current();
        }
        return $value;
    }

Usage Example

Пример #1
0
 public function testSetParent()
 {
     $token = new tokenizer\token(uniqid(), uniqid(), rand(1, PHP_INT_MAX));
     $this->assert->variable($token->getParent())->isNull()->object($token->setParent($parent = new tokenizer\iterator()))->isIdenticalTo($token)->object($token->getParent())->isIdenticalTo($parent)->sizeOf($parent)->isEqualTo(1)->object($parent->current())->isIdenticalTo($token)->exception(function () use($token) {
         $token->setParent(new tokenizer\iterator());
     })->isInstanceOf('mageekguy\\atoum\\exceptions\\runtime')->hasMessage('Parent is already set');
 }
All Usage Examples Of mageekguy\atoum\php\tokenizer\iterator::current