Skip to content

Conversation

ro0NL
Copy link
Contributor

@ro0NL ro0NL commented Jan 15, 2017

Q A
Branch? master
Bug fix? yes
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? 😱
Fixed tickets #19668 (comment)
License MIT
Doc PR symfony/symfony-docs#...

assertStringMatchesFormat is too tolerant here.

See also #21295

Given

$ ./phpunit src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php --filter testLegacyGet

Before

OK (1 test, 9 assertions)

After

1) Symfony\Component\DependencyInjection\Tests\ContainerTest::testLegacyGet
Failed asserting that format description matches text.
--- Expected
+++ Actual
@@ @@
 @expectedDeprecation:
-%A  Service identifiers will be made case sensitive in Symfony 4.0. Using "Foo" instead of "foo" is deprecated since version 3.3.
+

/var/www/html/symfony/vendor/symfony/symfony/.phpunit/phpunit-5.7/phpunit:5

FAILURES!
Tests: 1, Assertions: 9, Failures: 1.

ping @nicolas-grekas

@ro0NL
Copy link
Contributor Author

ro0NL commented Jan 15, 2017

I played around with a different approach, using the Differ directly.. the output imo. is way better, and the check is simpler;

1) Symfony\Component\DependencyInjection\Tests\ContainerTest::testLegacyGet
Failed asserting expected deprecations.

--- Expected
+++ Actual
@@ @@
-Service identifiers will be made case sensitive in Symfony 4.0. Using "Foo" instead of "foo" is deprecated since version 3.3.
 Generating a dumped container without populating the method map is deprecated since 3.2 and will be unsupported in 4.0. Update your dumper to generate the method map.
 Generating a dumped container without populating the method map is deprecated since 3.2 and will be unsupported in 4.0. Update your dumper to generate the method map.
 Generating a dumped container without populating the method map is deprecated since 3.2 and will be unsupported in 4.0. Update your dumper to generate the method map.
 Generating a dumped container without populating the method map is deprecated since 3.2 and will be unsupported in 4.0. Update your dumper to generate the method map.
+one to many :)

/var/www/html/symfony/vendor/symfony/symfony/.phpunit/phpunit-5.7/phpunit:5

FAILURES!
Tests: 1, Assertions: 9, Failures: 1.

@nicolas-grekas
Copy link
Member

👎 because that's by design: see #21186

@ro0NL
Copy link
Contributor Author

ro0NL commented Jan 15, 2017

I see.. missed that. Im not sure it's a good thing; as i totally missed one with #19668 (comment)

Lets see how it goes.

@ro0NL ro0NL closed this Jan 15, 2017
@ro0NL ro0NL deleted the phpunit/deprecations branch January 15, 2017 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants