Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: tags/PHP_Parse…
Fetching contributors…

Cannot retrieve contributors at this time

file 33 lines (33 sloc) 0.642 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
--TEST--
PHP_Parser: test empty docblock
--SKIPIF--
<?php
if (!function_exists('docblock_tokenize')) {
    print "skip You need to have the pecl docblock extension available";
}
?>
--FILE--
<?php
require_once 'PHP/Parser/DocblockParser.php';
require_once 'PHP/Parser/DocblockParser/Tokenizer.php';
$a = new PHP_Parser_DocblockParser_Tokenizer('/***/');
$b = new PHP_Parser_DocblockParser($a);
while ($a->advance()) {
    $b->doParse($a->token, $a->getValue(), $a);
}
$b->doParse(0, 0);
var_dump($b->data);
?>
===DONE===
--EXPECT--
array(2) {
["desc"]=>
array(1) {
[0]=>
string(0) ""
}
["tags"]=>
array(0) {
}
}
===DONE===
Something went wrong with that request. Please try again.