Skip to content

Commit 84085fb

Browse files
authored
Rename skipped rules on $rectorConfig->skip() are changed to different namespace (#73)
1 parent 13a107b commit 84085fb

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

rector.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
use Rector\Config\RectorConfig;
66
use Rector\Naming\Rector\Assign\RenameVariableToMatchMethodCallReturnTypeRector;
77
use Rector\Naming\Rector\ClassMethod\RenameParamToMatchTypeRector;
8-
use Rector\PHPUnit\Rector\Class_\AddSeeTestAnnotationRector;
8+
use Rector\PHPUnit\CodeQuality\Rector\Class_\AddSeeTestAnnotationRector;
99
use Rector\PHPUnit\Set\PHPUnitSetList;
1010
use Rector\Privatization\Rector\Class_\FinalizeClassesWithoutChildrenRector;
11-
use Rector\Privatization\Rector\Class_\RepeatedLiteralToClassConstantRector;
1211
use Rector\Set\ValueObject\LevelSetList;
1312
use Zing\CodingStandard\Set\RectorSetList;
1413

@@ -20,7 +19,6 @@
2019
RenameParamToMatchTypeRector::class,
2120
AddSeeTestAnnotationRector::class,
2221
FinalizeClassesWithoutChildrenRector::class,
23-
RepeatedLiteralToClassConstantRector::class,
2422
]);
2523
$rectorConfig->paths([__DIR__ . '/src', __DIR__ . '/tests', __DIR__ . '/ecs.php', __DIR__ . '/rector.php']);
2624
};

tests/DriverTest.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,34 +16,34 @@ final class DriverTest extends TestCase
1616
{
1717
public function testDriverRegistered(): void
1818
{
19-
self::assertInstanceOf(ObsAdapter::class, Storage::disk('obs')->getAdapter());
19+
$this->assertInstanceOf(ObsAdapter::class, Storage::disk('obs')->getAdapter());
2020
}
2121

2222
public function testUrl(): void
2323
{
24-
self::assertStringStartsWith('https://test-url', Storage::disk('obs-url')->url('test'));
24+
$this->assertStringStartsWith('https://test-url', Storage::disk('obs-url')->url('test'));
2525
}
2626

2727
public function testTemporaryUrl(): void
2828
{
29-
self::assertStringStartsWith(
29+
$this->assertStringStartsWith(
3030
'https://test-temporary-url',
3131
Storage::disk('obs-temporary-url')->temporaryUrl('test', Carbon::now()->addMinutes())
3232
);
3333
}
3434

3535
public function testBucketEndpoint(): void
3636
{
37-
self::assertStringStartsWith('https://your-endpoint', Storage::disk('obs-bucket-endpoint')->url('test'));
37+
$this->assertStringStartsWith('https://your-endpoint', Storage::disk('obs-bucket-endpoint')->url('test'));
3838
}
3939

4040
public function testIsCname(): void
4141
{
42-
self::assertStringStartsWith(
42+
$this->assertStringStartsWith(
4343
'https://your-endpoint',
4444
Storage::disk('obs-bucket-endpoint')->temporaryUrl('test', Carbon::now()->addMinutes())
4545
);
46-
self::assertStringStartsWith(
46+
$this->assertStringStartsWith(
4747
'https://your-endpoint',
4848
Storage::disk('obs-is-cname')->temporaryUrl('test', Carbon::now()->addMinutes())
4949
);
@@ -57,23 +57,23 @@ public function testReadOnly(): void
5757

5858
public function testPrefix(): void
5959
{
60-
self::assertSame(
60+
$this->assertSame(
6161
'https://your-bucket.your-endpoint/root/prefix/test',
6262
Storage::disk('obs-prefix-url')->url('test')
6363
);
64-
self::assertStringStartsWith(
64+
$this->assertStringStartsWith(
6565
'https://your-bucket.your-endpoint/root/prefix/test',
6666
Storage::disk('obs-prefix-url')->temporaryUrl('test', Carbon::now()->addMinutes())
6767
);
6868
}
6969

7070
public function testReadOnlyAndPrefix(): void
7171
{
72-
self::assertSame(
72+
$this->assertSame(
7373
'https://your-bucket.your-endpoint/root/prefix/test',
7474
Storage::disk('obs-read-only-and-prefix-url')->url('test')
7575
);
76-
self::assertStringStartsWith(
76+
$this->assertStringStartsWith(
7777
'https://your-bucket.your-endpoint/root/prefix/test',
7878
Storage::disk('obs-read-only-and-prefix-url')->temporaryUrl('test', Carbon::now()->addMinutes())
7979
);
@@ -85,11 +85,11 @@ public function testTemporaryUploadUrl(): void
8585
{
8686
$now = Carbon::now()->addMinutes();
8787
$data = Storage::disk('obs-temporary-url')->temporaryUploadUrl('test', $now);
88-
self::assertStringStartsWith(
88+
$this->assertStringStartsWith(
8989
sprintf('https://test-temporary-url/test?AccessKeyId&Expires=%d&Signature=', $now->getTimestamp()),
9090
$data['url']
9191
);
92-
self::assertSame([
92+
$this->assertSame([
9393
'Host' => 'your-bucket.your-endpoint',
9494
], $data['headers']);
9595
}

0 commit comments

Comments
 (0)