@ -53,6 +53,14 @@ class SorterTest extends \Test\TestCase {
],
];
protected$user3=[
'label'=>'ttle Sea',
'value'=>[
'shareType'=>'user',
'shareWith'=>'ttle_sea',
],
];
publicfunctionsetUp(){
parent::setUp();
@ -66,22 +74,25 @@ class SorterTest extends \Test\TestCase {
publicfunctiondataSort():array{
return[
'no user posted'=>[['users'=>[$this->user1,$this->user2]],[],['users'=>[$this->user1,$this->user2]]],
'second user posted'=>[['users'=>[$this->user1,$this->user2]],['new_york'=>new\DateTime('2000-01-01')],['users'=>[$this->user2,$this->user1]]],
'second user posted later'=>[['users'=>[$this->user1,$this->user2]],['seattle'=>new\DateTime('2017-01-01'),'new_york'=>new\DateTime('2018-01-01')],['users'=>[$this->user2,$this->user1]]],
'second user posted earlier'=>[['users'=>[$this->user1,$this->user2]],['seattle'=>new\DateTime('2018-01-01'),'new_york'=>new\DateTime('2017-01-01')],['users'=>[$this->user1,$this->user2]]],
'no user posted'=>['',['users'=>[$this->user1,$this->user2]],[],['users'=>[$this->user1,$this->user2]]],
'second user posted'=>['',['users'=>[$this->user1,$this->user2]],['new_york'=>new\DateTime('2000-01-01')],['users'=>[$this->user2,$this->user1]]],
'second user posted later'=>['',['users'=>[$this->user1,$this->user2]],['seattle'=>new\DateTime('2017-01-01'),'new_york'=>new\DateTime('2018-01-01')],['users'=>[$this->user2,$this->user1]]],
'second user posted earlier'=>['',['users'=>[$this->user1,$this->user2]],['seattle'=>new\DateTime('2018-01-01'),'new_york'=>new\DateTime('2017-01-01')],['users'=>[$this->user1,$this->user2]]],
'starting match first1'=>['Sea',['users'=>[$this->user1,$this->user3]],[],['users'=>[$this->user1,$this->user3]]],
'starting match first2'=>['Sea',['users'=>[$this->user3,$this->user1]],[],['users'=>[$this->user1,$this->user3]]],