mirror of
https://github.com/Karaka-Management/oms-EventManagement.git
synced 2026-02-14 08:48:41 +00:00
upgrade phpunit
This commit is contained in:
parent
62f54ecf29
commit
18bc3569ce
|
|
@ -27,12 +27,10 @@ use phpOMS\Localization\Money;
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\EventManagement\Models\EventMapper::class)]
|
||||||
final class EventMapperTest extends \PHPUnit\Framework\TestCase
|
final class EventMapperTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\EventManagement\Models\EventMapper
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testCRUD() : void
|
public function testCRUD() : void
|
||||||
{
|
{
|
||||||
$event = new Event();
|
$event = new Event();
|
||||||
|
|
@ -99,10 +97,7 @@ final class EventMapperTest extends \PHPUnit\Framework\TestCase
|
||||||
self::assertEquals(\end($expected)->name, \end($actual)->name);
|
self::assertEquals(\end($expected)->name, \end($actual)->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\EventManagement\Models\EventMapper
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testNewest() : void
|
public function testNewest() : void
|
||||||
{
|
{
|
||||||
$newest = EventMapper::getAll()->sort('id', OrderType::DESC)->limit(1)->execute();
|
$newest = EventMapper::getAll()->sort('id', OrderType::DESC)->limit(1)->execute();
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ use phpOMS\Stdlib\Base\FloatInt;
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\EventManagement\Models\Event::class)]
|
||||||
final class EventTest extends \PHPUnit\Framework\TestCase
|
final class EventTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
private Event $event;
|
private Event $event;
|
||||||
|
|
@ -34,10 +35,7 @@ final class EventTest extends \PHPUnit\Framework\TestCase
|
||||||
$this->event = new Event();
|
$this->event = new Event();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\EventManagement\Models\Event
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testDefault() : void
|
public function testDefault() : void
|
||||||
{
|
{
|
||||||
self::assertEquals(0, $this->event->id);
|
self::assertEquals(0, $this->event->id);
|
||||||
|
|
@ -55,20 +53,14 @@ final class EventTest extends \PHPUnit\Framework\TestCase
|
||||||
self::assertEquals(ProgressType::MANUAL, $this->event->progressType);
|
self::assertEquals(ProgressType::MANUAL, $this->event->progressType);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\EventManagement\Models\Event
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testProgressInputOutput() : void
|
public function testProgressInputOutput() : void
|
||||||
{
|
{
|
||||||
$this->event->progress = 10;
|
$this->event->progress = 10;
|
||||||
self::assertEquals(10, $this->event->progress);
|
self::assertEquals(10, $this->event->progress);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\EventManagement\Models\Event
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testSerialize() : void
|
public function testSerialize() : void
|
||||||
{
|
{
|
||||||
$this->event->name = 'Name';
|
$this->event->name = 'Name';
|
||||||
|
|
|
||||||
|
|
@ -19,31 +19,23 @@ use Modules\EventManagement\Models\NullEventAttribute;
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\EventManagement\Models\NullEventAttribute::class)]
|
||||||
final class NullEventAttributeTest extends \PHPUnit\Framework\TestCase
|
final class NullEventAttributeTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\EventManagement\Models\NullEventAttribute
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testNull() : void
|
public function testNull() : void
|
||||||
{
|
{
|
||||||
self::assertInstanceOf('\Modules\EventManagement\Models\EventAttribute', new NullEventAttribute());
|
self::assertInstanceOf('\Modules\EventManagement\Models\EventAttribute', new NullEventAttribute());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\EventManagement\Models\NullEventAttribute
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testId() : void
|
public function testId() : void
|
||||||
{
|
{
|
||||||
$null = new NullEventAttribute(2);
|
$null = new NullEventAttribute(2);
|
||||||
self::assertEquals(2, $null->id);
|
self::assertEquals(2, $null->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\EventManagement\Models\NullEventAttribute
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testJsonSerialize() : void
|
public function testJsonSerialize() : void
|
||||||
{
|
{
|
||||||
$null = new NullEventAttribute(2);
|
$null = new NullEventAttribute(2);
|
||||||
|
|
|
||||||
|
|
@ -19,31 +19,23 @@ use Modules\EventManagement\Models\NullEventAttributeType;
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\EventManagement\Models\NullEventAttributeType::class)]
|
||||||
final class NullEventAttributeTypeTest extends \PHPUnit\Framework\TestCase
|
final class NullEventAttributeTypeTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\EventManagement\Models\NullEventAttributeType
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testNull() : void
|
public function testNull() : void
|
||||||
{
|
{
|
||||||
self::assertInstanceOf('\Modules\EventManagement\Models\EventAttributeType', new NullEventAttributeType());
|
self::assertInstanceOf('\Modules\EventManagement\Models\EventAttributeType', new NullEventAttributeType());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\EventManagement\Models\NullEventAttributeType
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testId() : void
|
public function testId() : void
|
||||||
{
|
{
|
||||||
$null = new NullEventAttributeType(2);
|
$null = new NullEventAttributeType(2);
|
||||||
self::assertEquals(2, $null->id);
|
self::assertEquals(2, $null->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\EventManagement\Models\NullEventAttributeType
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testJsonSerialize() : void
|
public function testJsonSerialize() : void
|
||||||
{
|
{
|
||||||
$null = new NullEventAttributeType(2);
|
$null = new NullEventAttributeType(2);
|
||||||
|
|
|
||||||
|
|
@ -19,31 +19,23 @@ use Modules\EventManagement\Models\NullEventAttributeValue;
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\EventManagement\Models\NullEventAttributeValue::class)]
|
||||||
final class NullEventAttributeValueTest extends \PHPUnit\Framework\TestCase
|
final class NullEventAttributeValueTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\EventManagement\Models\NullEventAttributeValue
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testNull() : void
|
public function testNull() : void
|
||||||
{
|
{
|
||||||
self::assertInstanceOf('\Modules\EventManagement\Models\EventAttributeValue', new NullEventAttributeValue());
|
self::assertInstanceOf('\Modules\EventManagement\Models\EventAttributeValue', new NullEventAttributeValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\EventManagement\Models\NullEventAttributeValue
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testId() : void
|
public function testId() : void
|
||||||
{
|
{
|
||||||
$null = new NullEventAttributeValue(2);
|
$null = new NullEventAttributeValue(2);
|
||||||
self::assertEquals(2, $null->id);
|
self::assertEquals(2, $null->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\EventManagement\Models\NullEventAttributeValue
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testJsonSerialize() : void
|
public function testJsonSerialize() : void
|
||||||
{
|
{
|
||||||
$null = new NullEventAttributeValue(2);
|
$null = new NullEventAttributeValue(2);
|
||||||
|
|
|
||||||
|
|
@ -1,31 +1,6 @@
|
||||||
<?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" columns="120" 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/11.0/phpunit.xsd" cacheDirectory=".phpunit.cache">
|
||||||
<coverage includeUncoveredFiles="true" processUncoveredFiles="false">
|
<coverage includeUncoveredFiles="true">
|
||||||
<include>
|
|
||||||
<directory suffix=".php">../</directory>
|
|
||||||
</include>
|
|
||||||
<exclude>
|
|
||||||
<directory>../vendor*</directory>
|
|
||||||
<directory>../MainRepository*</directory>
|
|
||||||
<directory>../Karaka*</directory>
|
|
||||||
<directory>../Admin/Install/Application*</directory>
|
|
||||||
<directory>../phpOMS*</directory>
|
|
||||||
<directory>../tests*</directory>
|
|
||||||
<directory>../*/tests*</directory>
|
|
||||||
<directory>../**/tests*</directory>
|
|
||||||
<directory>*/tests*</directory>
|
|
||||||
<directory suffix="tpl.php">../*</directory>
|
|
||||||
<directory suffix="lang.php">../*</directory>
|
|
||||||
<directory suffix="Test.php">../*</directory>
|
|
||||||
<directory suffix="Routes.php">../*</directory>
|
|
||||||
<directory suffix="Hooks.php">../*</directory>
|
|
||||||
<directory>../**/test*</directory>
|
|
||||||
<directory>../**/Theme*</directory>
|
|
||||||
<directory>../**/Admin/Routes*</directory>
|
|
||||||
<directory>../**/Admin/Hooks*</directory>
|
|
||||||
<directory>../**/Admin/Install*</directory>
|
|
||||||
<directory>../Media/Files*</directory>
|
|
||||||
</exclude>
|
|
||||||
<report>
|
<report>
|
||||||
<clover outputFile="coverage.xml"/>
|
<clover outputFile="coverage.xml"/>
|
||||||
<html outputDirectory="../tests" lowUpperBound="75" highLowerBound="95"/>
|
<html outputDirectory="../tests" lowUpperBound="75" highLowerBound="95"/>
|
||||||
|
|
@ -56,4 +31,31 @@
|
||||||
<const name="WEB_SERVER_DOCROOT" value="./Karaka"/>
|
<const name="WEB_SERVER_DOCROOT" value="./Karaka"/>
|
||||||
<const name="RESET" value="1"/>
|
<const name="RESET" value="1"/>
|
||||||
</php>
|
</php>
|
||||||
|
<source>
|
||||||
|
<include>
|
||||||
|
<directory suffix=".php">../</directory>
|
||||||
|
</include>
|
||||||
|
<exclude>
|
||||||
|
<directory>../vendor*</directory>
|
||||||
|
<directory>../MainRepository*</directory>
|
||||||
|
<directory>../Karaka*</directory>
|
||||||
|
<directory>../Admin/Install/Application*</directory>
|
||||||
|
<directory>../phpOMS*</directory>
|
||||||
|
<directory>../tests*</directory>
|
||||||
|
<directory>../*/tests*</directory>
|
||||||
|
<directory>../**/tests*</directory>
|
||||||
|
<directory>*/tests*</directory>
|
||||||
|
<directory suffix="tpl.php">../*</directory>
|
||||||
|
<directory suffix="lang.php">../*</directory>
|
||||||
|
<directory suffix="Test.php">../*</directory>
|
||||||
|
<directory suffix="Routes.php">../*</directory>
|
||||||
|
<directory suffix="Hooks.php">../*</directory>
|
||||||
|
<directory>../**/test*</directory>
|
||||||
|
<directory>../**/Theme*</directory>
|
||||||
|
<directory>../**/Admin/Routes*</directory>
|
||||||
|
<directory>../**/Admin/Hooks*</directory>
|
||||||
|
<directory>../**/Admin/Install*</directory>
|
||||||
|
<directory>../Media/Files*</directory>
|
||||||
|
</exclude>
|
||||||
|
</source>
|
||||||
</phpunit>
|
</phpunit>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user