stop testing on windows

Signed-off-by: azjezz <azjezz@protonmail.com>
This commit is contained in:
azjezz 2021-07-10 03:01:37 +01:00
parent 3d6930b126
commit 4bef07dd32
No known key found for this signature in database
GPG Key ID: B00E0A46B3F1C157
8 changed files with 15 additions and 35 deletions

View File

@ -17,7 +17,6 @@ jobs:
operating-system:
- "macos-latest"
- "ubuntu-latest"
- "windows-latest"
steps:
- name: "checkout"

View File

@ -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)));

View File

@ -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

View File

@ -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));

View File

@ -1,17 +0,0 @@
<?php
declare(strict_types=1);
namespace Psl\Tests\Unit;
use PHPUnit\Framework\TestCase;
abstract class IOTestCase extends TestCase
{
protected function setUp(): void
{
if ('Windows' === PHP_OS_FAMILY) {
static::markTestSkipped('Test cannot be executed on windows.');
}
}
}

View File

@ -4,10 +4,10 @@ declare(strict_types=1);
namespace Psl\Tests\Unit\Shell;
use PHPUnit\Framework\TestCase;
use Psl\Shell;
use Psl\Tests\Unit\IOTestCase;
final class EscapeArgumentTest extends IOTestCase
final class EscapeArgumentTest extends TestCase
{
/**
* @dataProvider provideData

View File

@ -4,10 +4,10 @@ declare(strict_types=1);
namespace Psl\Tests\Unit\Shell;
use PHPUnit\Framework\TestCase;
use Psl\Shell;
use Psl\Tests\Unit\IOTestCase;
final class EscapeCommandTest extends IOTestCase
final class EscapeCommandTest extends TestCase
{
public function testEscapeCommand(): void
{

View File

@ -4,14 +4,14 @@ declare(strict_types=1);
namespace Psl\Tests\Unit\Shell;
use PHPUnit\Framework\TestCase;
use Psl\Env;
use Psl\SecureRandom;
use Psl\Shell;
use Psl\Tests\Unit\IOTestCase;
use const PHP_OS_FAMILY;
final class ExecuteTest extends IOTestCase
final class ExecuteTest extends TestCase
{
public function testExecute(): void
{