3declare(strict_types=1);
6use PHPUnit\Framework\TestCase;
16 $order =
$f->order(
'subject', Order::ASC);
17 $this->assertInstanceOf(Order::class, $order);
27 [
'subject' => Order::ASC],
37 $order = $order->
append(
'sub2', Order::DESC);
40 'subject' => Order::ASC,
54 'SORT BY subject ASC',
70 'Sorting subject ASC, sub2 DESC,',
85 $this->expectException(TypeError::class);
86 $order = $order->
append(
'sub3', -1);
94 $this->expectException(InvalidArgumentException::class);
95 $order = $order->
append(
'subject', Order::ASC);
static return function(ContainerConfigurator $containerConfigurator)
Both the subject and the direction need to be specified when expressing an order.
append(string $subject, string $direction)
join($init, callable $fn)
testJoinOne(Order $order)
@depends testFactory
testAppend(Order $order)
@depends testFactory
testInvalidSubject(Order $order)
@depends testFactory
testJoinMore(Order $order)
@depends testAppend
testInvalidDirection(Order $order)
@depends testFactory
testValues(Order $order)
@depends testFactory