ILIAS  release_8 Revision v8.23
orderTest Class Reference
+ Inheritance diagram for orderTest:
+ Collaboration diagram for orderTest:

Public Member Functions

 testFactory ()
 
 testValues (Order $order)
 testFactory More...
 
 testAppend (Order $order)
 testFactory More...
 
 testJoinOne (Order $order)
 testFactory More...
 
 testJoinMore (Order $order)
 testAppend More...
 
 testInvalidDirection (Order $order)
 testFactory More...
 
 testInvalidSubject (Order $order)
 testFactory More...
 

Detailed Description

Member Function Documentation

◆ testAppend()

orderTest::testAppend ( Order  $order)

testFactory

Definition at line 35 of file OrderTest.php.

References ILIAS\Data\Order\append(), and ILIAS\Data\Order\get().

35  : Order
36  {
37  $order = $order->append('sub2', Order::DESC);
38  $this->assertEquals(
39  [
40  'subject' => Order::ASC,
41  'sub2' => Order::DESC
42  ],
43  $order->get()
44  );
45  return $order;
46  }
Both the subject and the direction need to be specified when expressing an order. ...
Definition: Order.php:12
append(string $subject, string $direction)
Definition: Order.php:42
+ Here is the call graph for this function:

◆ testFactory()

orderTest::testFactory ( )

Definition at line 13 of file OrderTest.php.

References Vendor\Package\$f.

13  : Order
14  {
15  $f = new ILIAS\Data\Factory();
16  $order = $f->order('subject', Order::ASC);
17  $this->assertInstanceOf(Order::class, $order);
18  return $order;
19  }
Both the subject and the direction need to be specified when expressing an order. ...
Definition: Order.php:12

◆ testInvalidDirection()

orderTest::testInvalidDirection ( Order  $order)

testFactory

Definition at line 83 of file OrderTest.php.

References ILIAS\Data\Order\append().

83  : void
84  {
85  $this->expectException(TypeError::class);
86  $order = $order->append('sub3', -1);
87  }
append(string $subject, string $direction)
Definition: Order.php:42
+ Here is the call graph for this function:

◆ testInvalidSubject()

orderTest::testInvalidSubject ( Order  $order)

testFactory

Definition at line 92 of file OrderTest.php.

References ILIAS\Data\Order\append().

92  : void
93  {
94  $this->expectException(InvalidArgumentException::class);
95  $order = $order->append('subject', Order::ASC);
96  }
append(string $subject, string $direction)
Definition: Order.php:42
+ Here is the call graph for this function:

◆ testJoinMore()

orderTest::testJoinMore ( Order  $order)

testAppend

Definition at line 67 of file OrderTest.php.

References ILIAS\Data\Order\join().

67  : void
68  {
69  $this->assertEquals(
70  'Sorting subject ASC, sub2 DESC,',
71  $order->join(
72  'Sorting',
73  function ($pre, $k, $v) {
74  return "$pre $k $v,";
75  }
76  )
77  );
78  }
join($init, callable $fn)
Definition: Order.php:59
+ Here is the call graph for this function:

◆ testJoinOne()

orderTest::testJoinOne ( Order  $order)

testFactory

Definition at line 51 of file OrderTest.php.

References ILIAS\Data\Order\join().

51  : void
52  {
53  $this->assertEquals(
54  'SORT BY subject ASC',
55  $order->join(
56  'SORT BY',
57  function ($pre, $k, $v) {
58  return "$pre $k $v";
59  }
60  )
61  );
62  }
join($init, callable $fn)
Definition: Order.php:59
+ Here is the call graph for this function:

◆ testValues()

orderTest::testValues ( Order  $order)

testFactory

Definition at line 24 of file OrderTest.php.

References ILIAS\Data\Order\get().

24  : void
25  {
26  $this->assertEquals(
27  ['subject' => Order::ASC],
28  $order->get()
29  );
30  }
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: