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);
$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);

View File

@ -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^$:?><");
}
/**

View File

@ -1,48 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
bootstrap="Bootstrap.php"
colors="true"
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>
<exclude>
<directory>../*/tests*</directory>
<directory suffix="tpl.php">../*</directory>
<directory suffix="lang.php">../*</directory>
<directory suffix="Test.php">../*</directory>
<directory>./Build</directory>
<directory>./Resources</directory>
<directory>*vendor*</directory>
<directory>./vendor</directory>
<directory>../vendor</directory>
</exclude>
</whitelist>
</filter>
<groups>
<exclude>
<group>volume</group>
<group>maybe</group>
</exclude>
</groups>
<php>
<const name="WEB_SERVER_HOST" value="localhost" />
<const name="WEB_SERVER_PORT" value="1234" />
<const name="WEB_SERVER_DOCROOT" value="./" />
</php>
<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">
<coverage includeUncoveredFiles="true" processUncoveredFiles="false">
<include>
<directory suffix=".php">.*</directory>
</include>
<exclude>
<directory>../*/tests*</directory>
<directory suffix="tpl.php">../*</directory>
<directory suffix="lang.php">../*</directory>
<directory suffix="Test.php">../*</directory>
<directory>./Build</directory>
<directory>./Resources</directory>
<directory>*vendor*</directory>
<directory>./vendor</directory>
<directory>../vendor</directory>
</exclude>
</coverage>
<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>
<exclude>
<group>volume</group>
<group>maybe</group>
</exclude>
</groups>
<php>
<const name="WEB_SERVER_HOST" value="localhost"/>
<const name="WEB_SERVER_PORT" value="1234"/>
<const name="WEB_SERVER_DOCROOT" value="./"/>
</php>
</phpunit>