-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[Yaml] Add tags support #21194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Yaml] Add tags support #21194
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
use Symfony\Component\DependencyInjection\Dumper\YamlDumper; | ||
use Symfony\Component\Yaml\Yaml; | ||
use Symfony\Component\Yaml\Parser; | ||
|
||
class YamlDumperTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
|
@@ -62,8 +63,10 @@ public function testDumpAutowireData() | |
$this->assertStringEqualsFile(self::$fixturesPath.'/yaml/services24.yml', $dumper->dump()); | ||
} | ||
|
||
private function assertEqualYamlStructure($yaml, $expected, $message = '') | ||
private function assertEqualYamlStructure($expected, $yaml, $message = '') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shouldn't this accept a new $flags argument instead? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It works either way but imo this function should always be executed with the same flags used in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh sure! |
||
{ | ||
$this->assertEquals(Yaml::parse($expected), Yaml::parse($yaml), $message); | ||
$parser = new Parser(); | ||
|
||
$this->assertEquals($parser->parse($expected, Yaml::PARSE_CUSTOM_TAGS), $parser->parse($yaml, Yaml::PARSE_CUSTOM_TAGS), $message); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instanceof ArgumentInterface
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't know the tag corresponding to other instances so I think it's better this way here.