Skip to content

Commit

Permalink
[Config] Prefixing FileExistenceResource::__toString() to avoid confl…
Browse files Browse the repository at this point in the history
…ict with FileResource
  • Loading branch information
weaverryan authored and nicolas-grekas committed Nov 9, 2023
1 parent 8109892 commit dd5ea39
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Resource/FileExistenceResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function __construct(string $resource)

public function __toString(): string
{
return $this->resource;
return 'existence.'.$this->resource;
}

public function getResource(): string
Expand Down
2 changes: 1 addition & 1 deletion Tests/Resource/FileExistenceResourceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protected function tearDown(): void

public function testToString()
{
$this->assertSame($this->file, (string) $this->resource);
$this->assertSame('existence.'.$this->file, (string) $this->resource);
}

public function testGetResource()
Expand Down

0 comments on commit dd5ea39

Please sign in to comment.