update and fix phpunit config

This commit is contained in:
Dennis Eichhorn 2020-09-26 14:28:02 +02:00
parent 340fdc4943
commit a5ba70d40e
3 changed files with 40 additions and 48 deletions

View File

@ -189,7 +189,7 @@ abstract class FileAbstract implements ContainerInterface
$ctime = \filectime($this->path); $ctime = \filectime($this->path);
$this->createdAt = (new \DateTimeImmutable())->setTimestamp($mtime === false ? 0 : $mtime); $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); $owner = \fileowner($this->path);

View File

@ -335,7 +335,7 @@ class FileCacheTest extends \PHPUnit\Framework\TestCase
{ {
$this->expectException(\phpOMS\DataStorage\Cache\Exception\InvalidConnectionConfigException::class); $this->expectException(\phpOMS\DataStorage\Cache\Exception\InvalidConnectionConfigException::class);
$cache = new FileCache('/etc/invalidPathOrPermission^$:?><'); $cache = new FileCache("/root/etc/invalidPathOrPermission^$:?><");
} }
/** /**

View File

@ -1,26 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<phpunit <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="Bootstrap.php" colors="true" stopOnError="true" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false" beStrictAboutTestsThatDoNotTestAnything="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
bootstrap="Bootstrap.php" <coverage includeUncoveredFiles="true" processUncoveredFiles="false">
colors="true" <include>
stopOnError="true"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
beStrictAboutTestsThatDoNotTestAnything="false"
>
<testsuites>
<testsuite name="phpOMS">
<directory>./</directory>
<exclude>Module/ModuleManagerTest.php</exclude>
<exclude>./tests</exclude>
<exclude>./vendor</exclude>
<exclude>./Build</exclude>
<exclude>./Resources</exclude>
</testsuite>
</testsuites>
<filter>
<whitelist addUncoveredFilesFromWhitelist="true" processUncoveredFilesFromWhitelist="false">
<directory suffix=".php">.*</directory> <directory suffix=".php">.*</directory>
</include>
<exclude> <exclude>
<directory>../*/tests*</directory> <directory>../*/tests*</directory>
<directory suffix="tpl.php">../*</directory> <directory suffix="tpl.php">../*</directory>
@ -32,8 +15,17 @@
<directory>./vendor</directory> <directory>./vendor</directory>
<directory>../vendor</directory> <directory>../vendor</directory>
</exclude> </exclude>
</whitelist> </coverage>
</filter> <testsuites>
<testsuite name="phpOMS">
<directory>./</directory>
<exclude>Module/ModuleManagerTest.php</exclude>
<exclude>./tests</exclude>
<exclude>./vendor</exclude>
<exclude>./Build</exclude>
<exclude>./Resources</exclude>
</testsuite>
</testsuites>
<groups> <groups>
<exclude> <exclude>
<group>volume</group> <group>volume</group>