'!php/const PHP_INT_MAX', \PHP_INT_MAX
],
['[!php/const PHP_INT_MAX]',
[\PHP_INT_MAX
]],
['{ foo: !php/const PHP_INT_MAX }',
['foo' => \PHP_INT_MAX
]],
['{ !php/const PHP_INT_MAX: foo }',
[\PHP_INT_MAX => 'foo'
]],
['!php/const NULL', null
],
];
} public function testParsePhpConstantThrowsExceptionWhenUndefined() { $this->
expectException(ParseException::
class);
$this->
expectExceptionMessage('The constant "WRONG_CONSTANT" is not defined'
);
Inline::
parse('!php/const WRONG_CONSTANT', Yaml::PARSE_CONSTANT
);
} public function testParsePhpEnumThrowsExceptionWhenUndefined() { $this->
expectException(ParseException::
class);
$this->
expectExceptionMessage('The enum "SomeEnum::Foo" is not defined'
);
Inline::
parse('!php/enum SomeEnum::Foo', Yaml::PARSE_CONSTANT
);
} public function testParsePhpEnumThrowsExceptionWhenNotAnEnum() {