formatData('Json', $this->loadSample($path)); $this->assertNotNull(json_decode($data), 'invalid JSON output: ' . json_last_error_msg()); $expected = self::PATH_EXPECTED . $name . '.json'; $this->assertJsonStringEqualsJsonFile($expected, $data); } }