public function testGetSetSorts() { $faker = $this->getFaker(); $sorts = [$faker->word => Sorts::SORT_DESCENDING, $faker->word => Sorts::SORT_ASCENDING, $faker->word => Sorts::SORT_DESCENDING]; $request = new Request(); $request->setSorts($sorts); $this->assertSame($sorts, $request->getSorts()); foreach (array_keys($sorts) as $sort) { $this->assertTrue($request->hasSort($sort)); } }