pdo-document/tests/unit/FieldMatchTest.php

33 lines
776 B
PHP
Raw Normal View History

<?php
/**
* @author Daniel J. Summers <daniel@bitbadger.solutions>
* @license MIT
*/
declare(strict_types=1);
namespace Test\Unit;
use BitBadger\PDODocument\FieldMatch;
use PHPUnit\Framework\Attributes\TestDox;
use PHPUnit\Framework\TestCase;
/**
* Unit tests for the FieldMatch enum
*/
#[TestDox('Field Match (Unit tests)')]
class FieldMatchTest extends TestCase
{
#[TestDox('To SQL succeeds for all')]
public function testToSQLSucceedsForAll(): void
{
$this->assertEquals('AND', FieldMatch::All->toSQL(), 'All should have returned AND');
}
#[TestDox('To SQL succeeds for any')]
public function testToSQLSucceedsForAny(): void
{
$this->assertEquals('OR', FieldMatch::Any->toSQL(), 'Any should have returned OR');
}
}