Move CSRFTestProvider class to a PSR 0 compatible file

This commit is contained in:
Nicolas Le Goff
2013-12-17 20:28:23 +01:00
parent 3f54fb3f20
commit 529f09e93e
2 changed files with 25 additions and 18 deletions

View File

@@ -0,0 +1,25 @@
<?php
/*
* This file is part of Phraseanet
*
* (c) 2005-2013 Alchemy
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* This class is used to provided CRSF token in PHPUNIT test suite.
*/
class CsrfTestProvider implements CsrfProviderInterface
{
public function generateCsrfToken($intention)
{
return mt_rand();
}
public function isCsrfTokenValid($intention, $token)
{
return true;
}
}

View File

@@ -988,21 +988,3 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase
->getMock(); ->getMock();
} }
} }
class CsrfTestProvider implements CsrfProviderInterface
{
public function generateCsrfToken($intention)
{
return mt_rand();
}
public function isCsrfTokenValid($intention, $token)
{
return true;
}
}
class PDOMock extends \PDO
{
public function __construct() {}
}