Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjbalogh@mozilla.com <jbalogh@mozilla.com@4eb1ac78-321c-0410-a911-ec516a8615a5>2009-03-19 21:38:22 (GMT)
committer jbalogh@mozilla.com <jbalogh@mozilla.com@4eb1ac78-321c-0410-a911-ec516a8615a5>2009-03-19 21:38:22 (GMT)
commitae702a2a88f8f49bb2254c60c53911a595b1eb24 (patch)
tree2a3074d954f3f3480028fe62e15a097819f0e342
parent3e6a4c08a22133e9e56ec7c4471a3bc43d11e7ff (diff)
adding some mock values to prevent exceptions during tests.
git-svn-id: http://svn.mozilla.org/addons/trunk@23618 4eb1ac78-321c-0410-a911-ec516a8615a5
-rw-r--r--site/app/tests/controllers/users_controller.test.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/site/app/tests/controllers/users_controller.test.php b/site/app/tests/controllers/users_controller.test.php
index a28daf5..c81ebb6 100644
--- a/site/app/tests/controllers/users_controller.test.php
+++ b/site/app/tests/controllers/users_controller.test.php
@@ -73,7 +73,13 @@ class UsersTest extends UnitTestCase {
$this->controller = $this->helper->getController('Users', $this);
$this->helper->mockComponents($this->controller, $this);
$this->controller->User->cacheQueries = false; // important! Otherwise cake doesn't realize when we changed the user data.
- $this->controller->User->caching = false; // improtant! Otherwise memcache will break stuff.
+ $this->controller->User->caching = false; // important! Otherwise memcache will break stuff.
+
+ // Prevent exceptions in other parts of the world.
+ $this->controller->Amo->setReturnValue('getApplicationVersions',
+ array(1 => array(1.5, 2.0, 3.0),
+ 18 => array(1.5, 2.0, 3.0)));
+ $this->controller->params['url'] = array();
}
/**