mirror of
https://github.com/werkraum-media/events.git
synced 2024-12-23 12:46:09 +01:00
Daniel Siepmann
a9f3f108e3
The vendor was renamed from `wrm` to `werkraummedia`. And the namespace vendor was renamed from `Wrm` to `WerkraumMedia`. That way all references to PHP classes as well as the package name itself need to be adjusted.
78 lines
1.4 KiB
PHP
78 lines
1.4 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace WerkraumMedia\Events\Tests\Unit\Domain\Model;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
use WerkraumMedia\Events\Domain\Model\Category;
|
|
|
|
/**
|
|
* @covers \WerkraumMedia\Events\Domain\Model\Category
|
|
*/
|
|
class CategoryTest extends TestCase
|
|
{
|
|
/**
|
|
* @test
|
|
*/
|
|
public function canBeCreated(): void
|
|
{
|
|
$subject = new Category(
|
|
null,
|
|
10,
|
|
'Title',
|
|
false
|
|
);
|
|
|
|
self::assertInstanceOf(
|
|
Category::class,
|
|
$subject
|
|
);
|
|
}
|
|
|
|
/**
|
|
* @test
|
|
*/
|
|
public function returnsSorting(): void
|
|
{
|
|
$subject = new Category(
|
|
null,
|
|
10,
|
|
'Title',
|
|
false
|
|
);
|
|
$subject->_setProperty('sorting', 10);
|
|
|
|
self::assertSame(10, $subject->getSorting());
|
|
}
|
|
|
|
/**
|
|
* @test
|
|
*/
|
|
public function canBeVisible(): void
|
|
{
|
|
$subject = new Category(
|
|
null,
|
|
10,
|
|
'Title',
|
|
false
|
|
);
|
|
|
|
self::assertFalse($subject->_getProperty('hidden'));
|
|
}
|
|
|
|
/**
|
|
* @test
|
|
*/
|
|
public function canHide(): void
|
|
{
|
|
$subject = new Category(
|
|
null,
|
|
10,
|
|
'Title',
|
|
true
|
|
);
|
|
|
|
self::assertTrue($subject->_getProperty('hidden'));
|
|
}
|
|
}
|