Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove skipped rules on $rectorConfig->skip() are no longer exists #111

Merged
merged 6 commits into from
Aug 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
use Rector\Config\RectorConfig;
use Rector\Naming\Rector\Assign\RenameVariableToMatchMethodCallReturnTypeRector;
use Rector\Naming\Rector\ClassMethod\RenameParamToMatchTypeRector;
use Rector\PHPUnit\Rector\Class_\AddSeeTestAnnotationRector;
use Rector\PHPUnit\CodeQuality\Rector\Class_\AddSeeTestAnnotationRector;
use Rector\PHPUnit\CodeQuality\Rector\ClassMethod\ReplaceTestAnnotationWithPrefixedFunctionRector;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\Privatization\Rector\Class_\FinalizeClassesWithoutChildrenRector;
use Rector\Privatization\Rector\Class_\RepeatedLiteralToClassConstantRector;
use Rector\Privatization\Rector\MethodCall\PrivatizeLocalGetterToPropertyRector;
use Rector\Set\ValueObject\LevelSetList;
use Zing\CodingStandard\Set\RectorSetList;
Expand All @@ -23,8 +23,8 @@
RenameParamToMatchTypeRector::class,
AddSeeTestAnnotationRector::class,
FinalizeClassesWithoutChildrenRector::class,
RepeatedLiteralToClassConstantRector::class,
PrivatizeLocalGetterToPropertyRector::class,
ReplaceTestAnnotationWithPrefixedFunctionRector::class => [__DIR__ . '/tests/ObsAdapterTest.php'],
]
);
$rectorConfig->paths([__DIR__ . '/src', __DIR__ . '/tests', __DIR__ . '/ecs.php', __DIR__ . '/rector.php']);
Expand Down
24 changes: 12 additions & 12 deletions tests/InvalidAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public function testGetVisibility(): void
public function testListContents(): void
{
$this->expectException(ObsException::class);
self::assertEmpty(iterator_to_array($this->obsAdapter->listContents('/', false)));
$this->assertEmpty(iterator_to_array($this->obsAdapter->listContents('/', false)));
}

public function testGetSize(): void
Expand All @@ -145,15 +145,15 @@ public function testGetMimetype(): void

public function testHas(): void
{
self::assertFalse($this->obsAdapter->fileExists('file.txt'));
$this->assertFalse($this->obsAdapter->fileExists('file.txt'));
}

public function testBucket(): void
{
$obsAdapter = new ObsAdapter($this->obsClient, self::CONFIG['bucket'], '', null, null, [
'endpoint' => 'http://obs.cdn.com',
]);
self::assertSame('test', $obsAdapter->getBucket());
$this->assertSame('test', $obsAdapter->getBucket());
}

public function testSetBucket(): void
Expand All @@ -162,32 +162,32 @@ public function testSetBucket(): void
'endpoint' => 'http://obs.cdn.com',
]);
$obsAdapter->setBucket('new-bucket');
self::assertSame('new-bucket', $obsAdapter->getBucket());
$this->assertSame('new-bucket', $obsAdapter->getBucket());
}

public function testGetUrl(): void
{
$obsAdapter = new ObsAdapter($this->obsClient, self::CONFIG['bucket'], '', null, null, [
'endpoint' => 'http://obs.cdn.com',
]);
self::assertSame('http://test.obs.cdn.com/test', $obsAdapter->getUrl('test'));
$this->assertSame('http://test.obs.cdn.com/test', $obsAdapter->getUrl('test'));
}

public function testGetClient(): void
{
$obsAdapter = new ObsAdapter($this->obsClient, self::CONFIG['bucket'], '', null, null, [
'endpoint' => 'http://obs.cdn.com',
]);
self::assertSame($this->obsClient, $obsAdapter->getClient());
self::assertSame($this->obsClient, $obsAdapter->kernel());
$this->assertSame($this->obsClient, $obsAdapter->getClient());
$this->assertSame($this->obsClient, $obsAdapter->kernel());
}

public function testGetUrlWithoutSchema(): void
{
$obsAdapter = new ObsAdapter($this->obsClient, self::CONFIG['bucket'], '', null, null, [
'endpoint' => 'obs.cdn.com',
]);
self::assertSame('https://test.obs.cdn.com/test', $obsAdapter->getUrl('test'));
$this->assertSame('https://test.obs.cdn.com/test', $obsAdapter->getUrl('test'));
}

public function testGetUrlWithoutEndpoint(): void
Expand All @@ -204,7 +204,7 @@ public function testGetUrlWithUrl(): void
'endpoint' => 'https://obs.cdn.com',
'url' => 'https://obs.cdn.com',
]);
self::assertSame('https://obs.cdn.com/test', $obsAdapter->getUrl('test'));
$this->assertSame('https://obs.cdn.com/test', $obsAdapter->getUrl('test'));
}

public function testGetUrlWithBucketEndpoint(): void
Expand All @@ -213,7 +213,7 @@ public function testGetUrlWithBucketEndpoint(): void
'endpoint' => 'https://obs.cdn.com',
'bucket_endpoint' => true,
]);
self::assertSame('https://obs.cdn.com/test', $obsAdapter->getUrl('test'));
$this->assertSame('https://obs.cdn.com/test', $obsAdapter->getUrl('test'));
}

public function testGetTemporaryUrlWithUrl(): void
Expand All @@ -222,13 +222,13 @@ public function testGetTemporaryUrlWithUrl(): void
'endpoint' => 'https://obs.cdn.com',
'temporary_url' => 'https://obs.cdn.com',
]);
self::assertStringStartsWith('https://obs.cdn.com/test', $obsAdapter->getTemporaryUrl('test', 10));
$this->assertStringStartsWith('https://obs.cdn.com/test', $obsAdapter->getTemporaryUrl('test', 10));
}

public function testDirectoryExists(): void
{
if (! class_exists(UnableToCheckDirectoryExistence::class)) {
self::markTestSkipped('Require League Flysystem v3');
$this->markTestSkipped('Require League Flysystem v3');
}

$this->expectException(UnableToCheckDirectoryExistence::class);
Expand Down
Loading
Loading