Skip to content

Commit

Permalink
Fix more failing tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jul 4, 2012
1 parent e1db220 commit 5815cf8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Cake/Test/TestCase/Routing/DispatcherTest.php
Expand Up @@ -437,7 +437,7 @@ public function testDispatchBasic() {
$this->assertEquals($expected, $Dispatcher->controller->name);

$expected = array('0' => 'home');
$this->assertSame($expected, $controller->request->params['pass']);
$this->assertSame($expected, $Dispatcher->controller->request->params['pass']);

Configure::write('App.baseUrl', '/pages/index.php');

Expand Down Expand Up @@ -687,7 +687,7 @@ public function testDispatcherFilterCallable() {
$response = $this->getMock('Cake\Network\Response', array('send'));
$dispatcher->dispatch($request, $response);
$this->assertEmpty($dispatcher->controller);
$expected = array('controller' => null, 'action' => null, 'plugin' => null, 'named' => array(), 'pass' => array());
$expected = array('controller' => null, 'action' => null, 'plugin' => null, 'pass' => array());
$this->assertEquals($expected, $request->params);

$dispatcher = new TestDispatcher();
Expand Down
Expand Up @@ -18,6 +18,7 @@
namespace Cake\Test\TestCase\View\Helper;

use Cake\TestSuite\TestCase;
use Cake\Routing\Router;
use Cake\View\Helper\HtmlHelper;
use Cake\View\Helper\JsHelper;
use Cake\View\Helper\PrototypeEngineHelper;
Expand Down Expand Up @@ -183,6 +184,8 @@ public function testEffect() {
* @return void
*/
public function testRequest() {
Router::connect('/:controller/:action/*');

$result = $this->Proto->request(array('controller' => 'posts', 'action' => 'view', 1));
$expected = 'var jsRequest = new Ajax.Request("/posts/view/1");';
$this->assertEquals($expected, $result);
Expand Down
3 changes: 3 additions & 0 deletions lib/Cake/Test/TestCase/View/HelperTest.php
Expand Up @@ -17,6 +17,7 @@
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
namespace Cake\Test\TestCase\View;

use Cake\Core\App;
use Cake\Core\Configure;
use Cake\Core\Plugin;
Expand Down Expand Up @@ -609,6 +610,8 @@ public function testAssetTimestamp() {
* @return void
*/
public function testAssetUrl() {
Router::connect('/:controller/:action/*');

$this->Helper->webroot = '';
$result = $this->Helper->assetUrl(array(
'controller' => 'js',
Expand Down

0 comments on commit 5815cf8

Please sign in to comment.