8000 Merge branch '3.2' · symfony/symfony@12a4cfe · GitHub
[go: up one dir, main page]

Skip to content

Commit 12a4cfe

Browse files
Merge branch '3.2'
* 3.2: Fix test skip tests with failure and error states too hide stack trace of expected deprecation failures
2 parents f71c699 + b703f32 commit 12a4cfe

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/Symfony/Bridge/PhpUnit/SymfonyTestsListener.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ class SymfonyTestsListener extends \PHPUnit_Framework_BaseTestListener
3434
*/
3535
public function __construct(array $mockedNamespaces = array())
3636
{
37+
\PHPUnit_Util_Blacklist::$blacklistedClassNames['\Symfony\Bridge\PhpUnit\SymfonyTestsListener'] = 1;
38+
3739
$warn = false;
3840
foreach ($mockedNamespaces as $type => $namespaces) {
3941
if (!is_array($namespaces)) {
@@ -175,7 +177,7 @@ public function endTest(\PHPUnit_Framework_Test $test, $time)
175177
if ($this->expectedDeprecations) {
176178
restore_error_handler();
177179

178-
if (!in_array($test->getStatus(), array(\PHPUnit_Runner_BaseTestRunner::STATUS_SKIPPED, \PHPUnit_Runner_BaseTestRunner::STATUS_INCOMPLETE), true)) {
180+
if (!in_array($test->getStatus(), array(\PHPUnit_Runner_BaseTestRunner::STATUS_SKIPPED, \PHPUnit_Runner_BaseTestRunner::STATUS_INCOMPLETE, \PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE, \PHPUnit_Runner_BaseTestRunner::STATUS_ERROR), true)) {
179181
try {
180182
$prefix = "@expectedDeprecation:\n ";
181183
$test->assertStringMatchesFormat($prefix.implode("\n ", $this->expectedDeprecations), $prefix.implode("\n ", $this->gatheredDeprecations));

src/Symfony/Component/VarDumper/Tests/Caster/ExceptionCasterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public function testHtmlDump()
160160
-<span class=sf-dump-private title="Private property defined in class:&#10;`Exception`">trace</span>: {<samp>
161161
<span class=sf-dump-meta title="%sExceptionCasterTest.php
162162
Stack level %d."><span class=sf-dump-ellipsis>%sVarDumper%eTests</span>%eCaster%eExceptionCasterTest.php</span>: <span class=sf-dump-num>26</span>
163-
&hellip;12
163+
&hellip;%d
164164
</samp>}
165165
</samp>}
166166
</bar>

0 commit comments

Comments
 (0)
0