浏览代码

fix tests

euromark 11 年之前
父节点
当前提交
5376d3a741
共有 3 个文件被更改,包括 4 次插入3 次删除
  1. 2 2
      tests/TestCase/View/RssViewTest.php
  2. 1 0
      tests/bootstrap.php
  3. 1 1
      tests/config/routes.php

+ 2 - 2
tests/TestCase/View/RssViewTest.php

@@ -360,7 +360,7 @@ RSS;
 		$Request = new Request();
 		$Response = new Response();
 
-		$url = array('controller' => 'topics', 'action' => 'feed', 'ext' => 'rss');
+		$url = array('controller' => 'topics', 'action' => 'feed', '_ext' => 'rss');
 		$data = array(
 			'channel' => array(
 				'title' => 'Channel title',
@@ -422,7 +422,7 @@ RSS;
 					'category' => 'Internet'),
 				array('title' => 'Title Two', 'link' => array('controller' => 'foo', 'action' => 'bar'), 'description' => 'Content two',
 					'category' => array('News', 'Tutorial'),
-					'comments' => array('controller' => 'foo', 'action' => 'bar', 'ext' => 'rss')),
+					'comments' => array('controller' => 'foo', 'action' => 'bar', '_ext' => 'rss')),
 			)
 		);
 		$viewVars = array('channel' => $data, '_serialize' => 'channel');

+ 1 - 0
tests/bootstrap.php

@@ -10,6 +10,7 @@ define('CAKE_CORE_INCLUDE_PATH', ROOT . '/vendor/cakephp/cakephp');
 define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
 define('CAKE', CORE_PATH . APP_DIR . DS);
 
+define('WWW_ROOT', ROOT . DS . 'webroot' . DS);
 define('CONFIG', dirname(__FILE__) . DS . 'config' . DS);
 
 require ROOT . '/vendor/cakephp/cakephp/src/basics.php';

+ 1 - 1
tests/config/routes.php

@@ -6,7 +6,7 @@ use Cake\Routing\Router;
 //Router::extensions(['rss']);
 
 Router::scope('/', function($routes) {
-	$routes->extensions(['rss']);
+	//$routes->extensions(['rss']);
 	$routes->connect('/:controller', ['action' => 'index'], ['routeClass' => 'InflectedRoute']);
 	$routes->connect('/:controller/:action/*', [], ['routeClass' => 'InflectedRoute']);
 });