pdo-document/tests/unit/FieldMatchTest.php
Daniel J. Summers d8330d828a Derive mode from DSN function
- Add headers in all files
- Minor field name changes
2024-07-20 21:47:21 -04:00

33 lines
776 B
PHP

<?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');
}
}