From 1fc01d36580a17000bf0d53324e403b783eee490 Mon Sep 17 00:00:00 2001 From: Mike Bennett Date: Tue, 20 Sep 2022 20:39:53 +0100 Subject: [PATCH] Restructure repo to move tests out of src/ --- README.md | 2 +- composer.json | 5 +++++ phpunit.xml | 2 +- {src/Test => test}/LocalSeekerTest.php | 2 +- {src/Test => test}/ZipRangeReaderTest.php | 2 +- {src/Test => test}/fixtures/invalid-cdr.zip | Bin {src/Test => test}/fixtures/invalid-eocd.zip | Bin {src/Test => test}/fixtures/invalid-file.zip | 0 .../fixtures/multiple-files-with-comment.zip | Bin {src/Test => test}/fixtures/multiple-files.zip | Bin .../fixtures/single-file-with-comment.zip | Bin .../fixtures/single-file-with-file-comment.zip | Bin {src/Test => test}/fixtures/single-file.zip | Bin 13 files changed, 9 insertions(+), 4 deletions(-) rename {src/Test => test}/LocalSeekerTest.php (97%) rename {src/Test => test}/ZipRangeReaderTest.php (98%) rename {src/Test => test}/fixtures/invalid-cdr.zip (100%) rename {src/Test => test}/fixtures/invalid-eocd.zip (100%) rename {src/Test => test}/fixtures/invalid-file.zip (100%) rename {src/Test => test}/fixtures/multiple-files-with-comment.zip (100%) rename {src/Test => test}/fixtures/multiple-files.zip (100%) rename {src/Test => test}/fixtures/single-file-with-comment.zip (100%) rename {src/Test => test}/fixtures/single-file-with-file-comment.zip (100%) rename {src/Test => test}/fixtures/single-file.zip (100%) diff --git a/README.md b/README.md index 9855354..84a084a 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Mingulay follows [Semantic Versioning](https://semver.org/) practices. Until rel Mingulay requires an object that implements the `Mingulay\SeekerInterface` interface. A `LocalFileSeeker` implementation is provided for working with Zip files on disk. ```php -$seeker = new \Mingulay\Seeker\LocalFileSeeker("src/Test/fixtures/single-file.zip"); +$seeker = new \Mingulay\Seeker\LocalFileSeeker("test/fixtures/single-file.zip"); $zip_info = new \Mingulay\ZipRangeReader($seeker); var_dump($zip_info->files); ``` diff --git a/composer.json b/composer.json index 68c2fde..ece21d8 100644 --- a/composer.json +++ b/composer.json @@ -23,5 +23,10 @@ "psr-4": { "Mingulay\\": "src/" } + }, + "autoload-dev": { + "psr-4": { + "Mingulay\\Test\\": "test/" + } } } diff --git a/phpunit.xml b/phpunit.xml index 92fa77a..1d0c5ef 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -2,7 +2,7 @@ - ./src/Test/ + ./test/ \ No newline at end of file diff --git a/src/Test/LocalSeekerTest.php b/test/LocalSeekerTest.php similarity index 97% rename from src/Test/LocalSeekerTest.php rename to test/LocalSeekerTest.php index 056441e..c2b1588 100644 --- a/src/Test/LocalSeekerTest.php +++ b/test/LocalSeekerTest.php @@ -12,7 +12,7 @@ class LocalSeekerTest extends TestCase { - const FIXTURE_PATH = "src/Test/fixtures/"; + const FIXTURE_PATH = "test/fixtures/"; /** * Test retrieval from the start of the file. diff --git a/src/Test/ZipRangeReaderTest.php b/test/ZipRangeReaderTest.php similarity index 98% rename from src/Test/ZipRangeReaderTest.php rename to test/ZipRangeReaderTest.php index 7cb4fb3..a3a08d8 100644 --- a/src/Test/ZipRangeReaderTest.php +++ b/test/ZipRangeReaderTest.php @@ -13,7 +13,7 @@ class ZipRangeReaderTest extends TestCase { - const FIXTURE_PATH = "src/Test/fixtures/"; + const FIXTURE_PATH = "test/fixtures/"; /** * Test the construction flow with a valid Zip containing a single file. diff --git a/src/Test/fixtures/invalid-cdr.zip b/test/fixtures/invalid-cdr.zip similarity index 100% rename from src/Test/fixtures/invalid-cdr.zip rename to test/fixtures/invalid-cdr.zip diff --git a/src/Test/fixtures/invalid-eocd.zip b/test/fixtures/invalid-eocd.zip similarity index 100% rename from src/Test/fixtures/invalid-eocd.zip rename to test/fixtures/invalid-eocd.zip diff --git a/src/Test/fixtures/invalid-file.zip b/test/fixtures/invalid-file.zip similarity index 100% rename from src/Test/fixtures/invalid-file.zip rename to test/fixtures/invalid-file.zip diff --git a/src/Test/fixtures/multiple-files-with-comment.zip b/test/fixtures/multiple-files-with-comment.zip similarity index 100% rename from src/Test/fixtures/multiple-files-with-comment.zip rename to test/fixtures/multiple-files-with-comment.zip diff --git a/src/Test/fixtures/multiple-files.zip b/test/fixtures/multiple-files.zip similarity index 100% rename from src/Test/fixtures/multiple-files.zip rename to test/fixtures/multiple-files.zip diff --git a/src/Test/fixtures/single-file-with-comment.zip b/test/fixtures/single-file-with-comment.zip similarity index 100% rename from src/Test/fixtures/single-file-with-comment.zip rename to test/fixtures/single-file-with-comment.zip diff --git a/src/Test/fixtures/single-file-with-file-comment.zip b/test/fixtures/single-file-with-file-comment.zip similarity index 100% rename from src/Test/fixtures/single-file-with-file-comment.zip rename to test/fixtures/single-file-with-file-comment.zip diff --git a/src/Test/fixtures/single-file.zip b/test/fixtures/single-file.zip similarity index 100% rename from src/Test/fixtures/single-file.zip rename to test/fixtures/single-file.zip