2024-06-11 11:07:56 +00:00
|
|
|
<?php declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace Test\Unit;
|
|
|
|
|
|
|
|
use BitBadger\PDODocument\FieldMatch;
|
2024-06-12 21:43:17 +00:00
|
|
|
use PHPUnit\Framework\Attributes\TestDox;
|
2024-06-11 11:07:56 +00:00
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Unit tests for the FieldMatch enum
|
|
|
|
*/
|
2024-06-12 21:43:17 +00:00
|
|
|
#[TestDox('Field Match (Unit tests)')]
|
2024-06-11 11:07:56 +00:00
|
|
|
class FieldMatchTest extends TestCase
|
|
|
|
{
|
|
|
|
public function testToStringSucceedsForAll(): void
|
|
|
|
{
|
|
|
|
$this->assertEquals('AND', FieldMatch::All->toString(), 'All should have returned AND');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testToStringSucceedsForAny(): void
|
|
|
|
{
|
|
|
|
$this->assertEquals('OR', FieldMatch::Any->toString(), 'Any should have returned OR');
|
|
|
|
}
|
|
|
|
}
|