From 8017f4126be4ecd96cd0d696aa363133dce45e2c Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Mon, 28 Jan 2013 22:47:25 +0100 Subject: [PATCH] Fix unit tests --- lib/Alchemy/Phrasea/Application.php | 5 +++-- tests/classes/PhraseanetPHPUnitAbstract.php | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/Alchemy/Phrasea/Application.php b/lib/Alchemy/Phrasea/Application.php index f1a9b29065..aad7878792 100644 --- a/lib/Alchemy/Phrasea/Application.php +++ b/lib/Alchemy/Phrasea/Application.php @@ -105,6 +105,7 @@ use Symfony\Component\HttpKernel\Event\FilterResponseEvent; use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\HttpFoundation\Response; class Application extends SilexApplication { @@ -523,7 +524,7 @@ class Application extends SilexApplication public function bindRoutes() { - $this->get('/', function(PhraseaApplication $app) { + $this->get('/', function(Application $app) { if ($app['browser']->isMobile()) { return $app->redirect("/login/?redirect=lightbox"); } elseif ($app['browser']->isNewGeneration()) { @@ -533,7 +534,7 @@ class Application extends SilexApplication } })->bind('root'); - $this->get('/robots.txt', function(PhraseaApplication $app) { + $this->get('/robots.txt', function(Application $app) { if ($app['phraseanet.registry']->get('GV_allow_search_engine') === true) { $buffer = "User-Agent: *\n" . "Allow: /\n"; diff --git a/tests/classes/PhraseanetPHPUnitAbstract.php b/tests/classes/PhraseanetPHPUnitAbstract.php index 5d4e82804a..dd8ef6b594 100644 --- a/tests/classes/PhraseanetPHPUnitAbstract.php +++ b/tests/classes/PhraseanetPHPUnitAbstract.php @@ -127,12 +127,12 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase return $browser; })); - $app['notification.deliverer'] = $this->getMockBuilder('Alchemy\Phrasea\Notification\Deliverer') + $app['notification.deliverer'] = $phpunit->getMockBuilder('Alchemy\Phrasea\Notification\Deliverer') ->disableOriginalConstructor() ->getMock(); - $app['notification.deliverer']->expects($this->any()) + $app['notification.deliverer']->expects($phpunit->any()) ->method('deliver') - ->will($this->returnCallback(function() use ($phpunit){ + ->will($phpunit->returnCallback(function() use ($phpunit){ $phpunit->fail('Notification deliverer must be mocked'); }));