Pinq\Tests\Integration\Traversable\OrderByTest::testThatThenByAscendingIsEquivalentToThenByWithAscendingDirection PHP Метод

testThatThenByAscendingIsEquivalentToThenByWithAscendingDirection() публичный Метод

public testThatThenByAscendingIsEquivalentToThenByWithAscendingDirection ( Pinq\ITraversable $names, array $data )
$names Pinq\ITraversable
$data array
    public function testThatThenByAscendingIsEquivalentToThenByWithAscendingDirection(\Pinq\ITraversable $names, array $data)
    {
        $irrelaventOrderByFunction = function ($i) {
            return 1;
        };
        $thenFunction = function ($i) {
            return $i[2];
        };
        $orderedNames = $names->orderByAscending($irrelaventOrderByFunction)->thenByAscending($thenFunction);
        $otherOrderedNames = $names->orderByAscending($irrelaventOrderByFunction)->thenBy($thenFunction, \Pinq\Direction::ASCENDING);
        $this->assertSame($orderedNames->asArray(), $otherOrderedNames->asArray());
    }