mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-12 04:23:19 +00:00
cleanup
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -41,18 +41,4 @@ abstract class PhraseanetPHPUnitAuthenticatedAbstract extends PhraseanetPHPUnitA
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
// public static function setUpBeforeClass()
|
||||
// {
|
||||
// parent::setUpBeforeClass();
|
||||
// $session = Session_Handler::getInstance();
|
||||
// $session->authenticate(self::$user->get_id());
|
||||
// }
|
||||
//
|
||||
// public static function tearDownAfterClass()
|
||||
// {
|
||||
// $session = Session_Handler::getInstance();
|
||||
// $session->logout();
|
||||
// parent::tearDownAfterClass();
|
||||
// }
|
||||
|
||||
}
|
@@ -24,15 +24,4 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
abstract class PhraseanetWebTestCaseAbstract extends PhraseanetPHPUnitAbstract
|
||||
{
|
||||
|
||||
public function createClient(array $options = array(), array $server = array())
|
||||
{
|
||||
return new Client($this->app);
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
$this->app = $this->createApplication();
|
||||
}
|
||||
|
||||
}
|
@@ -15,7 +15,7 @@
|
||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||
* @link www.phraseanet.com
|
||||
*/
|
||||
require_once dirname(__FILE__) . '/PhraseanetPHPUnitAuthenticatedAbstract.class.inc';
|
||||
require_once __DIR__ . '/PhraseanetPHPUnitAuthenticatedAbstract.class.inc';
|
||||
|
||||
use Silex\WebTestCase;
|
||||
use Symfony\Component\HttpKernel\Client;
|
||||
@@ -24,15 +24,21 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
abstract class PhraseanetWebTestCaseAuthenticatedAbstract extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
{
|
||||
|
||||
public function createClient(array $options = array(), array $server = array())
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
return new Client($this->app);
|
||||
parent::setUpBeforeClass();
|
||||
$appbox = appbox::get_instance();
|
||||
$session = $appbox->get_session();
|
||||
$auth = new Session_Authentication_None(self::$user);
|
||||
$session->authenticate($auth);
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public static function tearDownAfterClass()
|
||||
{
|
||||
parent::setUp();
|
||||
$this->app = $this->createApplication();
|
||||
parent::tearDownAfterClass();
|
||||
$appbox = appbox::get_instance();
|
||||
$session = $appbox->get_session();
|
||||
$session->logout();
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user