use PHPUnit\Framework\TestCase;
use Symfony\Component\Yaml\Exception\ParseException;
-use Symfony\Component\Yaml\Yaml;
use Symfony\Component\Yaml\Parser;
use Symfony\Component\Yaml\Tag\TaggedValue;
+use Symfony\Component\Yaml\Yaml;
class ParserTest extends TestCase
{
restore_error_handler();
if (class_exists('PHPUnit_Util_ErrorHandler')) {
- return call_user_func_array('PHPUnit_Util_ErrorHandler::handleError', func_get_args());
+ return \call_user_func_array('PHPUnit_Util_ErrorHandler::handleError', \func_get_args());
}
- return call_user_func_array('PHPUnit\Util\ErrorHandler::handleError', func_get_args());
+ return \call_user_func_array('PHPUnit\Util\ErrorHandler::handleError', \func_get_args());
}
$deprecations[] = $msg;
*/
public function testParsingNotReadableFilesThrowsException()
{
- if ('\\' === DIRECTORY_SEPARATOR) {
+ if ('\\' === \DIRECTORY_SEPARATOR) {
$this->markTestSkipped('chmod is not supported on Windows');
}
+ if (!getenv('USER') || 'root' === getenv('USER')) {
+ $this->markTestSkipped('This test will fail if run under superuser');
+ }
+
$file = __DIR__.'/Fixtures/not_readable.yml';
chmod($file, 0200);