diff --git a/tests/Alchemy/Tests/Phrasea/ACL/BasketACLTest.php b/tests/Alchemy/Tests/Phrasea/ACL/BasketACLTest.php index a47870b60b..410c845201 100644 --- a/tests/Alchemy/Tests/Phrasea/ACL/BasketACLTest.php +++ b/tests/Alchemy/Tests/Phrasea/ACL/BasketACLTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\ACL; use Alchemy\Phrasea\ACL\BasketACL; -class BasketACLTest extends \PhraseanetPHPUnitAbstract +class BasketACLTest extends \PhraseanetTestCase { public function testOwnerIsOwner() { diff --git a/tests/Alchemy/Tests/Phrasea/Application/ApiJSONPTest.php b/tests/Alchemy/Tests/Phrasea/Application/ApiJSONPTest.php index c3b340f6db..5fa685377f 100644 --- a/tests/Alchemy/Tests/Phrasea/Application/ApiJSONPTest.php +++ b/tests/Alchemy/Tests/Phrasea/Application/ApiJSONPTest.php @@ -4,9 +4,8 @@ namespace Alchemy\Tests\Phrasea\Application; use Symfony\Component\HttpFoundation\Response; -class ApiJSONPApplication extends ApiAbstract +class ApiJSONPApplication extends ApiTestCase { - protected function evaluateResponseBadRequest(Response $response) { $this->assertEquals('UTF-8', $response->getCharset(), 'Test charset response'); diff --git a/tests/Alchemy/Tests/Phrasea/Application/ApiJsonTest.php b/tests/Alchemy/Tests/Phrasea/Application/ApiJsonTest.php index 2ebc1eb223..9a37e37564 100644 --- a/tests/Alchemy/Tests/Phrasea/Application/ApiJsonTest.php +++ b/tests/Alchemy/Tests/Phrasea/Application/ApiJsonTest.php @@ -2,7 +2,7 @@ namespace Alchemy\Tests\Phrasea\Application; -class ApiJsonApplication extends ApiAbstract +class ApiJsonApplication extends ApiTestCase { public function getParameters(array $parameters = []) diff --git a/tests/Alchemy/Tests/Phrasea/Application/ApiAbstract.php b/tests/Alchemy/Tests/Phrasea/Application/ApiTestCase.php similarity index 99% rename from tests/Alchemy/Tests/Phrasea/Application/ApiAbstract.php rename to tests/Alchemy/Tests/Phrasea/Application/ApiTestCase.php index c5b1c0b9d5..3be512ad86 100644 --- a/tests/Alchemy/Tests/Phrasea/Application/ApiAbstract.php +++ b/tests/Alchemy/Tests/Phrasea/Application/ApiTestCase.php @@ -11,7 +11,7 @@ use Alchemy\Phrasea\Model\Entities\Task; use Symfony\Component\HttpKernel\Client; use Symfony\Component\HttpFoundation\Response; -abstract class ApiAbstract extends \PhraseanetWebTestCaseAbstract +abstract class ApiTestCase extends \PhraseanetWebTestCaseAbstract { /** * @@ -22,35 +22,35 @@ abstract class ApiAbstract extends \PhraseanetWebTestCaseAbstract /** * @var \API_OAuth2_Token */ - protected static $token; - protected static $APIrecord; + private static $token; + private static $APIrecord; protected $record; /** * @var \API_OAuth2_Account */ - protected static $account; + private static $account; /** * @var \API_OAuth2_Application */ - protected static $oauthApplication; + private static $oauthApplication; /** * @var \API_OAuth2_Token */ - protected static $adminToken; + private static $adminToken; /** * @var \API_OAuth2_Account */ - protected static $adminAccount; + private static $adminAccount; /** * @var \API_OAuth2_Application */ - protected static $adminApplication; - protected static $databoxe_ids = []; + private static $adminApplication; + private static $databoxe_ids = []; abstract public function getParameters(array $parameters = []); @@ -87,13 +87,13 @@ abstract class ApiAbstract extends \PhraseanetWebTestCaseAbstract self::$apiInitialized = true; } - if (!static::$APIrecord) { + if (!self::$APIrecord) { $file = new File(self::$DI['app'], self::$DI['app']['mediavorus']->guess(__DIR__ . '/../../../../files/test024.jpg'), self::$DI['collection']); - static::$APIrecord = \record_adapter::createFromFile($file, self::$DI['app']); - static::$APIrecord->generate_subdefs(static::$APIrecord->get_databox(), self::$DI['app']); + self::$APIrecord = \record_adapter::createFromFile($file, self::$DI['app']); + self::$APIrecord->generate_subdefs(self::$APIrecord->get_databox(), self::$DI['app']); } - $this->record = static::$APIrecord; + $this->record = self::$APIrecord; } public static function tearDownAfterClass() @@ -107,8 +107,8 @@ abstract class ApiAbstract extends \PhraseanetWebTestCaseAbstract self::$adminApplication->delete(); } - static::$APIrecord->delete(); - static::$APIrecord = null; + self::$APIrecord->delete(); + self::$APIrecord = null; self::$apiInitialized = false; @@ -191,7 +191,7 @@ abstract class ApiAbstract extends \PhraseanetWebTestCaseAbstract $this->assertArrayHasKey('de', $databox['labels']); $this->assertArrayHasKey('nl', $databox['labels']); $this->assertArrayHasKey('version', $databox); - static::$databoxe_ids[] = $databox['databox_id']; + self::$databoxe_ids[] = $databox['databox_id']; } } @@ -625,7 +625,7 @@ abstract class ApiAbstract extends \PhraseanetWebTestCaseAbstract public function testDataboxCollectionRoute() { $this->setToken(self::$token); - foreach (static::$databoxe_ids as $databox_id) { + foreach (self::$databoxe_ids as $databox_id) { $route = '/api/v1/databoxes/' . $databox_id . '/collections/'; $this->evaluateMethodNotAllowedRoute($route, ['POST', 'PUT', 'DELETE']); @@ -669,7 +669,7 @@ abstract class ApiAbstract extends \PhraseanetWebTestCaseAbstract public function testDataboxStatusRoute() { $this->setToken(self::$token); - foreach (static::$databoxe_ids as $databox_id) { + foreach (self::$databoxe_ids as $databox_id) { $databox = self::$DI['app']['phraseanet.appbox']->get_databox($databox_id); $ref_status = $databox->get_statusbits(); $route = '/api/v1/databoxes/' . $databox_id . '/status/'; @@ -723,7 +723,7 @@ abstract class ApiAbstract extends \PhraseanetWebTestCaseAbstract public function testDataboxMetadatasRoute() { $this->setToken(self::$token); - foreach (static::$databoxe_ids as $databox_id) { + foreach (self::$databoxe_ids as $databox_id) { $databox = self::$DI['app']['phraseanet.appbox']->get_databox($databox_id); $ref_structure = $databox->get_meta_structure(); @@ -811,7 +811,7 @@ abstract class ApiAbstract extends \PhraseanetWebTestCaseAbstract public function testDataboxTermsOfUseRoute() { $this->setToken(self::$token); - foreach (static::$databoxe_ids as $databox_id) { + foreach (self::$databoxe_ids as $databox_id) { $route = '/api/v1/databoxes/' . $databox_id . '/termsOfUse/'; $this->evaluateMethodNotAllowedRoute($route, ['POST', 'PUT', 'DELETE']); diff --git a/tests/Alchemy/Tests/Phrasea/Application/ApiYamlTest.php b/tests/Alchemy/Tests/Phrasea/Application/ApiYamlTest.php index fc185682ea..c4a84df19c 100644 --- a/tests/Alchemy/Tests/Phrasea/Application/ApiYamlTest.php +++ b/tests/Alchemy/Tests/Phrasea/Application/ApiYamlTest.php @@ -2,7 +2,7 @@ namespace Alchemy\Tests\Phrasea\Application; -class ApiYamlApplication extends ApiAbstract +class ApiYamlApplication extends ApiTestCase { public function getParameters(array $parameters = []) diff --git a/tests/Alchemy/Tests/Phrasea/Application/ConsoleAPITest.php b/tests/Alchemy/Tests/Phrasea/Application/ConsoleAPITest.php index a3f8d299b1..04916c38e9 100644 --- a/tests/Alchemy/Tests/Phrasea/Application/ConsoleAPITest.php +++ b/tests/Alchemy/Tests/Phrasea/Application/ConsoleAPITest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Application; use Symfony\Component\Process\Process; -class ConsoleAPITest extends \PHPUnit_Framework_TestCase +class ConsoleAPITest extends \PhraseanetTestCase { /** * @dataProvider provideConsoleNames diff --git a/tests/Alchemy/Tests/Phrasea/Application/OverviewTest.php b/tests/Alchemy/Tests/Phrasea/Application/OverviewTest.php index 0aa143b797..96ed1c8207 100644 --- a/tests/Alchemy/Tests/Phrasea/Application/OverviewTest.php +++ b/tests/Alchemy/Tests/Phrasea/Application/OverviewTest.php @@ -181,7 +181,7 @@ class OverviewTest extends \PhraseanetWebTestCaseAuthenticatedAbstract $this->assertEquals(200, $response->getStatusCode()); } - protected function get_a_caption(array $headers = []) + private function get_a_caption(array $headers = []) { $token = self::$DI['record_1']->get_thumbnail()->get_permalink()->get_token(); $url = '/permalink/v1/' . self::$DI['record_1']->get_sbas_id() . "/" . self::$DI['record_1']->get_record_id() . '/caption/?token='.$token; @@ -198,7 +198,7 @@ class OverviewTest extends \PhraseanetWebTestCaseAuthenticatedAbstract $this->assertEquals(200, $response->getStatusCode()); } - protected function get_a_permalinkBCcompatibility(array $headers = []) + private function get_a_permalinkBCcompatibility(array $headers = []) { $token = self::$DI['record_1']->get_preview()->get_permalink()->get_token(); $url = '/permalink/v1/whateverIwannt/' . self::$DI['record_1']->get_sbas_id() . '/' . self::$DI['record_1']->get_record_id() . '/' . $token . '/preview/'; @@ -224,7 +224,7 @@ class OverviewTest extends \PhraseanetWebTestCaseAuthenticatedAbstract $this->assertEquals(200, self::$DI['client']->getResponse()->getStatusCode()); } - protected function get_a_permaviewBCcompatibility(array $headers = []) + private function get_a_permaviewBCcompatibility(array $headers = []) { $token = self::$DI['record_1']->get_preview()->get_permalink()->get_token(); $url = '/permalink/v1/whateverIwannt/' . self::$DI['record_1']->get_sbas_id() . '/' . self::$DI['record_1']->get_record_id() . '/' . $token . '/preview/'; @@ -240,7 +240,7 @@ class OverviewTest extends \PhraseanetWebTestCaseAuthenticatedAbstract $this->assertEquals(200, $response->getStatusCode()); } - protected function get_a_permalink(array $headers = []) + private function get_a_permalink(array $headers = []) { $token = self::$DI['record_1']->get_preview()->get_permalink()->get_token(); $url = '/permalink/v1/' . self::$DI['record_1']->get_sbas_id() . '/' . self::$DI['record_1']->get_record_id() . '/preview/whateverIwannt.jpg?token=' . $token . ''; @@ -257,7 +257,7 @@ class OverviewTest extends \PhraseanetWebTestCaseAuthenticatedAbstract $this->assertEquals(200, $response->getStatusCode()); } - protected function get_a_permaview(array $headers = []) + private function get_a_permaview(array $headers = []) { $token = self::$DI['record_1']->get_preview()->get_permalink()->get_token(); $url = '/permalink/v1/' . self::$DI['record_1']->get_sbas_id() . '/' . self::$DI['record_1']->get_record_id() . '/preview/?token=' . $token . ''; diff --git a/tests/Alchemy/Tests/Phrasea/Application/RootApplicationTest.php b/tests/Alchemy/Tests/Phrasea/Application/RootApplicationTest.php index 3cd426adbc..45ff22e2b3 100644 --- a/tests/Alchemy/Tests/Phrasea/Application/RootApplicationTest.php +++ b/tests/Alchemy/Tests/Phrasea/Application/RootApplicationTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Application; use Alchemy\Phrasea\Application; -class RootApplicationTest extends \PHPUnit_Framework_TestCase +class RootApplicationTest extends \PhraseanetTestCase { /** * @dataProvider provideEnvironments diff --git a/tests/Alchemy/Tests/Phrasea/ApplicationTest.php b/tests/Alchemy/Tests/Phrasea/ApplicationTest.php index e598f583eb..407e8b0720 100644 --- a/tests/Alchemy/Tests/Phrasea/ApplicationTest.php +++ b/tests/Alchemy/Tests/Phrasea/ApplicationTest.php @@ -15,16 +15,13 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; -class ApplicationTest extends \PhraseanetPHPUnitAbstract +class ApplicationTest extends \PhraseanetTestCase { /** * @covers Alchemy\Phrasea\Application */ public function testDebug() { - $app = new Application(); - $this->assertFalse($app['debug']); - $app = new Application('prod'); $this->assertFalse($app['debug']); @@ -363,7 +360,7 @@ class ApplicationTest extends \PhraseanetPHPUnitAbstract ]; } - protected function getPreparedApp($tempDir) + private function getPreparedApp($tempDir) { $app = new Application('test'); $app['translator.cache-options'] = [ diff --git a/tests/Alchemy/Tests/Phrasea/Authentication/ACLProviderTest.php b/tests/Alchemy/Tests/Phrasea/Authentication/ACLProviderTest.php index e53a6011ac..3adae73034 100644 --- a/tests/Alchemy/Tests/Phrasea/Authentication/ACLProviderTest.php +++ b/tests/Alchemy/Tests/Phrasea/Authentication/ACLProviderTest.php @@ -2,7 +2,7 @@ namespace Alchemy\Tests\Phrasea\Authentication; -class ACLProviderTest extends \PhraseanetPHPUnitAbstract +class ACLProviderTest extends \PhraseanetTestCase { public function testGetACL() { diff --git a/tests/Alchemy/Tests/Phrasea/Authentication/AccountCreatorTest.php b/tests/Alchemy/Tests/Phrasea/Authentication/AccountCreatorTest.php index 9411f924f5..57e8b9365e 100644 --- a/tests/Alchemy/Tests/Phrasea/Authentication/AccountCreatorTest.php +++ b/tests/Alchemy/Tests/Phrasea/Authentication/AccountCreatorTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Authentication; use Alchemy\Phrasea\Authentication\AccountCreator; -class AccountCreatorTest extends \PhraseanetPHPUnitAbstract +class AccountCreatorTest extends \PhraseanetTestCase { /** * @dataProvider provideEnabledOptions @@ -28,7 +28,7 @@ class AccountCreatorTest extends \PhraseanetPHPUnitAbstract } /** - * @expectedException Alchemy\Phrasea\Exception\InvalidArgumentException + * @expectedException \Alchemy\Phrasea\Exception\InvalidArgumentException */ public function testCreateWithAnExistingMail() { @@ -40,7 +40,7 @@ class AccountCreatorTest extends \PhraseanetPHPUnitAbstract } /** - * @expectedException Alchemy\Phrasea\Exception\RuntimeException + * @expectedException \Alchemy\Phrasea\Exception\RuntimeException */ public function testCreateWithDisabledCreator() { diff --git a/tests/Alchemy/Tests/Phrasea/Authentication/AuthenticatorTest.php b/tests/Alchemy/Tests/Phrasea/Authentication/AuthenticatorTest.php index 0bc71f39d1..bae1e5bc0c 100644 --- a/tests/Alchemy/Tests/Phrasea/Authentication/AuthenticatorTest.php +++ b/tests/Alchemy/Tests/Phrasea/Authentication/AuthenticatorTest.php @@ -7,14 +7,14 @@ use Alchemy\Phrasea\Authentication\Authenticator; use Alchemy\Phrasea\Exception\RuntimeException; use Alchemy\Phrasea\Model\Entities\Session; -class AuthenticatorTest extends \PhraseanetPHPUnitAbstract +class AuthenticatorTest extends \PhraseanetTestCase { /** * @covers Alchemy\Phrasea\Authentication\Authenticator::getUser */ public function testGetUser() { - $app = new Application(); + $app = $this->loadApp(); $app['browser'] = $browser = $this->getBrowserMock(); $app['session'] = $session = $this->getSessionMock(); @@ -28,7 +28,7 @@ class AuthenticatorTest extends \PhraseanetPHPUnitAbstract */ public function testGetUserWhenAuthenticated() { - $app = new Application(); + $app = $this->loadApp(); $user = self::$DI['user']; @@ -53,7 +53,7 @@ class AuthenticatorTest extends \PhraseanetPHPUnitAbstract */ public function testSetUser() { - $app = new Application(); + $app = $this->loadApp(); $app['browser'] = $browser = $this->getBrowserMock(); $app['session'] = $session = $this->getSessionMock(); @@ -75,7 +75,7 @@ class AuthenticatorTest extends \PhraseanetPHPUnitAbstract */ public function testOpenAccount() { - $app = new Application(); + $app = $this->loadApp(); $capturedSession = null; $app['browser'] = $browser = $this->getBrowserMock(); @@ -126,7 +126,7 @@ class AuthenticatorTest extends \PhraseanetPHPUnitAbstract */ public function testRefreshAccount() { - $app = new Application(); + $app = $this->loadApp(); $user = self::$DI['user']; @@ -168,7 +168,7 @@ class AuthenticatorTest extends \PhraseanetPHPUnitAbstract */ public function testRefreshAccountWithWrongSessionShouldThrowException() { - $app = new Application(); + $app = $this->loadApp(); $user = self::$DI['user']; @@ -239,7 +239,7 @@ class AuthenticatorTest extends \PhraseanetPHPUnitAbstract */ public function testIsAuthenticated() { - $app = new Application(); + $app = $this->loadApp(); $user = self::$DI['user']; @@ -264,7 +264,7 @@ class AuthenticatorTest extends \PhraseanetPHPUnitAbstract */ public function testIsNotAuthenticated() { - $app = new Application(); + $app = $this->loadApp(); $app['browser'] = $browser = $this->getBrowserMock(); $app['session'] = $session = $this->getSessionMock(); diff --git a/tests/Alchemy/Tests/Phrasea/Authentication/ContextTest.php b/tests/Alchemy/Tests/Phrasea/Authentication/ContextTest.php index 7578f20b77..6e73ccfa51 100644 --- a/tests/Alchemy/Tests/Phrasea/Authentication/ContextTest.php +++ b/tests/Alchemy/Tests/Phrasea/Authentication/ContextTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Authentication; use Alchemy\Phrasea\Authentication\Context; -class ContextTest extends \PHPUnit_Framework_TestCase +class ContextTest extends \PhraseanetTestCase { public function testWithValidCOntext() { @@ -17,7 +17,7 @@ class ContextTest extends \PHPUnit_Framework_TestCase } /** - * @expectedException Alchemy\Phrasea\Exception\InvalidArgumentException + * @expectedException \Alchemy\Phrasea\Exception\InvalidArgumentException */ public function testWithInvalidCOntext() { diff --git a/tests/Alchemy/Tests/Phrasea/Authentication/ManagerTest.php b/tests/Alchemy/Tests/Phrasea/Authentication/ManagerTest.php index 5393ca82ce..c0c80c5d11 100644 --- a/tests/Alchemy/Tests/Phrasea/Authentication/ManagerTest.php +++ b/tests/Alchemy/Tests/Phrasea/Authentication/ManagerTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Authentication; use Alchemy\Phrasea\Authentication\Manager; -class ManagerTest extends \PHPUnit_Framework_TestCase +class ManagerTest extends \PhraseanetTestCase { /** * @covers Alchemy\Phrasea\Authentication\Manager::openAccount diff --git a/tests/Alchemy/Tests/Phrasea/Authentication/PersistentCookie/ManagerTest.php b/tests/Alchemy/Tests/Phrasea/Authentication/PersistentCookie/ManagerTest.php index ab2255d474..5b5dc57d78 100644 --- a/tests/Alchemy/Tests/Phrasea/Authentication/PersistentCookie/ManagerTest.php +++ b/tests/Alchemy/Tests/Phrasea/Authentication/PersistentCookie/ManagerTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Phrasea\Authentication\PersistentCookie; use Alchemy\Phrasea\Authentication\PersistentCookie\Manager; use Alchemy\Phrasea\Model\Entities\Session; -class ManagerTest extends \PHPUnit_Framework_TestCase +class ManagerTest extends \PhraseanetTestCase { /** * @covers Alchemy\Phrasea\Authentication\PersistentCookie\Manager::getSession diff --git a/tests/Alchemy/Tests/Phrasea/Authentication/Phrasea/FailureHandledNativeAuthenticationTest.php b/tests/Alchemy/Tests/Phrasea/Authentication/Phrasea/FailureHandledNativeAuthenticationTest.php index 86bca82532..a82c8a5519 100644 --- a/tests/Alchemy/Tests/Phrasea/Authentication/Phrasea/FailureHandledNativeAuthenticationTest.php +++ b/tests/Alchemy/Tests/Phrasea/Authentication/Phrasea/FailureHandledNativeAuthenticationTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea; use Alchemy\Phrasea\Authentication\Phrasea\FailureHandledNativeAuthentication; -class FailureHandledNativeAuthenticationTest extends \PHPUnit_Framework_TestCase +class FailureHandledNativeAuthenticationTest extends \PhraseanetTestCase { public function testGetUsrIdWhenSuccessful() { diff --git a/tests/Alchemy/Tests/Phrasea/Authentication/Phrasea/FailureManagerTest.php b/tests/Alchemy/Tests/Phrasea/Authentication/Phrasea/FailureManagerTest.php index 5fd09de362..fc1b30f5b3 100644 --- a/tests/Alchemy/Tests/Phrasea/Authentication/Phrasea/FailureManagerTest.php +++ b/tests/Alchemy/Tests/Phrasea/Authentication/Phrasea/FailureManagerTest.php @@ -7,7 +7,7 @@ use Alchemy\Phrasea\Model\Entities\AuthFailure; use Gedmo\Timestampable\TimestampableListener; use Symfony\Component\HttpFoundation\Request; -class FailureManagerTest extends \PhraseanetPHPUnitAbstract +class FailureManagerTest extends \PhraseanetTestCase { /** * @covers Alchemy\Phrasea\Authentication\Phrasea\FailureManager::saveFailure @@ -155,7 +155,7 @@ class FailureManagerTest extends \PhraseanetPHPUnitAbstract } /** - * @expectedException Alchemy\Phrasea\Authentication\Exception\RequireCaptchaException + * @expectedException \Alchemy\Phrasea\Authentication\Exception\RequireCaptchaException * @covers Alchemy\Phrasea\Authentication\Phrasea\FailureManager::checkFailures */ public function testCheckFailuresMoreThan9WithIncorrectCaptcha() @@ -213,7 +213,7 @@ class FailureManagerTest extends \PhraseanetPHPUnitAbstract } /** - * @expectedException Alchemy\Phrasea\Authentication\Exception\RequireCaptchaException + * @expectedException \Alchemy\Phrasea\Authentication\Exception\RequireCaptchaException * @covers Alchemy\Phrasea\Authentication\Phrasea\FailureManager::checkFailures */ public function testCheckFailuresTrialsIsConfigurableOverThreshold() diff --git a/tests/Alchemy/Tests/Phrasea/Authentication/Phrasea/NativeAuthenticationTest.php b/tests/Alchemy/Tests/Phrasea/Authentication/Phrasea/NativeAuthenticationTest.php index 931830a766..92065acab3 100644 --- a/tests/Alchemy/Tests/Phrasea/Authentication/Phrasea/NativeAuthenticationTest.php +++ b/tests/Alchemy/Tests/Phrasea/Authentication/Phrasea/NativeAuthenticationTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Authentication\Phrasea; use Alchemy\Phrasea\Authentication\Phrasea\NativeAuthentication; use Alchemy\Phrasea\Authentication\Exception\AccountLockedException; -class NativeAuthenticationTest extends \PHPUnit_Framework_TestCase +class NativeAuthenticationTest extends \PhraseanetTestCase { /** * @dataProvider provideReservedUsernames diff --git a/tests/Alchemy/Tests/Phrasea/Authentication/Phrasea/OldPasswordEncoderTest.php b/tests/Alchemy/Tests/Phrasea/Authentication/Phrasea/OldPasswordEncoderTest.php index 1cfb1448bf..b4eaf0988e 100644 --- a/tests/Alchemy/Tests/Phrasea/Authentication/Phrasea/OldPasswordEncoderTest.php +++ b/tests/Alchemy/Tests/Phrasea/Authentication/Phrasea/OldPasswordEncoderTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Authentication\Phrasea; use Alchemy\Phrasea\Authentication\Phrasea\OldPasswordEncoder; -class OldPasswordEncoderTest extends \PHPUnit_Framework_TestCase +class OldPasswordEncoderTest extends \PhraseanetTestCase { /** * @dataProvider providePasswords diff --git a/tests/Alchemy/Tests/Phrasea/Authentication/Phrasea/PasswordEncoderTest.php b/tests/Alchemy/Tests/Phrasea/Authentication/Phrasea/PasswordEncoderTest.php index 82ad2e2788..bc1bd56761 100644 --- a/tests/Alchemy/Tests/Phrasea/Authentication/Phrasea/PasswordEncoderTest.php +++ b/tests/Alchemy/Tests/Phrasea/Authentication/Phrasea/PasswordEncoderTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Authentication\Phrasea; use Alchemy\Phrasea\Authentication\Phrasea\PasswordEncoder; -class PasswordEncoderTest extends \PHPUnit_Framework_TestCase +class PasswordEncoderTest extends \PhraseanetTestCase { public function providePasswords() { @@ -31,7 +31,7 @@ class PasswordEncoderTest extends \PHPUnit_Framework_TestCase /** * @dataProvider provideInvalidKeys - * @expectedException Alchemy\Phrasea\Exception\InvalidArgumentException + * @expectedException \Alchemy\Phrasea\Exception\InvalidArgumentException */ public function testFailureIfNoKey($key) { diff --git a/tests/Alchemy/Tests/Phrasea/Authentication/Provider/FacebookTest.php b/tests/Alchemy/Tests/Phrasea/Authentication/Provider/FacebookTest.php index 6049732657..2da4fb3a83 100644 --- a/tests/Alchemy/Tests/Phrasea/Authentication/Provider/FacebookTest.php +++ b/tests/Alchemy/Tests/Phrasea/Authentication/Provider/FacebookTest.php @@ -62,7 +62,7 @@ class FacebookTest extends ProviderTestCase return new Facebook($this->getFacebookMock(), $this->getUrlGeneratorMock()); } - protected function authenticate(ProviderInterface $provider) + protected function authenticateProvider(ProviderInterface $provider) { $provider->getFacebook()->expects($this->any()) ->method('getUser') @@ -72,7 +72,7 @@ class FacebookTest extends ProviderTestCase protected function getProviderForSuccessIdentity() { $provider = $this->getProvider(); - $this->authenticate($provider); + $this->authenticateProvider($provider); $facebook = $this->getMockBuilder('Facebook') ->disableOriginalConstructor() diff --git a/tests/Alchemy/Tests/Phrasea/Authentication/Provider/FactoryTest.php b/tests/Alchemy/Tests/Phrasea/Authentication/Provider/FactoryTest.php index c66b50fe92..118a90a7eb 100644 --- a/tests/Alchemy/Tests/Phrasea/Authentication/Provider/FactoryTest.php +++ b/tests/Alchemy/Tests/Phrasea/Authentication/Provider/FactoryTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Authentication\Provider; use Alchemy\Phrasea\Authentication\Provider\Factory; -class FactoryTest extends \PHPUnit_Framework_TestCase +class FactoryTest extends \PhraseanetTestCase { /** * @dataProvider provideNameAndOptions diff --git a/tests/Alchemy/Tests/Phrasea/Authentication/Provider/GithubTest.php b/tests/Alchemy/Tests/Phrasea/Authentication/Provider/GithubTest.php index 44ad62cb4c..d0fc6bcc32 100644 --- a/tests/Alchemy/Tests/Phrasea/Authentication/Provider/GithubTest.php +++ b/tests/Alchemy/Tests/Phrasea/Authentication/Provider/GithubTest.php @@ -197,7 +197,7 @@ class GithubTest extends ProviderTestCase ]; } - protected function authenticate(ProviderInterface $provider) + protected function authenticateProvider(ProviderInterface $provider) { $provider->getSession()->set('github.provider.id', 'github-id'); } diff --git a/tests/Alchemy/Tests/Phrasea/Authentication/Provider/GooglePlusTest.php b/tests/Alchemy/Tests/Phrasea/Authentication/Provider/GooglePlusTest.php index 25f47f653e..c4d0531d91 100644 --- a/tests/Alchemy/Tests/Phrasea/Authentication/Provider/GooglePlusTest.php +++ b/tests/Alchemy/Tests/Phrasea/Authentication/Provider/GooglePlusTest.php @@ -236,7 +236,7 @@ class GooglePlusTest extends ProviderTestCase return $provider; } - protected function authenticate(ProviderInterface $provider) + protected function authenticateProvider(ProviderInterface $provider) { $provider->getSession()->set('google-plus.provider.id', '12345678'); } diff --git a/tests/Alchemy/Tests/Phrasea/Authentication/Provider/LinkedinTest.php b/tests/Alchemy/Tests/Phrasea/Authentication/Provider/LinkedinTest.php index 0cc23a3477..78d7456a93 100644 --- a/tests/Alchemy/Tests/Phrasea/Authentication/Provider/LinkedinTest.php +++ b/tests/Alchemy/Tests/Phrasea/Authentication/Provider/LinkedinTest.php @@ -271,7 +271,7 @@ class LinkedinTest extends ProviderTestCase return $this->getProvider(); } - protected function authenticate(ProviderInterface $provider) + protected function authenticateProvider(ProviderInterface $provider) { $provider->getSession()->set('linkedin.provider.id', 'linkedin-id'); } diff --git a/tests/Alchemy/Tests/Phrasea/Authentication/Provider/ProviderTestCase.php b/tests/Alchemy/Tests/Phrasea/Authentication/Provider/ProviderTestCase.php index 951e02d7d7..e1c8b48a6f 100644 --- a/tests/Alchemy/Tests/Phrasea/Authentication/Provider/ProviderTestCase.php +++ b/tests/Alchemy/Tests/Phrasea/Authentication/Provider/ProviderTestCase.php @@ -11,7 +11,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Session\Storage\MockFileSessionStorage; use Symfony\Component\HttpFoundation\Session\Session; -abstract class ProviderTestCase extends \PHPUnit_Framework_TestCase +abstract class ProviderTestCase extends \PhraseanetTestCase { protected $session; @@ -101,7 +101,7 @@ abstract class ProviderTestCase extends \PHPUnit_Framework_TestCase /** * @dataProvider provideDataForFailingCallback - * @expectedException Alchemy\Phrasea\Authentication\Exception\NotAuthenticatedException + * @expectedException \Alchemy\Phrasea\Authentication\Exception\NotAuthenticatedException */ public function testOnCallbackWithFailure($provider, $request) { @@ -111,7 +111,7 @@ abstract class ProviderTestCase extends \PHPUnit_Framework_TestCase public function testGetToken() { $provider = $this->getProvider(); - $this->authenticate($provider); + $this->authenticateProvider($provider); $token = $provider->getToken(); @@ -120,7 +120,7 @@ abstract class ProviderTestCase extends \PHPUnit_Framework_TestCase } /** - * @expectedException Alchemy\Phrasea\Authentication\Exception\NotAuthenticatedException + * @expectedException \Alchemy\Phrasea\Authentication\Exception\NotAuthenticatedException */ public function testGetTokenWhenNotAuthenticated() { @@ -140,7 +140,7 @@ abstract class ProviderTestCase extends \PHPUnit_Framework_TestCase } /** - * @expectedException Alchemy\Phrasea\Authentication\Exception\NotAuthenticatedException + * @expectedException \Alchemy\Phrasea\Authentication\Exception\NotAuthenticatedException */ public function testGetIdentityWhenNotAuthenticated() { @@ -192,7 +192,7 @@ abstract class ProviderTestCase extends \PHPUnit_Framework_TestCase $this->getProviderForLogout()->logout(); } - abstract protected function authenticate(ProviderInterface $provider); + abstract protected function authenticateProvider(ProviderInterface $provider); abstract protected function getProviderForAuthentication(); diff --git a/tests/Alchemy/Tests/Phrasea/Authentication/Provider/Token/IdentityTest.php b/tests/Alchemy/Tests/Phrasea/Authentication/Provider/Token/IdentityTest.php index b6acd72b3a..ffd2c8f6fd 100644 --- a/tests/Alchemy/Tests/Phrasea/Authentication/Provider/Token/IdentityTest.php +++ b/tests/Alchemy/Tests/Phrasea/Authentication/Provider/Token/IdentityTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Authentication\Provider\Token; use Alchemy\Phrasea\Authentication\Provider\Token\Identity; -class IdentityTest extends \PHPUnit_Framework_TestCase +class IdentityTest extends \PhraseanetTestCase { public function testThatOffsetAreSetOnConstruct() { @@ -23,7 +23,7 @@ class IdentityTest extends \PHPUnit_Framework_TestCase } /** - * @expectedException Alchemy\Phrasea\Exception\InvalidArgumentException + * @expectedException \Alchemy\Phrasea\Exception\InvalidArgumentException */ public function testThatGetOnUnknownArgThrowsAnException() { @@ -103,7 +103,7 @@ class IdentityTest extends \PHPUnit_Framework_TestCase /** * @depends testSet - * @expectedException Alchemy\Phrasea\Exception\InvalidArgumentException + * @expectedException \Alchemy\Phrasea\Exception\InvalidArgumentException */ public function testRemoveThrowsAnException($identity) { diff --git a/tests/Alchemy/Tests/Phrasea/Authentication/Provider/Token/TokenTest.php b/tests/Alchemy/Tests/Phrasea/Authentication/Provider/Token/TokenTest.php index c0eb711003..94e7387d5f 100644 --- a/tests/Alchemy/Tests/Phrasea/Authentication/Provider/Token/TokenTest.php +++ b/tests/Alchemy/Tests/Phrasea/Authentication/Provider/Token/TokenTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Authentication\Provider\Token; use Alchemy\Phrasea\Authentication\Provider\Token\Token; -class TokenTest extends \PHPUnit_Framework_TestCase +class TokenTest extends \PhraseanetTestCase { public function testGetIdAndProvider() { diff --git a/tests/Alchemy/Tests/Phrasea/Authentication/Provider/TwitterTest.php b/tests/Alchemy/Tests/Phrasea/Authentication/Provider/TwitterTest.php index 5f15f246ae..3c1afb68f2 100644 --- a/tests/Alchemy/Tests/Phrasea/Authentication/Provider/TwitterTest.php +++ b/tests/Alchemy/Tests/Phrasea/Authentication/Provider/TwitterTest.php @@ -31,7 +31,7 @@ class TwitterTest extends ProviderTestCase } /** - * @expectedException Alchemy\Phrasea\Authentication\Exception\NotAuthenticatedException + * @expectedException \Alchemy\Phrasea\Authentication\Exception\NotAuthenticatedException */ public function testAuthenticateWithFailure() { @@ -202,7 +202,7 @@ class TwitterTest extends ProviderTestCase return $provider; } - protected function authenticate(ProviderInterface $provider) + protected function authenticateProvider(ProviderInterface $provider) { $provider->getSession()->set('twitter.provider.id', '12345'); } diff --git a/tests/Alchemy/Tests/Phrasea/Authentication/Provider/ViadeoTest.php b/tests/Alchemy/Tests/Phrasea/Authentication/Provider/ViadeoTest.php index f937ffbc1d..9bfb77e7ee 100644 --- a/tests/Alchemy/Tests/Phrasea/Authentication/Provider/ViadeoTest.php +++ b/tests/Alchemy/Tests/Phrasea/Authentication/Provider/ViadeoTest.php @@ -262,7 +262,7 @@ class ViadeoTest extends ProviderTestCase ]; } - protected function authenticate(ProviderInterface $provider) + protected function authenticateProvider(ProviderInterface $provider) { $provider->getSession()->set('viadeo.provider.id', 'viadeo-id'); } diff --git a/tests/Alchemy/Tests/Phrasea/Authentication/ProvidersCollectionTest.php b/tests/Alchemy/Tests/Phrasea/Authentication/ProvidersCollectionTest.php index a85a3309c2..09b799c829 100644 --- a/tests/Alchemy/Tests/Phrasea/Authentication/ProvidersCollectionTest.php +++ b/tests/Alchemy/Tests/Phrasea/Authentication/ProvidersCollectionTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Authentication; use Alchemy\Phrasea\Authentication\ProvidersCollection; use Alchemy\Phrasea\Exception\InvalidArgumentException; -class ProvidersCollectionTest extends \PHPUnit_Framework_TestCase +class ProvidersCollectionTest extends \PhraseanetTestCase { /** * @covers Alchemy\Phrasea\Authentication\ProvidersCollection::getIterator diff --git a/tests/Alchemy/Tests/Phrasea/Authentication/SuggestionFinderTest.php b/tests/Alchemy/Tests/Phrasea/Authentication/SuggestionFinderTest.php index 2d9258ef8d..d449a39df8 100644 --- a/tests/Alchemy/Tests/Phrasea/Authentication/SuggestionFinderTest.php +++ b/tests/Alchemy/Tests/Phrasea/Authentication/SuggestionFinderTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Authentication; use Alchemy\Phrasea\Authentication\Provider\Token\Identity; use Alchemy\Phrasea\Authentication\SuggestionFinder; -class SuggestionFinderTest extends \PhraseanetPHPUnitAbstract +class SuggestionFinderTest extends \PhraseanetTestCase { public function testSuggestionIsFound() { diff --git a/tests/Alchemy/Tests/Phrasea/Authentication/Token/TokenValidatorTest.php b/tests/Alchemy/Tests/Phrasea/Authentication/Token/TokenValidatorTest.php index f7e7b464f7..11c7db62b1 100644 --- a/tests/Alchemy/Tests/Phrasea/Authentication/Token/TokenValidatorTest.php +++ b/tests/Alchemy/Tests/Phrasea/Authentication/Token/TokenValidatorTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Authentication; use Alchemy\Phrasea\Authentication\Token\TokenValidator; -class TokenValidatorTest extends \PhraseanetPHPUnitAbstract +class TokenValidatorTest extends \PhraseanetTestCase { /** * @covers Alchemy\Phrasea\Authentication\TokenValidator::isValid diff --git a/tests/Alchemy/Tests/Phrasea/Border/Attribute/FactoryTest.php b/tests/Alchemy/Tests/Phrasea/Border/Attribute/FactoryTest.php index 8684f73a98..4b281945d6 100644 --- a/tests/Alchemy/Tests/Phrasea/Border/Attribute/FactoryTest.php +++ b/tests/Alchemy/Tests/Phrasea/Border/Attribute/FactoryTest.php @@ -9,7 +9,7 @@ use PHPExiftool\Driver\Tag\IPTC\UniqueDocumentID; use PHPExiftool\Driver\Value\Mono; use PHPExiftool\Driver\Metadata\Metadata; -class FactoryTest extends \PhraseanetPHPUnitAbstract +class FactoryTest extends \PhraseanetTestCase { /** diff --git a/tests/Alchemy/Tests/Phrasea/Border/Attribute/MetaFieldTest.php b/tests/Alchemy/Tests/Phrasea/Border/Attribute/MetaFieldTest.php index b79ad1a3f4..128a45a732 100644 --- a/tests/Alchemy/Tests/Phrasea/Border/Attribute/MetaFieldTest.php +++ b/tests/Alchemy/Tests/Phrasea/Border/Attribute/MetaFieldTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Border\Attribute; use Alchemy\Phrasea\Border\Attribute\MetaField; use Alchemy\Phrasea\Border\Attribute\AttributeInterface; -class MetaFieldTest extends \PhraseanetPHPUnitAbstract +class MetaFieldTest extends \PhraseanetTestCase { /** * @var MetaField diff --git a/tests/Alchemy/Tests/Phrasea/Border/Attribute/MetadataTest.php b/tests/Alchemy/Tests/Phrasea/Border/Attribute/MetadataTest.php index fba9a425ea..8207b114ec 100644 --- a/tests/Alchemy/Tests/Phrasea/Border/Attribute/MetadataTest.php +++ b/tests/Alchemy/Tests/Phrasea/Border/Attribute/MetadataTest.php @@ -8,7 +8,7 @@ use PHPExiftool\Driver\Tag\IPTC\ObjectName; use PHPExiftool\Driver\Value\Mono; use PHPExiftool\Driver\Metadata\Metadata as ExiftoolMeta; -class MetadataTest extends \PhraseanetPHPUnitAbstract +class MetadataTest extends \PhraseanetTestCase { /** * @var Metadata diff --git a/tests/Alchemy/Tests/Phrasea/Border/Attribute/StatusTest.php b/tests/Alchemy/Tests/Phrasea/Border/Attribute/StatusTest.php index 105fce23e1..a0a34b82cf 100644 --- a/tests/Alchemy/Tests/Phrasea/Border/Attribute/StatusTest.php +++ b/tests/Alchemy/Tests/Phrasea/Border/Attribute/StatusTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Border\Attribute; use Alchemy\Phrasea\Border\Attribute\Status; use Alchemy\Phrasea\Border\Attribute\AttributeInterface; -class StatusTest extends \PhraseanetPHPUnitAbstract +class StatusTest extends \PhraseanetTestCase { /** * @var Status diff --git a/tests/Alchemy/Tests/Phrasea/Border/Attribute/StoryTest.php b/tests/Alchemy/Tests/Phrasea/Border/Attribute/StoryTest.php index 0b2055c150..b223a44713 100644 --- a/tests/Alchemy/Tests/Phrasea/Border/Attribute/StoryTest.php +++ b/tests/Alchemy/Tests/Phrasea/Border/Attribute/StoryTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Border\Attribute; use Alchemy\Phrasea\Border\Attribute\Story; use Alchemy\Phrasea\Border\Attribute\AttributeInterface; -class StoryTest extends \PhraseanetPHPUnitAbstract +class StoryTest extends \PhraseanetTestCase { /** * @var Story diff --git a/tests/Alchemy/Tests/Phrasea/Border/Checker/AbstractCheckerTest.php b/tests/Alchemy/Tests/Phrasea/Border/Checker/AbstractCheckerTest.php index 850af1a21a..c509e91f72 100644 --- a/tests/Alchemy/Tests/Phrasea/Border/Checker/AbstractCheckerTest.php +++ b/tests/Alchemy/Tests/Phrasea/Border/Checker/AbstractCheckerTest.php @@ -8,7 +8,7 @@ use Alchemy\Phrasea\Application; use Doctrine\ORM\EntityManager; use Symfony\Component\Translation\TranslatorInterface; -class AbstractCheckerTest extends \PhraseanetPHPUnitAbstract +class AbstractCheckerTest extends \PhraseanetTestCase { /** * @var AbstractChecker @@ -48,7 +48,7 @@ class AbstractCheckerTest extends \PhraseanetPHPUnitAbstract public function getDataboxesCombinaison() { $databox = $collection = null; - $app = new Application('test'); + $app = $this->loadApp(); foreach ($app['phraseanet.appbox']->get_databoxes() as $db) { if (! $collection) { @@ -99,7 +99,7 @@ class AbstractCheckerTest extends \PhraseanetPHPUnitAbstract public function getCollectionsCombinaison() { $othercollection = $collection = null; - $app = new Application('test'); + $app = $this->loadApp(); $databoxes = $app['phraseanet.appbox']->get_databoxes(); if (count($databoxes) === 0) { $this->fail('Unable to find collections'); @@ -181,7 +181,7 @@ class AbstractCheckerTest extends \PhraseanetPHPUnitAbstract public function getDataboxAndCollection() { $databox = $collection = null; - $app = new Application('test'); + $app = $this->loadApp(); foreach ($app['phraseanet.appbox']->get_databoxes() as $db) { if (! $databox) { diff --git a/tests/Alchemy/Tests/Phrasea/Border/Checker/ColorspaceTest.php b/tests/Alchemy/Tests/Phrasea/Border/Checker/ColorspaceTest.php index e9750ba81f..bd079bb65e 100644 --- a/tests/Alchemy/Tests/Phrasea/Border/Checker/ColorspaceTest.php +++ b/tests/Alchemy/Tests/Phrasea/Border/Checker/ColorspaceTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Border\Checker; use Alchemy\Phrasea\Border\File; use Alchemy\Phrasea\Border\Checker\Colorspace; -class ColorspaceTest extends \PhraseanetPHPUnitAbstract +class ColorspaceTest extends \PhraseanetTestCase { /** * @var Colorspace @@ -55,7 +55,7 @@ class ColorspaceTest extends \PhraseanetPHPUnitAbstract } /** - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException */ public function testContructorInvalidArgumentException() { diff --git a/tests/Alchemy/Tests/Phrasea/Border/Checker/DimensionTest.php b/tests/Alchemy/Tests/Phrasea/Border/Checker/DimensionTest.php index 0466e7dc14..cd1aaad880 100644 --- a/tests/Alchemy/Tests/Phrasea/Border/Checker/DimensionTest.php +++ b/tests/Alchemy/Tests/Phrasea/Border/Checker/DimensionTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Border\Checker; use Alchemy\Phrasea\Border\File; use Alchemy\Phrasea\Border\Checker\Dimension; -class DimensionTest extends \PhraseanetPHPUnitAbstract +class DimensionTest extends \PhraseanetTestCase { /** * @var Dimension @@ -115,7 +115,7 @@ class DimensionTest extends \PhraseanetPHPUnitAbstract } /** - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException */ public function testContructorInvalidArgumentException() { diff --git a/tests/Alchemy/Tests/Phrasea/Border/Checker/ExtensionTest.php b/tests/Alchemy/Tests/Phrasea/Border/Checker/ExtensionTest.php index 6369b30f1c..8a73306ec5 100644 --- a/tests/Alchemy/Tests/Phrasea/Border/Checker/ExtensionTest.php +++ b/tests/Alchemy/Tests/Phrasea/Border/Checker/ExtensionTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Border\Checker; use Alchemy\Phrasea\Border\File; use Alchemy\Phrasea\Border\Checker\Extension; -class ExtensionTest extends \PhraseanetPHPUnitAbstract +class ExtensionTest extends \PhraseanetTestCase { /** * @var Extension @@ -67,7 +67,7 @@ class ExtensionTest extends \PhraseanetPHPUnitAbstract } /** - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException */ public function testContructorInvalidArgumentException() { diff --git a/tests/Alchemy/Tests/Phrasea/Border/Checker/FilenameTest.php b/tests/Alchemy/Tests/Phrasea/Border/Checker/FilenameTest.php index 70e37f90f9..845fbb6146 100644 --- a/tests/Alchemy/Tests/Phrasea/Border/Checker/FilenameTest.php +++ b/tests/Alchemy/Tests/Phrasea/Border/Checker/FilenameTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Border\Checker; use Alchemy\Phrasea\Border\File; use Alchemy\Phrasea\Border\Checker\Filename; -class FilenameTest extends \PhraseanetPHPUnitAbstract +class FilenameTest extends \PhraseanetTestCase { /** * @var Filename diff --git a/tests/Alchemy/Tests/Phrasea/Border/Checker/MediaTypeTest.php b/tests/Alchemy/Tests/Phrasea/Border/Checker/MediaTypeTest.php index 5d9d0cf532..4d14e94110 100644 --- a/tests/Alchemy/Tests/Phrasea/Border/Checker/MediaTypeTest.php +++ b/tests/Alchemy/Tests/Phrasea/Border/Checker/MediaTypeTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Border\Checker; use Alchemy\Phrasea\Border\File; use Alchemy\Phrasea\Border\Checker\MediaType; -class MediaTypeTest extends \PhraseanetPHPUnitAbstract +class MediaTypeTest extends \PhraseanetTestCase { /** * @var MediaType @@ -51,7 +51,7 @@ class MediaTypeTest extends \PhraseanetPHPUnitAbstract } /** - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException */ public function testContructorInvalidArgumentException() { diff --git a/tests/Alchemy/Tests/Phrasea/Border/Checker/ResponseTest.php b/tests/Alchemy/Tests/Phrasea/Border/Checker/ResponseTest.php index a06054faf3..bc8cce2373 100644 --- a/tests/Alchemy/Tests/Phrasea/Border/Checker/ResponseTest.php +++ b/tests/Alchemy/Tests/Phrasea/Border/Checker/ResponseTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Border\Checker; use Alchemy\Phrasea\Border\Checker\Response; use Alchemy\Tests\Tools\TranslatorMockTrait; -class ResponseTest extends \PHPUnit_Framework_TestCase +class ResponseTest extends \PhraseanetTestCase { use TranslatorMockTrait; diff --git a/tests/Alchemy/Tests/Phrasea/Border/Checker/Sha256Test.php b/tests/Alchemy/Tests/Phrasea/Border/Checker/Sha256Test.php index de4559dfb8..02b7b90512 100644 --- a/tests/Alchemy/Tests/Phrasea/Border/Checker/Sha256Test.php +++ b/tests/Alchemy/Tests/Phrasea/Border/Checker/Sha256Test.php @@ -6,7 +6,7 @@ use Alchemy\Phrasea\Border\Manager; use Alchemy\Phrasea\Border\File; use Alchemy\Phrasea\Border\Checker\Sha256; -class Sha256Test extends \PhraseanetPHPUnitAbstract +class Sha256Test extends \PhraseanetTestCase { /** * @var Sha256 diff --git a/tests/Alchemy/Tests/Phrasea/Border/Checker/UUIDTest.php b/tests/Alchemy/Tests/Phrasea/Border/Checker/UUIDTest.php index 20a8a6290c..f271ee9b5c 100644 --- a/tests/Alchemy/Tests/Phrasea/Border/Checker/UUIDTest.php +++ b/tests/Alchemy/Tests/Phrasea/Border/Checker/UUIDTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Border\Checker; use Alchemy\Phrasea\Border\File; use Alchemy\Phrasea\Border\Checker\UUID; -class UUIDTest extends \PhraseanetPHPUnitAbstract +class UUIDTest extends \PhraseanetTestCase { /** * @var UUID diff --git a/tests/Alchemy/Tests/Phrasea/Border/FileTest.php b/tests/Alchemy/Tests/Phrasea/Border/FileTest.php index ee3135cbe9..f560ac127e 100644 --- a/tests/Alchemy/Tests/Phrasea/Border/FileTest.php +++ b/tests/Alchemy/Tests/Phrasea/Border/FileTest.php @@ -16,7 +16,7 @@ use PHPExiftool\Driver\Value\Multi; use PHPExiftool\Driver\Metadata\Metadata as PHPExiftoolMetadata; use Alchemy\Phrasea\Border\Attribute\Metadata; -class FileTest extends \PhraseanetPHPUnitAbstract +class FileTest extends \PhraseanetTestCase { /** * @var File @@ -222,7 +222,7 @@ class FileTest extends \PhraseanetPHPUnitAbstract File::buildFromPathfile('unexistent.file', self::$DI['collection'], self::$DI['app']); } - protected function getMediaMock($type) + private function getMediaMock($type) { $mock = $this->getMockBuilder('\\MediaVorus\\Media\\Image') ->disableOriginalConstructor() diff --git a/tests/Alchemy/Tests/Phrasea/Border/ManagerTest.php b/tests/Alchemy/Tests/Phrasea/Border/ManagerTest.php index 4628d15dc9..401867f7d7 100644 --- a/tests/Alchemy/Tests/Phrasea/Border/ManagerTest.php +++ b/tests/Alchemy/Tests/Phrasea/Border/ManagerTest.php @@ -21,8 +21,8 @@ class ManagerTest extends \PhraseanetWebTestCaseAuthenticatedAbstract */ protected $object; protected $session; - protected static $file1; - protected static $file2; + private static $file1; + private static $file2; public static function setUpBeforeClass() { diff --git a/tests/Alchemy/Tests/Phrasea/Border/MetaFieldsBagTest.php b/tests/Alchemy/Tests/Phrasea/Border/MetaFieldsBagTest.php index 732822ecdc..4b16f534cb 100644 --- a/tests/Alchemy/Tests/Phrasea/Border/MetaFieldsBagTest.php +++ b/tests/Alchemy/Tests/Phrasea/Border/MetaFieldsBagTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Border; use Alchemy\Phrasea\Border\Attribute\MetaField; use Alchemy\Phrasea\Border\MetaFieldsBag; -class MetaFieldsBagTest extends \PhraseanetPHPUnitAbstract +class MetaFieldsBagTest extends \PhraseanetTestCase { /** * @var MetaFieldsBag diff --git a/tests/Alchemy/Tests/Phrasea/Border/MetadataBagTest.php b/tests/Alchemy/Tests/Phrasea/Border/MetadataBagTest.php index e4c6614c50..921aabed0c 100644 --- a/tests/Alchemy/Tests/Phrasea/Border/MetadataBagTest.php +++ b/tests/Alchemy/Tests/Phrasea/Border/MetadataBagTest.php @@ -7,7 +7,7 @@ use PHPExiftool\Driver\Metadata\Metadata; use PHPExiftool\Driver\Value\Mono; use PHPExiftool\Driver\Value\Multi; -class MetadataBagTest extends \PhraseanetPHPUnitAbstract +class MetadataBagTest extends \PhraseanetTestCase { /** * @var MetadataBag diff --git a/tests/Alchemy/Tests/Phrasea/Border/VisaTest.php b/tests/Alchemy/Tests/Phrasea/Border/VisaTest.php index e4743a2ff6..e1d2ad122d 100644 --- a/tests/Alchemy/Tests/Phrasea/Border/VisaTest.php +++ b/tests/Alchemy/Tests/Phrasea/Border/VisaTest.php @@ -6,7 +6,7 @@ use Alchemy\Phrasea\Border\Visa; use Alchemy\Phrasea\Border\Checker\Filename; use Alchemy\Phrasea\Border\Checker\Response; -class VisaTest extends \PhraseanetPHPUnitAbstract +class VisaTest extends \PhraseanetTestCase { /** diff --git a/tests/Alchemy/Tests/Phrasea/CLITest.php b/tests/Alchemy/Tests/Phrasea/CLITest.php index 83e22ee452..276a47fcbe 100644 --- a/tests/Alchemy/Tests/Phrasea/CLITest.php +++ b/tests/Alchemy/Tests/Phrasea/CLITest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea; use Alchemy\Phrasea\CLI; -class CLITest extends \PhraseanetPHPUnitAbstract +class CLITest extends \PhraseanetTestCase { public function testsEmailWithoutQueue() { diff --git a/tests/Alchemy/Tests/Phrasea/Cache/ApcCacheTest.php b/tests/Alchemy/Tests/Phrasea/Cache/ApcCacheTest.php index 6240db61e4..d97ba1b62c 100644 --- a/tests/Alchemy/Tests/Phrasea/Cache/ApcCacheTest.php +++ b/tests/Alchemy/Tests/Phrasea/Cache/ApcCacheTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Cache; use Alchemy\Phrasea\Cache\ApcCache; -class ApcCacheTest extends \PHPUnit_Framework_TestCase +class ApcCacheTest extends \PhraseanetTestCase { /** * @var ApcCache diff --git a/tests/Alchemy/Tests/Phrasea/Cache/ArrayCacheTest.php b/tests/Alchemy/Tests/Phrasea/Cache/ArrayCacheTest.php index 5d67d499de..4f166fc8bf 100644 --- a/tests/Alchemy/Tests/Phrasea/Cache/ArrayCacheTest.php +++ b/tests/Alchemy/Tests/Phrasea/Cache/ArrayCacheTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Cache; use Alchemy\Phrasea\Cache\ArrayCache; -class ArrayCacheTest extends \PHPUnit_Framework_TestCase +class ArrayCacheTest extends \PhraseanetTestCase { /** * @var ArrayCache diff --git a/tests/Alchemy/Tests/Phrasea/Cache/ConnectionFactoryTest.php b/tests/Alchemy/Tests/Phrasea/Cache/ConnectionFactoryTest.php index ef7c0bab52..7663ee33ca 100644 --- a/tests/Alchemy/Tests/Phrasea/Cache/ConnectionFactoryTest.php +++ b/tests/Alchemy/Tests/Phrasea/Cache/ConnectionFactoryTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Cache; use Alchemy\Phrasea\Cache\ConnectionFactory; use Alchemy\Phrasea\Cache\Factory; -class ConnectionFactoryTest extends \PHPUnit_Framework_TestCase +class ConnectionFactoryTest extends \PhraseanetTestCase { public function testGetRedisConnection() { @@ -21,7 +21,7 @@ class ConnectionFactoryTest extends \PHPUnit_Framework_TestCase } /** - * @expectedException Alchemy\PHrasea\Exception\RuntimeException + * @expectedException \Alchemy\PHrasea\Exception\RuntimeException * @expectedExceptionMessage Redis instance with host 'unknown-host' and port '666' is not reachable */ public function testGetInvalidRedisConnection() @@ -51,7 +51,7 @@ class ConnectionFactoryTest extends \PHPUnit_Framework_TestCase } /** - * @expectedException Alchemy\PHrasea\Exception\RuntimeException + * @expectedException \Alchemy\PHrasea\Exception\RuntimeException * @expectedExceptionMessage Memcached instance with host 'unknown-host' and port '666' is not reachable */ public function testGetInvalidMemcachedConnection() @@ -81,7 +81,7 @@ class ConnectionFactoryTest extends \PHPUnit_Framework_TestCase } /** - * @expectedException Alchemy\PHrasea\Exception\RuntimeException + * @expectedException \Alchemy\PHrasea\Exception\RuntimeException * @expectedExceptionMessage Memcache instance with host 'unknown-host' and port '666' is not reachable */ public function testGetInvalidMemcacheConnection() diff --git a/tests/Alchemy/Tests/Phrasea/Cache/FactoryTest.php b/tests/Alchemy/Tests/Phrasea/Cache/FactoryTest.php index e43fc97717..0176b2c3ce 100644 --- a/tests/Alchemy/Tests/Phrasea/Cache/FactoryTest.php +++ b/tests/Alchemy/Tests/Phrasea/Cache/FactoryTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Cache; use Alchemy\Phrasea\Cache\ConnectionFactory; use Alchemy\Phrasea\Cache\Factory; -class FactoryTest extends \PHPUnit_Framework_TestCase +class FactoryTest extends \PhraseanetTestCase { /** * @dataProvider provideCacheTypes diff --git a/tests/Alchemy/Tests/Phrasea/Cache/ManagerTest.php b/tests/Alchemy/Tests/Phrasea/Cache/ManagerTest.php index 32e3311406..fe10be345b 100644 --- a/tests/Alchemy/Tests/Phrasea/Cache/ManagerTest.php +++ b/tests/Alchemy/Tests/Phrasea/Cache/ManagerTest.php @@ -6,7 +6,7 @@ use Alchemy\Phrasea\Cache\Manager; use Alchemy\Phrasea\Core\Configuration\Compiler; use Alchemy\Phrasea\Exception\RuntimeException; -class ManagerTest extends \PHPUnit_Framework_TestCase +class ManagerTest extends \PhraseanetTestCase { private $file; diff --git a/tests/Alchemy/Tests/Phrasea/Cache/MemcacheCacheTest.php b/tests/Alchemy/Tests/Phrasea/Cache/MemcacheCacheTest.php index 82ff9aa9b9..e1d1173d3f 100644 --- a/tests/Alchemy/Tests/Phrasea/Cache/MemcacheCacheTest.php +++ b/tests/Alchemy/Tests/Phrasea/Cache/MemcacheCacheTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Cache; use Alchemy\Phrasea\Cache\MemcacheCache; -class MemcacheCacheTest extends \PHPUnit_Framework_TestCase +class MemcacheCacheTest extends \PhraseanetTestCase { /** * @var MemcacheCache diff --git a/tests/Alchemy/Tests/Phrasea/Cache/MemcachedCacheTest.php b/tests/Alchemy/Tests/Phrasea/Cache/MemcachedCacheTest.php index 97cacc3356..7023248cba 100644 --- a/tests/Alchemy/Tests/Phrasea/Cache/MemcachedCacheTest.php +++ b/tests/Alchemy/Tests/Phrasea/Cache/MemcachedCacheTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Cache; use Alchemy\Phrasea\Cache\MemcachedCache; -class MemcachedCacheTest extends \PHPUnit_Framework_TestCase +class MemcachedCacheTest extends \PhraseanetTestCase { /** * @var MemcacheCache diff --git a/tests/Alchemy/Tests/Phrasea/Cache/RedisCacheTest.php b/tests/Alchemy/Tests/Phrasea/Cache/RedisCacheTest.php index 2a3ca54a8e..ce5b5cb0ff 100644 --- a/tests/Alchemy/Tests/Phrasea/Cache/RedisCacheTest.php +++ b/tests/Alchemy/Tests/Phrasea/Cache/RedisCacheTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Cache; use \Alchemy\Phrasea\Cache\RedisCache; -class RedisTest extends \PhraseanetPHPUnitAbstract +class RedisTest extends \PhraseanetTestCase { public function testBasics() diff --git a/tests/Alchemy/Tests/Phrasea/Cache/XcacheCacheTest.php b/tests/Alchemy/Tests/Phrasea/Cache/XcacheCacheTest.php index 269bcb82b0..6a38d862d9 100644 --- a/tests/Alchemy/Tests/Phrasea/Cache/XcacheCacheTest.php +++ b/tests/Alchemy/Tests/Phrasea/Cache/XcacheCacheTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Cache; use Alchemy\Phrasea\Cache\XcacheCache; -class XcacheCacheTest extends \PHPUnit_Framework_TestCase +class XcacheCacheTest extends \PhraseanetTestCase { /** * @var XcacheCache diff --git a/tests/Alchemy/Tests/Phrasea/Command/CheckConfigTest.php b/tests/Alchemy/Tests/Phrasea/Command/CheckConfigTest.php index e0e9d505a5..b8afa46df0 100644 --- a/tests/Alchemy/Tests/Phrasea/Command/CheckConfigTest.php +++ b/tests/Alchemy/Tests/Phrasea/Command/CheckConfigTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Command; use Alchemy\Phrasea\Command\CheckConfig; -class CheckConfigTest extends \PhraseanetPHPUnitAbstract +class CheckConfigTest extends \PhraseanetTestCase { public function testRunWithoutProblems() { diff --git a/tests/Alchemy/Tests/Phrasea/Command/CommandTest.php b/tests/Alchemy/Tests/Phrasea/Command/CommandTest.php index 73538c654e..044b64650c 100644 --- a/tests/Alchemy/Tests/Phrasea/Command/CommandTest.php +++ b/tests/Alchemy/Tests/Phrasea/Command/CommandTest.php @@ -6,14 +6,14 @@ use Alchemy\Phrasea\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -class CommandTest extends \PHPUnit_Framework_TestCase +class CommandTest extends \PhraseanetTestCase { /** * @var Command */ protected $object; - protected function setUp() + public function setUp() { $this->object = new AbstractCommandTester('name'); } diff --git a/tests/Alchemy/Tests/Phrasea/Command/Compile/ConfigurationTest.php b/tests/Alchemy/Tests/Phrasea/Command/Compile/ConfigurationTest.php index 62b66bcb87..c223e808fc 100644 --- a/tests/Alchemy/Tests/Phrasea/Command/Compile/ConfigurationTest.php +++ b/tests/Alchemy/Tests/Phrasea/Command/Compile/ConfigurationTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Phrasea\Command\Compile; use Alchemy\Phrasea\Command\Compile\Configuration; -class ConfigurationTest extends \PhraseanetPHPUnitAbstract +class ConfigurationTest extends \PhraseanetTestCase { public function testExecute() { diff --git a/tests/Alchemy/Tests/Phrasea/Command/Developper/BowerInstallTest.php b/tests/Alchemy/Tests/Phrasea/Command/Developper/BowerInstallTest.php index da626abb8f..42872dbf07 100644 --- a/tests/Alchemy/Tests/Phrasea/Command/Developper/BowerInstallTest.php +++ b/tests/Alchemy/Tests/Phrasea/Command/Developper/BowerInstallTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Command\Developper; use Alchemy\Phrasea\Command\Developer\BowerInstall; -class BowerInstallTest extends \PhraseanetPHPUnitAbstract +class BowerInstallTest extends \PhraseanetTestCase { public function testRunWithoutProblems() { diff --git a/tests/Alchemy/Tests/Phrasea/Command/Developper/ComposerInstallTest.php b/tests/Alchemy/Tests/Phrasea/Command/Developper/ComposerInstallTest.php index 0637e6a616..27cf3d88fa 100644 --- a/tests/Alchemy/Tests/Phrasea/Command/Developper/ComposerInstallTest.php +++ b/tests/Alchemy/Tests/Phrasea/Command/Developper/ComposerInstallTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Command\Developper; use Alchemy\Phrasea\Command\Developer\ComposerInstall; -class ComposerInstallTest extends \PhraseanetPHPUnitAbstract +class ComposerInstallTest extends \PhraseanetTestCase { public function testRunWithoutProblems() { diff --git a/tests/Alchemy/Tests/Phrasea/Command/Developper/InstallAllTest.php b/tests/Alchemy/Tests/Phrasea/Command/Developper/InstallAllTest.php index ae82cbe3ca..65da33e483 100644 --- a/tests/Alchemy/Tests/Phrasea/Command/Developper/InstallAllTest.php +++ b/tests/Alchemy/Tests/Phrasea/Command/Developper/InstallAllTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Command\Developper; use Alchemy\Phrasea\Command\Developer\InstallAll; -class InstallAllTest extends \PhraseanetPHPUnitAbstract +class InstallAllTest extends \PhraseanetTestCase { public function testRunWithoutProblems() { diff --git a/tests/Alchemy/Tests/Phrasea/Command/Developper/Utils/BowerDriverTest.php b/tests/Alchemy/Tests/Phrasea/Command/Developper/Utils/BowerDriverTest.php index 4d7fb73975..29f7da68fe 100644 --- a/tests/Alchemy/Tests/Phrasea/Command/Developper/Utils/BowerDriverTest.php +++ b/tests/Alchemy/Tests/Phrasea/Command/Developper/Utils/BowerDriverTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Command\Developper\Utils; use Alchemy\Phrasea\Command\Developer\Utils\BowerDriver; use Symfony\Component\Process\PhpExecutableFinder; -class BowerDriverTest extends \PHPUnit_Framework_TestCase +class BowerDriverTest extends \PhraseanetTestCase { public function testCreate() { diff --git a/tests/Alchemy/Tests/Phrasea/Command/Developper/Utils/ComposerDriverTest.php b/tests/Alchemy/Tests/Phrasea/Command/Developper/Utils/ComposerDriverTest.php index 966f8bd515..752beb096e 100644 --- a/tests/Alchemy/Tests/Phrasea/Command/Developper/Utils/ComposerDriverTest.php +++ b/tests/Alchemy/Tests/Phrasea/Command/Developper/Utils/ComposerDriverTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Command\Developper\Utils; use Alchemy\Phrasea\Command\Developer\Utils\ComposerDriver; use Symfony\Component\Process\PhpExecutableFinder; -class ComposerDriverTest extends \PHPUnit_Framework_TestCase +class ComposerDriverTest extends \PhraseanetTestCase { public function testCreate() { diff --git a/tests/Alchemy/Tests/Phrasea/Command/Developper/Utils/GruntDriverTest.php b/tests/Alchemy/Tests/Phrasea/Command/Developper/Utils/GruntDriverTest.php index 945b4cb4d7..52ba45a223 100644 --- a/tests/Alchemy/Tests/Phrasea/Command/Developper/Utils/GruntDriverTest.php +++ b/tests/Alchemy/Tests/Phrasea/Command/Developper/Utils/GruntDriverTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Command\Developper\Utils; use Alchemy\Phrasea\Command\Developer\Utils\GruntDriver; use Symfony\Component\Process\PhpExecutableFinder; -class GruntDriverTest extends \PHPUnit_Framework_TestCase +class GruntDriverTest extends \PhraseanetTestCase { public function testCreate() { diff --git a/tests/Alchemy/Tests/Phrasea/Command/Developper/Utils/RecessDriverTest.php b/tests/Alchemy/Tests/Phrasea/Command/Developper/Utils/RecessDriverTest.php index 6b4355fcae..78eba80638 100644 --- a/tests/Alchemy/Tests/Phrasea/Command/Developper/Utils/RecessDriverTest.php +++ b/tests/Alchemy/Tests/Phrasea/Command/Developper/Utils/RecessDriverTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Command\Developper\Utils; use Alchemy\Phrasea\Command\Developer\Utils\RecessDriver; -class RecessDriverTest extends \PHPUnit_Framework_TestCase +class RecessDriverTest extends \PhraseanetTestCase { public function testGetCreate() { diff --git a/tests/Alchemy/Tests/Phrasea/Command/Developper/Utils/UglifyJsDriverTest.php b/tests/Alchemy/Tests/Phrasea/Command/Developper/Utils/UglifyJsDriverTest.php index a07503c74e..a011f2b557 100644 --- a/tests/Alchemy/Tests/Phrasea/Command/Developper/Utils/UglifyJsDriverTest.php +++ b/tests/Alchemy/Tests/Phrasea/Command/Developper/Utils/UglifyJsDriverTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Command\Developper\Utils; use Alchemy\Phrasea\Command\Developer\Utils\UglifyJsDriver; use Symfony\Component\Process\PhpExecutableFinder; -class UglifyJsDriverTest extends \PHPUnit_Framework_TestCase +class UglifyJsDriverTest extends \PhraseanetTestCase { public function testCreate() { diff --git a/tests/Alchemy/Tests/Phrasea/Command/MailTestTest.php b/tests/Alchemy/Tests/Phrasea/Command/MailTestTest.php index c8eb0afc4d..d6445ae7e2 100644 --- a/tests/Alchemy/Tests/Phrasea/Command/MailTestTest.php +++ b/tests/Alchemy/Tests/Phrasea/Command/MailTestTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Command; use Alchemy\Phrasea\Command\MailTest; -class MailTestTest extends \PhraseanetPHPUnitAbstract +class MailTestTest extends \PhraseanetTestCase { public function testMailIsSent() { diff --git a/tests/Alchemy/Tests/Phrasea/Command/Plugin/PluginCommandTestCase.php b/tests/Alchemy/Tests/Phrasea/Command/Plugin/PluginCommandTestCase.php index d0affce512..ef118942ba 100644 --- a/tests/Alchemy/Tests/Phrasea/Command/Plugin/PluginCommandTestCase.php +++ b/tests/Alchemy/Tests/Phrasea/Command/Plugin/PluginCommandTestCase.php @@ -2,7 +2,7 @@ namespace Alchemy\Tests\Phrasea\Command\Plugin; -class PluginCommandTestCase extends \PhraseanetPHPUnitAbstract +class PluginCommandTestCase extends \PhraseanetTestCase { protected function createTemporaryFilesystemMock() { diff --git a/tests/Alchemy/Tests/Phrasea/Command/Setup/CheckEnvironmentTest.php b/tests/Alchemy/Tests/Phrasea/Command/Setup/CheckEnvironmentTest.php index d2dfc1e8f8..2ac045368c 100644 --- a/tests/Alchemy/Tests/Phrasea/Command/Setup/CheckEnvironmentTest.php +++ b/tests/Alchemy/Tests/Phrasea/Command/Setup/CheckEnvironmentTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Command; use Alchemy\Phrasea\Command\Setup\CheckEnvironment; -class CheckEnvironmentTest extends \PhraseanetPHPUnitAbstract +class CheckEnvironmentTest extends \PhraseanetTestCase { public function testRunWithoutProblems() { diff --git a/tests/Alchemy/Tests/Phrasea/Command/Setup/InstallTest.php b/tests/Alchemy/Tests/Phrasea/Command/Setup/InstallTest.php index 88f1d6ef34..c9dfc6eef2 100644 --- a/tests/Alchemy/Tests/Phrasea/Command/Setup/InstallTest.php +++ b/tests/Alchemy/Tests/Phrasea/Command/Setup/InstallTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Command; use Alchemy\Phrasea\Command\Setup\Install; -class InstallTest extends \PhraseanetPHPUnitAbstract +class InstallTest extends \PhraseanetTestCase { public function testRunWithoutProblems() { diff --git a/tests/Alchemy/Tests/Phrasea/Command/Setup/PluginResetTest.php b/tests/Alchemy/Tests/Phrasea/Command/Setup/PluginResetTest.php index 04036d1355..9682d786e5 100644 --- a/tests/Alchemy/Tests/Phrasea/Command/Setup/PluginResetTest.php +++ b/tests/Alchemy/Tests/Phrasea/Command/Setup/PluginResetTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Command\Setup; use Alchemy\Phrasea\Command\Setup\PluginsReset; -class PluginResetTest extends \PhraseanetPHPUnitAbstract +class PluginResetTest extends \PhraseanetTestCase { public function testRun() { diff --git a/tests/Alchemy/Tests/Phrasea/Command/Setup/XSendFileMappingGeneratorTest.php b/tests/Alchemy/Tests/Phrasea/Command/Setup/XSendFileMappingGeneratorTest.php index 8e2057f115..c26e9ae371 100644 --- a/tests/Alchemy/Tests/Phrasea/Command/Setup/XSendFileMappingGeneratorTest.php +++ b/tests/Alchemy/Tests/Phrasea/Command/Setup/XSendFileMappingGeneratorTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Command\Setup; use Alchemy\Phrasea\Command\Setup\XSendFileMappingGenerator; -class XSendFileMappingGeneratorTest extends \PhraseanetPHPUnitAbstract +class XSendFileMappingGeneratorTest extends \PhraseanetTestCase { /** * @dataProvider provideVariousOptions diff --git a/tests/Alchemy/Tests/Phrasea/Command/Task/SchedulerPauseTest.php b/tests/Alchemy/Tests/Phrasea/Command/Task/SchedulerPauseTest.php index 81b34c6b33..0ac2563484 100644 --- a/tests/Alchemy/Tests/Phrasea/Command/Task/SchedulerPauseTest.php +++ b/tests/Alchemy/Tests/Phrasea/Command/Task/SchedulerPauseTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Command\Task; use Alchemy\Phrasea\Command\Task\SchedulerPauseTasks; -class SchedulerPauseTasksTest extends \PhraseanetPHPUnitAbstract +class SchedulerPauseTasksTest extends \PhraseanetTestCase { public function testRunWithoutProblems() { diff --git a/tests/Alchemy/Tests/Phrasea/Command/Task/SchedulerResumeTest.php b/tests/Alchemy/Tests/Phrasea/Command/Task/SchedulerResumeTest.php index 78249a545f..843eb00e57 100644 --- a/tests/Alchemy/Tests/Phrasea/Command/Task/SchedulerResumeTest.php +++ b/tests/Alchemy/Tests/Phrasea/Command/Task/SchedulerResumeTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Command\Task; use Alchemy\Phrasea\Command\Task\SchedulerResumeTasks; -class SchedulerResumeTasksTest extends \PhraseanetPHPUnitAbstract +class SchedulerResumeTasksTest extends \PhraseanetTestCase { public function testRunWithoutProblems() { diff --git a/tests/Alchemy/Tests/Phrasea/Command/Task/SchedulerRunTest.php b/tests/Alchemy/Tests/Phrasea/Command/Task/SchedulerRunTest.php index 188552c32a..537f9a0f2d 100644 --- a/tests/Alchemy/Tests/Phrasea/Command/Task/SchedulerRunTest.php +++ b/tests/Alchemy/Tests/Phrasea/Command/Task/SchedulerRunTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Command\Task; use Alchemy\Phrasea\Command\Task\SchedulerRun; -class SchedulerRunTest extends \PhraseanetPHPUnitAbstract +class SchedulerRunTest extends \PhraseanetTestCase { public function testRunWithoutProblems() { diff --git a/tests/Alchemy/Tests/Phrasea/Command/Task/SchedulerStateTest.php b/tests/Alchemy/Tests/Phrasea/Command/Task/SchedulerStateTest.php index 323873e4c1..9facc5de81 100644 --- a/tests/Alchemy/Tests/Phrasea/Command/Task/SchedulerStateTest.php +++ b/tests/Alchemy/Tests/Phrasea/Command/Task/SchedulerStateTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Command\Task; use Alchemy\Phrasea\Command\Task\SchedulerState; -class SchedulerStateTest extends \PhraseanetPHPUnitAbstract +class SchedulerStateTest extends \PhraseanetTestCase { public function testRunWithoutProblems() { diff --git a/tests/Alchemy/Tests/Phrasea/Command/Task/TaskListTest.php b/tests/Alchemy/Tests/Phrasea/Command/Task/TaskListTest.php index 9dcb202ba1..bbf1090942 100644 --- a/tests/Alchemy/Tests/Phrasea/Command/Task/TaskListTest.php +++ b/tests/Alchemy/Tests/Phrasea/Command/Task/TaskListTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Command\Task; use Alchemy\Phrasea\Command\Task\TaskList; -class TaskListTest extends \PhraseanetPHPUnitAbstract +class TaskListTest extends \PhraseanetTestCase { public function testRunWithoutProblems() { diff --git a/tests/Alchemy/Tests/Phrasea/Command/Task/TaskRunTest.php b/tests/Alchemy/Tests/Phrasea/Command/Task/TaskRunTest.php index 707df9300a..89a29c53b5 100644 --- a/tests/Alchemy/Tests/Phrasea/Command/Task/TaskRunTest.php +++ b/tests/Alchemy/Tests/Phrasea/Command/Task/TaskRunTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Command\Task; use Alchemy\Phrasea\Command\Task\TaskRun; use Alchemy\Phrasea\Model\Entities\Task; -class TaskRunTest extends \PhraseanetPHPUnitAbstract +class TaskRunTest extends \PhraseanetTestCase { public function testRunWithoutProblems() { diff --git a/tests/Alchemy/Tests/Phrasea/Command/Task/TaskStartTest.php b/tests/Alchemy/Tests/Phrasea/Command/Task/TaskStartTest.php index afe8d8421b..aff88e2689 100644 --- a/tests/Alchemy/Tests/Phrasea/Command/Task/TaskStartTest.php +++ b/tests/Alchemy/Tests/Phrasea/Command/Task/TaskStartTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Command\Task; use Alchemy\Phrasea\Command\Task\TaskStart; use Alchemy\Phrasea\Model\Entities\Task; -class TaskStartTest extends \PhraseanetPHPUnitAbstract +class TaskStartTest extends \PhraseanetTestCase { public function testRunWithoutProblems() { diff --git a/tests/Alchemy/Tests/Phrasea/Command/Task/TaskStateTest.php b/tests/Alchemy/Tests/Phrasea/Command/Task/TaskStateTest.php index ce2948a030..f000e99244 100644 --- a/tests/Alchemy/Tests/Phrasea/Command/Task/TaskStateTest.php +++ b/tests/Alchemy/Tests/Phrasea/Command/Task/TaskStateTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Command\Task; use Alchemy\Phrasea\Command\Task\TaskState; use Alchemy\Phrasea\Model\Entities\Task; -class TaskStateTest extends \PhraseanetPHPUnitAbstract +class TaskStateTest extends \PhraseanetTestCase { public function testRunWithoutProblems() { diff --git a/tests/Alchemy/Tests/Phrasea/Command/Task/TaskStopTest.php b/tests/Alchemy/Tests/Phrasea/Command/Task/TaskStopTest.php index 355b9a4c89..1b69ac0d8f 100644 --- a/tests/Alchemy/Tests/Phrasea/Command/Task/TaskStopTest.php +++ b/tests/Alchemy/Tests/Phrasea/Command/Task/TaskStopTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Command\Task; use Alchemy\Phrasea\Command\Task\TaskStop; use Alchemy\Phrasea\Model\Entities\Task; -class TaskStopTest extends \PhraseanetPHPUnitAbstract +class TaskStopTest extends \PhraseanetTestCase { public function testRunWithoutProblems() { diff --git a/tests/Alchemy/Tests/Phrasea/Command/UpgradeDBDatasTest.php b/tests/Alchemy/Tests/Phrasea/Command/UpgradeDBDatasTest.php index 687113974f..da938dedc1 100644 --- a/tests/Alchemy/Tests/Phrasea/Command/UpgradeDBDatasTest.php +++ b/tests/Alchemy/Tests/Phrasea/Command/UpgradeDBDatasTest.php @@ -7,7 +7,7 @@ use Alchemy\Phrasea\Command\UpgradeDBDatas; use Alchemy\Phrasea\Command\Upgrade\Step31; use Alchemy\Phrasea\Command\Upgrade\Step35; -class UpgradeDBDatasTest extends \PHPUnit_Framework_TestCase +class UpgradeDBDatasTest extends \PhraseanetTestCase { /** * @var UpgradeDBDatas @@ -17,7 +17,7 @@ class UpgradeDBDatasTest extends \PHPUnit_Framework_TestCase /** * @covers Alchemy\Phrasea\Command\UpgradeDBDatas::__construct */ - protected function setUp() + public function setUp() { $this->object = new UpgradeDBDatas('commandname'); } @@ -33,7 +33,7 @@ class UpgradeDBDatasTest extends \PHPUnit_Framework_TestCase $this->assertEquals([], $this->object->getUpgrades()); $upgrades = [ - new Step31(new Application('test')) + new Step31($this->loadApp()) ]; $this->object->setUpgrades($upgrades); $this->assertEquals($upgrades, $this->object->getUpgrades()); @@ -46,12 +46,12 @@ class UpgradeDBDatasTest extends \PHPUnit_Framework_TestCase { $this->assertEquals([], $this->object->getUpgrades()); - $step31 = new Step31(new Application('test')); + $step31 = new Step31($this->loadApp()); $this->object->addUpgrade($step31); $this->assertEquals([$step31], $this->object->getUpgrades()); - $step35 = new Step35(new Application('test')); + $step35 = new Step35($this->loadApp()); $this->object->addUpgrade($step35); $this->assertEquals([$step31, $step35], $this->object->getUpgrades()); diff --git a/tests/Alchemy/Tests/Phrasea/Controller/Admin/DataboxTest.php b/tests/Alchemy/Tests/Phrasea/Controller/Admin/DataboxTest.php index 3b3fefb281..8715216e34 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/Admin/DataboxTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/Admin/DataboxTest.php @@ -9,11 +9,11 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; class DataboxTest extends \PhraseanetWebTestCaseAuthenticatedAbstract { protected $client; - protected static $createdCollections = []; + private static $createdCollections = []; public function setUp() { - self::$DI['app'] = new Application('test'); + self::$DI['app'] = $this->loadApp(); self::dropDatabase(); parent::setUp(); } diff --git a/tests/Alchemy/Tests/Phrasea/Controller/Admin/SearchEngineTest.php b/tests/Alchemy/Tests/Phrasea/Controller/Admin/SearchEngineTest.php index 860908dfc5..8febec9d99 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/Admin/SearchEngineTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/Admin/SearchEngineTest.php @@ -35,7 +35,7 @@ class SearchEngineTest extends \PhraseanetWebTestCaseAuthenticatedAbstract public function getSearchEngines() { - $app = new Application('test'); + $app = $this->loadApp(); return [ [new PhraseaEngine($app)], diff --git a/tests/Alchemy/Tests/Phrasea/Controller/MinifierTest.php b/tests/Alchemy/Tests/Phrasea/Controller/MinifierTest.php index c3a2574919..610510b86c 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/MinifierTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/MinifierTest.php @@ -2,7 +2,7 @@ namespace Alchemy\Tests\Phrasea\Controller; -class MinifierTest extends \PhraseanetPHPUnitAbstract +class MinifierTest extends \PhraseanetTestCase { public function setUp() { diff --git a/tests/Alchemy/Tests/Phrasea/Controller/Prod/ExportTest.php b/tests/Alchemy/Tests/Phrasea/Controller/Prod/ExportTest.php index 3bc543eabc..f56c12a035 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/Prod/ExportTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/Prod/ExportTest.php @@ -8,7 +8,7 @@ namespace Alchemy\Tests\Phrasea\Controller\Prod; class ExportTest extends \PhraseanetWebTestCaseAuthenticatedAbstract { protected $client; - protected static $GV_activeFTP; + private static $GV_activeFTP; public function tearDown() { diff --git a/tests/Alchemy/Tests/Phrasea/Controller/Prod/LazaretTest.php b/tests/Alchemy/Tests/Phrasea/Controller/Prod/LazaretTest.php index 392486b60f..28407682f5 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/Prod/LazaretTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/Prod/LazaretTest.php @@ -13,7 +13,7 @@ class LazaretTest extends \PhraseanetWebTestCaseAuthenticatedAbstract * @return Client A Client instance */ protected $client; - protected static $need_records = false; + private static $need_records = false; public function tearDown() { diff --git a/tests/Alchemy/Tests/Phrasea/Controller/Prod/UploadTest.php b/tests/Alchemy/Tests/Phrasea/Controller/Prod/UploadTest.php index 6ee84a7f2d..5dc83d9c2e 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/Prod/UploadTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/Prod/UploadTest.php @@ -16,7 +16,7 @@ class UploadTest extends \PhraseanetWebTestCaseAuthenticatedAbstract */ protected $client; protected $tmpFile; - protected static $need_records = false; + private static $need_records = false; public function setUp() { diff --git a/tests/Alchemy/Tests/Phrasea/Controller/Prod/UsrListsTest.php b/tests/Alchemy/Tests/Phrasea/Controller/Prod/UsrListsTest.php index 398874226d..c3020710fd 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/Prod/UsrListsTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/Prod/UsrListsTest.php @@ -32,7 +32,7 @@ class ControllerUsrListsTest extends \PhraseanetWebTestCaseAuthenticatedAbstract $this->assertEquals(4, count($datas['result'])); } - protected function checkList($list, $owners = true, $users = true) + private function checkList($list, $owners = true, $users = true) { $this->assertInstanceOf('stdClass', $list); $this->assertObjectHasAttribute('name', $list); @@ -401,7 +401,7 @@ class ControllerUsrListsTest extends \PhraseanetWebTestCaseAuthenticatedAbstract $this->assertTrue($datas['success']); } - protected function checkOwner($owner) + private function checkOwner($owner) { $this->assertInstanceOf('stdClass', $owner); $this->assertObjectHasAttribute('usr_id', $owner); @@ -414,7 +414,7 @@ class ControllerUsrListsTest extends \PhraseanetWebTestCaseAuthenticatedAbstract $this->assertTrue(ctype_digit($owner->role)); } - protected function checkUser($user) + private function checkUser($user) { $this->assertInstanceOf('stdClass', $user); $this->assertObjectHasAttribute('usr_id', $user); diff --git a/tests/Alchemy/Tests/Phrasea/Controller/RecordsRequestTest.php b/tests/Alchemy/Tests/Phrasea/Controller/RecordsRequestTest.php index 16c2ed84cf..4626261384 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/RecordsRequestTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/RecordsRequestTest.php @@ -6,7 +6,7 @@ use Alchemy\Phrasea\Controller\RecordsRequest; use Alchemy\Phrasea\Application; use Symfony\Component\HttpFoundation\Request; -class RecordsRequestTest extends \PhraseanetPHPUnitAuthenticatedAbstract +class RecordsRequestTest extends \PhraseanetAuthenticatedTestCase { public static function setUpBeforeClass() @@ -280,7 +280,7 @@ class RecordsRequestTest extends \PhraseanetPHPUnitAuthenticatedAbstract $this->assertEquals($story->getRecord(self::$DI['app'])->get_serialize_key(), $serialized); } - protected function getStoryWZ() + private function getStoryWZ() { $story = new \Alchemy\Phrasea\Model\Entities\StoryWZ(); $story->setRecord(self::$DI['record_story_2']); diff --git a/tests/Alchemy/Tests/Phrasea/Controller/Root/AccountTest.php b/tests/Alchemy/Tests/Phrasea/Controller/Root/AccountTest.php index 2a571152e1..b4fcc8bac4 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/Root/AccountTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/Root/AccountTest.php @@ -7,7 +7,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; class AccountTest extends \PhraseanetWebTestCaseAuthenticatedAbstract { - protected static $authorizedApp; + private static $authorizedApp; public static function setUpBeforeClass() { diff --git a/tests/Alchemy/Tests/Phrasea/Controller/Root/RSSFeedTest.php b/tests/Alchemy/Tests/Phrasea/Controller/Root/RSSFeedTest.php index 1905c8a017..9f18e7804c 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/Root/RSSFeedTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/Root/RSSFeedTest.php @@ -25,19 +25,6 @@ class RssFeedTest extends \PhraseanetWebTestCaseAbstract } } - public static function setUpBeforeClass() - { - parent::setUpBeforeClass(); - - $application = new Application('test'); - - } - - public static function tearDownAfterClass() - { - parent::tearDownAfterClass(); - } - public function testPublicFeedAggregated() { $this->insertOneFeed(self::$DI['user'], "test", true); @@ -51,7 +38,7 @@ class RssFeedTest extends \PhraseanetWebTestCaseAbstract $this->evaluateAtom($response); } - protected function evaluateAtom(Response $response) + private function evaluateAtom(Response $response) { $dom_doc = new \DOMDocument(); $dom_doc->preserveWhiteSpace = false; @@ -68,7 +55,7 @@ class RssFeedTest extends \PhraseanetWebTestCaseAbstract $this->assertEquals(1, $xpath->query('/atom:feed/atom:subtitle')->length); } - protected function evaluateGoodXML(Response $response) + private function evaluateGoodXML(Response $response) { $dom_doc = new \DOMDocument(); $dom_doc->loadXML($response->getContent()); @@ -76,7 +63,7 @@ class RssFeedTest extends \PhraseanetWebTestCaseAbstract $this->assertEquals($dom_doc->saveXML(), $response->getContent()); } - protected function evaluateResponse200(Response $response) + private function evaluateResponse200(Response $response) { $this->assertEquals(200, $response->getStatusCode(), 'Test status code '); $this->assertEquals('UTF-8', $response->getCharset(), 'Test charset response'); diff --git a/tests/Alchemy/Tests/Phrasea/Core/CLIProvider/ServiceProviderTestCase.php b/tests/Alchemy/Tests/Phrasea/Core/CLIProvider/ServiceProviderTestCase.php index 5df7eb3c47..1bc32a1c82 100644 --- a/tests/Alchemy/Tests/Phrasea/Core/CLIProvider/ServiceProviderTestCase.php +++ b/tests/Alchemy/Tests/Phrasea/Core/CLIProvider/ServiceProviderTestCase.php @@ -2,7 +2,7 @@ namespace Alchemy\Tests\Phrasea\Core\CLIProvider; -abstract class ServiceProviderTestCase extends \PhraseanetPHPUnitAbstract +abstract class ServiceProviderTestCase extends \PhraseanetTestCase { /** * @test diff --git a/tests/Alchemy/Tests/Phrasea/Core/Configuration/CompilerTest.php b/tests/Alchemy/Tests/Phrasea/Core/Configuration/CompilerTest.php index 6670d063d4..d0068c29d9 100644 --- a/tests/Alchemy/Tests/Phrasea/Core/Configuration/CompilerTest.php +++ b/tests/Alchemy/Tests/Phrasea/Core/Configuration/CompilerTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Core\Configuration; use Alchemy\Phrasea\Core\Configuration\Compiler; -class CompilerTest extends \PHPUnit_Framework_TestCase +class CompilerTest extends \PhraseanetTestCase { /** * @dataProvider provideDataToCompile diff --git a/tests/Alchemy/Tests/Phrasea/Core/Configuration/ConfigurationTest.php b/tests/Alchemy/Tests/Phrasea/Core/Configuration/ConfigurationTest.php index f32bc4d46e..1d67b31242 100644 --- a/tests/Alchemy/Tests/Phrasea/Core/Configuration/ConfigurationTest.php +++ b/tests/Alchemy/Tests/Phrasea/Core/Configuration/ConfigurationTest.php @@ -6,7 +6,7 @@ use Alchemy\Phrasea\Core\Configuration\Configuration; use Alchemy\Phrasea\Core\Configuration\Compiler; use Symfony\Component\Yaml\Yaml; -class ConfigurationTest extends \PHPUnit_Framework_TestCase +class ConfigurationTest extends \PhraseanetTestCase { private $compiled; @@ -32,7 +32,7 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase } /** - * @expectedException Alchemy\Phrasea\Exception\RuntimeException + * @expectedException \Alchemy\Phrasea\Exception\RuntimeException */ public function testGetConfigInvalidConfig() { @@ -70,7 +70,7 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase } /** - * @expectedException Alchemy\Phrasea\Exception\RuntimeException + * @expectedException \Alchemy\Phrasea\Exception\RuntimeException */ public function testInitializeWrongPath() { @@ -186,7 +186,7 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase } /** - * @expectedException Alchemy\Phrasea\Exception\InvalidArgumentException + * @expectedException \Alchemy\Phrasea\Exception\InvalidArgumentException */ public function testSetdefaultInvalidKey() { diff --git a/tests/Alchemy/Tests/Phrasea/Core/Configuration/DisplaySettingServiceTest.php b/tests/Alchemy/Tests/Phrasea/Core/Configuration/DisplaySettingServiceTest.php index 11a8e0b2b4..dc5b9f9722 100644 --- a/tests/Alchemy/Tests/Phrasea/Core/Configuration/DisplaySettingServiceTest.php +++ b/tests/Alchemy/Tests/Phrasea/Core/Configuration/DisplaySettingServiceTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Configuration; use Alchemy\Phrasea\Model\Entities\User; use Doctrine\Common\Collections\ArrayCollection; -class DisplaySettingServiceTest extends \PhraseanetPHPUnitAbstract +class DisplaySettingServiceTest extends \PhraseanetTestCase { private static $userSettings; private static $appSettings; diff --git a/tests/Alchemy/Tests/Phrasea/Core/Configuration/PropertyAccessTest.php b/tests/Alchemy/Tests/Phrasea/Core/Configuration/PropertyAccessTest.php index 86ccc2a272..42252da4da 100644 --- a/tests/Alchemy/Tests/Phrasea/Core/Configuration/PropertyAccessTest.php +++ b/tests/Alchemy/Tests/Phrasea/Core/Configuration/PropertyAccessTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Core\Configuration; use Alchemy\Phrasea\Core\Configuration\ConfigurationInterface; use Alchemy\Phrasea\Core\Configuration\PropertyAccess; -class PropertyAccessTest extends \PHPUnit_Framework_TestCase +class PropertyAccessTest extends \PhraseanetTestCase { /** * @dataProvider provideGetData diff --git a/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/ApiExceptionHandlerSubscriberTest.php b/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/ApiExceptionHandlerSubscriberTest.php index 13fc2b8532..c911fb6dd8 100644 --- a/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/ApiExceptionHandlerSubscriberTest.php +++ b/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/ApiExceptionHandlerSubscriberTest.php @@ -8,7 +8,7 @@ use Symfony\Component\HttpKernel\Client; use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -class ApiExceptionHandlerSubscriberTest extends \PHPUnit_Framework_TestCase +class ApiExceptionHandlerSubscriberTest extends \PhraseanetTestCase { /** * @dataProvider provideExceptionsAndCode diff --git a/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/ApiOauth2ErrorsSubscriberTest.php b/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/ApiOauth2ErrorsSubscriberTest.php index ad8ed6d348..7f8f530d99 100644 --- a/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/ApiOauth2ErrorsSubscriberTest.php +++ b/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/ApiOauth2ErrorsSubscriberTest.php @@ -9,7 +9,7 @@ use Symfony\Component\HttpKernel\Exception\HttpException; use Alchemy\Phrasea\Core\PhraseaExceptionHandler; use Alchemy\Tests\Tools\TranslatorMockTrait; -class ApiOauth2ErrorsSubscriberTest extends \PHPUnit_Framework_TestCase +class ApiOauth2ErrorsSubscriberTest extends \PhraseanetTestCase { use TranslatorMockTrait; /** diff --git a/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/BridgeExceptionSubscriberTest.php b/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/BridgeExceptionSubscriberTest.php index 2f8ff5ef10..e320f819b8 100644 --- a/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/BridgeExceptionSubscriberTest.php +++ b/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/BridgeExceptionSubscriberTest.php @@ -6,7 +6,7 @@ use Alchemy\Phrasea\Application; use Symfony\Component\HttpKernel\Client; use Alchemy\Phrasea\Core\Event\Subscriber\BridgeExceptionSubscriber; -class BridgeExceptionSubscriberTest extends \PHPUnit_Framework_TestCase +class BridgeExceptionSubscriberTest extends \PhraseanetTestCase { public function testErrorOnBridgeExceptions() { diff --git a/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/CookiesDisablerSubscriberTest.php b/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/CookiesDisablerSubscriberTest.php index d4f14ac6fe..500c3767a0 100644 --- a/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/CookiesDisablerSubscriberTest.php +++ b/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/CookiesDisablerSubscriberTest.php @@ -11,7 +11,7 @@ use Symfony\Component\HttpFoundation\ResponseHeaderBag; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Cookie; -class CookiesDisablerSubscriberTest extends \PHPUnit_Framework_TestCase +class CookiesDisablerSubscriberTest extends \PhraseanetTestCase { /** * @dataProvider provideVariousRoutes diff --git a/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/DebuggerSubscriberTest.php b/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/DebuggerSubscriberTest.php index 77b90f1239..f0c22a3043 100644 --- a/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/DebuggerSubscriberTest.php +++ b/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/DebuggerSubscriberTest.php @@ -6,7 +6,7 @@ use Alchemy\Phrasea\Application; use Alchemy\Phrasea\Core\Event\Subscriber\DebuggerSubscriber; use Symfony\Component\HttpFoundation\Request; -class DebuggerSubscriberTest extends \PHPUnit_Framework_TestCase +class DebuggerSubscriberTest extends \PhraseanetTestCase { public function tearDown() { diff --git a/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/FirewallSubscriberTest.php b/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/FirewallSubscriberTest.php index abbf371a29..94041feb65 100644 --- a/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/FirewallSubscriberTest.php +++ b/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/FirewallSubscriberTest.php @@ -7,7 +7,7 @@ use Alchemy\Phrasea\Application; use Symfony\Component\HttpKernel\Exception\HttpException; use Symfony\Component\HttpKernel\Client; -class FirewallSubscriberTest extends \PHPUnit_Framework_TestCase +class FirewallSubscriberTest extends \PhraseanetTestCase { public function testRedirection() { diff --git a/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/JsonRequestSubscriberTest.php b/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/JsonRequestSubscriberTest.php index 560676882d..a2653cc799 100644 --- a/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/JsonRequestSubscriberTest.php +++ b/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/JsonRequestSubscriberTest.php @@ -6,7 +6,7 @@ use Alchemy\Phrasea\Application; use Alchemy\Phrasea\Core\Event\Subscriber\JsonRequestSubscriber; use Symfony\Component\HttpKernel\Client; -class JsonRequestSubscriberTest extends \PHPUnit_Framework_TestCase +class JsonRequestSubscriberTest extends \PhraseanetTestCase { /** * @dataProvider provideRouteParameters diff --git a/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/LogoutSubscriberTest.php b/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/LogoutSubscriberTest.php index c400726f36..a6fc0eda36 100644 --- a/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/LogoutSubscriberTest.php +++ b/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/LogoutSubscriberTest.php @@ -7,7 +7,7 @@ use Alchemy\Phrasea\Application; use Alchemy\Phrasea\Core\Event\LogoutEvent; use Alchemy\Phrasea\Core\PhraseaEvents; -class LogoutSubscriberTest extends \PHPUnit_Framework_TestCase +class LogoutSubscriberTest extends \PhraseanetTestCase { public function testThatSearchEngineCacheIsCleaned() { diff --git a/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/MaintenanceSubscriberTest.php b/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/MaintenanceSubscriberTest.php index 9039d64a56..3694bbbc71 100644 --- a/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/MaintenanceSubscriberTest.php +++ b/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/MaintenanceSubscriberTest.php @@ -7,7 +7,7 @@ use Alchemy\Phrasea\Core\Event\Subscriber\MaintenanceSubscriber; use Symfony\Component\HttpKernel\Client; use Symfony\Component\HttpKernel\Exception\HttpException; -class MaintenanceSubscriberTest extends \PHPUnit_Framework_TestCase +class MaintenanceSubscriberTest extends \PhraseanetTestCase { public function tearDown() { diff --git a/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/PhraseaExceptionHandlerSubscriberTest.php b/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/PhraseaExceptionHandlerSubscriberTest.php index dd8373a738..5e23387edc 100644 --- a/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/PhraseaExceptionHandlerSubscriberTest.php +++ b/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/PhraseaExceptionHandlerSubscriberTest.php @@ -8,7 +8,7 @@ use Alchemy\Phrasea\Core\PhraseaExceptionHandler; use Symfony\Component\HttpKernel\Client; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -class PhraseaExceptionHandlerSubscriberTest extends \PHPUnit_Framework_TestCase +class PhraseaExceptionHandlerSubscriberTest extends \PhraseanetTestCase { public function testAResponseIsReturned() { diff --git a/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/PhraseaLocaleSubscriberTest.php b/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/PhraseaLocaleSubscriberTest.php index 7b1ca3e6a9..939cca60c0 100644 --- a/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/PhraseaLocaleSubscriberTest.php +++ b/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/PhraseaLocaleSubscriberTest.php @@ -10,7 +10,7 @@ use Symfony\Component\BrowserKit\CookieJar; use Symfony\Component\BrowserKit\Cookie as BrowserCookie; use Symfony\Component\HttpFoundation\Request; -class PhraseaLocaleSubscriberTest extends \PhraseanetPHPUnitAbstract +class PhraseaLocaleSubscriberTest extends \PhraseanetTestCase { public function testBasic() { diff --git a/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/TrustedProxySubscriberTest.php b/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/TrustedProxySubscriberTest.php index 1f424098d2..762ad577b5 100644 --- a/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/TrustedProxySubscriberTest.php +++ b/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/TrustedProxySubscriberTest.php @@ -7,7 +7,7 @@ use Silex\Application; use Symfony\Component\HttpKernel\Client; use Symfony\Component\HttpFoundation\Request; -class TrustedProxySubscriberTest extends \PHPUnit_Framework_TestCase +class TrustedProxySubscriberTest extends \PhraseanetTestCase { private function getConfigurationMock() { diff --git a/tests/Alchemy/Tests/Phrasea/Core/Middleware/MiddlewareProviderTestCase.php b/tests/Alchemy/Tests/Phrasea/Core/Middleware/MiddlewareProviderTestCase.php index d5b8d06c46..23495861b3 100644 --- a/tests/Alchemy/Tests/Phrasea/Core/Middleware/MiddlewareProviderTestCase.php +++ b/tests/Alchemy/Tests/Phrasea/Core/Middleware/MiddlewareProviderTestCase.php @@ -2,7 +2,7 @@ namespace Alchemy\Tests\Phrasea\Core\Middleware; -abstract class MiddlewareProviderTestCase extends \PhraseanetPHPUnitAbstract +abstract class MiddlewareProviderTestCase extends \PhraseanetTestCase { /** * @test diff --git a/tests/Alchemy/Tests/Phrasea/Core/Provider/AuthenticationManagerServiceProviderTest.php b/tests/Alchemy/Tests/Phrasea/Core/Provider/AuthenticationManagerServiceProviderTest.php index e7ae159ab8..b191b6556d 100644 --- a/tests/Alchemy/Tests/Phrasea/Core/Provider/AuthenticationManagerServiceProviderTest.php +++ b/tests/Alchemy/Tests/Phrasea/Core/Provider/AuthenticationManagerServiceProviderTest.php @@ -81,7 +81,7 @@ class AuthenticationManagerServiceProvidertest extends ServiceProviderTestCase public function testFailureManagerAttemptsConfiguration() { - $app = new Application(); + $app = $this->loadApp(); $app['root.path'] = __DIR__ . '/../../../../../../'; $app->register(new TokensServiceProvider()); $app->register(new AuthenticationManagerServiceProvider()); @@ -112,7 +112,7 @@ class AuthenticationManagerServiceProvidertest extends ServiceProviderTestCase public function testAuthNativeWithCaptchaEnabled() { - $app = new Application(); + $app = $this->loadApp(); $app['root.path'] = __DIR__ . '/../../../../../../'; $app->register(new AuthenticationManagerServiceProvider()); $app->register(new ConfigurationServiceProvider()); @@ -145,7 +145,7 @@ class AuthenticationManagerServiceProvidertest extends ServiceProviderTestCase public function testAuthNativeWithCaptchaDisabled() { - $app = new Application(); + $app = $this->loadApp(); $app['root.path'] = __DIR__ . '/../../../../../../'; $app->register(new AuthenticationManagerServiceProvider()); $app->register(new ConfigurationServiceProvider()); diff --git a/tests/Alchemy/Tests/Phrasea/Core/Provider/BorderManagerServiceProviderTest.php b/tests/Alchemy/Tests/Phrasea/Core/Provider/BorderManagerServiceProviderTest.php index f4e2f63a9c..08e9e272ba 100644 --- a/tests/Alchemy/Tests/Phrasea/Core/Provider/BorderManagerServiceProviderTest.php +++ b/tests/Alchemy/Tests/Phrasea/Core/Provider/BorderManagerServiceProviderTest.php @@ -26,7 +26,7 @@ class BorderManagerServiceProvidertest extends ServiceProviderTestCase public function testItLoadsWithoutXPDF() { - $app = new Application(); + $app = $this->loadApp(); $app->register(new XPDFServiceProvider(), [ 'xpdf.configuration' => [ 'pdftotext.binaries' => '/path/to/nowhere', @@ -50,7 +50,7 @@ class BorderManagerServiceProvidertest extends ServiceProviderTestCase $this->markTestSkipped('Unable to find php binary, mandatory for this test'); } - $app = new Application(); + $app = $this->loadApp(); $app->register(new XPDFServiceProvider(), [ 'xpdf.configuration' => [ 'pdftotext.binaries' => $php, diff --git a/tests/Alchemy/Tests/Phrasea/Core/Provider/ConfigurationServiceProviderTest.php b/tests/Alchemy/Tests/Phrasea/Core/Provider/ConfigurationServiceProviderTest.php index dad80dc4c5..0970ff5c7f 100644 --- a/tests/Alchemy/Tests/Phrasea/Core/Provider/ConfigurationServiceProviderTest.php +++ b/tests/Alchemy/Tests/Phrasea/Core/Provider/ConfigurationServiceProviderTest.php @@ -35,7 +35,7 @@ class ConfigurationServiceProvidertest extends ServiceProviderTestCase public function testRequestTrustedProxiesAreSetOnRequest() { - $app = new Application(); + $app = $this->loadApp(); $app['root.path'] = __DIR__ . '/../../../../../..'; $app->register(new ConfigurationServiceProvider()); $app['phraseanet.configuration.config-path'] = __DIR__ . '/fixtures/config-proxies.yml'; diff --git a/tests/Alchemy/Tests/Phrasea/Core/Provider/FTPServiceProviderTest.php b/tests/Alchemy/Tests/Phrasea/Core/Provider/FTPServiceProviderTest.php index 58c8d70669..e9c51c5765 100644 --- a/tests/Alchemy/Tests/Phrasea/Core/Provider/FTPServiceProviderTest.php +++ b/tests/Alchemy/Tests/Phrasea/Core/Provider/FTPServiceProviderTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Core\Provider; use Alchemy\Phrasea\Core\Provider\FtpServiceProvider; -class FTPServiceProvidertest extends \PhraseanetPHPUnitAbstract +class FTPServiceProvidertest extends \PhraseanetTestCase { public function testGetInstantiate() { diff --git a/tests/Alchemy/Tests/Phrasea/Core/Provider/LocaleServiceProviderTest.php b/tests/Alchemy/Tests/Phrasea/Core/Provider/LocaleServiceProviderTest.php index 5da1389cc0..7ce9cf5b9e 100644 --- a/tests/Alchemy/Tests/Phrasea/Core/Provider/LocaleServiceProviderTest.php +++ b/tests/Alchemy/Tests/Phrasea/Core/Provider/LocaleServiceProviderTest.php @@ -9,11 +9,11 @@ use Alchemy\Phrasea\Core\Provider\LocaleServiceProvider; /** * @covers Alchemy\Phrasea\Core\Provider\LocaleServiceProvider */ -class LocaleServiceProvidertest extends \PhraseanetPHPUnitAbstract +class LocaleServiceProvidertest extends \PhraseanetTestCase { public function testLocalesAvailable() { - $app = new Application(); + $app = $this->loadApp(); $app->register(new LocaleServiceProvider()); $this->assertEquals(Application::getAvailableLanguages(), $app['locales.available']); @@ -21,7 +21,7 @@ class LocaleServiceProvidertest extends \PhraseanetPHPUnitAbstract public function testLocalesAvailableCustomized() { - $app = new Application(); + $app = $this->loadApp(); $app->register(new LocaleServiceProvider()); $app['root.path'] = __DIR__ . '/../../../../../..'; $app->register(new ConfigurationServiceProvider()); @@ -36,7 +36,7 @@ class LocaleServiceProvidertest extends \PhraseanetPHPUnitAbstract public function testLocalesCustomizedWithError() { - $app = new Application(); + $app = $this->loadApp(); $app->register(new LocaleServiceProvider()); $app['root.path'] = __DIR__ . '/../../../../../..'; $app->register(new ConfigurationServiceProvider()); @@ -54,7 +54,7 @@ class LocaleServiceProvidertest extends \PhraseanetPHPUnitAbstract public function testLocaleBeforeBoot() { - $app = new Application(); + $app = $this->loadApp(); $app->register(new LocaleServiceProvider()); $app['phraseanet.registry'] = $this->getMockBuilder('registry') ->disableOriginalConstructor() diff --git a/tests/Alchemy/Tests/Phrasea/Core/Provider/RegistrationServiceProviderTest.php b/tests/Alchemy/Tests/Phrasea/Core/Provider/RegistrationServiceProviderTest.php index 445c7b6985..39bf7a931b 100644 --- a/tests/Alchemy/Tests/Phrasea/Core/Provider/RegistrationServiceProviderTest.php +++ b/tests/Alchemy/Tests/Phrasea/Core/Provider/RegistrationServiceProviderTest.php @@ -7,7 +7,7 @@ use Alchemy\Phrasea\Core\Provider\RegistrationServiceProvider; /** * @covers Alchemy\Phrasea\Core\Provider\RegistrationServiceProvider */ -class RegistrationServiceProvidertest extends \PhraseanetPHPUnitAbstract +class RegistrationServiceProvidertest extends \PhraseanetTestCase { public function testSameInstanceShouldBereturnedEveryTime() { diff --git a/tests/Alchemy/Tests/Phrasea/Core/Provider/ServiceProviderTestCase.php b/tests/Alchemy/Tests/Phrasea/Core/Provider/ServiceProviderTestCase.php index a56f3792a4..864c76a046 100644 --- a/tests/Alchemy/Tests/Phrasea/Core/Provider/ServiceProviderTestCase.php +++ b/tests/Alchemy/Tests/Phrasea/Core/Provider/ServiceProviderTestCase.php @@ -2,7 +2,7 @@ namespace Alchemy\Tests\Phrasea\Core\Provider; -abstract class ServiceProviderTestCase extends \PhraseanetPHPUnitAbstract +abstract class ServiceProviderTestCase extends \PhraseanetTestCase { /** * @test diff --git a/tests/Alchemy/Tests/Phrasea/Core/Provider/TasksServiceProviderTest.php b/tests/Alchemy/Tests/Phrasea/Core/Provider/TasksServiceProviderTest.php index db5b7e9fad..a650a1d7f6 100644 --- a/tests/Alchemy/Tests/Phrasea/Core/Provider/TasksServiceProviderTest.php +++ b/tests/Alchemy/Tests/Phrasea/Core/Provider/TasksServiceProviderTest.php @@ -43,7 +43,7 @@ class TasksServiceProviderTest extends ServiceProviderTestCase public function testGetAvailableJobs() { - $app = new Application(); + $app = $this->loadApp(); $app['translator'] = $this->createTranslatorMock(); $app->register(new TasksServiceProvider()); $app->boot(); diff --git a/tests/Alchemy/Tests/Phrasea/Core/VersionTest.php b/tests/Alchemy/Tests/Phrasea/Core/VersionTest.php index 93cfa2185f..f02a274386 100644 --- a/tests/Alchemy/Tests/Phrasea/Core/VersionTest.php +++ b/tests/Alchemy/Tests/Phrasea/Core/VersionTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Core; use Alchemy\Phrasea\Core\Version; -class VersionTest extends \PhraseanetPHPUnitAbstract +class VersionTest extends \PhraseanetTestCase { public function testGetNumber() diff --git a/tests/Alchemy/Tests/Phrasea/Feed/AggregateLinkGeneratorTest.php b/tests/Alchemy/Tests/Phrasea/Feed/AggregateLinkGeneratorTest.php index 914b09ff90..49715a54e5 100644 --- a/tests/Alchemy/Tests/Phrasea/Feed/AggregateLinkGeneratorTest.php +++ b/tests/Alchemy/Tests/Phrasea/Feed/AggregateLinkGeneratorTest.php @@ -7,7 +7,7 @@ use Alchemy\Phrasea\Feed\Link\AggregateLinkGenerator; use Alchemy\Phrasea\Model\Entities\Feed; use Symfony\Component\Routing\Generator\UrlGenerator; -class AggregateLinkGeneratorTest extends \PhraseanetPHPUnitAbstract +class AggregateLinkGeneratorTest extends \PhraseanetTestCase { /** * @dataProvider provideGenerationData diff --git a/tests/Alchemy/Tests/Phrasea/Feed/FeedLinkGeneratorTest.php b/tests/Alchemy/Tests/Phrasea/Feed/FeedLinkGeneratorTest.php index 6df68de67a..914665610a 100644 --- a/tests/Alchemy/Tests/Phrasea/Feed/FeedLinkGeneratorTest.php +++ b/tests/Alchemy/Tests/Phrasea/Feed/FeedLinkGeneratorTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Feed; use Alchemy\Phrasea\Feed\Link\FeedLinkGenerator; use Symfony\Component\Routing\Generator\UrlGenerator; -class FeedLinkGeneratorTest extends \PhraseanetPHPUnitAbstract +class FeedLinkGeneratorTest extends \PhraseanetTestCase { /** * @dataProvider provideGenerationData diff --git a/tests/Alchemy/Tests/Phrasea/Form/Constraint/GeonameTest.php b/tests/Alchemy/Tests/Phrasea/Form/Constraint/GeonameTest.php index 54575d5d64..06f69efc57 100644 --- a/tests/Alchemy/Tests/Phrasea/Form/Constraint/GeonameTest.php +++ b/tests/Alchemy/Tests/Phrasea/Form/Constraint/GeonameTest.php @@ -7,7 +7,7 @@ use Alchemy\Geonames\Geoname as GeonameResult; use Alchemy\Geonames\Exception\NotFoundException; use Alchemy\Geonames\Exception\TransportException; -class GeonameTest extends \PhraseanetPHPUnitAbstract +class GeonameTest extends \PhraseanetTestCase { public function testAValidGeonameIsValid() { diff --git a/tests/Alchemy/Tests/Phrasea/Form/Constraint/GeonameValidatorTest.php b/tests/Alchemy/Tests/Phrasea/Form/Constraint/GeonameValidatorTest.php index bd2007fff9..64c9d0f163 100644 --- a/tests/Alchemy/Tests/Phrasea/Form/Constraint/GeonameValidatorTest.php +++ b/tests/Alchemy/Tests/Phrasea/Form/Constraint/GeonameValidatorTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Form\Constraint; use Alchemy\Phrasea\Form\Constraint\GeonameValidator; -class GeonameValidatorTest extends \PhraseanetPHPUnitAbstract +class GeonameValidatorTest extends \PhraseanetTestCase { /** * @dataProvider provideData diff --git a/tests/Alchemy/Tests/Phrasea/Form/Constraint/NewEmailTest.php b/tests/Alchemy/Tests/Phrasea/Form/Constraint/NewEmailTest.php index 9cbab7bbc4..c0a69d48a9 100644 --- a/tests/Alchemy/Tests/Phrasea/Form/Constraint/NewEmailTest.php +++ b/tests/Alchemy/Tests/Phrasea/Form/Constraint/NewEmailTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Form\Constraint; use Alchemy\Phrasea\Form\Constraint\NewEmail; -class NewEmailTest extends \PhraseanetPHPUnitAbstract +class NewEmailTest extends \PhraseanetTestCase { public function testAnUnknownAddressIsNotAlreadyRegistered() { diff --git a/tests/Alchemy/Tests/Phrasea/Form/Constraint/NewEmailValidatorTest.php b/tests/Alchemy/Tests/Phrasea/Form/Constraint/NewEmailValidatorTest.php index 43e6c4c2f9..0dda5cd76a 100644 --- a/tests/Alchemy/Tests/Phrasea/Form/Constraint/NewEmailValidatorTest.php +++ b/tests/Alchemy/Tests/Phrasea/Form/Constraint/NewEmailValidatorTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Form\Constraint; use Alchemy\Phrasea\Form\Constraint\NewEmailValidator; -class NewEmailValidatorTest extends \PhraseanetPHPUnitAbstract +class NewEmailValidatorTest extends \PhraseanetTestCase { /** * @dataProvider provideValidationData diff --git a/tests/Alchemy/Tests/Phrasea/Form/Constraint/NewLoginTest.php b/tests/Alchemy/Tests/Phrasea/Form/Constraint/NewLoginTest.php index e1c5d1670b..c4cad9d260 100644 --- a/tests/Alchemy/Tests/Phrasea/Form/Constraint/NewLoginTest.php +++ b/tests/Alchemy/Tests/Phrasea/Form/Constraint/NewLoginTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Form\Constraint; use Alchemy\Phrasea\Form\Constraint\NewLogin; -class NewLoginTest extends \PhraseanetPHPUnitAbstract +class NewLoginTest extends \PhraseanetTestCase { public function testAnUnknownLoginIsNotAlreadyRegistered() { diff --git a/tests/Alchemy/Tests/Phrasea/Form/Constraint/NewLoginValidatorTest.php b/tests/Alchemy/Tests/Phrasea/Form/Constraint/NewLoginValidatorTest.php index 425d277809..77a0ce0098 100644 --- a/tests/Alchemy/Tests/Phrasea/Form/Constraint/NewLoginValidatorTest.php +++ b/tests/Alchemy/Tests/Phrasea/Form/Constraint/NewLoginValidatorTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Form\Constraint; use Alchemy\Phrasea\Form\Constraint\NewLoginValidator; -class NewLoginValidatorTest extends \PhraseanetPHPUnitAbstract +class NewLoginValidatorTest extends \PhraseanetTestCase { /** * @dataProvider provideValidationData diff --git a/tests/Alchemy/Tests/Phrasea/Form/Constraint/PasswordTokenTest.php b/tests/Alchemy/Tests/Phrasea/Form/Constraint/PasswordTokenTest.php index 5c33ece891..ab4a0dfee6 100644 --- a/tests/Alchemy/Tests/Phrasea/Form/Constraint/PasswordTokenTest.php +++ b/tests/Alchemy/Tests/Phrasea/Form/Constraint/PasswordTokenTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Form\Constraint; use Alchemy\Phrasea\Form\Constraint\PasswordToken; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -class PasswordTokenTest extends \PhraseanetPHPUnitAbstract +class PasswordTokenTest extends \PhraseanetTestCase { public function testInvalidTokenIsNotValid() { diff --git a/tests/Alchemy/Tests/Phrasea/Form/Constraint/PasswordTokenValidatorTest.php b/tests/Alchemy/Tests/Phrasea/Form/Constraint/PasswordTokenValidatorTest.php index 706237818b..f9d1de49b5 100644 --- a/tests/Alchemy/Tests/Phrasea/Form/Constraint/PasswordTokenValidatorTest.php +++ b/tests/Alchemy/Tests/Phrasea/Form/Constraint/PasswordTokenValidatorTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Form\Constraint; use Alchemy\Phrasea\Form\Constraint\PasswordTokenValidator; -class PasswordTokenValidatorTest extends \PhraseanetPHPUnitAbstract +class PasswordTokenValidatorTest extends \PhraseanetTestCase { /** * @dataProvider provideValidationData diff --git a/tests/Alchemy/Tests/Phrasea/Form/FormTestCase.php b/tests/Alchemy/Tests/Phrasea/Form/FormTestCase.php index ec004e3226..b3cc5d7b40 100644 --- a/tests/Alchemy/Tests/Phrasea/Form/FormTestCase.php +++ b/tests/Alchemy/Tests/Phrasea/Form/FormTestCase.php @@ -2,7 +2,7 @@ namespace Alchemy\Tests\Phrasea\Form; -abstract class FormTestCase extends \PhraseanetPHPUnitAbstract +abstract class FormTestCase extends \PhraseanetTestCase { public function testBuildForm() { diff --git a/tests/Alchemy/Tests/Phrasea/Form/Type/GeonameTypeTest.php b/tests/Alchemy/Tests/Phrasea/Form/Type/GeonameTypeTest.php index d25a58c4c8..3508c6260c 100644 --- a/tests/Alchemy/Tests/Phrasea/Form/Type/GeonameTypeTest.php +++ b/tests/Alchemy/Tests/Phrasea/Form/Type/GeonameTypeTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Form\Type; use Alchemy\Phrasea\Form\Type\GeonameType; -class GeonameTypeTest extends \PhraseanetPHPUnitAbstract +class GeonameTypeTest extends \PhraseanetTestCase { public function testGetParent() { diff --git a/tests/Alchemy/Tests/Phrasea/Http/ServeFileResponseFactoryTest.php b/tests/Alchemy/Tests/Phrasea/Http/ServeFileResponseFactoryTest.php index 0afec8f609..da5bfddf9a 100644 --- a/tests/Alchemy/Tests/Phrasea/Http/ServeFileResponseFactoryTest.php +++ b/tests/Alchemy/Tests/Phrasea/Http/ServeFileResponseFactoryTest.php @@ -107,7 +107,7 @@ class ServeFileResponseFactoryTest extends \PhraseanetWebTestCaseAbstract } /** - * @expectedException Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException + * @expectedException \Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException */ public function testDeliverUnexistingFile() { @@ -132,13 +132,13 @@ class ServeFileResponseFactoryTest extends \PhraseanetWebTestCaseAbstract $request = Request::create('/'); $mode->setHeaders($request); - $file = __DIR__ . '/../../../../classes/PhraseanetPHPUnitAbstract.php'; + $file = __DIR__ . '/../../../../classes/PhraseanetTestCase.php'; - $response = $this->factory->deliverFile($file, 'PhraseanetPHPUnitAbstract.php', 'attachment'); + $response = $this->factory->deliverFile($file, 'PhraseanetTestCase.php', 'attachment'); $response->prepare($request); $this->assertInstanceOf("Symfony\Component\HttpFoundation\Response", $response); - $this->assertEquals('attachment; filename="PhraseanetPHPUnitAbstract.php"', $response->headers->get('content-disposition')); + $this->assertEquals('attachment; filename="PhraseanetTestCase.php"', $response->headers->get('content-disposition')); $this->assertEquals(realpath($file), $response->headers->get('x-accel-redirect')); } diff --git a/tests/Alchemy/Tests/Phrasea/Http/XSendFile/ApacheModeTest.php b/tests/Alchemy/Tests/Phrasea/Http/XSendFile/ApacheModeTest.php index e218ffcad9..16ecfcf528 100644 --- a/tests/Alchemy/Tests/Phrasea/Http/XSendFile/ApacheModeTest.php +++ b/tests/Alchemy/Tests/Phrasea/Http/XSendFile/ApacheModeTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Http\XSendFile; use Alchemy\Phrasea\Http\XSendFile\ApacheMode; use Symfony\Component\HttpFoundation\Request; -class ApacheModeTest extends \PhraseanetPHPUnitAbstract +class ApacheModeTest extends \PhraseanetTestCase { public function testGetVirtualHost() { @@ -30,7 +30,7 @@ class ApacheModeTest extends \PhraseanetPHPUnitAbstract /** * @dataProvider provideMappings - * @expectedException Alchemy\Phrasea\Exception\InvalidArgumentException + * @expectedException \Alchemy\Phrasea\Exception\InvalidArgumentException */ public function testInvalidMapping($mapping) { diff --git a/tests/Alchemy/Tests/Phrasea/Http/XSendFile/NginxModeTest.php b/tests/Alchemy/Tests/Phrasea/Http/XSendFile/NginxModeTest.php index f4575cd5a0..49de7f2a41 100644 --- a/tests/Alchemy/Tests/Phrasea/Http/XSendFile/NginxModeTest.php +++ b/tests/Alchemy/Tests/Phrasea/Http/XSendFile/NginxModeTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Http\XSendFile; use Alchemy\Phrasea\Http\XSendFile\NginxMode; use Symfony\Component\HttpFoundation\Request; -class XSendFileModeNginxTest extends \PhraseanetPHPUnitAbstract +class XSendFileModeNginxTest extends \PhraseanetTestCase { public function testGetVirtualHost() { @@ -63,7 +63,7 @@ class XSendFileModeNginxTest extends \PhraseanetPHPUnitAbstract /** * @dataProvider provideMappings - * @expectedException Alchemy\Phrasea\Exception\InvalidArgumentException + * @expectedException \Alchemy\Phrasea\Exception\InvalidArgumentException */ public function testInvalidMapping($mapping) { diff --git a/tests/Alchemy/Tests/Phrasea/Http/XSendFile/NullModeTest.php b/tests/Alchemy/Tests/Phrasea/Http/XSendFile/NullModeTest.php index fee4729fc2..b60e234a02 100644 --- a/tests/Alchemy/Tests/Phrasea/Http/XSendFile/NullModeTest.php +++ b/tests/Alchemy/Tests/Phrasea/Http/XSendFile/NullModeTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Http\XSendFile; use Alchemy\Phrasea\Http\XSendFile\NullMode; use Symfony\Component\HttpFoundation\Request; -class NullModeTest extends \PhraseanetPHPUnitAbstract +class NullModeTest extends \PhraseanetTestCase { public function testGetVirtualHost() { diff --git a/tests/Alchemy/Tests/Phrasea/Http/XSendFile/XSendFileFactoryTest.php b/tests/Alchemy/Tests/Phrasea/Http/XSendFile/XSendFileFactoryTest.php index c37e78071e..90ce923463 100644 --- a/tests/Alchemy/Tests/Phrasea/Http/XSendFile/XSendFileFactoryTest.php +++ b/tests/Alchemy/Tests/Phrasea/Http/XSendFile/XSendFileFactoryTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Http\XSendFile; use Alchemy\Phrasea\Http\XSendFile\XSendFileFactory; -class XSendFileFactoryTest extends \PhraseanetPHPUnitAbstract +class XSendFileFactoryTest extends \PhraseanetTestCase { public function testFactoryCreation() { @@ -30,7 +30,7 @@ class XSendFileFactoryTest extends \PhraseanetPHPUnitAbstract } /** - * @expectedException Alchemy\Phrasea\Exception\InvalidArgumentException + * @expectedException \Alchemy\Phrasea\Exception\InvalidArgumentException */ public function testFactoryWithWrongTypeThrowsAnExceptionIfRequired() { diff --git a/tests/Alchemy/Tests/Phrasea/Media/Subdef/AudioTest.php b/tests/Alchemy/Tests/Phrasea/Media/Subdef/AudioTest.php index 0ee38b171e..751742ed26 100644 --- a/tests/Alchemy/Tests/Phrasea/Media/Subdef/AudioTest.php +++ b/tests/Alchemy/Tests/Phrasea/Media/Subdef/AudioTest.php @@ -6,7 +6,7 @@ use Alchemy\Phrasea\Media\Subdef\Audio; use Alchemy\Phrasea\Media\Subdef\Subdef; use Alchemy\Tests\Tools\TranslatorMockTrait; -class AudioTest extends \PHPUnit_Framework_TestCase +class AudioTest extends \PhraseanetTestCase { use TranslatorMockTrait; @@ -15,7 +15,7 @@ class AudioTest extends \PHPUnit_Framework_TestCase */ protected $object; - protected function setUp() + public function setUp() { $this->object = new Audio($this->createTranslatorMock()); } diff --git a/tests/Alchemy/Tests/Phrasea/Media/Subdef/FlexPaperTest.php b/tests/Alchemy/Tests/Phrasea/Media/Subdef/FlexPaperTest.php index 7e1e74df0a..583720a09a 100644 --- a/tests/Alchemy/Tests/Phrasea/Media/Subdef/FlexPaperTest.php +++ b/tests/Alchemy/Tests/Phrasea/Media/Subdef/FlexPaperTest.php @@ -6,7 +6,7 @@ use Alchemy\Phrasea\Media\Subdef\FlexPaper; use Alchemy\Phrasea\Media\Subdef\Subdef; use Alchemy\Tests\Tools\TranslatorMockTrait; -class FlexPaperTest extends \PHPUnit_Framework_TestCase +class FlexPaperTest extends \PhraseanetTestCase { use TranslatorMockTrait; @@ -15,7 +15,7 @@ class FlexPaperTest extends \PHPUnit_Framework_TestCase */ protected $object; - protected function setUp() + public function setUp() { $this->object = new FlexPaper($this->createTranslatorMock()); } diff --git a/tests/Alchemy/Tests/Phrasea/Media/Subdef/GifTest.php b/tests/Alchemy/Tests/Phrasea/Media/Subdef/GifTest.php index db0c90d33d..f526985390 100644 --- a/tests/Alchemy/Tests/Phrasea/Media/Subdef/GifTest.php +++ b/tests/Alchemy/Tests/Phrasea/Media/Subdef/GifTest.php @@ -6,7 +6,7 @@ use Alchemy\Phrasea\Media\Subdef\Gif; use Alchemy\Phrasea\Media\Subdef\Subdef; use Alchemy\Tests\Tools\TranslatorMockTrait; -class GifTest extends \PHPUnit_Framework_TestCase +class GifTest extends \PhraseanetTestCase { use TranslatorMockTrait; @@ -15,7 +15,7 @@ class GifTest extends \PHPUnit_Framework_TestCase */ protected $object; - protected function setUp() + public function setUp() { $this->object = new Gif($this->createTranslatorMock()); } diff --git a/tests/Alchemy/Tests/Phrasea/Media/Subdef/ImageTest.php b/tests/Alchemy/Tests/Phrasea/Media/Subdef/ImageTest.php index 84ef3a669f..a26baef8f8 100644 --- a/tests/Alchemy/Tests/Phrasea/Media/Subdef/ImageTest.php +++ b/tests/Alchemy/Tests/Phrasea/Media/Subdef/ImageTest.php @@ -6,7 +6,7 @@ use Alchemy\Phrasea\Media\Subdef\Image; use Alchemy\Phrasea\Media\Subdef\Subdef; use Alchemy\Tests\Tools\TranslatorMockTrait; -class ImageTest extends \PHPUnit_Framework_TestCase +class ImageTest extends \PhraseanetTestCase { use TranslatorMockTrait; @@ -15,7 +15,7 @@ class ImageTest extends \PHPUnit_Framework_TestCase */ protected $object; - protected function setUp() + public function setUp() { $this->object = new Image($this->createTranslatorMock()); } diff --git a/tests/Alchemy/Tests/Phrasea/Media/Subdef/OptionType/BooleanTest.php b/tests/Alchemy/Tests/Phrasea/Media/Subdef/OptionType/BooleanTest.php index 3b5c7e1e4c..d1a2bdc219 100644 --- a/tests/Alchemy/Tests/Phrasea/Media/Subdef/OptionType/BooleanTest.php +++ b/tests/Alchemy/Tests/Phrasea/Media/Subdef/OptionType/BooleanTest.php @@ -5,14 +5,14 @@ namespace Alchemy\Tests\Phrasea\Media\Subdef\OptionType; use Alchemy\Phrasea\Media\Subdef\OptionType\Boolean; use Alchemy\Phrasea\Media\Subdef\OptionType\OptionType; -class BooleanTest extends \PHPUnit_Framework_TestCase +class BooleanTest extends \PhraseanetTestCase { /** * @var Boolean */ protected $object; - protected function setUp() + public function setUp() { $this->object = new Boolean('Booleen', 'boolean', true); } diff --git a/tests/Alchemy/Tests/Phrasea/Media/Subdef/OptionType/EnumTest.php b/tests/Alchemy/Tests/Phrasea/Media/Subdef/OptionType/EnumTest.php index 74472180b2..c91bff1764 100644 --- a/tests/Alchemy/Tests/Phrasea/Media/Subdef/OptionType/EnumTest.php +++ b/tests/Alchemy/Tests/Phrasea/Media/Subdef/OptionType/EnumTest.php @@ -5,14 +5,14 @@ namespace Alchemy\Tests\Phrasea\Media\Subdef\OptionType; use Alchemy\Phrasea\Media\Subdef\OptionType\Enum; use Alchemy\Phrasea\Media\Subdef\OptionType\OptionType; -class EnumTest extends \PHPUnit_Framework_TestCase +class EnumTest extends \PhraseanetTestCase { /** * @var Enum */ protected $object; - protected function setUp() + public function setUp() { $this->object = new Enum('Numo', 'enumerateur', ['un', 'dos', 'tres'], 'dos'); } diff --git a/tests/Alchemy/Tests/Phrasea/Media/Subdef/OptionType/MultiTest.php b/tests/Alchemy/Tests/Phrasea/Media/Subdef/OptionType/MultiTest.php index fc628122e3..a5f0c13493 100644 --- a/tests/Alchemy/Tests/Phrasea/Media/Subdef/OptionType/MultiTest.php +++ b/tests/Alchemy/Tests/Phrasea/Media/Subdef/OptionType/MultiTest.php @@ -5,14 +5,14 @@ namespace Alchemy\Tests\Phrasea\Media\Subdef\OptionType; use Alchemy\Phrasea\Media\Subdef\OptionType\Multi; use Alchemy\Phrasea\Media\Subdef\OptionType\OptionType; -class MultiTest extends \PHPUnit_Framework_TestCase +class MultiTest extends \PhraseanetTestCase { /** * @var Multi */ protected $object; - protected function setUp() + public function setUp() { $this->object = new Multi('MUMU', 'multiateur', ['un', 'dos', 'tres'], 'dos'); } diff --git a/tests/Alchemy/Tests/Phrasea/Media/Subdef/OptionType/RangeTest.php b/tests/Alchemy/Tests/Phrasea/Media/Subdef/OptionType/RangeTest.php index 208df21a2f..1cf4769050 100644 --- a/tests/Alchemy/Tests/Phrasea/Media/Subdef/OptionType/RangeTest.php +++ b/tests/Alchemy/Tests/Phrasea/Media/Subdef/OptionType/RangeTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Media\Subdef\OptionType; use Alchemy\Phrasea\Media\Subdef\OptionType\Range; use Alchemy\Phrasea\Media\Subdef\OptionType\OptionType; -class RangeTest extends \PHPUnit_Framework_TestCase +class RangeTest extends \PhraseanetTestCase { /** * @var Range @@ -16,7 +16,7 @@ class RangeTest extends \PHPUnit_Framework_TestCase * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ - protected function setUp() + public function setUp() { $this->object = new Range('Rangers', 'name', 3, 8, 6, 2); } diff --git a/tests/Alchemy/Tests/Phrasea/Media/Subdef/ProviderTest.php b/tests/Alchemy/Tests/Phrasea/Media/Subdef/ProviderTest.php index 16904a4213..37fc338611 100644 --- a/tests/Alchemy/Tests/Phrasea/Media/Subdef/ProviderTest.php +++ b/tests/Alchemy/Tests/Phrasea/Media/Subdef/ProviderTest.php @@ -6,7 +6,7 @@ use Alchemy\Phrasea\Media\Subdef\Provider; use Alchemy\Phrasea\Media\Subdef\Image; use Alchemy\Tests\Tools\TranslatorMockTrait; -class ProviderTest extends \PHPUnit_Framework_TestCase +class ProviderTest extends \PhraseanetTestCase { use TranslatorMockTrait; @@ -15,7 +15,7 @@ class ProviderTest extends \PHPUnit_Framework_TestCase */ protected $object; - protected function setUp() + public function setUp() { $this->object = new Image($this->createTranslatorMock()); } diff --git a/tests/Alchemy/Tests/Phrasea/Media/Subdef/VideoTest.php b/tests/Alchemy/Tests/Phrasea/Media/Subdef/VideoTest.php index d290f6ad0c..7d33a8abe4 100644 --- a/tests/Alchemy/Tests/Phrasea/Media/Subdef/VideoTest.php +++ b/tests/Alchemy/Tests/Phrasea/Media/Subdef/VideoTest.php @@ -6,7 +6,7 @@ use Alchemy\Phrasea\Media\Subdef\Video; use Alchemy\Phrasea\Media\Subdef\Subdef; use Alchemy\Tests\Tools\TranslatorMockTrait; -class VideoTest extends \PHPUnit_Framework_TestCase +class VideoTest extends \PhraseanetTestCase { use TranslatorMockTrait; @@ -15,7 +15,7 @@ class VideoTest extends \PHPUnit_Framework_TestCase */ protected $object; - protected function setUp() + public function setUp() { $this->object = new Video($this->createTranslatorMock()); } diff --git a/tests/Alchemy/Tests/Phrasea/Media/Type/AudioTest.php b/tests/Alchemy/Tests/Phrasea/Media/Type/AudioTest.php index 4fae04c9b2..dd697ab5db 100644 --- a/tests/Alchemy/Tests/Phrasea/Media/Type/AudioTest.php +++ b/tests/Alchemy/Tests/Phrasea/Media/Type/AudioTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Media\Type; use Alchemy\Phrasea\Media\Type\Audio; use Alchemy\Phrasea\Media\Type\Type; -class AudioTest extends \PHPUnit_Framework_TestCase +class AudioTest extends \PhraseanetTestCase { /** diff --git a/tests/Alchemy/Tests/Phrasea/Media/Type/DocumentTest.php b/tests/Alchemy/Tests/Phrasea/Media/Type/DocumentTest.php index 413ec6ca49..5bc8cea336 100644 --- a/tests/Alchemy/Tests/Phrasea/Media/Type/DocumentTest.php +++ b/tests/Alchemy/Tests/Phrasea/Media/Type/DocumentTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Media\Type; use Alchemy\Phrasea\Media\Type\Document; use Alchemy\Phrasea\Media\Type\Type; -class DocumentTest extends \PHPUnit_Framework_TestCase +class DocumentTest extends \PhraseanetTestCase { /** diff --git a/tests/Alchemy/Tests/Phrasea/Media/Type/FlashTest.php b/tests/Alchemy/Tests/Phrasea/Media/Type/FlashTest.php index de6192eb57..3b22242d4a 100644 --- a/tests/Alchemy/Tests/Phrasea/Media/Type/FlashTest.php +++ b/tests/Alchemy/Tests/Phrasea/Media/Type/FlashTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Media\Type; use Alchemy\Phrasea\Media\Type\Flash; use Alchemy\Phrasea\Media\Type\Type; -class FlashTest extends \PHPUnit_Framework_TestCase +class FlashTest extends \PhraseanetTestCase { /** diff --git a/tests/Alchemy/Tests/Phrasea/Media/Type/ImageTest.php b/tests/Alchemy/Tests/Phrasea/Media/Type/ImageTest.php index 493c29eebd..3130837b04 100644 --- a/tests/Alchemy/Tests/Phrasea/Media/Type/ImageTest.php +++ b/tests/Alchemy/Tests/Phrasea/Media/Type/ImageTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Media\Type; use Alchemy\Phrasea\Media\Type\Image; use Alchemy\Phrasea\Media\Type\Type; -class ImageTest extends \PHPUnit_Framework_TestCase +class ImageTest extends \PhraseanetTestCase { /** diff --git a/tests/Alchemy/Tests/Phrasea/Media/Type/VideoTest.php b/tests/Alchemy/Tests/Phrasea/Media/Type/VideoTest.php index 284128f1ae..7c2501f72f 100644 --- a/tests/Alchemy/Tests/Phrasea/Media/Type/VideoTest.php +++ b/tests/Alchemy/Tests/Phrasea/Media/Type/VideoTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Media\Type; use Alchemy\Phrasea\Media\Type\Video; use Alchemy\Phrasea\Media\Type\Type; -class VideoTest extends \PHPUnit_Framework_TestCase +class VideoTest extends \PhraseanetTestCase { /** diff --git a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/NosourceTest.php b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/NosourceTest.php index a9d5dfd66e..5ad7d7e096 100644 --- a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/NosourceTest.php +++ b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/NosourceTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Metadata\Tag; use Alchemy\Phrasea\Metadata\Tag\Nosource; -class NosourceTest extends \PHPUnit_Framework_TestCase +class NosourceTest extends \PhraseanetTestCase { /** diff --git a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/PdfTextTest.php b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/PdfTextTest.php index 14458d8981..1f06c7c289 100644 --- a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/PdfTextTest.php +++ b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/PdfTextTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Metadata\Tag; use Alchemy\Phrasea\Metadata\Tag\PdfText; -class PdfTextTest extends \PHPUnit_Framework_TestCase +class PdfTextTest extends \PhraseanetTestCase { /** diff --git a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfArchivedateTest.php b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfArchivedateTest.php index 520e48eff5..2807e63edb 100644 --- a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfArchivedateTest.php +++ b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfArchivedateTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Metadata\Tag; use Alchemy\Phrasea\Metadata\Tag\TfArchivedate; -class TfArchivedateTest extends \PHPUnit_Framework_TestCase +class TfArchivedateTest extends \PhraseanetTestCase { /** diff --git a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfAtimeTest.php b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfAtimeTest.php index b1269d0933..0c6e050bf0 100644 --- a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfAtimeTest.php +++ b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfAtimeTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Metadata\Tag; use Alchemy\Phrasea\Metadata\Tag\TfAtime; -class TfAtimeTest extends \PHPUnit_Framework_TestCase +class TfAtimeTest extends \PhraseanetTestCase { /** diff --git a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfBasenameTest.php b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfBasenameTest.php index bc2bda79ee..6574aed2b7 100644 --- a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfBasenameTest.php +++ b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfBasenameTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Metadata\Tag; use Alchemy\Phrasea\Metadata\Tag\TfBasename; -class TfBasenameTest extends \PHPUnit_Framework_TestCase +class TfBasenameTest extends \PhraseanetTestCase { /** diff --git a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfBitsTest.php b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfBitsTest.php index 390f0e16e8..e724a11b16 100644 --- a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfBitsTest.php +++ b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfBitsTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Metadata\Tag; use Alchemy\Phrasea\Metadata\Tag\TfBits; -class TfBitsTest extends \PHPUnit_Framework_TestCase +class TfBitsTest extends \PhraseanetTestCase { /** diff --git a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfChannelsTest.php b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfChannelsTest.php index 3949bba5d0..99ee18ce55 100644 --- a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfChannelsTest.php +++ b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfChannelsTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Metadata\Tag; use Alchemy\Phrasea\Metadata\Tag\TfChannels; -class TfChannelsTest extends \PHPUnit_Framework_TestCase +class TfChannelsTest extends \PhraseanetTestCase { /** diff --git a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfCtimeTest.php b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfCtimeTest.php index 7603b026b8..955ce7712c 100644 --- a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfCtimeTest.php +++ b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfCtimeTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Metadata\Tag; use Alchemy\Phrasea\Metadata\Tag\TfCtime; -class TfCtimeTest extends \PHPUnit_Framework_TestCase +class TfCtimeTest extends \PhraseanetTestCase { /** diff --git a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfDirnameTest.php b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfDirnameTest.php index 0690ca5320..73179ba6c0 100644 --- a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfDirnameTest.php +++ b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfDirnameTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Metadata\Tag; use Alchemy\Phrasea\Metadata\Tag\TfDirname; -class TfDirnameTest extends \PHPUnit_Framework_TestCase +class TfDirnameTest extends \PhraseanetTestCase { /** diff --git a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfDurationTest.php b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfDurationTest.php index 024ebc5966..f125a7c259 100644 --- a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfDurationTest.php +++ b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfDurationTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Metadata\Tag; use Alchemy\Phrasea\Metadata\Tag\TfDuration; -class TfDurationTest extends \PHPUnit_Framework_TestCase +class TfDurationTest extends \PhraseanetTestCase { /** diff --git a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfEditDateTest.php b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfEditDateTest.php index 416e18cb56..a6a7cb6133 100644 --- a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfEditDateTest.php +++ b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfEditDateTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Metadata\Tag; use Alchemy\Phrasea\Metadata\Tag\TfEditdate; -class TfEditdateTest extends \PHPUnit_Framework_TestCase +class TfEditdateTest extends \PhraseanetTestCase { /** diff --git a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfExtensionTest.php b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfExtensionTest.php index f732f38634..e6e70bd095 100644 --- a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfExtensionTest.php +++ b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfExtensionTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Metadata\Tag; use Alchemy\Phrasea\Metadata\Tag\TfExtension; -class TfExtensionTest extends \PHPUnit_Framework_TestCase +class TfExtensionTest extends \PhraseanetTestCase { /** diff --git a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfFilenameTest.php b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfFilenameTest.php index 1301da9d52..6a7fe37892 100644 --- a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfFilenameTest.php +++ b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfFilenameTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Metadata\Tag; use Alchemy\Phrasea\Metadata\Tag\TfFilename; -class TfFilenameTest extends \PHPUnit_Framework_TestCase +class TfFilenameTest extends \PhraseanetTestCase { /** diff --git a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfFilepathTest.php b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfFilepathTest.php index 00df2639c8..d2e70a42ec 100644 --- a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfFilepathTest.php +++ b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfFilepathTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Metadata\Tag; use Alchemy\Phrasea\Metadata\Tag\TfFilepath; -class TfFilepathTest extends \PHPUnit_Framework_TestCase +class TfFilepathTest extends \PhraseanetTestCase { /** diff --git a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfHeightTest.php b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfHeightTest.php index 7275ac9dfc..a0ef0f381c 100644 --- a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfHeightTest.php +++ b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfHeightTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Metadata\Tag; use Alchemy\Phrasea\Metadata\Tag\TfHeight; -class TfHeightTest extends \PHPUnit_Framework_TestCase +class TfHeightTest extends \PhraseanetTestCase { /** diff --git a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfMimeTypeTest.php b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfMimeTypeTest.php index b2b176f6ab..d1da2654ba 100644 --- a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfMimeTypeTest.php +++ b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfMimeTypeTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Metadata\Tag; use Alchemy\Phrasea\Metadata\Tag\TfMimetype; -class TfMimetypeTest extends \PHPUnit_Framework_TestCase +class TfMimetypeTest extends \PhraseanetTestCase { /** diff --git a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfMtimeTest.php b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfMtimeTest.php index 1ae9398ff0..38f9768670 100644 --- a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfMtimeTest.php +++ b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfMtimeTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Metadata\Tag; use Alchemy\Phrasea\Metadata\Tag\TfMtime; -class TfMtimeTest extends \PHPUnit_Framework_TestCase +class TfMtimeTest extends \PhraseanetTestCase { /** diff --git a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfQuarantineTest.php b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfQuarantineTest.php index 80ef6bcf52..ab8ee783bd 100644 --- a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfQuarantineTest.php +++ b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfQuarantineTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Metadata\Tag; use Alchemy\Phrasea\Metadata\Tag\TfQuarantine; -class TfQuarantineTest extends \PHPUnit_Framework_TestCase +class TfQuarantineTest extends \PhraseanetTestCase { /** diff --git a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfRecordidTest.php b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfRecordidTest.php index 70f7cd762d..f83c4c14fa 100644 --- a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfRecordidTest.php +++ b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfRecordidTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Metadata\Tag; use Alchemy\Phrasea\Metadata\Tag\TfRecordid; -class TfRecordidTest extends \PHPUnit_Framework_TestCase +class TfRecordidTest extends \PhraseanetTestCase { /** diff --git a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfSizeTest.php b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfSizeTest.php index 4078ec9318..fcd5feb8df 100644 --- a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfSizeTest.php +++ b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfSizeTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Metadata\Tag; use Alchemy\Phrasea\Metadata\Tag\TfSize; -class TfSizeTest extends \PHPUnit_Framework_TestCase +class TfSizeTest extends \PhraseanetTestCase { /** diff --git a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfWidthTest.php b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfWidthTest.php index 39587891ae..91bed6a743 100644 --- a/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfWidthTest.php +++ b/tests/Alchemy/Tests/Phrasea/Metadata/Tag/TfWidthTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Metadata\Tag; use Alchemy\Phrasea\Metadata\Tag\TfWidth; -class TfWidthTest extends \PHPUnit_Framework_TestCase +class TfWidthTest extends \PhraseanetTestCase { /** diff --git a/tests/Alchemy/Tests/Phrasea/Metadata/TagProviderTest.php b/tests/Alchemy/Tests/Phrasea/Metadata/TagProviderTest.php index 77dfd817e9..939cca19ae 100644 --- a/tests/Alchemy/Tests/Phrasea/Metadata/TagProviderTest.php +++ b/tests/Alchemy/Tests/Phrasea/Metadata/TagProviderTest.php @@ -4,10 +4,10 @@ namespace Alchemy\Tests\Phrasea\Metadata; use Alchemy\Phrasea\Metadata\TagProvider; -class TagProviderTest extends \PHPUnit_Framework_TestCase +class TagProviderTest extends \PhraseanetTestCase { private $object; - protected function setUp() + public function setUp() { $this->object = new TagProvider; } diff --git a/tests/Alchemy/Tests/Phrasea/Model/Converter/BasketConverterTest.php b/tests/Alchemy/Tests/Phrasea/Model/Converter/BasketConverterTest.php index d5641c29c8..122d7cf4c5 100644 --- a/tests/Alchemy/Tests/Phrasea/Model/Converter/BasketConverterTest.php +++ b/tests/Alchemy/Tests/Phrasea/Model/Converter/BasketConverterTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Phrasea\Model\Converter; use Alchemy\Phrasea\Model\Converter\BasketConverter; -class BasketConverterTest extends \PhraseanetPHPUnitAbstract +class BasketConverterTest extends \PhraseanetTestCase { public function testConvert() { @@ -15,7 +15,7 @@ class BasketConverterTest extends \PhraseanetPHPUnitAbstract } /** - * @expectedException Symfony\Component\HttpKernel\Exception\NotFoundHttpException + * @expectedException \Symfony\Component\HttpKernel\Exception\NotFoundHttpException * @expectedExceptionMessage Basket prout not found. */ public function testConvertFailure() diff --git a/tests/Alchemy/Tests/Phrasea/Model/Converter/TaskConverterTest.php b/tests/Alchemy/Tests/Phrasea/Model/Converter/TaskConverterTest.php index 948614d387..418c15ffda 100644 --- a/tests/Alchemy/Tests/Phrasea/Model/Converter/TaskConverterTest.php +++ b/tests/Alchemy/Tests/Phrasea/Model/Converter/TaskConverterTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Phrasea\Model\Converter; use Alchemy\Phrasea\Model\Converter\TaskConverter; use Alchemy\Phrasea\Model\Entities\Task; -class TaskConverterTest extends \PhraseanetPHPUnitAbstract +class TaskConverterTest extends \PhraseanetTestCase { public function testConvert() { @@ -22,7 +22,7 @@ class TaskConverterTest extends \PhraseanetPHPUnitAbstract } /** - * @expectedException Symfony\Component\HttpKernel\Exception\NotFoundHttpException + * @expectedException \Symfony\Component\HttpKernel\Exception\NotFoundHttpException * @expectedExceptionMessage Task prout not found. */ public function testConvertFailure() diff --git a/tests/Alchemy/Tests/Phrasea/Model/Entities/UserTest.php b/tests/Alchemy/Tests/Phrasea/Model/Entities/UserTest.php index b01cf35ddf..600c8afced 100644 --- a/tests/Alchemy/Tests/Phrasea/Model/Entities/UserTest.php +++ b/tests/Alchemy/Tests/Phrasea/Model/Entities/UserTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Model\Entities; use Alchemy\Phrasea\Application; use Alchemy\Phrasea\Model\Entities\User; -class UserTest extends \PhraseanetPHPUnitAbstract +class UserTest extends \PhraseanetTestCase { private $user; diff --git a/tests/Alchemy/Tests/Phrasea/Model/Manager/UserManagerTest.php b/tests/Alchemy/Tests/Phrasea/Model/Manager/UserManagerTest.php index 8ebf420569..f8c6bf8e71 100644 --- a/tests/Alchemy/Tests/Phrasea/Model/Manager/UserManagerTest.php +++ b/tests/Alchemy/Tests/Phrasea/Model/Manager/UserManagerTest.php @@ -2,7 +2,7 @@ namespace Alchemy\Tests\Phrasea\Model\Manipulator; -class UserManagerTest extends \PhraseanetPHPUnitAbstract +class UserManagerTest extends \PhraseanetTestCase { public function testNewUser() { diff --git a/tests/Alchemy/Tests/Phrasea/Model/Manipulator/ACLManipulatorTest.php b/tests/Alchemy/Tests/Phrasea/Model/Manipulator/ACLManipulatorTest.php index 697228ac63..fab7500962 100644 --- a/tests/Alchemy/Tests/Phrasea/Model/Manipulator/ACLManipulatorTest.php +++ b/tests/Alchemy/Tests/Phrasea/Model/Manipulator/ACLManipulatorTest.php @@ -2,7 +2,7 @@ namespace Alchemy\Tests\Phrasea\Model\Manipulator; -class ACLManipulatorTest extends \PhraseanetPHPUnitAbstract +class ACLManipulatorTest extends \PhraseanetTestCase { public function testResetAdminRights() { diff --git a/tests/Alchemy/Tests/Phrasea/Model/Manipulator/TaskManipulatorTest.php b/tests/Alchemy/Tests/Phrasea/Model/Manipulator/TaskManipulatorTest.php index 6860cfc726..204466fff9 100644 --- a/tests/Alchemy/Tests/Phrasea/Model/Manipulator/TaskManipulatorTest.php +++ b/tests/Alchemy/Tests/Phrasea/Model/Manipulator/TaskManipulatorTest.php @@ -6,7 +6,7 @@ use Alchemy\Phrasea\Model\Manipulator\TaskManipulator; use Alchemy\Phrasea\TaskManager\Notifier; use Alchemy\Phrasea\Model\Entities\Task; -class TaskManipulatorTest extends \PhraseanetPHPUnitAbstract +class TaskManipulatorTest extends \PhraseanetTestCase { public function testCreate() { diff --git a/tests/Alchemy/Tests/Phrasea/Model/Manipulator/UserManipulatorTest.php b/tests/Alchemy/Tests/Phrasea/Model/Manipulator/UserManipulatorTest.php index 72014280e9..aaa44749c3 100644 --- a/tests/Alchemy/Tests/Phrasea/Model/Manipulator/UserManipulatorTest.php +++ b/tests/Alchemy/Tests/Phrasea/Model/Manipulator/UserManipulatorTest.php @@ -6,7 +6,7 @@ use Alchemy\Phrasea\Model\Manipulator\UserManipulator; use Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface; use Alchemy\Phrasea\Model\Entities\User; -class UserManipulatorTest extends \PhraseanetPHPUnitAbstract +class UserManipulatorTest extends \PhraseanetTestCase { public function testCreateUser() { diff --git a/tests/Alchemy/Tests/Phrasea/Model/Repositories/FeedItemRepositoryTest.php b/tests/Alchemy/Tests/Phrasea/Model/Repositories/FeedItemRepositoryTest.php index 29034faf4d..4258882647 100644 --- a/tests/Alchemy/Tests/Phrasea/Model/Repositories/FeedItemRepositoryTest.php +++ b/tests/Alchemy/Tests/Phrasea/Model/Repositories/FeedItemRepositoryTest.php @@ -2,7 +2,7 @@ namespace Alchemy\Tests\Phrasea\Model\Repositories; -class FeedItemRepositoryTest extends \PhraseanetPHPUnitAbstract +class FeedItemRepositoryTest extends \PhraseanetTestCase { public function testIs_record_in_public_feedInPublicFeed() { diff --git a/tests/Alchemy/Tests/Phrasea/Model/Repositories/FtpExportRepositoryTest.php b/tests/Alchemy/Tests/Phrasea/Model/Repositories/FtpExportRepositoryTest.php index c25b655e9c..6283c51317 100644 --- a/tests/Alchemy/Tests/Phrasea/Model/Repositories/FtpExportRepositoryTest.php +++ b/tests/Alchemy/Tests/Phrasea/Model/Repositories/FtpExportRepositoryTest.php @@ -6,7 +6,7 @@ use Alchemy\Phrasea\Model\Entities\FtpExport; use Alchemy\Phrasea\Model\Entities\FtpExportElement; use Gedmo\Timestampable\TimestampableListener; -class FtpExportRepositoryTest extends \PhraseanetPHPUnitAbstract +class FtpExportRepositoryTest extends \PhraseanetTestCase { public function testFindCrashedExportsWithoutDate() { diff --git a/tests/Alchemy/Tests/Phrasea/Model/Repositories/TaskRepositoryTest.php b/tests/Alchemy/Tests/Phrasea/Model/Repositories/TaskRepositoryTest.php index b26edc80b2..4660d4dc82 100644 --- a/tests/Alchemy/Tests/Phrasea/Model/Repositories/TaskRepositoryTest.php +++ b/tests/Alchemy/Tests/Phrasea/Model/Repositories/TaskRepositoryTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Model\Repositories; use Alchemy\Phrasea\Model\Entities\Task; -class TaskRepositoryTest extends \PhraseanetPHPUnitAbstract +class TaskRepositoryTest extends \PhraseanetTestCase { public function testFindActiveTask() { diff --git a/tests/Alchemy/Tests/Phrasea/Model/Repositories/UserRepositoryTest.php b/tests/Alchemy/Tests/Phrasea/Model/Repositories/UserRepositoryTest.php index 6c7fb772e3..403b3d49a0 100644 --- a/tests/Alchemy/Tests/Phrasea/Model/Repositories/UserRepositoryTest.php +++ b/tests/Alchemy/Tests/Phrasea/Model/Repositories/UserRepositoryTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Model\Repositories; use Alchemy\Phrasea\Model\Entities\User; -class UserRepositoryTest extends \PhraseanetPHPUnitAbstract +class UserRepositoryTest extends \PhraseanetTestCase { public function testFindAdminsWithNoAdmins() { diff --git a/tests/Alchemy/Tests/Phrasea/Notification/DelivererTest.php b/tests/Alchemy/Tests/Phrasea/Notification/DelivererTest.php index 8007740ca9..5b2303711b 100644 --- a/tests/Alchemy/Tests/Phrasea/Notification/DelivererTest.php +++ b/tests/Alchemy/Tests/Phrasea/Notification/DelivererTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Notification; use Alchemy\Phrasea\Notification\Deliverer; use Alchemy\Phrasea\Exception\LogicException; -class DelivererTest extends \PHPUnit_Framework_TestCase +class DelivererTest extends \PhraseanetTestCase { /** * @covers Alchemy\Phrasea\Notification\Deliverer::deliver diff --git a/tests/Alchemy/Tests/Phrasea/Notification/EmitterTest.php b/tests/Alchemy/Tests/Phrasea/Notification/EmitterTest.php index bc46c8a82b..1e26f7e17d 100644 --- a/tests/Alchemy/Tests/Phrasea/Notification/EmitterTest.php +++ b/tests/Alchemy/Tests/Phrasea/Notification/EmitterTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Notification; use Alchemy\Phrasea\Notification\Emitter; use Alchemy\Phrasea\Exception\InvalidArgumentException; -class EmitterTest extends \PHPUnit_Framework_TestCase +class EmitterTest extends \PhraseanetTestCase { /** * @var Emitter @@ -14,7 +14,7 @@ class EmitterTest extends \PHPUnit_Framework_TestCase private $name; private $email; - protected function setUp() + public function setUp() { $this->name = 'name-' . mt_rand(); $this->email = sprintf('name-%s@domain-%s.com', mt_rand(), mt_rand()); diff --git a/tests/Alchemy/Tests/Phrasea/Notification/Mail/AbstractMailTest.php b/tests/Alchemy/Tests/Phrasea/Notification/Mail/AbstractMailTest.php index 9789a6cc97..e21703d081 100644 --- a/tests/Alchemy/Tests/Phrasea/Notification/Mail/AbstractMailTest.php +++ b/tests/Alchemy/Tests/Phrasea/Notification/Mail/AbstractMailTest.php @@ -8,7 +8,7 @@ use Symfony\Component\Routing\Generator\UrlGenerator; /** * @covers Alchemy\Phrasea\Notification\Mail\AbstractMail */ -class AbstractMailTest extends \PHPUnit_Framework_TestCase +class AbstractMailTest extends \PhraseanetTestCase { /** * @covers Alchemy\Phrasea\Notification\Mail\AbstractMail::renderHTML diff --git a/tests/Alchemy/Tests/Phrasea/Notification/Mail/MailTestCase.php b/tests/Alchemy/Tests/Phrasea/Notification/Mail/MailTestCase.php index f8d1c989c9..26844b725f 100644 --- a/tests/Alchemy/Tests/Phrasea/Notification/Mail/MailTestCase.php +++ b/tests/Alchemy/Tests/Phrasea/Notification/Mail/MailTestCase.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Notification\Mail; use Alchemy\Phrasea\Notification\Mail\MailInterface; -abstract class MailTestCase extends \PhraseanetPHPUnitAbstract +abstract class MailTestCase extends \PhraseanetTestCase { public function testGetSubject() { diff --git a/tests/Alchemy/Tests/Phrasea/Notification/ReceiverTest.php b/tests/Alchemy/Tests/Phrasea/Notification/ReceiverTest.php index 0a1c4b91f8..179fb08532 100644 --- a/tests/Alchemy/Tests/Phrasea/Notification/ReceiverTest.php +++ b/tests/Alchemy/Tests/Phrasea/Notification/ReceiverTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Notification; use Alchemy\Phrasea\Notification\Receiver; use Alchemy\Phrasea\Exception\InvalidArgumentException; -class ReceiverTest extends \PHPUnit_Framework_TestCase +class ReceiverTest extends \PhraseanetTestCase { /** * @var Receiver @@ -14,7 +14,7 @@ class ReceiverTest extends \PHPUnit_Framework_TestCase private $name; private $email; - protected function setUp() + public function setUp() { $this->name = 'name-' . mt_rand(); $this->email = sprintf('name-%s@domain-%s.com', mt_rand(), mt_rand()); diff --git a/tests/Alchemy/Tests/Phrasea/Plugin/Importer/FolderImporterTest.php b/tests/Alchemy/Tests/Phrasea/Plugin/Importer/FolderImporterTest.php index 5e04521a26..f407266177 100644 --- a/tests/Alchemy/Tests/Phrasea/Plugin/Importer/FolderImporterTest.php +++ b/tests/Alchemy/Tests/Phrasea/Plugin/Importer/FolderImporterTest.php @@ -24,7 +24,7 @@ class FolderImporterTest extends PluginTestCase } /** - * @expectedException Alchemy\Phrasea\Plugin\Exception\ImportFailureException + * @expectedException \Alchemy\Phrasea\Plugin\Exception\ImportFailureException */ public function testImportFailed() { diff --git a/tests/Alchemy/Tests/Phrasea/Plugin/Importer/ImportStrategyTest.php b/tests/Alchemy/Tests/Phrasea/Plugin/Importer/ImportStrategyTest.php index 24a9ad3c55..9660d8a6b8 100644 --- a/tests/Alchemy/Tests/Phrasea/Plugin/Importer/ImportStrategyTest.php +++ b/tests/Alchemy/Tests/Phrasea/Plugin/Importer/ImportStrategyTest.php @@ -18,7 +18,7 @@ class ImportStrategyTest extends PluginTestCase /** * @dataProvider provideInvalidFolderSources - * @expectedException Alchemy\Phrasea\Plugin\Exception\ImportFailureException + * @expectedException \Alchemy\Phrasea\Plugin\Exception\ImportFailureException */ public function testDetectFailure($source) { diff --git a/tests/Alchemy/Tests/Phrasea/Plugin/Importer/ImporterTest.php b/tests/Alchemy/Tests/Phrasea/Plugin/Importer/ImporterTest.php index 52c1b49911..4f125ecb1d 100644 --- a/tests/Alchemy/Tests/Phrasea/Plugin/Importer/ImporterTest.php +++ b/tests/Alchemy/Tests/Phrasea/Plugin/Importer/ImporterTest.php @@ -28,7 +28,7 @@ class ImporterTest extends PluginTestCase } /** - * @expectedException Alchemy\Phrasea\Plugin\Exception\ImportFailureException + * @expectedException \Alchemy\Phrasea\Plugin\Exception\ImportFailureException */ public function testImportFailure() { diff --git a/tests/Alchemy/Tests/Phrasea/Plugin/Management/AssetsManagerTest.php b/tests/Alchemy/Tests/Phrasea/Plugin/Management/AssetsManagerTest.php index 22f2f841b3..c1904ad8cc 100644 --- a/tests/Alchemy/Tests/Phrasea/Plugin/Management/AssetsManagerTest.php +++ b/tests/Alchemy/Tests/Phrasea/Plugin/Management/AssetsManagerTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Plugin\Management; use Alchemy\Phrasea\Plugin\Management\AssetsManager; use Symfony\Component\Filesystem\Exception\IOException; -class AssetsManagerTest extends \PhraseanetPHPUnitAbstract +class AssetsManagerTest extends \PhraseanetTestCase { public function testUpdate() { @@ -29,7 +29,7 @@ class AssetsManagerTest extends \PhraseanetPHPUnitAbstract } /** - * @expectedException Alchemy\Phrasea\Exception\RuntimeException + * @expectedException \Alchemy\Phrasea\Exception\RuntimeException */ public function testUpdateWithErrors() { @@ -67,7 +67,7 @@ class AssetsManagerTest extends \PhraseanetPHPUnitAbstract } /** - * @expectedException Alchemy\Phrasea\Exception\RuntimeException + * @expectedException \Alchemy\Phrasea\Exception\RuntimeException */ public function testRemoveWithError() { diff --git a/tests/Alchemy/Tests/Phrasea/Plugin/Management/AutoloaderGeneratorTest.php b/tests/Alchemy/Tests/Phrasea/Plugin/Management/AutoloaderGeneratorTest.php index 1008ca95e9..d20595454d 100644 --- a/tests/Alchemy/Tests/Phrasea/Plugin/Management/AutoloaderGeneratorTest.php +++ b/tests/Alchemy/Tests/Phrasea/Plugin/Management/AutoloaderGeneratorTest.php @@ -9,7 +9,7 @@ use Alchemy\Phrasea\Plugin\Schema\Manifest; use Symfony\Component\Process\ProcessBuilder; use Symfony\Component\Process\ExecutableFinder; -class AutoloaderGeneratorTest extends \PHPUnit_Framework_TestCase +class AutoloaderGeneratorTest extends \PhraseanetTestCase { public function testGeneratedFileAfterInstall() { diff --git a/tests/Alchemy/Tests/Phrasea/Plugin/Management/ComposerInstallerTest.php b/tests/Alchemy/Tests/Phrasea/Plugin/Management/ComposerInstallerTest.php index 0ae5dd206d..b921d33f19 100644 --- a/tests/Alchemy/Tests/Phrasea/Plugin/Management/ComposerInstallerTest.php +++ b/tests/Alchemy/Tests/Phrasea/Plugin/Management/ComposerInstallerTest.php @@ -8,7 +8,7 @@ use Guzzle\Http\Client as Guzzle; use Symfony\Component\Process\ExecutableFinder; use Symfony\Component\Filesystem\Filesystem; -class ComposerInstallerTest extends \PHPUnit_Framework_TestCase +class ComposerInstallerTest extends \PhraseanetTestCase { public function testInstall() { diff --git a/tests/Alchemy/Tests/Phrasea/Plugin/PluginTestCase.php b/tests/Alchemy/Tests/Phrasea/Plugin/PluginTestCase.php index 448d6f29b0..db33bdb24b 100644 --- a/tests/Alchemy/Tests/Phrasea/Plugin/PluginTestCase.php +++ b/tests/Alchemy/Tests/Phrasea/Plugin/PluginTestCase.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Plugin; use Alchemy\Phrasea\Plugin\Schema\ManifestValidator; -class PluginTestCase extends \PhraseanetPHPUnitAbstract +class PluginTestCase extends \PhraseanetTestCase { protected function createManifestValidator() { diff --git a/tests/Alchemy/Tests/Phrasea/Plugin/Schema/ManifestTest.php b/tests/Alchemy/Tests/Phrasea/Plugin/Schema/ManifestTest.php index 9014d46f3d..50ab60e840 100644 --- a/tests/Alchemy/Tests/Phrasea/Plugin/Schema/ManifestTest.php +++ b/tests/Alchemy/Tests/Phrasea/Plugin/Schema/ManifestTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Plugin\Schema; use Alchemy\Phrasea\Plugin\Schema\Manifest; -class ManifestTest extends \PHPUnit_Framework_TestCase +class ManifestTest extends \PhraseanetTestCase { public function testGetters() { diff --git a/tests/Alchemy/Tests/Phrasea/Plugin/Schema/ManifestValidatorTest.php b/tests/Alchemy/Tests/Phrasea/Plugin/Schema/ManifestValidatorTest.php index 089b2e0fcd..4431338ba2 100644 --- a/tests/Alchemy/Tests/Phrasea/Plugin/Schema/ManifestValidatorTest.php +++ b/tests/Alchemy/Tests/Phrasea/Plugin/Schema/ManifestValidatorTest.php @@ -26,7 +26,7 @@ class ManifestValidatorTest extends PluginTestCase } /** - * @expectedException Alchemy\Phrasea\Plugin\Exception\JsonValidationException + * @expectedException \Alchemy\Phrasea\Plugin\Exception\JsonValidationException * @dataProvider provideWrongManifestFiles */ public function testValidateWrongOnes($file) @@ -49,7 +49,7 @@ class ManifestValidatorTest extends PluginTestCase } /** - * @expectedException Alchemy\Phrasea\Exception\InvalidArgumentException + * @expectedException \Alchemy\Phrasea\Exception\InvalidArgumentException */ public function testValidateInvalidData() { @@ -58,7 +58,7 @@ class ManifestValidatorTest extends PluginTestCase } /** - * @expectedException Alchemy\Phrasea\Exception\InvalidArgumentException + * @expectedException \Alchemy\Phrasea\Exception\InvalidArgumentException */ public function testConstructWithInvalidSchema() { diff --git a/tests/Alchemy/Tests/Phrasea/Plugin/Schema/PluginValidatorTest.php b/tests/Alchemy/Tests/Phrasea/Plugin/Schema/PluginValidatorTest.php index 4e5ab4b556..e40b12f3f6 100644 --- a/tests/Alchemy/Tests/Phrasea/Plugin/Schema/PluginValidatorTest.php +++ b/tests/Alchemy/Tests/Phrasea/Plugin/Schema/PluginValidatorTest.php @@ -9,7 +9,7 @@ class PluginValidatorTest extends PluginTestCase { /** * @dataProvider provideInvalidPluginDirs - * @expectedException Alchemy\Phrasea\Plugin\Exception\PluginValidationException + * @expectedException \Alchemy\Phrasea\Plugin\Exception\PluginValidationException */ public function testValidateInvalidPlugin($directory) { diff --git a/tests/Alchemy/Tests/Phrasea/SearchEngine/ConfigurationPanelAbstractTest.php b/tests/Alchemy/Tests/Phrasea/SearchEngine/ConfigurationPanelAbstractTest.php index 177441b732..793309ee71 100644 --- a/tests/Alchemy/Tests/Phrasea/SearchEngine/ConfigurationPanelAbstractTest.php +++ b/tests/Alchemy/Tests/Phrasea/SearchEngine/ConfigurationPanelAbstractTest.php @@ -2,7 +2,7 @@ namespace Alchemy\Tests\Phrasea\SearchEngine; -abstract class ConfigurationPanelAbstractTest extends \PhraseanetPHPUnitAuthenticatedAbstract +abstract class ConfigurationPanelAbstractTest extends \PhraseanetAuthenticatedTestCase { abstract public function getPanel(); diff --git a/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineAbstractTest.php b/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineAbstractTest.php index 5b53edb801..eb5892e033 100644 --- a/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineAbstractTest.php +++ b/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineAbstractTest.php @@ -6,12 +6,12 @@ use Alchemy\Phrasea\Application; use Alchemy\Phrasea\SearchEngine\SearchEngineOptions; use Alchemy\Phrasea\SearchEngine\SearchEngineInterface; -abstract class SearchEngineAbstractTest extends \PhraseanetPHPUnitAuthenticatedAbstract +abstract class SearchEngineAbstractTest extends \PhraseanetAuthenticatedTestCase { protected $options; protected static $searchEngine; protected static $searchEngineClass; - protected static $initialized = false; + private static $initialized = false; public function setUp() { diff --git a/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineLoggerTest.php b/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineLoggerTest.php index 15ae573df7..2939723579 100644 --- a/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineLoggerTest.php +++ b/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineLoggerTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\SearchEngine; use Alchemy\Phrasea\SearchEngine\SearchEngineLogger; -class SearchEngineLoggerTest extends \PhraseanetPHPUnitAbstract +class SearchEngineLoggerTest extends \PhraseanetTestCase { /** * @covers Alchemy\Phrasea\SearchEngine\SearchEngineLogger::log diff --git a/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineOptionsTest.php b/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineOptionsTest.php index 32868cc3fd..5caf81dbff 100644 --- a/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineOptionsTest.php +++ b/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineOptionsTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\SearchEngine; use Alchemy\Phrasea\SearchEngine\SearchEngineOptions; use Symfony\Component\HttpFoundation\Request; -class SearchEngineOptionsTest extends \PhraseanetPHPUnitAbstract +class SearchEngineOptionsTest extends \PhraseanetTestCase { /** * @covers Alchemy\Phrasea\SearchEngine\SearchEngineOptions diff --git a/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineResultTest.php b/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineResultTest.php index 3e13b9b124..fe68a14ab4 100644 --- a/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineResultTest.php +++ b/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineResultTest.php @@ -6,7 +6,7 @@ use Doctrine\Common\Collections\ArrayCollection; use Alchemy\Phrasea\SearchEngine\SearchEngineResult; use Alchemy\Phrasea\SearchEngine\SearchEngineSuggestion; -class SearchEngineResultTest extends \PhraseanetPHPUnitAbstract +class SearchEngineResultTest extends \PhraseanetTestCase { /** * @covers Alchemy\Phrasea\SearchEngine\SearchEngineResult diff --git a/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineSuggestionTest.php b/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineSuggestionTest.php index cc924b80a6..5807c4a99c 100644 --- a/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineSuggestionTest.php +++ b/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineSuggestionTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\SearchEngine; use Alchemy\Phrasea\SearchEngine\SearchEngineSuggestion; -class SearchEngineSuggestionTest extends \PhraseanetPHPUnitAbstract +class SearchEngineSuggestionTest extends \PhraseanetTestCase { /** * @covers Alchemy\Phrasea\SearchEngine\SearchEngineSuggestion diff --git a/tests/Alchemy/Tests/Phrasea/SearchEngine/SphinxSearchEngineTest.php b/tests/Alchemy/Tests/Phrasea/SearchEngine/SphinxSearchEngineTest.php index fb3abb2e7f..366bf24ad4 100644 --- a/tests/Alchemy/Tests/Phrasea/SearchEngine/SphinxSearchEngineTest.php +++ b/tests/Alchemy/Tests/Phrasea/SearchEngine/SphinxSearchEngineTest.php @@ -11,8 +11,8 @@ use Symfony\Component\Process\Process; class SphinxSearchEngineTest extends SearchEngineAbstractTest { private static $skipped = false; - protected static $config; - protected static $searchd; + private static $config; + private static $searchd; /** * @covers Alchemy\Phrasea\SearchEngine\SphinxSearch\SphinxSearchEngine diff --git a/tests/Alchemy/Tests/Phrasea/Security/FirewallTest.php b/tests/Alchemy/Tests/Phrasea/Security/FirewallTest.php index b4d25280a0..50af33cd2f 100644 --- a/tests/Alchemy/Tests/Phrasea/Security/FirewallTest.php +++ b/tests/Alchemy/Tests/Phrasea/Security/FirewallTest.php @@ -15,7 +15,7 @@ class FirewallTest extends \PhraseanetWebTestCaseAuthenticatedAbstract } /** - * @expectedException Symfony\Component\HttpKernel\Exception\HttpException + * @expectedException \Symfony\Component\HttpKernel\Exception\HttpException */ public function testRequiredAuthNotAuthenticated() { diff --git a/tests/Alchemy/Tests/Phrasea/Setup/AbstractSetupTester.php b/tests/Alchemy/Tests/Phrasea/Setup/AbstractSetupTester.php index 2d38d25118..da4aa67b19 100644 --- a/tests/Alchemy/Tests/Phrasea/Setup/AbstractSetupTester.php +++ b/tests/Alchemy/Tests/Phrasea/Setup/AbstractSetupTester.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Setup; use Alchemy\Phrasea\Application; -abstract class AbstractSetupTester extends \PHPUnit_Framework_TestCase +abstract class AbstractSetupTester extends \PhraseanetTestCase { private $tearDownHandlers = []; diff --git a/tests/Alchemy/Tests/Phrasea/Setup/InstallerTest.php b/tests/Alchemy/Tests/Phrasea/Setup/InstallerTest.php index 31bbdb7633..76203f6d58 100644 --- a/tests/Alchemy/Tests/Phrasea/Setup/InstallerTest.php +++ b/tests/Alchemy/Tests/Phrasea/Setup/InstallerTest.php @@ -9,7 +9,7 @@ use Symfony\Component\Yaml\Parser; use Symfony\Component\Yaml\Yaml; use Alchemy\Phrasea\Core\Configuration\Compiler; -class InstallerTest extends \PHPUnit_Framework_TestCase +class InstallerTest extends \PhraseanetTestCase { public function setUp() diff --git a/tests/Alchemy/Tests/Phrasea/Setup/Probe/ProbeTestCase.php b/tests/Alchemy/Tests/Phrasea/Setup/Probe/ProbeTestCase.php index b89a0fee14..c7e4d48721 100644 --- a/tests/Alchemy/Tests/Phrasea/Setup/Probe/ProbeTestCase.php +++ b/tests/Alchemy/Tests/Phrasea/Setup/Probe/ProbeTestCase.php @@ -2,7 +2,7 @@ namespace Alchemy\Tests\Phrasea\Setup\Probe; -abstract class ProbeTestCase extends \PhraseanetPHPUnitAbstract +abstract class ProbeTestCase extends \PhraseanetTestCase { abstract protected function getClassName(); diff --git a/tests/Alchemy/Tests/Phrasea/Setup/Requirements/RequirementsTestCase.php b/tests/Alchemy/Tests/Phrasea/Setup/Requirements/RequirementsTestCase.php index 2e6b235efd..c3f39b60a0 100644 --- a/tests/Alchemy/Tests/Phrasea/Setup/Requirements/RequirementsTestCase.php +++ b/tests/Alchemy/Tests/Phrasea/Setup/Requirements/RequirementsTestCase.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Setup\Requirements; use Alchemy\Phrasea\Setup\RequirementCollection; use Alchemy\Phrasea\Setup\RequirementCollectionInterface; -abstract class RequirementsTestCase extends \PHPUnit_Framework_TestCase +abstract class RequirementsTestCase extends \PhraseanetTestCase { /** * @return RequirementCollectionInterface diff --git a/tests/Alchemy/Tests/Phrasea/Setup/Version/MailCheckerTest.php b/tests/Alchemy/Tests/Phrasea/Setup/Version/MailCheckerTest.php index edeaa7fb15..c96950a109 100644 --- a/tests/Alchemy/Tests/Phrasea/Setup/Version/MailCheckerTest.php +++ b/tests/Alchemy/Tests/Phrasea/Setup/Version/MailCheckerTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Setup\Version; use Alchemy\Phrasea\Setup\Version\MailChecker; -class MailCheckerTest extends \PhraseanetPHPUnitAbstract +class MailCheckerTest extends \PhraseanetTestCase { public function testMailChecker() { diff --git a/tests/Alchemy/Tests/Phrasea/TaskManager/Editor/EditorTestCase.php b/tests/Alchemy/Tests/Phrasea/TaskManager/Editor/EditorTestCase.php index dfc5fa2f8c..095b361110 100644 --- a/tests/Alchemy/Tests/Phrasea/TaskManager/Editor/EditorTestCase.php +++ b/tests/Alchemy/Tests/Phrasea/TaskManager/Editor/EditorTestCase.php @@ -5,10 +5,10 @@ namespace Alchemy\Tests\Phrasea\TaskManager\Editor; use Alchemy\Phrasea\TaskManager\Editor\EditorInterface; use Symfony\Component\HttpFoundation\Request; -abstract class EditorTestCase extends \PhraseanetPHPUnitAbstract +abstract class EditorTestCase extends \PhraseanetTestCase { /** - * @expectedException Symfony\Component\HttpKernel\Exception\BadRequestHttpException + * @expectedException \Symfony\Component\HttpKernel\Exception\BadRequestHttpException * @expectedExceptionMessage Invalid XML data. */ public function testThatUpdateXmlWithRequestThrowsABadRequestOnWrongXML() @@ -29,7 +29,7 @@ abstract class EditorTestCase extends \PhraseanetPHPUnitAbstract } /** - * @expectedException Symfony\Component\HttpKernel\Exception\NotFoundHttpException + * @expectedException \Symfony\Component\HttpKernel\Exception\NotFoundHttpException * @expectedExceptionMessage Route not found. */ public function testThatFacilityThrowsANotFoundInCaseOfFailure() diff --git a/tests/Alchemy/Tests/Phrasea/TaskManager/Event/FinishedJobRemoverSubscriberTest.php b/tests/Alchemy/Tests/Phrasea/TaskManager/Event/FinishedJobRemoverSubscriberTest.php index d90dd4db27..eb45c5e777 100644 --- a/tests/Alchemy/Tests/Phrasea/TaskManager/Event/FinishedJobRemoverSubscriberTest.php +++ b/tests/Alchemy/Tests/Phrasea/TaskManager/Event/FinishedJobRemoverSubscriberTest.php @@ -6,7 +6,7 @@ use Alchemy\Phrasea\TaskManager\Event\FinishedJobRemoverSubscriber; use Alchemy\Phrasea\TaskManager\Event\JobFinishedEvent; use Alchemy\Phrasea\Model\Entities\Task; -class FinishedJobRemoverSubscriberTest extends \PhraseanetPHPUnitAbstract +class FinishedJobRemoverSubscriberTest extends \PhraseanetTestCase { public function testOnJobFinish() { diff --git a/tests/Alchemy/Tests/Phrasea/TaskManager/Event/JobFinishedEventTest.php b/tests/Alchemy/Tests/Phrasea/TaskManager/Event/JobFinishedEventTest.php index b5b8db5e13..0634ce873b 100644 --- a/tests/Alchemy/Tests/Phrasea/TaskManager/Event/JobFinishedEventTest.php +++ b/tests/Alchemy/Tests/Phrasea/TaskManager/Event/JobFinishedEventTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\TaskManager\Event; use Alchemy\Phrasea\TaskManager\Event\JobFinishedEvent; -class JobFinishedEventTest extends \PHPUnit_Framework_TestCase +class JobFinishedEventTest extends \PhraseanetTestCase { public function testEvent() { diff --git a/tests/Alchemy/Tests/Phrasea/TaskManager/Event/PhraseanetIndexerStopperSubscriberTest.php b/tests/Alchemy/Tests/Phrasea/TaskManager/Event/PhraseanetIndexerStopperSubscriberTest.php index c3aec51292..01b0553d8e 100644 --- a/tests/Alchemy/Tests/Phrasea/TaskManager/Event/PhraseanetIndexerStopperSubscriberTest.php +++ b/tests/Alchemy/Tests/Phrasea/TaskManager/Event/PhraseanetIndexerStopperSubscriberTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\TaskManager\Event; use Alchemy\Phrasea\TaskManager\Event\PhraseanetIndexerStopperSubscriber; -class PhraseanetIndexerStopperSubscriberTest extends \PHPUnit_Framework_TestCase +class PhraseanetIndexerStopperSubscriberTest extends \PhraseanetTestCase { public function testSocketmessageIsSentOnStop() { diff --git a/tests/Alchemy/Tests/Phrasea/TaskManager/Job/FactoryTest.php b/tests/Alchemy/Tests/Phrasea/TaskManager/Job/FactoryTest.php index 0462dce599..9ae3c81128 100644 --- a/tests/Alchemy/Tests/Phrasea/TaskManager/Job/FactoryTest.php +++ b/tests/Alchemy/Tests/Phrasea/TaskManager/Job/FactoryTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\TaskManager\Job; use Alchemy\Phrasea\TaskManager\Job\Factory; -class FactoryTest extends \PHPUnit_Framework_TestCase +class FactoryTest extends \PhraseanetTestCase { /** * @dataProvider provideValidClasses @@ -71,9 +71,4 @@ class FactoryTest extends \PHPUnit_Framework_TestCase { return $this->getMock('Psr\Log\LoggerInterface'); } - - private function createTranslatorMock() - { - return $this->getMock('Symfony\Component\Translation\TranslatorInterface'); - } } diff --git a/tests/Alchemy/Tests/Phrasea/TaskManager/Job/JobDataTest.php b/tests/Alchemy/Tests/Phrasea/TaskManager/Job/JobDataTest.php index cfe0d0b6d9..527aa6ad99 100644 --- a/tests/Alchemy/Tests/Phrasea/TaskManager/Job/JobDataTest.php +++ b/tests/Alchemy/Tests/Phrasea/TaskManager/Job/JobDataTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\TaskManager\Job; use Alchemy\Phrasea\TaskManager\Job\JobData; -class JobDataTest extends \PHPUnit_Framework_TestCase +class JobDataTest extends \PhraseanetTestCase { public function testGetters() { diff --git a/tests/Alchemy/Tests/Phrasea/TaskManager/Job/JobTestCase.php b/tests/Alchemy/Tests/Phrasea/TaskManager/Job/JobTestCase.php index d56edf4b81..abd00271dd 100644 --- a/tests/Alchemy/Tests/Phrasea/TaskManager/Job/JobTestCase.php +++ b/tests/Alchemy/Tests/Phrasea/TaskManager/Job/JobTestCase.php @@ -6,7 +6,7 @@ use Alchemy\Phrasea\TaskManager\Job\JobInterface; use Alchemy\TaskManager\JobDataInterface; use Alchemy\Phrasea\TaskManager\Job\Factory; -abstract class JobTestCase extends \PhraseanetPHPUnitAbstract +abstract class JobTestCase extends \PhraseanetTestCase { public function testGetJobIdReturnsAvalidId() { diff --git a/tests/Alchemy/Tests/Phrasea/TaskManager/LiveInformationTest.php b/tests/Alchemy/Tests/Phrasea/TaskManager/LiveInformationTest.php index 7105575f84..455e0191e7 100644 --- a/tests/Alchemy/Tests/Phrasea/TaskManager/LiveInformationTest.php +++ b/tests/Alchemy/Tests/Phrasea/TaskManager/LiveInformationTest.php @@ -7,7 +7,7 @@ use Alchemy\Phrasea\TaskManager\Notifier; use Alchemy\Phrasea\TaskManager\TaskManagerStatus; use Alchemy\Phrasea\Model\Entities\Task; -class LiveInformationTest extends \PhraseanetPHPUnitAbstract +class LiveInformationTest extends \PhraseanetTestCase { public function testItReturnsWorkingManagerStatus() { diff --git a/tests/Alchemy/Tests/Phrasea/TaskManager/Log/LogFileFactoryTest.php b/tests/Alchemy/Tests/Phrasea/TaskManager/Log/LogFileFactoryTest.php index 0583b7e71d..ff76e93f5f 100644 --- a/tests/Alchemy/Tests/Phrasea/TaskManager/Log/LogFileFactoryTest.php +++ b/tests/Alchemy/Tests/Phrasea/TaskManager/Log/LogFileFactoryTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\TaskManager\Log; use Alchemy\Phrasea\TaskManager\Log\LogFileFactory; use Alchemy\Phrasea\Model\Entities\Task; -class LogFilefactorytest extends \PhraseanetPHPUnitAbstract +class LogFilefactorytest extends \PhraseanetTestCase { public function testForTask() { diff --git a/tests/Alchemy/Tests/Phrasea/TaskManager/Log/LogFileTestCase.php b/tests/Alchemy/Tests/Phrasea/TaskManager/Log/LogFileTestCase.php index 71cfe457ff..480eda6864 100644 --- a/tests/Alchemy/Tests/Phrasea/TaskManager/Log/LogFileTestCase.php +++ b/tests/Alchemy/Tests/Phrasea/TaskManager/Log/LogFileTestCase.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\TaskManager\Log; use Alchemy\Phrasea\TaskManager\Log\LogFileInterface; use Symfony\Component\Finder\Finder; -abstract class LogFileTestCase extends \PhraseanetPHPUnitAbstract +abstract class LogFileTestCase extends \PhraseanetTestCase { protected $root; diff --git a/tests/Alchemy/Tests/Phrasea/TaskManager/NotifierTest.php b/tests/Alchemy/Tests/Phrasea/TaskManager/NotifierTest.php index 9b3722c3ab..597e7e5189 100644 --- a/tests/Alchemy/Tests/Phrasea/TaskManager/NotifierTest.php +++ b/tests/Alchemy/Tests/Phrasea/TaskManager/NotifierTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Phrasea\TaskManager; use Alchemy\Phrasea\TaskManager\Notifier; use Alchemy\TaskManager\TaskManager; -class NotifierTest extends \PHPUnit_Framework_TestCase +class NotifierTest extends \PhraseanetTestCase { /** * @dataProvider provideMessagesData diff --git a/tests/Alchemy/Tests/Phrasea/TaskManager/TaskListTest.php b/tests/Alchemy/Tests/Phrasea/TaskManager/TaskListTest.php index a59b7de51f..541efb4709 100644 --- a/tests/Alchemy/Tests/Phrasea/TaskManager/TaskListTest.php +++ b/tests/Alchemy/Tests/Phrasea/TaskManager/TaskListTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\TaskManager; use Alchemy\Phrasea\Model\Entities\Task; use Alchemy\Phrasea\TaskManager\TaskList; -class TaskListTest extends \PhraseanetPHPUnitAbstract +class TaskListTest extends \PhraseanetTestCase { public function testThatRefreshReturnsAnArrayOfTaskInterface() { diff --git a/tests/Alchemy/Tests/Phrasea/TaskManager/TaskManagerStatusTest.php b/tests/Alchemy/Tests/Phrasea/TaskManager/TaskManagerStatusTest.php index 6dbd2a4f3c..bb8f9e2258 100644 --- a/tests/Alchemy/Tests/Phrasea/TaskManager/TaskManagerStatusTest.php +++ b/tests/Alchemy/Tests/Phrasea/TaskManager/TaskManagerStatusTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\TaskManager; use Alchemy\Phrasea\TaskManager\TaskManagerStatus; use Alchemy\Phrasea\Core\Configuration\ConfigurationInterface; -class TaskManagerStatusTest extends \PHPUnit_Framework_TestCase +class TaskManagerStatusTest extends \PhraseanetTestCase { /** * @dataProvider provideInitialData diff --git a/tests/Alchemy/Tests/Phrasea/Twig/BytesConverterTest.php b/tests/Alchemy/Tests/Phrasea/Twig/BytesConverterTest.php index 405ff639d4..81c61a5c3d 100644 --- a/tests/Alchemy/Tests/Phrasea/Twig/BytesConverterTest.php +++ b/tests/Alchemy/Tests/Phrasea/Twig/BytesConverterTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Twig; use Alchemy\Phrasea\Twig\BytesConverter; -class BytesConverterTest extends \PHPUnit_Framework_TestCase +class BytesConverterTest extends \PhraseanetTestCase { /** * @dataProvider convertDataProvider diff --git a/tests/Alchemy/Tests/Phrasea/Utilities/ComposerSetupTest.php b/tests/Alchemy/Tests/Phrasea/Utilities/ComposerSetupTest.php index 3d1df873d3..e95630dd6d 100644 --- a/tests/Alchemy/Tests/Phrasea/Utilities/ComposerSetupTest.php +++ b/tests/Alchemy/Tests/Phrasea/Utilities/ComposerSetupTest.php @@ -7,7 +7,7 @@ use Guzzle\Http\Client as Guzzle; use Symfony\Component\Process\PhpExecutableFinder; use Symfony\Component\Process\ProcessBuilder; -class ComposerSetupTest extends \PHPUnit_Framework_TestCase +class ComposerSetupTest extends \PhraseanetTestCase { public function testSetup() { diff --git a/tests/Alchemy/Tests/Phrasea/Utilities/Less/BuilderTest.php b/tests/Alchemy/Tests/Phrasea/Utilities/Less/BuilderTest.php index 103e47459e..767097a297 100644 --- a/tests/Alchemy/Tests/Phrasea/Utilities/Less/BuilderTest.php +++ b/tests/Alchemy/Tests/Phrasea/Utilities/Less/BuilderTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Utilities\Compiler; use Alchemy\Phrasea\Utilities\Less\Builder; -class BuilderTest extends \PHPUnit_Framework_TestCase +class BuilderTest extends \PhraseanetTestCase { public function testBuildSuccess() { diff --git a/tests/Alchemy/Tests/Phrasea/Utilities/Less/CompilerTest.php b/tests/Alchemy/Tests/Phrasea/Utilities/Less/CompilerTest.php index 8ec64b8e80..30345009eb 100644 --- a/tests/Alchemy/Tests/Phrasea/Utilities/Less/CompilerTest.php +++ b/tests/Alchemy/Tests/Phrasea/Utilities/Less/CompilerTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Utilities\Compiler; use Alchemy\Phrasea\Utilities\Less\Compiler; use Alchemy\BinaryDriver\Exception\ExecutionFailureException; -class CompilerTest extends \PhraseanetPHPUnitAbstract +class CompilerTest extends \PhraseanetTestCase { public function testCompileSuccess() { @@ -24,7 +24,7 @@ class CompilerTest extends \PhraseanetPHPUnitAbstract } /** - * @expectedException Alchemy\Phrasea\Exception\RuntimeException + * @expectedException \Alchemy\Phrasea\Exception\RuntimeException */ public function testCompileFileNotExists() { @@ -41,7 +41,7 @@ class CompilerTest extends \PhraseanetPHPUnitAbstract } /** - * @expectedException Alchemy\Phrasea\Exception\RuntimeException + * @expectedException \Alchemy\Phrasea\Exception\RuntimeException */ public function testCompileExecutionFailure() { diff --git a/tests/Alchemy/Tests/Phrasea/Utilities/String/CamelizerTest.php b/tests/Alchemy/Tests/Phrasea/Utilities/String/CamelizerTest.php index ea725f8af8..85466cbe92 100644 --- a/tests/Alchemy/Tests/Phrasea/Utilities/String/CamelizerTest.php +++ b/tests/Alchemy/Tests/Phrasea/Utilities/String/CamelizerTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Utilities\String; use Alchemy\Phrasea\Utilities\String\Camelizer; -class CamelizerTest extends \PHPUnit_Framework_TestCase +class CamelizerTest extends \PhraseanetTestCase { /** * @dataProvider provideStrings diff --git a/tests/Alchemy/Tests/Phrasea/Vocabulary/ControlProvider/UserProviderTest.php b/tests/Alchemy/Tests/Phrasea/Vocabulary/ControlProvider/UserProviderTest.php index 800ac9784b..6154395a86 100644 --- a/tests/Alchemy/Tests/Phrasea/Vocabulary/ControlProvider/UserProviderTest.php +++ b/tests/Alchemy/Tests/Phrasea/Vocabulary/ControlProvider/UserProviderTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Vocabulary\ControllerProvider; use Alchemy\Phrasea\Vocabulary\ControlProvider\UserProvider; -class UserProviderTest extends \PhraseanetPHPUnitAbstract +class UserProviderTest extends \PhraseanetTestCase { /** * @var UserProvider diff --git a/tests/Alchemy/Tests/Phrasea/Vocabulary/ControllerTest.php b/tests/Alchemy/Tests/Phrasea/Vocabulary/ControllerTest.php index 1edffc9c9f..b5f9799882 100644 --- a/tests/Alchemy/Tests/Phrasea/Vocabulary/ControllerTest.php +++ b/tests/Alchemy/Tests/Phrasea/Vocabulary/ControllerTest.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Vocabulary; use Alchemy\Phrasea\Vocabulary\Controller; -class ControllerTest extends \PhraseanetPHPUnitAbstract +class ControllerTest extends \PhraseanetTestCase { public function testGet() diff --git a/tests/Alchemy/Tests/Phrasea/Vocabulary/TermTest.php b/tests/Alchemy/Tests/Phrasea/Vocabulary/TermTest.php index 0e718bf0cd..5643bbccfd 100644 --- a/tests/Alchemy/Tests/Phrasea/Vocabulary/TermTest.php +++ b/tests/Alchemy/Tests/Phrasea/Vocabulary/TermTest.php @@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Vocabulary; use Alchemy\Phrasea\Vocabulary\Term; use Alchemy\Phrasea\Vocabulary\ControlProvider\UserProvider; -class TermTest extends \PhraseanetPHPUnitAbstract +class TermTest extends \PhraseanetTestCase { /** * @var Term diff --git a/tests/classes/ACLTest.php b/tests/classes/ACLTest.php index f3999bcf4c..71c0f56dff 100644 --- a/tests/classes/ACLTest.php +++ b/tests/classes/ACLTest.php @@ -2,12 +2,12 @@ use Alchemy\Phrasea\Application; -class ACLTest extends PhraseanetPHPUnitAuthenticatedAbstract +class ACLTest extends \PhraseanetAuthenticatedTestCase { /** * @var ACL */ - protected static $object; + private static $object; public static function tearDownAfterClass() { diff --git a/tests/classes/Bridge/Api/Auth/Bridge_Api_Auth_AbstractTest.php b/tests/classes/Bridge/Api/Auth/Bridge_Api_Auth_AbstractTest.php index bfeaf5a74f..dd214c5714 100644 --- a/tests/classes/Bridge/Api/Auth/Bridge_Api_Auth_AbstractTest.php +++ b/tests/classes/Bridge/Api/Auth/Bridge_Api_Auth_AbstractTest.php @@ -2,7 +2,7 @@ require_once __DIR__ . '/../../Bridge_datas.inc'; -class Bridge_Api_Auth_AbstractTest extends PHPUnit_Framework_TestCase +class Bridge_Api_Auth_AbstractTest extends \PhraseanetTestCase { public function testSet_settings() diff --git a/tests/classes/Bridge/Api/Auth/Bridge_Api_Auth_FlickrTest.php b/tests/classes/Bridge/Api/Auth/Bridge_Api_Auth_FlickrTest.php index 42c73460a9..5afa998139 100644 --- a/tests/classes/Bridge/Api/Auth/Bridge_Api_Auth_FlickrTest.php +++ b/tests/classes/Bridge/Api/Auth/Bridge_Api_Auth_FlickrTest.php @@ -2,7 +2,7 @@ require_once __DIR__ . '/../../Bridge_datas.inc'; -class Bridge_Api_Auth_FlickrTest extends PHPUnit_Framework_TestCase +class Bridge_Api_Auth_FlickrTest extends \PhraseanetTestCase { /** * @var Bridge_Api_Auth_Flickr diff --git a/tests/classes/Bridge/Api/Auth/Bridge_Api_Auth_OAuth2Test.php b/tests/classes/Bridge/Api/Auth/Bridge_Api_Auth_OAuth2Test.php index eba1175e55..6d7e2b95ee 100644 --- a/tests/classes/Bridge/Api/Auth/Bridge_Api_Auth_OAuth2Test.php +++ b/tests/classes/Bridge/Api/Auth/Bridge_Api_Auth_OAuth2Test.php @@ -2,7 +2,7 @@ require_once __DIR__ . '/../../Bridge_datas.inc'; -class Bridge_Api_Auth_OAuth2Test extends PHPUnit_Framework_TestCase +class Bridge_Api_Auth_OAuth2Test extends \PhraseanetTestCase { /** * @var Bridge_Api_Auth_OAuth2 diff --git a/tests/classes/Bridge/Api/Bridge_Api_AbstractCollectionTest.php b/tests/classes/Bridge/Api/Bridge_Api_AbstractCollectionTest.php index ea9b4127db..e22de77681 100644 --- a/tests/classes/Bridge/Api/Bridge_Api_AbstractCollectionTest.php +++ b/tests/classes/Bridge/Api/Bridge_Api_AbstractCollectionTest.php @@ -2,7 +2,7 @@ require_once __DIR__ . '/../Bridge_datas.inc'; -class Bridge_Api_AbstractCollectionTest extends PHPUnit_Framework_TestCase +class Bridge_Api_AbstractCollectionTest extends \PhraseanetTestCase { /** * @var Bridge_Api_AbstractCollection diff --git a/tests/classes/Bridge/Api/Bridge_Api_ContainerCollectionTest.php b/tests/classes/Bridge/Api/Bridge_Api_ContainerCollectionTest.php index 7cd6050d96..810dbc89c9 100644 --- a/tests/classes/Bridge/Api/Bridge_Api_ContainerCollectionTest.php +++ b/tests/classes/Bridge/Api/Bridge_Api_ContainerCollectionTest.php @@ -2,7 +2,7 @@ require_once __DIR__ . '/../Bridge_datas.inc'; -class Bridge_Api_ContainerCollectionTest extends PHPUnit_Framework_TestCase +class Bridge_Api_ContainerCollectionTest extends \PhraseanetTestCase { public function testAdd_element() diff --git a/tests/classes/Bridge/Api/Bridge_Api_ElementCollectionTest.php b/tests/classes/Bridge/Api/Bridge_Api_ElementCollectionTest.php index c81fd18ab7..46c0271ef8 100644 --- a/tests/classes/Bridge/Api/Bridge_Api_ElementCollectionTest.php +++ b/tests/classes/Bridge/Api/Bridge_Api_ElementCollectionTest.php @@ -2,7 +2,7 @@ require_once __DIR__ . '/../Bridge_datas.inc'; -class Bridge_Api_ElementCollectionTest extends PHPUnit_Framework_TestCase +class Bridge_Api_ElementCollectionTest extends \PhraseanetTestCase { public function testAdd_element() diff --git a/tests/classes/Bridge/Api/Dailymotion/Bridge_Api_Dailymotion_ContainerTest.php b/tests/classes/Bridge/Api/Dailymotion/Bridge_Api_Dailymotion_ContainerTest.php index f6c449be96..4c5b403331 100644 --- a/tests/classes/Bridge/Api/Dailymotion/Bridge_Api_Dailymotion_ContainerTest.php +++ b/tests/classes/Bridge/Api/Dailymotion/Bridge_Api_Dailymotion_ContainerTest.php @@ -2,14 +2,14 @@ require_once __DIR__ . '/../../Bridge_datas.inc'; -class Bridge_Api_Dailymotion_ContainerTest extends PHPUnit_Framework_TestCase +class Bridge_Api_Dailymotion_ContainerTest extends \PhraseanetTestCase { /** * @var Bridge_Api_Dailymotion_Container */ protected $object; - protected function setUp() + public function setUp() { $this->test = [ 'id' => '01234567' diff --git a/tests/classes/Bridge/Api/Dailymotion/Bridge_Api_Dailymotion_ElementTest.php b/tests/classes/Bridge/Api/Dailymotion/Bridge_Api_Dailymotion_ElementTest.php index a1d3968810..c154c5ce31 100644 --- a/tests/classes/Bridge/Api/Dailymotion/Bridge_Api_Dailymotion_ElementTest.php +++ b/tests/classes/Bridge/Api/Dailymotion/Bridge_Api_Dailymotion_ElementTest.php @@ -2,7 +2,7 @@ require_once __DIR__ . '/../../Bridge_datas.inc'; -class Bridge_Api_Dailymotion_ElementTest extends PHPUnit_Framework_TestCase +class Bridge_Api_Dailymotion_ElementTest extends \PhraseanetTestCase { /** * @var Bridge_Api_Dailymotion_Element diff --git a/tests/classes/Bridge/Api/Flickr/Bridge_Api_Flickr_ContainerTest.php b/tests/classes/Bridge/Api/Flickr/Bridge_Api_Flickr_ContainerTest.php index e9e31aba5b..1a69458599 100644 --- a/tests/classes/Bridge/Api/Flickr/Bridge_Api_Flickr_ContainerTest.php +++ b/tests/classes/Bridge/Api/Flickr/Bridge_Api_Flickr_ContainerTest.php @@ -2,7 +2,7 @@ require_once __DIR__ . '/../../Bridge_datas.inc'; -class Bridge_Api_Flickr_ContainerTest extends PHPUnit_Framework_TestCase +class Bridge_Api_Flickr_ContainerTest extends \PhraseanetTestCase { /** * @var Bridge_Api_Flickr_Container diff --git a/tests/classes/Bridge/Api/Flickr/Bridge_Api_Flickr_ElementTest.php b/tests/classes/Bridge/Api/Flickr/Bridge_Api_Flickr_ElementTest.php index 6208d74f01..c7baaa33bc 100644 --- a/tests/classes/Bridge/Api/Flickr/Bridge_Api_Flickr_ElementTest.php +++ b/tests/classes/Bridge/Api/Flickr/Bridge_Api_Flickr_ElementTest.php @@ -2,7 +2,7 @@ require_once __DIR__ . '/../../Bridge_datas.inc'; -class Bridge_Api_Flickr_ElementTest extends PHPUnit_Framework_TestCase +class Bridge_Api_Flickr_ElementTest extends \PhraseanetTestCase { /** * @var Bridge_Api_Flickr_Element diff --git a/tests/classes/Bridge/Api/Youtube/Bridge_Api_Youtube_ContainerTest.php b/tests/classes/Bridge/Api/Youtube/Bridge_Api_Youtube_ContainerTest.php index fa4c276727..e427da8b49 100644 --- a/tests/classes/Bridge/Api/Youtube/Bridge_Api_Youtube_ContainerTest.php +++ b/tests/classes/Bridge/Api/Youtube/Bridge_Api_Youtube_ContainerTest.php @@ -2,7 +2,7 @@ require_once __DIR__ . '/../../Bridge_datas.inc'; -class Bridge_Api_Youtube_ContainerTest extends PHPUnit_Framework_TestCase +class Bridge_Api_Youtube_ContainerTest extends \PhraseanetTestCase { /** * @var Bridge_Api_Youtube_Container diff --git a/tests/classes/Bridge/Api/Youtube/Bridge_Api_Youtube_ElementTest.php b/tests/classes/Bridge/Api/Youtube/Bridge_Api_Youtube_ElementTest.php index c3d0021e87..c1499c0979 100644 --- a/tests/classes/Bridge/Api/Youtube/Bridge_Api_Youtube_ElementTest.php +++ b/tests/classes/Bridge/Api/Youtube/Bridge_Api_Youtube_ElementTest.php @@ -2,7 +2,7 @@ require_once __DIR__ . '/../../Bridge_datas.inc'; -class Bridge_Api_Youtube_ElementTest extends PHPUnit_Framework_TestCase +class Bridge_Api_Youtube_ElementTest extends \PhraseanetTestCase { /** * @var Bridge_Api_Youtube_Element diff --git a/tests/classes/Bridge/Bridge_AccountSettingsTest.php b/tests/classes/Bridge/Bridge_AccountSettingsTest.php index ec7bf10b28..9415bd8461 100644 --- a/tests/classes/Bridge/Bridge_AccountSettingsTest.php +++ b/tests/classes/Bridge/Bridge_AccountSettingsTest.php @@ -2,7 +2,7 @@ require_once __DIR__ . '/Bridge_datas.inc'; -class Bridge_AccountSettingsTest extends PhraseanetPHPUnitAuthenticatedAbstract +class Bridge_AccountSettingsTest extends \PhraseanetAuthenticatedTestCase { /** * @var Bridge_AccountSettings diff --git a/tests/classes/Bridge/Bridge_AccountTest.php b/tests/classes/Bridge/Bridge_AccountTest.php index 51d60fbad0..58c795b7dd 100644 --- a/tests/classes/Bridge/Bridge_AccountTest.php +++ b/tests/classes/Bridge/Bridge_AccountTest.php @@ -4,16 +4,16 @@ use Alchemy\Phrasea\Application; require_once __DIR__ . '/Bridge_datas.inc'; -class Bridge_AccountTest extends PhraseanetPHPUnitAuthenticatedAbstract +class Bridge_AccountTest extends \PhraseanetAuthenticatedTestCase { /** * @var Bridge_Account */ - protected static $object; - protected static $api; - protected static $dist_id; - protected static $named; - protected static $id; + private static $object; + private static $api; + private static $dist_id; + private static $named; + private static $id; public static function setUpBeforeClass() { diff --git a/tests/classes/Bridge/Bridge_ApiTest.php b/tests/classes/Bridge/Bridge_ApiTest.php index ba9a0e33ef..041d47bc2a 100644 --- a/tests/classes/Bridge/Bridge_ApiTest.php +++ b/tests/classes/Bridge/Bridge_ApiTest.php @@ -2,7 +2,7 @@ require_once __DIR__ . '/Bridge_datas.inc'; -class Bridge_ApiTest extends PhraseanetPHPUnitAuthenticatedAbstract +class Bridge_ApiTest extends \PhraseanetAuthenticatedTestCase { /** * @var Bridge_Api diff --git a/tests/classes/Bridge/Bridge_ElementTest.php b/tests/classes/Bridge/Bridge_ElementTest.php index 612788a303..c9fcd2e9cf 100644 --- a/tests/classes/Bridge/Bridge_ElementTest.php +++ b/tests/classes/Bridge/Bridge_ElementTest.php @@ -2,7 +2,7 @@ require_once __DIR__ . '/Bridge_datas.inc'; -class Bridge_ElementTest extends PhraseanetPHPUnitAuthenticatedAbstract +class Bridge_ElementTest extends \PhraseanetAuthenticatedTestCase { /** * @var Bridge_Element diff --git a/tests/classes/Doctrine/Entities/BasketTest.php b/tests/classes/Doctrine/Entities/BasketTest.php index d6fcc851eb..c736aa171b 100644 --- a/tests/classes/Doctrine/Entities/BasketTest.php +++ b/tests/classes/Doctrine/Entities/BasketTest.php @@ -1,6 +1,6 @@ addMocks($app); return $app; @@ -203,7 +205,7 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase })); $app['browser'] = $app->share($app->extend('browser', function ($browser) { - $browser->setUserAgent(PhraseanetPHPUnitAbstract::USER_AGENT_FIREFOX8MAC); + $browser->setUserAgent(PhraseanetTestCase::USER_AGENT_FIREFOX8MAC); return $browser; })); @@ -1050,7 +1052,7 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase foreach (range(1, 24) as $i) { self::$DI['record_' . $i] = self::$DI->share(function ($DI) use ($logger, $resolvePathfile, $i) { - PhraseanetPHPUnitAbstract::$recordsInitialized[] = $i; + \PhraseanetTestCase::$recordsInitialized[] = $i; $file = new File($DI['app'], $DI['app']['mediavorus']->guess($resolvePathfile($i)->getPathname()), $DI['collection']); @@ -1065,7 +1067,7 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase foreach (range(1, 2) as $i) { self::$DI['record_story_' . $i] = self::$DI->share(function ($DI) use ($i) { - PhraseanetPHPUnitAbstract::$recordsInitialized[] = 'story_' . $i; + \PhraseanetTestCase::$recordsInitialized[] = 'story_' . $i; return record_adapter::createStory($DI['app'], $DI['collection']); }); @@ -1073,7 +1075,7 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase self::$DI['record_no_access'] = self::$DI->share(function ($DI) { - PhraseanetPHPUnitAbstract::$recordsInitialized[] = 'no_access'; + \PhraseanetTestCase::$recordsInitialized[] = 'no_access'; $file = new File($DI['app'], $DI['app']['mediavorus']->guess(__DIR__ . '/../files/cestlafete.jpg'), $DI['collection_no_access']); @@ -1082,7 +1084,7 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase self::$DI['record_no_access_by_status'] = self::$DI->share(function ($DI) { - PhraseanetPHPUnitAbstract::$recordsInitialized[] = 'no_access_by_status'; + \PhraseanetTestCase::$recordsInitialized[] = 'no_access_by_status'; $file = new File($DI['app'], $DI['app']['mediavorus']->guess(__DIR__ . '/../files/cestlafete.jpg'), $DI['collection_no_access']); @@ -1091,7 +1093,7 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase self::$DI['user'] = self::$DI->share( self::$DI->extend('user', function ($user, $DI) use ($app) { - PhraseanetPHPUnitAbstract::giveRightsToUser($app, $user); + \PhraseanetTestCase::giveRightsToUser($app, $user); $app['acl']->get($user)->set_admin(true); return $user; @@ -1100,7 +1102,7 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase self::$DI['user_notAdmin'] = self::$DI->share( self::$DI->extend('user_notAdmin', function ($user, $DI) use ($app) { - PhraseanetPHPUnitAbstract::giveRightsToUser($app, $user); + \PhraseanetTestCase::giveRightsToUser($app, $user); $app['acl']->get($user)->set_admin(false); return $user; diff --git a/tests/classes/PhraseanetWebTestCaseAbstract.php b/tests/classes/PhraseanetWebTestCaseAbstract.php index 08416916cf..05b0cc77e4 100644 --- a/tests/classes/PhraseanetWebTestCaseAbstract.php +++ b/tests/classes/PhraseanetWebTestCaseAbstract.php @@ -1,6 +1,6 @@ filter('.field-error')->count(); $total += $crawler->filter('.alert')->count(); @@ -178,7 +178,7 @@ abstract class PhraseanetWebTestCaseAuthenticatedAbstract extends PhraseanetPHPU $this->assertEquals($quantity, $total); } - protected function assertFormError(Crawler $crawler, $quantity) + private function assertFormError(Crawler $crawler, $quantity) { $this->assertEquals($quantity, $crawler->filter('.field-error')->count()); } diff --git a/tests/classes/Session/Session_LoggerTest.php b/tests/classes/Session/Session_LoggerTest.php index 5a43a983bb..e562879f15 100644 --- a/tests/classes/Session/Session_LoggerTest.php +++ b/tests/classes/Session/Session_LoggerTest.php @@ -1,6 +1,6 @@ check_percentage(0, 16, 0); } - protected function check_percentage($percent, $total, $complete) + private function check_percentage($percent, $total, $complete) { $datas = $this->object->get_status(); $this->assertArrayHasKey('completed_steps', $datas); diff --git a/tests/classes/api/oauthv2/API_OAuth2_AuthCodeTest.php b/tests/classes/api/oauthv2/API_OAuth2_AuthCodeTest.php index 160af87772..6130e5a7b8 100644 --- a/tests/classes/api/oauthv2/API_OAuth2_AuthCodeTest.php +++ b/tests/classes/api/oauthv2/API_OAuth2_AuthCodeTest.php @@ -1,6 +1,6 @@ assertInstanceOf('DateTime', $this->object->get_last_modified()); } - protected function assertmd5($md5) + private function assertmd5($md5) { $this->assertTrue((count(preg_match('/[a-z0-9]{32}/', $md5)) === 1)); } diff --git a/tests/classes/api/oauthv2/api_oauthv2_TokenTest.php b/tests/classes/api/oauthv2/api_oauthv2_TokenTest.php index 52cfc49f7e..01d60773a6 100644 --- a/tests/classes/api/oauthv2/api_oauthv2_TokenTest.php +++ b/tests/classes/api/oauthv2/api_oauthv2_TokenTest.php @@ -1,6 +1,6 @@ assertTrue((count(preg_match('/[a-z0-9]{32}/', $md5)) === 1)); } diff --git a/tests/classes/api/v1/api_v1_TimerTest.php b/tests/classes/api/v1/api_v1_TimerTest.php index 86191a5584..8f9915be41 100644 --- a/tests/classes/api/v1/api_v1_TimerTest.php +++ b/tests/classes/api/v1/api_v1_TimerTest.php @@ -4,13 +4,13 @@ use Alchemy\Phrasea\Core\PhraseaEvents; use Silex\Application; use Symfony\Component\EventDispatcher\Event; -class API_V1_TimerTest extends PhraseanetPHPUnitAbstract +class API_V1_TimerTest extends \PhraseanetTestCase { public function testRegister() { $start = microtime(true); - $app = new Application(); + $app = $this->loadApp(); $dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); $dispatcher->expects($this->exactly(9)) ->method('addListener'); @@ -23,7 +23,7 @@ class API_V1_TimerTest extends PhraseanetPHPUnitAbstract public function testTriggerEvent() { - $app = new Application(); + $app = $this->loadApp(); $app->register(new API_V1_Timer()); $app['dispatcher']->dispatch(PhraseaEvents::API_RESULT, new Event()); diff --git a/tests/classes/api/v1/api_v1_adapterTest.php b/tests/classes/api/v1/api_v1_adapterTest.php index fc14583fc8..7511d41425 100644 --- a/tests/classes/api/v1/api_v1_adapterTest.php +++ b/tests/classes/api/v1/api_v1_adapterTest.php @@ -3,7 +3,7 @@ use Alchemy\Phrasea\Border\File as BorderFile; use Symfony\Component\HttpFoundation\Request; -class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract +class API_V1_adapterTest extends \PhraseanetAuthenticatedTestCase { /** * @var API_V1_adapter @@ -681,7 +681,7 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract } } - protected function checkResponseField(API_V1_result $result, $field, $type) + private function checkResponseField(API_V1_result $result, $field, $type) { $response = json_decode($result->format(), true); $this->assertArrayHasKey($field, $response['response']); diff --git a/tests/classes/api/v1/api_v1_resultTest.php b/tests/classes/api/v1/api_v1_resultTest.php index d34a5be5d6..42823c6522 100644 --- a/tests/classes/api/v1/api_v1_resultTest.php +++ b/tests/classes/api/v1/api_v1_resultTest.php @@ -4,7 +4,7 @@ require_once __DIR__ . '/../../../../vendor/alchemy/oauth2php/lib/OAuth2.php'; use Symfony\Component\HttpFoundation\Request; -class API_V1_resultTest extends PhraseanetPHPUnitAuthenticatedAbstract +class API_V1_resultTest extends \PhraseanetAuthenticatedTestCase { /** * @var API_V1_result @@ -22,7 +22,7 @@ class API_V1_resultTest extends PhraseanetPHPUnitAuthenticatedAbstract $this->api->expects($this->any())->method("get_version")->will($this->returnValue("my_super_version1.0")); } - protected function assertIsTimer($timer) + private function assertIsTimer($timer) { $this->assertObjectHasAttribute('name', $timer); $this->assertObjectHasAttribute('memory', $timer); @@ -225,14 +225,14 @@ class API_V1_resultTest extends PhraseanetPHPUnitAuthenticatedAbstract $this->assertEquals($data, $api_result->get_datas()); } - protected function checkResponseFieldMeta(stdClass $response, $field, $expected_value, $type) + private function checkResponseFieldMeta(stdClass $response, $field, $expected_value, $type) { $this->assertObjectHasAttribute($field, $response->meta); $this->assertInternalType($type, $response->meta->$field); $this->assertEquals($expected_value, $response->meta->$field); } - protected function checkResponseFieldResponse(stdClass $response, $field, $expected_value, $type) + private function checkResponseFieldResponse(stdClass $response, $field, $expected_value, $type) { $this->assertObjectHasAttribute($field, $response->response); $this->assertInternalType($type, $response->response->$field); @@ -301,7 +301,7 @@ class API_V1_resultTest extends PhraseanetPHPUnitAuthenticatedAbstract $this->assertErrorMessage($api_result, 200, OAUTH2_ERROR_INVALID_REQUEST, NULL, 'detaillage'); } - protected function assertErrorMessage(API_V1_result $api_result, $code, $type, $message, $detail) + private function assertErrorMessage(API_V1_result $api_result, $code, $type, $message, $detail) { $response = json_decode($api_result->format()); $this->checkResponseFieldMeta($response, 'http_code', $code, PHPUnit_Framework_Constraint_IsType::TYPE_INT); diff --git a/tests/classes/caption/caption_fieldTest.php b/tests/classes/caption/caption_fieldTest.php index a476767142..aecee4cb7b 100644 --- a/tests/classes/caption/caption_fieldTest.php +++ b/tests/classes/caption/caption_fieldTest.php @@ -1,6 +1,6 @@ get_databox(); - static::$subdef = self::$DI['record_1']->get_subdef('document'); - static::$object = media_Permalink_Adapter::getPermalink(self::$DI['app'], $databox, static::$subdef); + self::$subdef = self::$DI['record_1']->get_subdef('document'); + self::$object = media_Permalink_Adapter::getPermalink(self::$DI['app'], $databox, self::$subdef); } public function testGet_label() { - $this->assertInternalType('string', static::$object->get_label()); - $this->assertEquals('test001', static::$object->get_label()); + $this->assertInternalType('string', self::$object->get_label()); + $this->assertEquals('test001', self::$object->get_label()); } public function testGetPermalink() { - $this->assertTrue((static::$object instanceof media_Permalink_Adapter)); + $this->assertTrue((self::$object instanceof media_Permalink_Adapter)); } public function testSet_is_activated() { - static::$object->set_is_activated(true); - $this->assertTrue(static::$object->get_is_activated()); - static::$object->set_is_activated(false); - $this->assertFalse(static::$object->get_is_activated()); - static::$object->set_is_activated(true); - $this->assertTrue(static::$object->get_is_activated()); + self::$object->set_is_activated(true); + $this->assertTrue(self::$object->get_is_activated()); + self::$object->set_is_activated(false); + $this->assertFalse(self::$object->get_is_activated()); + self::$object->set_is_activated(true); + $this->assertTrue(self::$object->get_is_activated()); } public function testSet_label() { - static::$object->set_label('coucou les chicos'); - $this->assertEquals('coucou-les-chicos', static::$object->get_label()); - static::$object->set_label(''); - $this->assertEquals('untitled', static::$object->get_label()); - static::$object->set_label('JE ANp ra&é"\/,;:!§/.?%µ*ù$]@^\[{#~234567890°+\'(-è_çà'); - $this->assertEquals('JE-ANp-raeu234567890-e_ca', static::$object->get_label()); + self::$object->set_label('coucou les chicos'); + $this->assertEquals('coucou-les-chicos', self::$object->get_label()); + self::$object->set_label(''); + $this->assertEquals('untitled', self::$object->get_label()); + self::$object->set_label('JE ANp ra&é"\/,;:!§/.?%µ*ù$]@^\[{#~234567890°+\'(-è_çà'); + $this->assertEquals('JE-ANp-raeu234567890-e_ca', self::$object->get_label()); } public function testGet_url() @@ -52,11 +52,11 @@ class media_Permalink_AdapterTest extends PhraseanetPHPUnitAbstract $url = rtrim(self::$DI['app']['phraseanet.registry']->get('GV_ServerName'), '/') . '/permalink/v1/' . self::$DI['record_1']->get_sbas_id() . '/' . self::$DI['record_1']->get_record_id() - . '/document/' . static::$object->get_label() + . '/document/' . self::$object->get_label() . '.' . pathinfo(self::$DI['record_1']->get_subdef('document')->get_file(), PATHINFO_EXTENSION) - . '?token=' . static::$object->get_token(); + . '?token=' . self::$object->get_token(); - $this->assertEquals($url, static::$object->get_url()); + $this->assertEquals($url, self::$object->get_url()); } public function testGet_Previewurl() @@ -81,38 +81,38 @@ class media_Permalink_AdapterTest extends PhraseanetPHPUnitAbstract . self::$DI['record_1']->get_sbas_id() . '/' . self::$DI['record_1']->get_record_id() . '/document/' - . '?token=' . static::$object->get_token(); + . '?token=' . self::$object->get_token(); - $this->assertEquals($url, static::$object->get_page()); + $this->assertEquals($url, self::$object->get_page()); } public function testGet_id() { - $this->assertInternalType('integer', static::$object->get_id()); + $this->assertInternalType('integer', self::$object->get_id()); } public function testGet_token() { - $this->assertInternalType('string', static::$object->get_token()); + $this->assertInternalType('string', self::$object->get_token()); } public function testGet_is_activated() { - $this->assertInternalType('boolean', static::$object->get_is_activated()); + $this->assertInternalType('boolean', self::$object->get_is_activated()); } public function testGet_created_on() { - $this->assertInstanceOf('DateTime', static::$object->get_created_on()); + $this->assertInstanceOf('DateTime', self::$object->get_created_on()); } public function testGet_last_modified() { - $this->assertInstanceOf('DateTime', static::$object->get_last_modified()); + $this->assertInstanceOf('DateTime', self::$object->get_last_modified()); } /** - * @expectedException Alchemy\Phrasea\Exception\RuntimeException + * @expectedException \Alchemy\Phrasea\Exception\RuntimeException */ public function testCreateAPermalinkAlreadyCreated() { diff --git a/tests/classes/media/media_subdefTest.php b/tests/classes/media/media_subdefTest.php index 820da2709e..9ede448872 100644 --- a/tests/classes/media/media_subdefTest.php +++ b/tests/classes/media/media_subdefTest.php @@ -2,26 +2,26 @@ use Alchemy\Phrasea\Border\File; -class media_subdefTest extends \PhraseanetPHPUnitAbstract +class media_subdefTest extends \PhraseanetTestCase { /** * @var \media_subdef */ - protected static $objectPresent; + private static $objectPresent; /** * @var \media_subdef */ - protected static $storyPresent; + private static $storyPresent; /** * @var \media_subdef */ - protected static $objectNotPresent; + private static $objectNotPresent; /** * @var \record_adapter */ - protected static $recordonbleu; + private static $recordonbleu; /** * @covers media_subdef::__construct diff --git a/tests/classes/module/console/module_console_aboutAuthorsTest.php b/tests/classes/module/console/module_console_aboutAuthorsTest.php index 2838b72ac5..1796c658a9 100644 --- a/tests/classes/module/console/module_console_aboutAuthorsTest.php +++ b/tests/classes/module/console/module_console_aboutAuthorsTest.php @@ -3,7 +3,7 @@ use Alchemy\Phrasea\CLI; use Symfony\Component\Console\Tester\CommandTester; -class module_console_aboutAuthorsTest extends PHPUnit_Framework_TestCase +class module_console_aboutAuthorsTest extends \PhraseanetTestCase { /** * @var module_console_aboutAuthors diff --git a/tests/classes/module/console/module_console_aboutLicenseTest.php b/tests/classes/module/console/module_console_aboutLicenseTest.php index 1cc643138c..0b03298522 100644 --- a/tests/classes/module/console/module_console_aboutLicenseTest.php +++ b/tests/classes/module/console/module_console_aboutLicenseTest.php @@ -3,7 +3,7 @@ use Alchemy\Phrasea\CLI; use Symfony\Component\Console\Tester\CommandTester; -class module_console_aboutLicenseTest extends PHPUnit_Framework_TestCase +class module_console_aboutLicenseTest extends \PhraseanetTestCase { /** * @var module_console_aboutLicense diff --git a/tests/classes/module/console/module_console_systemTemplateGeneratorTest.php b/tests/classes/module/console/module_console_systemTemplateGeneratorTest.php index fa547790ad..9bde1df61f 100644 --- a/tests/classes/module/console/module_console_systemTemplateGeneratorTest.php +++ b/tests/classes/module/console/module_console_systemTemplateGeneratorTest.php @@ -3,7 +3,7 @@ use Alchemy\Phrasea\CLI; use Symfony\Component\Console\Tester\CommandTester; -class module_console_systemTemplateGeneratorTest extends PHPUnit_Framework_TestCase +class module_console_systemTemplateGeneratorTest extends \PhraseanetTestCase { public function testExecute() diff --git a/tests/classes/p4stringTest.php b/tests/classes/p4stringTest.php index c28dd2c326..f7f531d02d 100644 --- a/tests/classes/p4stringTest.php +++ b/tests/classes/p4stringTest.php @@ -1,6 +1,6 @@ get_databox()->get_meta_structure() as $databox_field) { /* @var $databox_field \databox_field */ $databox_field->set_thumbtitle(false)->save(); } - self::$updated = true; + self::$thumbtitled = true; } } @@ -87,11 +88,6 @@ class record_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract ); } - protected function assertDateAtom($date) - { - return $this->assertRegExp('/\d{4}[-]\d{2}[-]\d{2}[T]\d{2}[:]\d{2}[:]\d{2}[+]\d{2}[:]\d{2}/', $date); - } - public function testGet_uuid() { $this->assertTrue(uuid::is_valid(self::$DI['record_1']->get_uuid())); diff --git a/tests/classes/recordutils/imageTest.php b/tests/classes/recordutils/imageTest.php index dd40755260..5a9b58ae58 100644 --- a/tests/classes/recordutils/imageTest.php +++ b/tests/classes/recordutils/imageTest.php @@ -5,7 +5,7 @@ use Symfony\Component\HttpFoundation\File\File as SymfoFile; /** * @covers recordutils_image */ -class recordutils_imageTest extends PhraseanetPHPUnitAbstract +class recordutils_imageTest extends \PhraseanetTestCase { public function testWatermarkWithoutFile() { diff --git a/tests/classes/registryTest.php b/tests/classes/registryTest.php index 47aff67a4e..c48c9741e1 100644 --- a/tests/classes/registryTest.php +++ b/tests/classes/registryTest.php @@ -1,6 +1,6 @@