ValidResultTest.php 528 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. declare(strict_types=1);
  3. namespace JsonMachineTest\JsonDecoder;
  4. use JsonMachine\JsonDecoder\ValidResult;
  5. use PHPUnit\Framework\TestCase;
  6. /**
  7. * @covers \JsonMachine\JsonDecoder\ValidResult
  8. */
  9. class ValidResultTest extends TestCase
  10. {
  11. public function testGetValue()
  12. {
  13. $result = new ValidResult('Value X');
  14. $this->assertSame('Value X', $result->getValue());
  15. }
  16. public function testIsOk()
  17. {
  18. $result = new ValidResult('X');
  19. $this->assertTrue($result->isOk());
  20. }
  21. }