[Filesystem] Fix transient tests
This commit is contained in:
parent
be867ae968
commit
a6edd78116
@ -22,7 +22,7 @@ class ClassMapGeneratorTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function prepare_workspace()
|
public function prepare_workspace()
|
||||||
{
|
{
|
||||||
$this->workspace = rtrim(sys_get_temp_dir(), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.time().mt_rand(0, 1000);
|
$this->workspace = sys_get_temp_dir().'/'.microtime(true).'.'.mt_rand();
|
||||||
mkdir($this->workspace, 0777, true);
|
mkdir($this->workspace, 0777, true);
|
||||||
$this->workspace = realpath($this->workspace);
|
$this->workspace = realpath($this->workspace);
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
$this->umask = umask(0);
|
$this->umask = umask(0);
|
||||||
$this->filesystem = new Filesystem();
|
$this->filesystem = new Filesystem();
|
||||||
$this->workspace = rtrim(sys_get_temp_dir(), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.time().mt_rand(0, 1000);
|
$this->workspace = sys_get_temp_dir().'/'.microtime(true).'.'.mt_rand();
|
||||||
mkdir($this->workspace, 0777, true);
|
mkdir($this->workspace, 0777, true);
|
||||||
$this->workspace = realpath($this->workspace);
|
$this->workspace = realpath($this->workspace);
|
||||||
}
|
}
|
||||||
|
@ -414,7 +414,10 @@ abstract class AbstractIntlDateFormatterTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testFormatWithIntlTimeZone()
|
public function testFormatWithIntlTimeZone()
|
||||||
{
|
{
|
||||||
if (PHP_VERSION_ID < 50500 && !(extension_loaded('intl') && method_exists('IntlDateFormatter', 'setTimeZone'))) {
|
if (!extension_loaded('intl')) {
|
||||||
|
$this->markTestSkipped('Extension intl is required.');
|
||||||
|
}
|
||||||
|
if (PHP_VERSION_ID < 50500 && !method_exists('IntlDateFormatter', 'setTimeZone')) {
|
||||||
$this->markTestSkipped('Only in PHP 5.5+ IntlDateFormatter allows to use DateTimeZone objects.');
|
$this->markTestSkipped('Only in PHP 5.5+ IntlDateFormatter allows to use DateTimeZone objects.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user