tests/Encoder/EncodeErrorsTest.php
/**
     * Test encode empty error array.
     *
     * @see https://github.com/neomerx/json-api/issues/151
     */
Test encode empty error array.
Test encode empty error array .
public function testEncodeEmptyErrorArray(): void
    {
        $actual = Encoder::instance()->encodeErrors([]);
        $expected = <<<EOL
        {
            "errors" : []
        }
EOL;
        self::assertJsonStringEqualsJsonString($expected, $actual);
    }
public function testEncodeEmptyErrorArray ( ) : void { $ actual = Encoder :: instance ( ) -> encodeErrors ( [ ] ) ; $ expected = <<< EOL         {             "errors" : []         } 
EOL ; self :: assertJsonStringEqualsJsonString ( $ expected , $ actual ) ; }
Test encode empty error array.
Test encode empty error array .