Permalink
Browse files

Connect test routes.

  • Loading branch information...
1 parent 37fef22 commit 028e82210086253fe5e6464efcb747c01ec6e52e @davidpersson davidpersson committed Feb 8, 2011
Showing with 9 additions and 0 deletions.
  1. +9 −0 config/routes.php
View
@@ -8,6 +8,7 @@
use lithium\net\http\Router;
use lithium\action\Response;
+use lithium\core\Environment;
Router::connect('/', array(), function($request) {
$location = array('controller' => 'pastes', 'action' => 'add');
@@ -18,6 +19,14 @@
Router::connect('/edit/{:args}', array('controller' => 'pastes', 'action' => 'edit'));
Router::connect('/latest', array('controller' => 'pastes', 'action' => 'index'));
+/**
+ * Connect the testing routes.
+ */
+if (!Environment::is('production')) {
+ Router::connect('/test/{:args}', array('controller' => 'lithium\test\Controller'));
+ Router::connect('/test', array('controller' => 'lithium\test\Controller'));
+}
+
/* This route ensures old links don't break and a migrated to the shorter URL. */
Router::connect('/view/{:args}', array(), function($request) {
$location = array('controller' => 'pastes', 'action' => 'view', 'args' => $request->args);

0 comments on commit 028e822

Please sign in to comment.