コード例 #1
0
ファイル: SortTest.php プロジェクト: nilportugues/repository
 public function testItCanAddSorting()
 {
     $originalSort = new Sort(['size', 'pages'], new Order('ASC'));
     $sortDesc = new Sort(['words'], new Order('DESC'));
     $originalSort->andSort($sortDesc);
     $expected = [];
     $expected['size'] = new Order('ASC');
     $expected['pages'] = new Order('ASC');
     $expected['words'] = new Order('DESC');
     $this->assertEquals($expected, $originalSort->orders());
 }