Initial SQLite development (#1)
Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
67
tests/unit/OpTest.php
Normal file
67
tests/unit/OpTest.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Test\Unit;
|
||||
|
||||
use BitBadger\PDODocument\Op;
|
||||
use PHPUnit\Framework\Attributes\TestDox;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* Unit tests for the Op enumeration
|
||||
*/
|
||||
class OpTest extends TestCase
|
||||
{
|
||||
#[TestDox('To string succeeds for EQ')]
|
||||
public function testToStringSucceedsForEQ(): void
|
||||
{
|
||||
$this->assertEquals('=', Op::EQ->toString(), 'EQ operator incorrect');
|
||||
}
|
||||
|
||||
#[TestDox('To string succeeds for GT')]
|
||||
public function testToStringSucceedsForGT(): void
|
||||
{
|
||||
$this->assertEquals('>', Op::GT->toString(), 'GT operator incorrect');
|
||||
}
|
||||
|
||||
#[TestDox('To string succeeds for GE')]
|
||||
public function testToStringSucceedsForGE(): void
|
||||
{
|
||||
$this->assertEquals('>=', Op::GE->toString(), 'GE operator incorrect');
|
||||
}
|
||||
|
||||
#[TestDox('To string succeeds for LT')]
|
||||
public function testToStringSucceedsForLT(): void
|
||||
{
|
||||
$this->assertEquals('<', Op::LT->toString(), 'LT operator incorrect');
|
||||
}
|
||||
|
||||
#[TestDox('To string succeeds for LE')]
|
||||
public function testToStringSucceedsForLE(): void
|
||||
{
|
||||
$this->assertEquals('<=', Op::LE->toString(), 'LE operator incorrect');
|
||||
}
|
||||
|
||||
#[TestDox('To string succeeds for NE')]
|
||||
public function testToStringSucceedsForNE(): void
|
||||
{
|
||||
$this->assertEquals('<>', Op::NE->toString(), 'NE operator incorrect');
|
||||
}
|
||||
|
||||
#[TestDox('To string succeeds for BT')]
|
||||
public function testToStringSucceedsForBT(): void
|
||||
{
|
||||
$this->assertEquals('BETWEEN', Op::BT->toString(), 'BT operator incorrect');
|
||||
}
|
||||
|
||||
#[TestDox('To string succeeds for EX')]
|
||||
public function testToStringSucceedsForEX(): void
|
||||
{
|
||||
$this->assertEquals('IS NOT NULL', Op::EX->toString(), 'EX operator incorrect');
|
||||
}
|
||||
|
||||
#[TestDox('To string succeeds for NEX')]
|
||||
public function testToStringSucceedsForNEX(): void
|
||||
{
|
||||
$this->assertEquals('IS NULL', Op::NEX->toString(), 'NEX operator incorrect');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user