diff --git a/test/unitTests/app/attachment/AttachmentControllerTest.php b/test/unitTests/app/attachment/AttachmentControllerTest.php index 83d70a432b3a59d5e1003dcd711d959e35e65221..310469a8a0c9af997a8b87698428f46e9292e827 100755 --- a/test/unitTests/app/attachment/AttachmentControllerTest.php +++ b/test/unitTests/app/attachment/AttachmentControllerTest.php @@ -317,12 +317,12 @@ class AttachmentControllerTest extends TestCase public function testGetAttachmentTypes() { - $attachmentController = new \Attachment\controllers\AttachmentController(); + $attachmentController = new \Attachment\controllers\AttachmentTypeController(); $environment = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'GET']); $request = \Slim\Http\Request::createFromEnvironment($environment); - $response = $attachmentController->getAttachmentsTypes($request, new \Slim\Http\Response()); + $response = $attachmentController->get($request, new \Slim\Http\Response()); $response = json_decode((string)$response->getBody(), true); $this->assertNotNull($response['attachmentsTypes']); @@ -330,10 +330,10 @@ class AttachmentControllerTest extends TestCase foreach ($response['attachmentsTypes'] as $value) { $this->assertNotNull($value['label']); - $this->assertIsBool($value['sign']); + $this->assertIsBool($value['signable']); $this->assertIsBool($value['chrono']); - $this->assertIsBool($value['attachInMail']); - $this->assertIsBool($value['show']); + $this->assertIsBool($value['emailLink']); + $this->assertIsBool($value['visible']); } } diff --git a/test/unitTests/app/status/StatusControllerTest.php b/test/unitTests/app/status/StatusControllerTest.php index 61b8fd00cd64f5b4eb3a2fd840f3a7cbc8f6d1eb..5cb7a0cf28059653e9ab479f840ce1a317565482 100755 --- a/test/unitTests/app/status/StatusControllerTest.php +++ b/test/unitTests/app/status/StatusControllerTest.php @@ -193,7 +193,7 @@ class StatusControllerTest extends TestCase $response = $status->delete($request, new \Slim\Http\Response(), ['identifier'=> self::$id]); - $this->assertRegexp('/statuses/', (string)$response->getBody()); + $this->assertMatchesRegularExpression('/statuses/', (string)$response->getBody()); } public function testGetNewInformations() diff --git a/test/unitTests/app/versionUpdate/VersionUpdateControllerTest.php b/test/unitTests/app/versionUpdate/VersionUpdateControllerTest.php index a0c8f82f0f1c87006bcf7ecb71c69977cef92cbb..bd692f56a1a06e1f9b252270dbb01d10171f5a6f 100755 --- a/test/unitTests/app/versionUpdate/VersionUpdateControllerTest.php +++ b/test/unitTests/app/versionUpdate/VersionUpdateControllerTest.php @@ -23,16 +23,16 @@ class VersionUpdateControllerTest extends TestCase $this->assertIsString($responseBody->currentVersion); $this->assertNotNull($responseBody->currentVersion); - $this->assertRegExp('/^\d{2}\.\d{2}\.\d+$/', $responseBody->currentVersion, 'Invalid current version'); + $this->assertMatchesRegularExpression('/^\d{2}\.\d{2}\.\d+$/', $responseBody->currentVersion, 'Invalid current version'); if ($responseBody->lastAvailableMinorVersion != null) { $this->assertIsString($responseBody->lastAvailableMinorVersion); - $this->assertRegExp('/^\d{2}\.\d{2}\.\d+$/', $responseBody->lastAvailableMinorVersion, 'Invalid available minor version'); + $this->assertMatchesRegularExpression('/^\d{2}\.\d{2}\.\d+$/', $responseBody->lastAvailableMinorVersion, 'Invalid available minor version'); } if ($responseBody->lastAvailableMajorVersion != null) { $this->assertIsString($responseBody->lastAvailableMajorVersion); - $this->assertRegExp('/^\d{2}\.\d{2}\.\d+$/', $responseBody->lastAvailableMajorVersion, 'Invalid available major version'); + $this->assertMatchesRegularExpression('/^\d{2}\.\d{2}\.\d+$/', $responseBody->lastAvailableMajorVersion, 'Invalid available major version'); } } } diff --git a/test/unitTests/core/CoreControllerTest.php b/test/unitTests/core/CoreControllerTest.php index ccd0192dfe722ae93073c3b7c0930023133b9e9e..63f0470295c70dfe69124826be90dc41577f4882 100755 --- a/test/unitTests/core/CoreControllerTest.php +++ b/test/unitTests/core/CoreControllerTest.php @@ -71,7 +71,7 @@ class CoreControllerTest extends TestCase $this->assertStringNotEqualsFile("src/core/lang/lang-{$language}.php", ''); include("src/core/lang/lang-{$language}.php"); - $this->assertFileNotExists("src/core/lang/lang-zh.php"); + $this->assertFileDoesNotExist("src/core/lang/lang-zh.php"); } public function testGetExternalConnectionsEnabled()