mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-02-12 15:06:27 +00:00
26 lines
768 B
PHP
26 lines
768 B
PHP
![]() |
<?php
|
||
|
// $Id$
|
||
|
|
||
|
require_once(dirname(__FILE__) . '/../socket.php');
|
||
|
|
||
|
Mock::generate('SimpleSocket');
|
||
|
|
||
|
class TestOfSimpleStickyError extends UnitTestCase {
|
||
|
|
||
|
function testSettingError() {
|
||
|
$error = new SimpleStickyError();
|
||
|
$this->assertFalse($error->isError());
|
||
|
$error->_setError('Ouch');
|
||
|
$this->assertTrue($error->isError());
|
||
|
$this->assertEqual($error->getError(), 'Ouch');
|
||
|
}
|
||
|
|
||
|
function testClearingError() {
|
||
|
$error = new SimpleStickyError();
|
||
|
$error->_setError('Ouch');
|
||
|
$this->assertTrue($error->isError());
|
||
|
$error->_clearError();
|
||
|
$this->assertFalse($error->isError());
|
||
|
}
|
||
|
}
|
||
|
?>
|