Skip to content

Commit 0b065ea

Browse files
committed
test: upgrade to the new version
Closes #22
1 parent c79a437 commit 0b065ea

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/SetMethodTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Josantonius\Json\Json;
1717
use PHPUnit\Framework\TestCase;
1818
use Josantonius\Json\Exceptions\CreateFileException;
19+
use Josantonius\Json\Exceptions\CreateDirectoryException;
1920
use Josantonius\Json\Exceptions\UnavailableMethodException;
2021

2122
class SetMethodTest extends TestCase
@@ -75,4 +76,13 @@ public function test_should_throw_exception_if_set_method_is_used_with_remote_fi
7576

7677
$jsonFile->set(['foo' => 'bar']);
7778
}
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+
}
7888
}

0 commit comments

Comments
 (0)