xref: /PHP-8.0/ext/pspell/tests/002.phpt (revision 0c6d06ec)
1--TEST--
2pspell session
3--SKIPIF--
4<?php
5if (!extension_loaded('pspell')) die('skip');
6if (!@pspell_new('en')) die('skip English dictionary is not available');
7?>
8--FILE--
9<?php
10
11$p = pspell_new('en');
12
13var_dump(pspell_check($p, 'somebogusword'));
14
15var_dump(pspell_add_to_session($p, ''));
16var_dump(pspell_add_to_session($p, 'somebogusword'));
17var_dump(pspell_check($p, 'somebogusword'));
18
19$res = @pspell_clear_session($p);
20if ($res) {
21    var_dump($res);
22    var_dump(pspell_check($p, 'somebogusword'));
23} else {
24    echo "bool(true)\n";
25    echo "bool(false)\n";
26}
27?>
28--EXPECT--
29bool(false)
30bool(false)
31bool(true)
32bool(true)
33bool(true)
34bool(false)
35