summaryrefslogtreecommitdiff
path: root/ext/pspell/tests/002.phpt
blob: 538775d01344f7a946718316df201c91d0c3ceba (plain)
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
34
--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($p, 'somebogusword'));

var_dump(pspell_add_to_session($p, ''));
var_dump(pspell_add_to_session($p, 'somebogusword'));
var_dump(pspell_check($p, 'somebogusword'));

$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--
bool(false)
bool(false)
bool(true)
bool(true)
bool(true)
bool(false)