1 --- Assert.php.orig 2004-06-09 15:52:13.000000000 +1000
2 +++ Assert.php 2004-06-09 15:55:10.000000000 +1000
7 + * Asserts that the actual string does not match a given
8 + * regular expression.
14 + * @author Sébastien Hordeaux <marms@marms.com>
15 + * @author Matthew Palmer <mpalmer@hezmatt.org>
17 + function assertNotRegExp($expected, $actual, $message = '') {
19 + '%sexpected %s, actual %s',
21 + !empty($message) ? $message . ' ' : '',
26 + if (preg_match($expected, $actual)) {
27 + return $this->fail($message);
32 + * Asserts that the expected string is contained somewhere within the
33 + * data string given.
39 + * @author Matthew Palmer <mpalmer@hezmatt.org>
41 + function assertSubStr($needle, $haystack, $message = '')
43 + if (empty($message))
46 + '"%s" not found in "%s"',
52 + if (substr_count($haystack, $needle) == 0)
54 + return $this->fail($message);
57 + return $this->pass();
61 + * Asserts that the expected string is not contained anywhere within the
62 + * data string given.
68 + * @author Matthew Palmer <mpalmer@hezmatt.org>
70 + function assertNotSubStr($needle, $haystack, $message = '')
72 + if (empty($message))
75 + '"%s" found in "%s"',
81 + if (substr_count($haystack, $needle) > 0)
83 + return $this->fail($message);
86 + return $this->pass();
90 * Asserts that a variable is of a given type.
92 * @param string $expected