Skip to content

Commit bec7102

Browse files
committed
Moving to SupervisorPHP
1 parent 0ce446d commit bec7102

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Manage Supervisor configuration in PHP",
44
"license": "MIT",
55
"keywords": ["supervisor", "configuration"],
6-
"homepage": "https://indigophp.com",
6+
"homepage": "https://supervisorphp.com",
77
"authors": [
88
{
99
"name": "Márk Sági-Kazár",

spec/Configuration/Parser/FilesystemSpec.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,11 @@ function it_throws_an_exception_when_invalid_file_given(Flysystem $filesystem)
4141

4242
$this->shouldThrow('Supervisor\Exception\ParsingFailed')->duringParse();
4343
}
44+
45+
function it_throws_an_exception_when_cannot_read_file_given(Flysystem $filesystem)
46+
{
47+
$filesystem->read('supervisord.conf')->willReturn(false);
48+
49+
$this->shouldThrow('Supervisor\Exception\ParsingFailed')->duringParse();
50+
}
4451
}

src/Configuration/Parser/Filesystem.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ public function parse(Configuration $configuration = null)
4747
throw new ParsingFailed(sprintf('File "%s" not found', $this->file));
4848
}
4949

50-
$fileContents = $this->filesystem->read($this->file);
50+
if (!$fileContents = $this->filesystem->read($this->file)) {
51+
throw new ParsingFailed(sprintf('Reading file "%s" failed', $this->file));
52+
}
5153

5254
$parser = new Text($fileContents);
5355

0 commit comments

Comments
 (0)