X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=vendor%2Fsymfony%2Fhttp-kernel%2FTests%2FDataCollector%2FConfigDataCollectorTest.php;h=4fb36afda227106f3dbecd444509e6377f4c2c17;hb=9e65bae52407293a5182f19dc57b5628b09e92f4;hp=6d9f65d0ac6e86223d710d81e9b925840c0a2e58;hpb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;p=yaffs-website diff --git a/vendor/symfony/http-kernel/Tests/DataCollector/ConfigDataCollectorTest.php b/vendor/symfony/http-kernel/Tests/DataCollector/ConfigDataCollectorTest.php index 6d9f65d0a..4fb36afda 100644 --- a/vendor/symfony/http-kernel/Tests/DataCollector/ConfigDataCollectorTest.php +++ b/vendor/symfony/http-kernel/Tests/DataCollector/ConfigDataCollectorTest.php @@ -31,31 +31,16 @@ class ConfigDataCollectorTest extends TestCase $this->assertTrue($c->isDebug()); $this->assertSame('config', $c->getName()); $this->assertSame('testkernel', $c->getAppName()); - $this->assertSame(PHP_VERSION, $c->getPhpVersion()); + $this->assertRegExp('~^'.preg_quote($c->getPhpVersion(), '~').'~', PHP_VERSION); + $this->assertRegExp('~'.preg_quote((string) $c->getPhpVersionExtra(), '~').'$~', PHP_VERSION); + $this->assertSame(PHP_INT_SIZE * 8, $c->getPhpArchitecture()); + $this->assertSame(class_exists('Locale', false) && \Locale::getDefault() ? \Locale::getDefault() : 'n/a', $c->getPhpIntlLocale()); + $this->assertSame(date_default_timezone_get(), $c->getPhpTimezone()); $this->assertSame(Kernel::VERSION, $c->getSymfonyVersion()); $this->assertNull($c->getToken()); - - // if else clause because we don't know it - if (extension_loaded('xdebug')) { - $this->assertTrue($c->hasXDebug()); - } else { - $this->assertFalse($c->hasXDebug()); - } - - // if else clause because we don't know it - if (((extension_loaded('eaccelerator') && ini_get('eaccelerator.enable')) - || - (extension_loaded('apc') && ini_get('apc.enabled')) - || - (extension_loaded('Zend OPcache') && ini_get('opcache.enable')) - || - (extension_loaded('xcache') && ini_get('xcache.cacher')) - || - (extension_loaded('wincache') && ini_get('wincache.ocenabled')))) { - $this->assertTrue($c->hasAccelerator()); - } else { - $this->assertFalse($c->hasAccelerator()); - } + $this->assertSame(extension_loaded('xdebug'), $c->hasXDebug()); + $this->assertSame(extension_loaded('Zend OPcache') && ini_get('opcache.enable'), $c->hasZendOpcache()); + $this->assertSame(extension_loaded('apcu') && ini_get('apc.enabled'), $c->hasApcu()); } }