Version 1.0.0
This commit is contained in:
28
tests/Object/RequestTest.php
Normal file
28
tests/Object/RequestTest.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Diffhead\PHP\DataEnrichmentKit\Tests\Object;
|
||||
|
||||
use Diffhead\PHP\DataEnrichmentKit\Object\ItemsBag;
|
||||
use Diffhead\PHP\DataEnrichmentKit\Object\Request;
|
||||
use Diffhead\PHP\DataEnrichmentKit\Object\Target;
|
||||
use PHPUnit\Framework\Attributes\CoversClass;
|
||||
use PHPUnit\Framework\Attributes\CoversMethod;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
#[CoversClass(Request::class)]
|
||||
#[CoversMethod(Request::class, 'items')]
|
||||
#[CoversMethod(Request::class, 'target')]
|
||||
class RequestTest extends TestCase
|
||||
{
|
||||
public function testProperlyInitialized(): void
|
||||
{
|
||||
$itemsBag = new ItemsBag();
|
||||
$target = new Target('entity', 'field');
|
||||
$request = new Request($itemsBag, $target);
|
||||
|
||||
$this->assertSame($itemsBag, $request->items());
|
||||
$this->assertSame($target, $request->target());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user