From 26c80dc1c5a9b30e6fe6735b58ec0acd8faa978d Mon Sep 17 00:00:00 2001 From: Deon George Date: Wed, 13 Dec 2023 13:29:16 +1100 Subject: [PATCH] Move TIC testing into a file subfolder, so our test folder can have other types of resources --- .gitlab-test.yml | 2 +- .../{ => file}/000E-1700545740-bad_size.tic | 0 .../test/{ => file}/000E-1700545740-file.tic | 0 .../{ => file}/000E-1700545740-invalid_crc.tic | 0 .../{ => file}/000E-1700545740-no_area.tic | 0 .../{ => file}/000E-1700545740-no_file.tic | 0 .../{ => file}/000E-1700545740-not_to_me.tic | 0 .../000E-1700545740-wrong_password.tic | 0 tests/Feature/TicProcessingTest.php | 18 +++++++++--------- 9 files changed, 10 insertions(+), 10 deletions(-) rename storage/app/test/{ => file}/000E-1700545740-bad_size.tic (100%) rename storage/app/test/{ => file}/000E-1700545740-file.tic (100%) rename storage/app/test/{ => file}/000E-1700545740-invalid_crc.tic (100%) rename storage/app/test/{ => file}/000E-1700545740-no_area.tic (100%) rename storage/app/test/{ => file}/000E-1700545740-no_file.tic (100%) rename storage/app/test/{ => file}/000E-1700545740-not_to_me.tic (100%) rename storage/app/test/{ => file}/000E-1700545740-wrong_password.tic (100%) diff --git a/.gitlab-test.yml b/.gitlab-test.yml index c104252..e49be76 100644 --- a/.gitlab-test.yml +++ b/.gitlab-test.yml @@ -34,7 +34,7 @@ x86_64:test: script: # run laravel tests - - touch storage/app/test/* + - touch storage/app/test/*ZIP storage/app/test/file/* - XDEBUG_MODE=coverage php vendor/bin/phpunit --coverage-text --colors=never coverage: '/^\s*Lines:\s*\d+.\d+\%/' diff --git a/storage/app/test/000E-1700545740-bad_size.tic b/storage/app/test/file/000E-1700545740-bad_size.tic similarity index 100% rename from storage/app/test/000E-1700545740-bad_size.tic rename to storage/app/test/file/000E-1700545740-bad_size.tic diff --git a/storage/app/test/000E-1700545740-file.tic b/storage/app/test/file/000E-1700545740-file.tic similarity index 100% rename from storage/app/test/000E-1700545740-file.tic rename to storage/app/test/file/000E-1700545740-file.tic diff --git a/storage/app/test/000E-1700545740-invalid_crc.tic b/storage/app/test/file/000E-1700545740-invalid_crc.tic similarity index 100% rename from storage/app/test/000E-1700545740-invalid_crc.tic rename to storage/app/test/file/000E-1700545740-invalid_crc.tic diff --git a/storage/app/test/000E-1700545740-no_area.tic b/storage/app/test/file/000E-1700545740-no_area.tic similarity index 100% rename from storage/app/test/000E-1700545740-no_area.tic rename to storage/app/test/file/000E-1700545740-no_area.tic diff --git a/storage/app/test/000E-1700545740-no_file.tic b/storage/app/test/file/000E-1700545740-no_file.tic similarity index 100% rename from storage/app/test/000E-1700545740-no_file.tic rename to storage/app/test/file/000E-1700545740-no_file.tic diff --git a/storage/app/test/000E-1700545740-not_to_me.tic b/storage/app/test/file/000E-1700545740-not_to_me.tic similarity index 100% rename from storage/app/test/000E-1700545740-not_to_me.tic rename to storage/app/test/file/000E-1700545740-not_to_me.tic diff --git a/storage/app/test/000E-1700545740-wrong_password.tic b/storage/app/test/file/000E-1700545740-wrong_password.tic similarity index 100% rename from storage/app/test/000E-1700545740-wrong_password.tic rename to storage/app/test/file/000E-1700545740-wrong_password.tic diff --git a/tests/Feature/TicProcessingTest.php b/tests/Feature/TicProcessingTest.php index a32f0ec..c3c5e11 100644 --- a/tests/Feature/TicProcessingTest.php +++ b/tests/Feature/TicProcessingTest.php @@ -40,7 +40,7 @@ class TicProcessingTest extends TestCase $this->expectException(FileNotFoundException::class); $tic = new Tic; - $tic->load('000E-1700545740-no_file.tic'); + $tic->load('file/000E-1700545740-no_file.tic'); } public function test_tic_invalidcrc(): void @@ -48,7 +48,7 @@ class TicProcessingTest extends TestCase $this->expectException(InvalidCRCException::class); $tic = new Tic; - $tic->load('000E-1700545740-invalid_crc.tic'); + $tic->load('file/000E-1700545740-invalid_crc.tic'); } public function test_tic_nofilearea(): void @@ -56,7 +56,7 @@ class TicProcessingTest extends TestCase $this->expectException(NoFileAreaException::class); $tic = new Tic; - $tic->load('000E-1700545740-no_area.tic'); + $tic->load('file/000E-1700545740-no_area.tic'); } public function test_tic_bad_size(): void @@ -64,7 +64,7 @@ class TicProcessingTest extends TestCase $this->expectException(SizeMismatchException::class); $tic = new Tic; - $tic->load('000E-1700545740-bad_size.tic'); + $tic->load('file/000E-1700545740-bad_size.tic'); } public function test_tic_not_to_me(): void @@ -72,7 +72,7 @@ class TicProcessingTest extends TestCase $this->expectException(NotToMeException::class); $tic = new Tic; - $tic->load('000E-1700545740-not_to_me.tic'); + $tic->load('file/000E-1700545740-not_to_me.tic'); } public function test_tic_wrong_password(): void @@ -84,7 +84,7 @@ class TicProcessingTest extends TestCase $this->expectException(InvalidPasswordException::class); $tic = new Tic; - $tic->load('000E-1700545740-wrong_password.tic'); + $tic->load('file/000E-1700545740-wrong_password.tic'); } public function test_tic_node_not_subscribed(): void @@ -96,7 +96,7 @@ class TicProcessingTest extends TestCase $this->expectException(NodeNotSubscribedException::class); $tic = new Tic; - $tic->load('000E-1700545740-file.tic'); + $tic->load('file/000E-1700545740-file.tic'); } public function test_tic_node_no_write(): void @@ -109,7 +109,7 @@ class TicProcessingTest extends TestCase $this->expectException(NoWriteSecurityException::class); $tic = new Tic; - $tic->load('000E-1700545740-file.tic'); + $tic->load('file/000E-1700545740-file.tic'); } public function test_tic_good(): void @@ -122,7 +122,7 @@ class TicProcessingTest extends TestCase $ao->update(['security'=>1]); $tic = new Tic; - $file = $tic->load('000E-1700545740-file.tic'); + $file = $tic->load('file/000E-1700545740-file.tic'); $tic->save();