add unit tests

This commit is contained in:
Dennis Eichhorn 2021-11-02 21:57:09 +01:00
parent dfbc9fdacd
commit ec49baa0b1
2 changed files with 1 additions and 33 deletions

View File

@ -107,36 +107,4 @@ final class EventMapperTest extends \PHPUnit\Framework\TestCase
self::assertCount(1, $newest);
}
/**
* @group volume
* @group module
* @coversNothing
*/
public function testVolume() : void
{
for ($i = 1; $i < 100; ++$i) {
$text = new Text();
$event = new Event();
$event->setType(EventType::SEMINAR);
$event->name = $text->generateText(\mt_rand(3, 7));
$event->description = $text->generateText(\mt_rand(20, 100));
$event->createdBy = new NullAccount(1);
$event->start = new \DateTime('2000-05-05');
$event->end = new \DateTime('2005-05-05');
$event->progress = \mt_rand(0, 100);
$event->setProgressType(\mt_rand(0, 4));
$money = new Money();
$money->setString('1.23');
$event->costs = $money;
$event->budget = $money;
$event->earnings = $money;
$id = EventMapper::create($event);
}
}
}

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="Bootstrap.php" colors="true" columns="120" 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">
<exclude>
<directory>*vendor*</directory>