mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
Fix tests
This commit is contained in:
@@ -75,6 +75,7 @@ class SessionManagerSubscriber implements EventSubscriberInterface
|
||||
return;
|
||||
}
|
||||
$moduleName = strtolower($pathInfo[1]);
|
||||
|
||||
if (!array_key_exists($moduleName, $modulesIds) ) {
|
||||
return;
|
||||
}
|
||||
@@ -90,6 +91,11 @@ class SessionManagerSubscriber implements EventSubscriberInterface
|
||||
if ($this->isFlashUploadRequest($event->getRequest())) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($event->getRequest()->query->has('LOG')) {
|
||||
return;
|
||||
}
|
||||
|
||||
// if we are already disconnected (ex. from another window), quit immediatly
|
||||
if (!($this->app['authentication']->isAuthenticated())) {
|
||||
if ($event->getRequest()->isXmlHttpRequest()) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace Alchemy\Tests\Phrasea\Application;
|
||||
|
||||
class ApplicationLightboxTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
|
||||
class LightboxTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
|
||||
{
|
||||
|
||||
protected $client;
|
||||
|
||||
@@ -74,9 +74,9 @@ class SessionManagerSubscriberTest extends \PhraseanetWebTestCaseAuthenticatedAb
|
||||
$session->setUpdated(new \DateTime());
|
||||
|
||||
$app['EM'] = $this->getMockBuilder('Doctrine\ORM\EntityManager')->disableOriginalConstructor()->getMock();
|
||||
$app['EM']->expects($this->once())->method('find')->with($this->equalTo('Entities\Session'))->will($this->returnValue($session));
|
||||
$app['EM']->expects($this->exactly(2))->method('persist')->will($this->returnValue(null));
|
||||
$app['EM']->expects($this->once())->method('flush')->will($this->returnValue(null));
|
||||
$app['EM']->expects($this->exactly(2))->method('find')->with($this->equalTo('Entities\Session'))->will($this->returnValue($session));
|
||||
$app['EM']->expects($this->exactly(4))->method('persist')->will($this->returnValue(null));
|
||||
$app['EM']->expects($this->exactly(2))->method('flush')->will($this->returnValue(null));
|
||||
|
||||
$app['phraseanet.configuration']['session'] = array(
|
||||
'idle' => 0,
|
||||
|
||||
@@ -40,7 +40,6 @@ class PhraseanetPHPUnitListener implements PHPUnit_Framework_TestListener
|
||||
|
||||
public function startTest(PHPUnit_Framework_Test $test)
|
||||
{
|
||||
echo $test->getName() . "\n";
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user