ParserTest
extends TestCase
in package
Table of Contents
- $parser : Parser
- circularReferenceProvider() : mixed
- deprecatedObjectValueProvider() : mixed
- getBinaryData() : mixed
- getBlockChompingTests() : mixed
- getCommentLikeStringInScalarBlockData() : mixed
- getDataFormSpecifications() : mixed
- getInvalidBinaryData() : mixed
- getLegacyNonStringMappingKeysData() : mixed
- getNonStringMappingKeysData() : mixed
- getObjectForMapTests() : mixed
- getParseExceptionNotAffectedMultiLineStringLastResortParsing() : mixed
- getParseExceptionOnDuplicateData() : mixed
- indentedMappingData() : mixed
- invalidDumpedObjectProvider() : mixed
- multiLineDataProvider() : mixed
- parserThrowsExceptionWithCorrectLineNumberProvider() : mixed
- taggedValuesProvider() : mixed
- testAdditionallyIndentedLinesAreParsedAsNewLinesInFoldedBlocks() : mixed
- testBackslashInQuotedMultiLineString() : mixed
- testBlankLinesAreParsedAsNewLinesInFoldedBlocks() : mixed
- testBlankLinesInQuotedMultiLineString() : mixed
- testBlockChomping() : mixed
- testBlockLiteralWithLeadingNewlines() : mixed
- Regression test for issue #7989.
- testBooleanKeys() : mixed
- testCanParseContentWithTrailingSpaces() : mixed
- testCanParseVeryLongValue() : mixed
- testColonInMappingValueException() : mixed
- testColonInMappingValueExceptionNotTriggeredByColonInComment() : mixed
- testCommentAtTheRootIndent() : mixed
- testCommentCharactersInMultiLineQuotedStrings() : mixed
- testCommentLikeStringsAreNotStrippedInBlockScalars() : mixed
- testComplexMappingNestedInMappingThrowsParseException() : mixed
- testComplexMappingNestedInSequenceThrowsParseException() : mixed
- testComplexMappingThrowsParseException() : mixed
- testCustomTagsDisabled() : mixed
- testCustomTagSupport() : mixed
- testDeprecatedPhpConstantTagMappingKey() : mixed
- testDetectCircularReferences() : mixed
- testEmptyValue() : mixed
- testEndOfTheDocumentMarker() : mixed
- testEscapedQuoteInQuotedMultiLineString() : mixed
- testEvalRefException() : mixed
- testExceptionWhenUsingUnsupportedBuiltInTags() : mixed
- testExplicitStringCasting() : mixed
- testFilenamesAreParsedAsStringsWithoutFlag() : mixed
- testFloatKeys() : mixed
- testFoldedStringBlockWithComments() : mixed
- testLegacyNonStringMappingKeys() : mixed
- testMappingDuplicateKeyBlock() : mixed
- > It is an error for two equal keys to appear in the same mapping node.
- testMappingDuplicateKeyFlow() : mixed
- testMappingInASequence() : mixed
- testMergeKeysWhenMappingsAreParsedAsObjects() : mixed
- testMultiLineComment() : mixed
- testMultiLineQuotedStringWithTrailingBackslash() : mixed
- testMultiLineStringLastResortParsing() : mixed
- testMultipleDocumentsNotSupportedException() : mixed
- testNestedFoldedStringBlockWithComments() : mixed
- testNonStringFollowedByCommentEmbeddedInMapping() : mixed
- testNonStringMappingKeys() : mixed
- testNonUtf8Exception() : mixed
- testObjectForMap() : mixed
- testObjectForMapEnabledWithMappingUsingBooleanToggles() : mixed
- testObjectsSupportDisabledWithExceptions() : mixed
- testObjectsSupportDisabledWithExceptionsUsingBooleanToggles() : mixed
- testObjectSupportDisabledButNoExceptions() : mixed
- testObjectSupportEnabled() : mixed
- testObjectSupportEnabledPassingTrue() : mixed
- testObjectSupportEnabledWithDeprecatedTag() : mixed
- testParseBinaryData() : mixed
- testParseDateAsMappingValue() : mixed
- testParseExceptionNotAffectedByMultiLineStringLastResortParsing() : mixed
- testParseExceptionOnDuplicate() : mixed
- testParseFile() : mixed
- testParseIndentedMappings() : mixed
- testParseInvalidBinaryData() : mixed
- testParseMultiLineMappingValue() : mixed
- testParseMultiLineQuotedString() : mixed
- testParseMultiLineString() : mixed
- testParseMultiLineUnquotedString() : mixed
- testParserCleansUpReferencesBetweenRuns() : mixed
- testParseReferencesOnMergeKeys() : mixed
- testParseReferencesOnMergeKeysWithMappingsParsedAsObjects() : mixed
- testParserThrowsExceptionWithCorrectLineNumber() : mixed
- testParseValueWithModifiers() : mixed
- testParseValueWithNegativeModifiers() : mixed
- testParsingIniThrowsException() : mixed
- testParsingMultipleDocuments() : mixed
- This is a regression test for a bug where a YAML block with a nested multiline string using | was parsed without a trailing \n when a shorter YAML document was parsed before.
- testParsingNonExistentFilesThrowsException() : mixed
- testParsingNotReadableFilesThrowsException() : mixed
- testPhpConstantTagMappingAsScalarKey() : mixed
- testPhpConstantTagMappingKey() : mixed
- testPhpConstantTagMappingKeyWithKeysCastToStrings() : mixed
- testReferenceResolvingInInlineStrings() : mixed
- testScalarInSequence() : mixed
- testSequenceFollowedByCommentEmbeddedInMapping() : mixed
- testSequenceInAMapping() : mixed
- testSequenceInMappingStartedBySingleDashLine() : mixed
- testShortcutKeyUnindentedCollectionException() : mixed
- testSpecifications() : mixed
- testStringBlockWithComments() : mixed
- testTabsInYaml() : mixed
- testTaggedInlineMapping() : mixed
- testTagMappingAsScalarKey() : mixed
- testUnindentedCollectionException() : mixed
- testUnsupportedTagWithScalar() : mixed
- testYamlDirective() : mixed
- setUp() : mixed
- tearDown() : mixed
- loadTestsFromFixtureFiles() : mixed
Properties
$parser
protected
Parser
$parser
Methods
circularReferenceProvider()
public
circularReferenceProvider() : mixed
Return values
mixed —deprecatedObjectValueProvider()
public
deprecatedObjectValueProvider() : mixed
Return values
mixed —getBinaryData()
public
getBinaryData() : mixed
Return values
mixed —getBlockChompingTests()
public
getBlockChompingTests() : mixed
Return values
mixed —getCommentLikeStringInScalarBlockData()
public
getCommentLikeStringInScalarBlockData() : mixed
Return values
mixed —getDataFormSpecifications()
public
getDataFormSpecifications() : mixed
Return values
mixed —getInvalidBinaryData()
public
getInvalidBinaryData() : mixed
Return values
mixed —getLegacyNonStringMappingKeysData()
public
getLegacyNonStringMappingKeysData() : mixed
Return values
mixed —getNonStringMappingKeysData()
public
getNonStringMappingKeysData() : mixed
Return values
mixed —getObjectForMapTests()
public
getObjectForMapTests() : mixed
Return values
mixed —getParseExceptionNotAffectedMultiLineStringLastResortParsing()
public
getParseExceptionNotAffectedMultiLineStringLastResortParsing() : mixed
Return values
mixed —getParseExceptionOnDuplicateData()
public
getParseExceptionOnDuplicateData() : mixed
Return values
mixed —indentedMappingData()
public
indentedMappingData() : mixed
Return values
mixed —invalidDumpedObjectProvider()
public
invalidDumpedObjectProvider() : mixed
Return values
mixed —multiLineDataProvider()
public
multiLineDataProvider() : mixed
Return values
mixed —parserThrowsExceptionWithCorrectLineNumberProvider()
public
parserThrowsExceptionWithCorrectLineNumberProvider() : mixed
Return values
mixed —taggedValuesProvider()
public
taggedValuesProvider() : mixed
Return values
mixed —testAdditionallyIndentedLinesAreParsedAsNewLinesInFoldedBlocks()
public
testAdditionallyIndentedLinesAreParsedAsNewLinesInFoldedBlocks() : mixed
Return values
mixed —testBackslashInQuotedMultiLineString()
public
testBackslashInQuotedMultiLineString() : mixed
Return values
mixed —testBlankLinesAreParsedAsNewLinesInFoldedBlocks()
public
testBlankLinesAreParsedAsNewLinesInFoldedBlocks() : mixed
Return values
mixed —testBlankLinesInQuotedMultiLineString()
public
testBlankLinesInQuotedMultiLineString() : mixed
Return values
mixed —testBlockChomping()
public
testBlockChomping(mixed $expected, mixed $yaml) : mixed
Parameters
- $expected : mixed
- $yaml : mixed
Tags
Return values
mixed —testBlockLiteralWithLeadingNewlines()
Regression test for issue #7989.
public
testBlockLiteralWithLeadingNewlines() : mixed
Tags
Return values
mixed —testBooleanKeys()
public
testBooleanKeys() : mixed
Tags
Return values
mixed —testCanParseContentWithTrailingSpaces()
public
testCanParseContentWithTrailingSpaces() : mixed
Return values
mixed —testCanParseVeryLongValue()
public
testCanParseVeryLongValue() : mixed
Return values
mixed —testColonInMappingValueException()
public
testColonInMappingValueException() : mixed
Return values
mixed —testColonInMappingValueExceptionNotTriggeredByColonInComment()
public
testColonInMappingValueExceptionNotTriggeredByColonInComment() : mixed
Return values
mixed —testCommentAtTheRootIndent()
public
testCommentAtTheRootIndent() : mixed
Return values
mixed —testCommentCharactersInMultiLineQuotedStrings()
public
testCommentCharactersInMultiLineQuotedStrings() : mixed
Return values
mixed —testCommentLikeStringsAreNotStrippedInBlockScalars()
public
testCommentLikeStringsAreNotStrippedInBlockScalars(mixed $yaml, mixed $expectedParserResult) : mixed
Parameters
- $yaml : mixed
- $expectedParserResult : mixed
Tags
Return values
mixed —testComplexMappingNestedInMappingThrowsParseException()
public
testComplexMappingNestedInMappingThrowsParseException() : mixed
Tags
Return values
mixed —testComplexMappingNestedInSequenceThrowsParseException()
public
testComplexMappingNestedInSequenceThrowsParseException() : mixed
Tags
Return values
mixed —testComplexMappingThrowsParseException()
public
testComplexMappingThrowsParseException() : mixed
Tags
Return values
mixed —testCustomTagsDisabled()
public
testCustomTagsDisabled() : mixed
Return values
mixed —testCustomTagSupport()
public
testCustomTagSupport(mixed $expected, mixed $yaml) : mixed
Parameters
- $expected : mixed
- $yaml : mixed
Tags
Return values
mixed —testDeprecatedPhpConstantTagMappingKey()
public
testDeprecatedPhpConstantTagMappingKey() : mixed
Tags
Return values
mixed —testDetectCircularReferences()
public
testDetectCircularReferences(mixed $yaml) : mixed
Parameters
- $yaml : mixed
Tags
Return values
mixed —testEmptyValue()
public
testEmptyValue() : mixed
Return values
mixed —testEndOfTheDocumentMarker()
public
testEndOfTheDocumentMarker() : mixed
Return values
mixed —testEscapedQuoteInQuotedMultiLineString()
public
testEscapedQuoteInQuotedMultiLineString() : mixed
Return values
mixed —testEvalRefException()
public
testEvalRefException() : mixed
Return values
mixed —testExceptionWhenUsingUnsupportedBuiltInTags()
public
testExceptionWhenUsingUnsupportedBuiltInTags() : mixed
Return values
mixed —testExplicitStringCasting()
public
testExplicitStringCasting() : mixed
Return values
mixed —testFilenamesAreParsedAsStringsWithoutFlag()
public
testFilenamesAreParsedAsStringsWithoutFlag() : mixed
Return values
mixed —testFloatKeys()
public
testFloatKeys() : mixed
Tags
Return values
mixed —testFoldedStringBlockWithComments()
public
testFoldedStringBlockWithComments() : mixed
Return values
mixed —testLegacyNonStringMappingKeys()
public
testLegacyNonStringMappingKeys(mixed $expected, mixed $yaml, mixed $comment) : mixed
Parameters
- $expected : mixed
- $yaml : mixed
- $comment : mixed
Tags
Return values
mixed —testMappingDuplicateKeyBlock()
> It is an error for two equal keys to appear in the same mapping node.
public
testMappingDuplicateKeyBlock() : mixed
In such a case the YAML processor may continue, ignoring the second
key: valuepair and issuing an appropriate warning. This strategy preserves a consistent information model for one-pass and random access applications.
Tags
Return values
mixed —testMappingDuplicateKeyFlow()
public
testMappingDuplicateKeyFlow() : mixed
Tags
Return values
mixed —testMappingInASequence()
public
testMappingInASequence() : mixed
Return values
mixed —testMergeKeysWhenMappingsAreParsedAsObjects()
public
testMergeKeysWhenMappingsAreParsedAsObjects() : mixed
Return values
mixed —testMultiLineComment()
public
testMultiLineComment() : mixed
Return values
mixed —testMultiLineQuotedStringWithTrailingBackslash()
public
testMultiLineQuotedStringWithTrailingBackslash() : mixed
Return values
mixed —testMultiLineStringLastResortParsing()
public
testMultiLineStringLastResortParsing() : mixed
Return values
mixed —testMultipleDocumentsNotSupportedException()
public
testMultipleDocumentsNotSupportedException() : mixed
Return values
mixed —testNestedFoldedStringBlockWithComments()
public
testNestedFoldedStringBlockWithComments() : mixed
Return values
mixed —testNonStringFollowedByCommentEmbeddedInMapping()
public
testNonStringFollowedByCommentEmbeddedInMapping() : mixed
Return values
mixed —testNonStringMappingKeys()
public
testNonStringMappingKeys(mixed $expected, mixed $yaml, mixed $comment) : mixed
Parameters
- $expected : mixed
- $yaml : mixed
- $comment : mixed
Tags
Return values
mixed —testNonUtf8Exception()
public
testNonUtf8Exception() : mixed
Tags
Return values
mixed —testObjectForMap()
public
testObjectForMap(mixed $yaml, mixed $expected) : mixed
Parameters
- $yaml : mixed
- $expected : mixed
Tags
Return values
mixed —testObjectForMapEnabledWithMappingUsingBooleanToggles()
public
testObjectForMapEnabledWithMappingUsingBooleanToggles(mixed $yaml, mixed $expected) : mixed
Parameters
- $yaml : mixed
- $expected : mixed
Tags
Return values
mixed —testObjectsSupportDisabledWithExceptions()
public
testObjectsSupportDisabledWithExceptions(mixed $yaml) : mixed
Parameters
- $yaml : mixed
Tags
Return values
mixed —testObjectsSupportDisabledWithExceptionsUsingBooleanToggles()
public
testObjectsSupportDisabledWithExceptionsUsingBooleanToggles(mixed $yaml) : mixed
Parameters
- $yaml : mixed
Tags
Return values
mixed —testObjectSupportDisabledButNoExceptions()
public
testObjectSupportDisabledButNoExceptions(mixed $input) : mixed
Parameters
- $input : mixed
Tags
Return values
mixed —testObjectSupportEnabled()
public
testObjectSupportEnabled() : mixed
Return values
mixed —testObjectSupportEnabledPassingTrue()
public
testObjectSupportEnabledPassingTrue() : mixed
Tags
Return values
mixed —testObjectSupportEnabledWithDeprecatedTag()
public
testObjectSupportEnabledWithDeprecatedTag(mixed $yaml) : mixed
Parameters
- $yaml : mixed
Tags
Return values
mixed —testParseBinaryData()
public
testParseBinaryData(mixed $data) : mixed
Parameters
- $data : mixed
Tags
Return values
mixed —testParseDateAsMappingValue()
public
testParseDateAsMappingValue() : mixed
Return values
mixed —testParseExceptionNotAffectedByMultiLineStringLastResortParsing()
public
testParseExceptionNotAffectedByMultiLineStringLastResortParsing(mixed $yaml) : mixed
Parameters
- $yaml : mixed
Tags
Return values
mixed —testParseExceptionOnDuplicate()
public
testParseExceptionOnDuplicate(mixed $input, mixed $duplicateKey, mixed $lineNumber) : mixed
Parameters
- $input : mixed
- $duplicateKey : mixed
- $lineNumber : mixed
Tags
Return values
mixed —testParseFile()
public
testParseFile() : mixed
Return values
mixed —testParseIndentedMappings()
public
testParseIndentedMappings(mixed $yaml, mixed $expected) : mixed
Parameters
- $yaml : mixed
- $expected : mixed
Tags
Return values
mixed —testParseInvalidBinaryData()
public
testParseInvalidBinaryData(mixed $data, mixed $expectedMessage) : mixed
Parameters
- $data : mixed
- $expectedMessage : mixed
Tags
Return values
mixed —testParseMultiLineMappingValue()
public
testParseMultiLineMappingValue(mixed $yaml, mixed $expected, mixed $parseError) : mixed
Parameters
- $yaml : mixed
- $expected : mixed
- $parseError : mixed
Tags
Return values
mixed —testParseMultiLineQuotedString()
public
testParseMultiLineQuotedString() : mixed
Return values
mixed —testParseMultiLineString()
public
testParseMultiLineString() : mixed
Return values
mixed —testParseMultiLineUnquotedString()
public
testParseMultiLineUnquotedString() : mixed
Return values
mixed —testParserCleansUpReferencesBetweenRuns()
public
testParserCleansUpReferencesBetweenRuns() : mixed
Return values
mixed —testParseReferencesOnMergeKeys()
public
testParseReferencesOnMergeKeys() : mixed
Return values
mixed —testParseReferencesOnMergeKeysWithMappingsParsedAsObjects()
public
testParseReferencesOnMergeKeysWithMappingsParsedAsObjects() : mixed
Return values
mixed —testParserThrowsExceptionWithCorrectLineNumber()
public
testParserThrowsExceptionWithCorrectLineNumber( $lineNumber, $yaml) : mixed
Parameters
Tags
Return values
mixed —testParseValueWithModifiers()
public
testParseValueWithModifiers() : mixed
Return values
mixed —testParseValueWithNegativeModifiers()
public
testParseValueWithNegativeModifiers() : mixed
Return values
mixed —testParsingIniThrowsException()
public
testParsingIniThrowsException() : mixed
Return values
mixed —testParsingMultipleDocuments()
This is a regression test for a bug where a YAML block with a nested multiline string using | was parsed without a trailing \n when a shorter YAML document was parsed before.
public
testParsingMultipleDocuments() : mixed
When a shorter document was parsed before, the nested string did not have a \n at the end of the string, because the Parser thought it was the end of the file, even though it is not.
Return values
mixed —testParsingNonExistentFilesThrowsException()
public
testParsingNonExistentFilesThrowsException() : mixed
Return values
mixed —testParsingNotReadableFilesThrowsException()
public
testParsingNotReadableFilesThrowsException() : mixed
Return values
mixed —testPhpConstantTagMappingAsScalarKey()
public
testPhpConstantTagMappingAsScalarKey() : mixed
Return values
mixed —testPhpConstantTagMappingKey()
public
testPhpConstantTagMappingKey() : mixed
Return values
mixed —testPhpConstantTagMappingKeyWithKeysCastToStrings()
public
testPhpConstantTagMappingKeyWithKeysCastToStrings() : mixed
Tags
Return values
mixed —testReferenceResolvingInInlineStrings()
public
testReferenceResolvingInInlineStrings() : mixed
Return values
mixed —testScalarInSequence()
public
testScalarInSequence() : mixed
Return values
mixed —testSequenceFollowedByCommentEmbeddedInMapping()
public
testSequenceFollowedByCommentEmbeddedInMapping() : mixed
Return values
mixed —testSequenceInAMapping()
public
testSequenceInAMapping() : mixed
Return values
mixed —testSequenceInMappingStartedBySingleDashLine()
public
testSequenceInMappingStartedBySingleDashLine() : mixed
Return values
mixed —testShortcutKeyUnindentedCollectionException()
public
testShortcutKeyUnindentedCollectionException() : mixed
Return values
mixed —testSpecifications()
public
testSpecifications(mixed $expected, mixed $yaml, mixed $comment, mixed $deprecated) : mixed
Parameters
- $expected : mixed
- $yaml : mixed
- $comment : mixed
- $deprecated : mixed
Tags
Return values
mixed —testStringBlockWithComments()
public
testStringBlockWithComments() : mixed
Return values
mixed —testTabsInYaml()
public
testTabsInYaml() : mixed
Return values
mixed —testTaggedInlineMapping()
public
testTaggedInlineMapping() : mixed
Return values
mixed —testTagMappingAsScalarKey()
public
testTagMappingAsScalarKey() : mixed
Return values
mixed —testUnindentedCollectionException()
public
testUnindentedCollectionException() : mixed
Return values
mixed —testUnsupportedTagWithScalar()
public
testUnsupportedTagWithScalar() : mixed
Tags
Return values
mixed —testYamlDirective()
public
testYamlDirective() : mixed
Return values
mixed —setUp()
protected
setUp() : mixed
Return values
mixed —tearDown()
protected
tearDown() : mixed
Return values
mixed —loadTestsFromFixtureFiles()
private
loadTestsFromFixtureFiles(mixed $testsFile) : mixed
Parameters
- $testsFile : mixed