8000 [PhpUnitBridge] Fix tests · symfony/symfony@bca4761 · GitHub
[go: up one dir, main page]

Skip to content

Commit bca4761

Browse files
[PhpUnitBridge] Fix tests
1 parent ac3ae81 commit bca4761

File tree

4 files changed

+8
-50
lines changed

4 files changed

+8
-50
lines changed

src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/DeprecationTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ public function testItCanDetermineTheClassWhereTheDeprecationHappened()
2626

2727
public function testItCanTellWhetherItIsInternal()
2828
{
29+
$r = new \ReflectionClass(Deprecation::class);
30+
31+
if (dirname($r->getFileName(), 2) !== dirname(__DIR__, 2)) {
32+
$this->markTestSkipped('Test case is not compatible with having the bridge in vendor/');
33+
}
34+
2935
$deprecation = new Deprecation('💩', $this->debugBacktrace(), __FILE__);
3036
$this->assertSame(Deprecation::TYPE_SELF, $deprecation->getType());
3137
}

src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/disabled.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
--TEST--
2-
Test DeprecationErrorHandler in disabled mode
2+
Test DeprecationErrorHandler in weak mode
33
--FILE--
44
<?php
55

6-
$_SERVER['SYMFONY_DEPRECATIONS_HELPER'] = 'disabled';
6+
putenv('SYMFONY_DEPRECATIONS_HELPER=disabled');
77
putenv('ANSICON');
88
putenv('ConEmuANSI');
99
putenv('TERM');

src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/disabled_from_env_superglobal.phpt

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/disabled_from_putenv.phpt

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)
0