mirror of
https://github.com/halaxa/json-machine.git
synced 2025-07-19 05:21:16 +02:00
25 lines
578 B
PHP
25 lines
578 B
PHP
<?php
|
|
|
|
namespace JsonMachineTest\JsonDecoder;
|
|
|
|
use JsonMachine\JsonDecoder\DecodingError;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class DecodingErrorTest extends TestCase
|
|
{
|
|
|
|
public function testGetMalformedJson()
|
|
{
|
|
$decodingError = new DecodingError('"json\"', null);
|
|
|
|
$this->assertSame('"json\"', $decodingError->getMalformedJson());
|
|
}
|
|
|
|
public function testGetErrorMessage()
|
|
{
|
|
$decodingError = new DecodingError('', 'something bad happened');
|
|
|
|
$this->assertSame('something bad happened', $decodingError->getErrorMessage());
|
|
}
|
|
}
|