Skip to content

Commit

Permalink
Adding the first test
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.php.net/repository/pear/packages/Text_Wiki/trunk@222193 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information
Justin Patrin committed Oct 21, 2006
1 parent 4b50ba1 commit 93a6c67
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 0 deletions.
73 changes: 73 additions & 0 deletions tests/Default_Parse_BlockQuote.phpt
@@ -0,0 +1,73 @@
--TEST--
Text_Wiki_Default_Blockquote
--FILE--
<?php
include 'config.php';
require_once 'Text/Wiki.php';
$t = Text_Wiki::factory('Default', array('Blockquote'));
$t->parse('
> test 1
> test 2
>> test 11
>> test 22
', 'Xhtml');
var_dump($t->source);
var_dump($t->tokens);
?>
--EXPECT--
string(43) "
ÿ0ÿtest 1
test 2
ÿ1ÿtest 11
test 22ÿ2ÿÿ3ÿ
"
array(4) {
[0]=>
array(2) {
[0]=>
string(10) "Blockquote"
[1]=>
array(2) {
["type"]=>
string(5) "start"
["level"]=>
int(1)
}
}
[1]=>
array(2) {
[0]=>
string(10) "Blockquote"
[1]=>
array(2) {
["type"]=>
string(5) "start"
["level"]=>
int(2)
}
}
[2]=>
array(2) {
[0]=>
string(10) "Blockquote"
[1]=>
array(2) {
["type"]=>
string(3) "end"
["level"]=>
int(2)
}
}
[3]=>
array(2) {
[0]=>
string(10) "Blockquote"
[1]=>
array(2) {
["type"]=>
string(3) "end"
["level"]=>
int(1)
}
}
}
5 changes: 5 additions & 0 deletions tests/config.php.dist
@@ -0,0 +1,5 @@
<?php
set_include_path('.'.PATH_SEPARATOR.
dirname(__FILE__).PATH_SEPARATOR.
get_include_path());
?>

0 comments on commit 93a6c67

Please sign in to comment.