Skip to content

Commit

Permalink
style: rename getStreamWrapper to getStreamWrapperClass
Browse files Browse the repository at this point in the history
  • Loading branch information
carlalexander committed Aug 9, 2024
1 parent bacc240 commit 71477ae
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ protected function setUp(): void
{
$this->client = $this->getCloudStorageClientInterfaceMock();

$this->getStreamWrapper()::register($this->client, new \ArrayObject());
$this->getStreamWrapperClass()::register($this->client, new \ArrayObject());
}

public function testAppendsToExistingFile()
Expand Down Expand Up @@ -309,11 +309,11 @@ public function testReadingFile()

public function testRegistersStreamWrapperOnlyOnce()
{
$this->assertContains($this->getStreamWrapper()::getProtocol(), stream_get_wrappers());
$this->assertContains($this->getStreamWrapperClass()::getProtocol(), stream_get_wrappers());

$this->getStreamWrapper()::register($this->client);
$this->getStreamWrapperClass()::register($this->client);

$this->assertContains($this->getStreamWrapper()::getProtocol(), stream_get_wrappers());
$this->assertContains($this->getStreamWrapperClass()::getProtocol(), stream_get_wrappers());
}

public function testRenameSuccessful()
Expand Down Expand Up @@ -690,10 +690,10 @@ public function testWritingFileWhenPutObjectThrowsException()

abstract protected function getAcl();

abstract protected function getStreamWrapper(): string;
abstract protected function getStreamWrapperClass(): string;

private function getProtocol(): string
{
return $this->getStreamWrapper()::getProtocol();
return $this->getStreamWrapperClass()::getProtocol();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ protected function setUp(): void
{
$this->client = new S3Client(new CurlClient('test'), 'ymir-plugin-test', getenv('AWS_TEST_ACCESS_KEY_ID') ?: $_ENV['AWS_TEST_ACCESS_KEY_ID'], 'us-east-1', getenv('AWS_TEST_SECRET_ACCESS_KEY') ?: $_ENV['AWS_TEST_SECRET_ACCESS_KEY']);

$this->getStreamWrapper()::register($this->client);
$this->getStreamWrapperClass()::register($this->client);
}

public function testCopyFromLocal()
Expand Down Expand Up @@ -185,10 +185,10 @@ public function testTruncateNewFile()
$this->client->deleteObject($relativePath);
}

abstract protected function getStreamWrapper(): string;
abstract protected function getStreamWrapperClass(): string;

private function getProtocol(): string
{
return $this->getStreamWrapper()::getProtocol();
return $this->getStreamWrapperClass()::getProtocol();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ protected function getAcl()
return 'private';
}

protected function getStreamWrapper(): string
protected function getStreamWrapperClass(): string
{
return PrivateCloudStorageStreamWrapper::class;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
class PrivateCloudStorageStreamWrapperS3Test extends AbstractCloudStorageStreamWrapperS3TestCase
{
protected function getStreamWrapper(): string
protected function getStreamWrapperClass(): string
{
return PrivateCloudStorageStreamWrapper::class;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ protected function getAcl()
return 'public-read';
}

protected function getStreamWrapper(): string
protected function getStreamWrapperClass(): string
{
return PublicCloudStorageStreamWrapper::class;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
class PublicCloudStorageStreamWrapperS3Test extends AbstractCloudStorageStreamWrapperS3TestCase
{
protected function getStreamWrapper(): string
protected function getStreamWrapperClass(): string
{
return PublicCloudStorageStreamWrapper::class;
}
Expand Down

0 comments on commit 71477ae

Please sign in to comment.