mirror of
https://github.com/Karaka-Management/oms-EventManagement.git
synced 2026-02-14 00:38:41 +00:00
add unit tests
This commit is contained in:
parent
dfbc9fdacd
commit
ec49baa0b1
|
|
@ -107,36 +107,4 @@ final class EventMapperTest extends \PHPUnit\Framework\TestCase
|
||||||
|
|
||||||
self::assertCount(1, $newest);
|
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<coverage includeUncoveredFiles="true" processUncoveredFiles="false">
|
||||||
<exclude>
|
<exclude>
|
||||||
<directory>*vendor*</directory>
|
<directory>*vendor*</directory>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user