mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
da79dff7d7
- Dispatcher sets a Controller::here variable with the real URL used to access the page, so that tag generators can that use an url (linkTo and formTag for example) use the real url, not guess it from the controller and action names which often fails - Log class works more reliably and a LogError() shortcut function was added - Nstring class added, to store string-related functions (there are just four yet, including a random password generator and an string-to-array splitter - SimpleTest library (with Rephlux) included in /vendors; I've tweaked SimpleScorer::inCli() function, because it didn't work on my setup, it should work everywhere now (it checks for empty REQUEST_METHOD, which should only be empty in CLI) git-svn-id: https://svn.cakephp.org/repo/trunk/cake@248 3807eeeb-6ff5-0310-8944-8be069107fe0
26 lines
No EOL
768 B
PHP
26 lines
No EOL
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());
|
|
}
|
|
}
|
|
?>
|