We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c79a437 commit 0b065eaCopy full SHA for 0b065ea
tests/SetMethodTest.php
@@ -16,6 +16,7 @@
16
use Josantonius\Json\Json;
17
use PHPUnit\Framework\TestCase;
18
use Josantonius\Json\Exceptions\CreateFileException;
19
+use Josantonius\Json\Exceptions\CreateDirectoryException;
20
use Josantonius\Json\Exceptions\UnavailableMethodException;
21
22
class SetMethodTest extends TestCase
@@ -75,4 +76,13 @@ public function test_should_throw_exception_if_set_method_is_used_with_remote_fi
75
76
77
$jsonFile->set(['foo' => 'bar']);
78
}
79
+
80
+ public function test_should_throw_exception_if_path_is_wrong(): void
81
+ {
82
+ $this->expectException(CreateDirectoryException::class);
83
84
+ $jsonFile = new Json('/foo:/filename.json');
85
86
+ $jsonFile->set();
87
+ }
88
0 commit comments