From a5ba70d40ede37df69fe18d50f9b3c83eb91d6df Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 26 Sep 2020 14:28:02 +0200 Subject: [PATCH] update and fix phpunit config --- System/File/Local/FileAbstract.php | 2 +- .../Cache/Connection/FileCacheTest.php | 2 +- tests/phpunit_no_coverage.xml | 84 +++++++++---------- 3 files changed, 40 insertions(+), 48 deletions(-) diff --git a/System/File/Local/FileAbstract.php b/System/File/Local/FileAbstract.php index 782351c33..a7b9373e8 100644 --- a/System/File/Local/FileAbstract.php +++ b/System/File/Local/FileAbstract.php @@ -189,7 +189,7 @@ abstract class FileAbstract implements ContainerInterface $ctime = \filectime($this->path); $this->createdAt = (new \DateTimeImmutable())->setTimestamp($mtime === false ? 0 : $mtime); - $this->changedAt = (new \DateTimeImmutable())->setTimestamp($ctime === false ? 0 : $ctime); + $this->changedAt->setTimestamp($ctime === false ? 0 : $ctime); $owner = \fileowner($this->path); diff --git a/tests/DataStorage/Cache/Connection/FileCacheTest.php b/tests/DataStorage/Cache/Connection/FileCacheTest.php index e20f7595d..cf3c488eb 100644 --- a/tests/DataStorage/Cache/Connection/FileCacheTest.php +++ b/tests/DataStorage/Cache/Connection/FileCacheTest.php @@ -335,7 +335,7 @@ class FileCacheTest extends \PHPUnit\Framework\TestCase { $this->expectException(\phpOMS\DataStorage\Cache\Exception\InvalidConnectionConfigException::class); - $cache = new FileCache('/etc/invalidPathOrPermission^$:?><'); + $cache = new FileCache("/root/etc/invalidPathOrPermission^$:?><"); } /** diff --git a/tests/phpunit_no_coverage.xml b/tests/phpunit_no_coverage.xml index 06586189e..b77acb1e9 100644 --- a/tests/phpunit_no_coverage.xml +++ b/tests/phpunit_no_coverage.xml @@ -1,48 +1,40 @@ - - - - ./ - Module/ModuleManagerTest.php - ./tests - ./vendor - ./Build - ./Resources - - - - - .* - - ../*/tests* - ../* - ../* - ../* - ./Build - ./Resources - *vendor* - ./vendor - ../vendor - - - - - - volume - maybe - - - - - - - + + + + .* + + + ../*/tests* + ../* + ../* + ../* + ./Build + ./Resources + *vendor* + ./vendor + ../vendor + + + + + ./ + Module/ModuleManagerTest.php + ./tests + ./vendor + ./Build + ./Resources + + + + + volume + maybe + + + + + + +