From 4bef07dd322dce2e280507899aa9602e5e034a8b Mon Sep 17 00:00:00 2001 From: azjezz Date: Sat, 10 Jul 2021 03:01:37 +0100 Subject: [PATCH] stop testing on windows Signed-off-by: azjezz --- .github/workflows/unit-tests.yml | 1 - .../unit/Filesystem/AbstractFilesystemTest.php | 6 ++---- tests/unit/IO/MemoryHandleTest.php | 4 ++-- tests/unit/IO/ReaderTest.php | 10 +++++----- tests/unit/IOTestCase.php | 17 ----------------- tests/unit/Shell/EscapeArgumentTest.php | 4 ++-- tests/unit/Shell/EscapeCommandTest.php | 4 ++-- tests/unit/Shell/ExecuteTest.php | 4 ++-- 8 files changed, 15 insertions(+), 35 deletions(-) delete mode 100644 tests/unit/IOTestCase.php diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 5558ca8..bcaabe9 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -17,7 +17,6 @@ jobs: operating-system: - "macos-latest" - "ubuntu-latest" - - "windows-latest" steps: - name: "checkout" diff --git a/tests/unit/Filesystem/AbstractFilesystemTest.php b/tests/unit/Filesystem/AbstractFilesystemTest.php index 3f5112b..03c16c6 100644 --- a/tests/unit/Filesystem/AbstractFilesystemTest.php +++ b/tests/unit/Filesystem/AbstractFilesystemTest.php @@ -4,13 +4,13 @@ declare(strict_types=1); namespace Psl\Tests\Unit\Filesystem; +use PHPUnit\Framework\TestCase; use Psl\Env; use Psl\Filesystem; use Psl\Str; -use Psl\Tests\Unit\IOTestCase; use Psl\Type; -abstract class AbstractFilesystemTest extends IOTestCase +abstract class AbstractFilesystemTest extends TestCase { protected string $function; protected string $cacheDirectory; @@ -19,8 +19,6 @@ abstract class AbstractFilesystemTest extends IOTestCase protected function setUp(): void { - parent::setUp(); - $this->cacheDirectory = Type\string()->assert(Filesystem\canonicalize(Str\join([ __DIR__, '..', '.cache' ], Filesystem\SEPARATOR))); diff --git a/tests/unit/IO/MemoryHandleTest.php b/tests/unit/IO/MemoryHandleTest.php index 2a531dc..3d205bb 100644 --- a/tests/unit/IO/MemoryHandleTest.php +++ b/tests/unit/IO/MemoryHandleTest.php @@ -4,12 +4,12 @@ declare(strict_types=1); namespace Psl\Tests\Unit\IO; +use PHPUnit\Framework\TestCase; use Psl\IO; use Psl\Str; use Psl\Str\Byte; -use Psl\Tests\Unit\IOTestCase; -final class MemoryHandleTest extends IOTestCase +final class MemoryHandleTest extends TestCase { /** * @param (callable(IO\MemoryHandle): mixed) $operation diff --git a/tests/unit/IO/ReaderTest.php b/tests/unit/IO/ReaderTest.php index 163db61..0908afb 100644 --- a/tests/unit/IO/ReaderTest.php +++ b/tests/unit/IO/ReaderTest.php @@ -4,10 +4,10 @@ declare(strict_types=1); namespace Psl\Tests\Unit\IO; +use PHPUnit\Framework\TestCase; use Psl\IO; -use Psl\Tests\Unit\IOTestCase; -final class ReaderTest extends IOTestCase +final class ReaderTest extends TestCase { public function testReadingFile(): void { @@ -20,12 +20,12 @@ final class ReaderTest extends IOTestCase static::assertSame('', $reader->readLine()); static::assertSame('declare(strict_types=1);', $reader->readLine()); static::assertSame('', $reader->readLine()); - static::assertSame('namespace Psl\Tests\Unit\IO;', $reader->readLine()); + static::assertSame('namespace Psl\\Tests\\Unit\\IO;', $reader->readLine()); static::assertSame('', $reader->readLine()); - static::assertSame('use Psl\IO;', $reader->readLine()); + static::assertSame('use PHPUnit\\Framework\\TestCase;', $reader->readLine()); static::assertSame('use Psl', $reader->readUntil('\\')); - static::assertSame('Tests\Unit\IOTestCase;', $reader->readLine()); + static::assertSame('IO;', $reader->readLine()); static::assertSame('', $reader->readLine()); static::assertSame('final class', $reader->readFixedSize(11)); diff --git a/tests/unit/IOTestCase.php b/tests/unit/IOTestCase.php deleted file mode 100644 index c1fd759..0000000 --- a/tests/unit/IOTestCase.php +++ /dev/null @@ -1,17 +0,0 @@ -