diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2013-03-14 05:42:27 +0000 |
---|---|---|
committer | <> | 2013-04-03 16:25:08 +0000 |
commit | c4dd7a1a684490673e25aaf4fabec5df138854c4 (patch) | |
tree | 4d57c44caae4480efff02b90b9be86f44bf25409 /ext/pspell/tests/002.phpt | |
download | php2-master.tar.gz |
Imported from /home/lorry/working-area/delta_php2/php-5.4.13.tar.bz2.HEADphp-5.4.13master
Diffstat (limited to 'ext/pspell/tests/002.phpt')
-rw-r--r-- | ext/pspell/tests/002.phpt | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/ext/pspell/tests/002.phpt b/ext/pspell/tests/002.phpt new file mode 100644 index 0000000..e6aff66 --- /dev/null +++ b/ext/pspell/tests/002.phpt @@ -0,0 +1,42 @@ +--TEST-- +pspell session +--SKIPIF-- +<?php +if (!extension_loaded('pspell')) die('skip'); +if (!@pspell_new('en')) die('skip English dictionary is not available'); +?> +--FILE-- +<?php + +$p = pspell_new('en'); + +var_dump(pspell_check('a')); +var_dump(pspell_check($p, 'somebogusword')); + +var_dump(pspell_add_to_session($p, '')); +var_dump(pspell_add_to_session($p, 'somebogusword')); +var_dump(pspell_check($p, 'somebogusword')); + +var_dump(pspell_clear_session(new stdclass)); + +$res = @pspell_clear_session($p); +if ($res) { + var_dump($res); + var_dump(pspell_check($p, 'somebogusword')); +} else { + echo "bool(true)\n"; + echo "bool(false)\n"; +} +?> +--EXPECTF-- +Warning: pspell_check() expects exactly 2 parameters, 1 given in %s on line %d +NULL +bool(false) +bool(false) +bool(true) +bool(true) + +Warning: pspell_clear_session() expects parameter 1 to be long, object given in %s on line %d +NULL +bool(true) +bool(false) |