mirror of
https://github.com/halaxa/json-machine.git
synced 2025-07-16 20:16:25 +02:00
29 lines
553 B
PHP
29 lines
553 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace JsonMachineTest\JsonDecoder;
|
|
|
|
use JsonMachine\JsonDecoder\InvalidResult;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
/**
|
|
* @covers \JsonMachine\JsonDecoder\InvalidResult
|
|
*/
|
|
class InvalidResultTest extends TestCase
|
|
{
|
|
public function testGetErrorMessage()
|
|
{
|
|
$result = new InvalidResult('Error X');
|
|
|
|
$this->assertSame('Error X', $result->getErrorMessage());
|
|
}
|
|
|
|
public function testIsOk()
|
|
{
|
|
$result = new InvalidResult('X');
|
|
|
|
$this->assertFalse($result->isOk());
|
|
}
|
|
}
|