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 9a9cdbf commit 187bdedCopy full SHA for 187bded
tests/Unit/Transformer/ElementTransformerTest.php
@@ -14,6 +14,7 @@
14
15
namespace MultiTheftAuto\Sdk\Transformer;
16
17
+use MultiTheftAuto\Sdk\Exception\NotCallableResourceException;
18
use MultiTheftAuto\Sdk\Model\Element;
19
use MultiTheftAuto\Sdk\Model\Resource;
20
use PHPUnit\Framework\TestCase;
@@ -54,4 +55,12 @@ public function testItReturnsNullIfDataIsEmpty(): void
54
55
56
$this->assertNull($fromInput);
57
}
58
+
59
+ public function testItThrowsExceptionOnUnparseableData(): void
60
+ {
61
+ $this->expectException(NotCallableResourceException::class);
62
63
+ $input = 'Resource not running';
64
+ ElementTransformer::fromServer($input);
65
+ }
66
0 commit comments