Skip to content

Commit

Permalink
Updating test cases with failing tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Nov 16, 2010
1 parent 66e6ec7 commit f0ac462
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
Expand Up @@ -65,7 +65,7 @@ function testLoad() {
* @return void
*/
function testLoadWithEnableFalse() {
$result = $this->Components->load('Cookie', array('callbacks' => false));
$result = $this->Components->load('Cookie', array('enabled' => false));
$this->assertType('CookieComponent', $result);
$this->assertType('CookieComponent', $this->Components->Cookie);

Expand Down
11 changes: 6 additions & 5 deletions cake/tests/cases/libs/controller/components/auth.test.php
Expand Up @@ -1451,17 +1451,18 @@ function testPluginModel() {
* @return void
*/
function testAjaxLogin() {
App::build(array('views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS)));
App::build(array(
'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS)
));
$_SERVER['HTTP_X_REQUESTED_WITH'] = "XMLHttpRequest";

if (!class_exists('dispatcher')) {
require CAKE . 'dispatcher.php';
}
App::import('Core', 'Dispatcher');

ob_start();
$Dispatcher = new Dispatcher();
$Dispatcher->dispatch('/ajax_auth/add', array('return' => 1));
$Dispatcher->dispatch(new CakeRequest('/ajax_auth/add'), array('return' => 1));
$result = ob_get_clean();

$this->assertEqual("Ajax!\nthis is the test element", str_replace("\r\n", "\n", $result));
unset($_SERVER['HTTP_X_REQUESTED_WITH']);
}
Expand Down
3 changes: 2 additions & 1 deletion cake/tests/cases/libs/debugger.test.php
Expand Up @@ -243,7 +243,8 @@ function testExportVar() {
View::$modelId = NULL
View::$uuids = array
View::$output = false
View::$request = NULL';
View::$request = NULL
View::$elementCache = "default"';
$result = str_replace(array("\t", "\r\n", "\n"), "", strtolower($result));
$expected = str_replace(array("\t", "\r\n", "\n"), "", strtolower($expected));
$this->assertEqual($result, $expected);
Expand Down
1 change: 1 addition & 0 deletions cake/tests/cases/libs/view/helpers/rss.test.php
Expand Up @@ -36,6 +36,7 @@ class RssHelperTest extends CakeTestCase {
*/
function setUp() {
parent::setUp();
$controller = null;
$this->View = new View($controller);
$this->Rss = new RssHelper($this->View);
}
Expand Down

0 comments on commit f0ac462

Please sign in to comment.