Example #1
0
 /**
  * @test
  */
 public function sortBySortingMovesItemWithHigherSortingValueAfterItemWithLowerSortingValue()
 {
     $model1 = new Tx_Oelib_Tests_Unit_Fixtures_TestingChildModel();
     $model1->setSorting(2);
     $this->subject->add($model1);
     $model2 = new Tx_Oelib_Tests_Unit_Fixtures_TestingChildModel();
     $model2->setSorting(1);
     $this->subject->add($model2);
     $this->subject->sortBySorting();
     self::assertSame($model2, $this->subject->first());
 }