ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 51 of file OrderTest.php.

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

51  : Order
52  {
53  $order = $order->append('sub2', Order::DESC);
54  $this->assertEquals(
55  [
56  'subject' => Order::ASC,
57  'sub2' => Order::DESC
58  ],
59  $order->get()
60  );
61  return $order;
62  }
Both the subject and the direction need to be specified when expressing an order. ...
Definition: Order.php:28
append(string $subject, string $direction)
Definition: Order.php:58
+ Here is the call graph for this function:

◆ testFactory()

orderTest::testFactory ( )

Definition at line 29 of file OrderTest.php.

References Vendor\Package\$f.

29  : Order
30  {
31  $f = new ILIAS\Data\Factory();
32  $order = $f->order('subject', Order::ASC);
33  $this->assertInstanceOf(Order::class, $order);
34  return $order;
35  }
Both the subject and the direction need to be specified when expressing an order. ...
Definition: Order.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ testInvalidDirection()

orderTest::testInvalidDirection ( Order  $order)

testFactory

Definition at line 99 of file OrderTest.php.

References ILIAS\Data\Order\append().

99  : void
100  {
101  $this->expectException(TypeError::class);
102  $order = $order->append('sub3', -1);
103  }
append(string $subject, string $direction)
Definition: Order.php:58
+ Here is the call graph for this function:

◆ testInvalidSubject()

orderTest::testInvalidSubject ( Order  $order)

testFactory

Definition at line 108 of file OrderTest.php.

References ILIAS\Data\Order\append().

108  : void
109  {
110  $this->expectException(InvalidArgumentException::class);
111  $order = $order->append('subject', Order::ASC);
112  }
append(string $subject, string $direction)
Definition: Order.php:58
+ Here is the call graph for this function:

◆ testJoinMore()

orderTest::testJoinMore ( Order  $order)

testAppend

Definition at line 83 of file OrderTest.php.

References ILIAS\Data\Order\join().

83  : void
84  {
85  $this->assertEquals(
86  'Sorting subject ASC, sub2 DESC,',
87  $order->join(
88  'Sorting',
89  function ($pre, $k, $v) {
90  return "$pre $k $v,";
91  }
92  )
93  );
94  }
join($init, callable $fn)
Definition: Order.php:75
+ Here is the call graph for this function:

◆ testJoinOne()

orderTest::testJoinOne ( Order  $order)

testFactory

Definition at line 67 of file OrderTest.php.

References ILIAS\Data\Order\join().

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

◆ testValues()

orderTest::testValues ( Order  $order)

testFactory

Definition at line 40 of file OrderTest.php.

References ILIAS\Data\Order\get().

40  : void
41  {
42  $this->assertEquals(
43  ['subject' => Order::ASC],
44  $order->get()
45  );
46  }
+ Here is the call graph for this function:

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