Merge branch '4.3' into 4.4

* 4.3:
  [PhpUnitBridge] Fix tests
This commit is contained in:
Nicolas Grekas 2019-06-26 13:29:11 +02:00
commit f0a66754b8
4 changed files with 8 additions and 50 deletions

View File

@ -26,6 +26,12 @@ class DeprecationTest extends TestCase
public function testItCanTellWhetherItIsInternal()
{
$r = new \ReflectionClass(Deprecation::class);
if (dirname($r->getFileName(), 2) !== dirname(__DIR__, 2)) {
$this->markTestSkipped('Test case is not compatible with having the bridge in vendor/');
}
$deprecation = new Deprecation('💩', $this->debugBacktrace(), __FILE__);
$this->assertSame(Deprecation::TYPE_SELF, $deprecation->getType());
}

View File

@ -1,9 +1,9 @@
--TEST--
Test DeprecationErrorHandler in disabled mode
Test DeprecationErrorHandler in weak mode
--FILE--
<?php
$_SERVER['SYMFONY_DEPRECATIONS_HELPER'] = 'disabled';
putenv('SYMFONY_DEPRECATIONS_HELPER=disabled');
putenv('ANSICON');
putenv('ConEmuANSI');
putenv('TERM');

View File

@ -1,24 +0,0 @@
--TEST--
Test DeprecationErrorHandler in disabled mode (via putenv)
--FILE--
<?php
$_ENV['SYMFONY_DEPRECATIONS_HELPER'] = 'disabled';
putenv('ANSICON');
putenv('ConEmuANSI');
putenv('TERM');
$vendor = __DIR__;
while (!file_exists($vendor.'/vendor')) {
$vendor = dirname($vendor);
}
define('PHPUNIT_COMPOSER_INSTALL', $vendor.'/vendor/autoload.php');
require PHPUNIT_COMPOSER_INSTALL;
require_once __DIR__.'/../../bootstrap.php';
echo (int) set_error_handler('var_dump');
echo (int) class_exists('Symfony\Bridge\PhpUnit\DeprecationErrorHandler', false);
?>
--EXPECTF--
00

View File

@ -1,24 +0,0 @@
--TEST--
Test DeprecationErrorHandler in disabled mode (via putenv)
--FILE--
<?php
putenv('SYMFONY_DEPRECATIONS_HELPER=disabled');
putenv('ANSICON');
putenv('ConEmuANSI');
putenv('TERM');
$vendor = __DIR__;
while (!file_exists($vendor.'/vendor')) {
$vendor = dirname($vendor);
}
define('PHPUNIT_COMPOSER_INSTALL', $vendor.'/vendor/autoload.php');
require PHPUNIT_COMPOSER_INSTALL;
require_once __DIR__.'/../../bootstrap.php';
echo (int) set_error_handler('var_dump');
echo (int) class_exists('Symfony\Bridge\PhpUnit\DeprecationErrorHandler', false);
?>
--EXPECTF--
00