Pinq\Tests\Integration\Traversable\OrderByTest::testThatOrderStringsCharsAndLengthCharsDescendingOrdersCorrectly PHP Method

testThatOrderStringsCharsAndLengthCharsDescendingOrdersCorrectly() public method

public testThatOrderStringsCharsAndLengthCharsDescendingOrdersCorrectly ( Pinq\ITraversable $names, array $data )
$names Pinq\ITraversable
$data array
    public function testThatOrderStringsCharsAndLengthCharsDescendingOrdersCorrectly(\Pinq\ITraversable $names, array $data)
    {
        $orderedNames = $names->orderByDescending(function ($i) {
            return $i[0];
        })->thenByDescending(function ($i) {
            return strlen($i);
        });
        $this->assertMatchesValues($orderedNames, ['Taylor', 'Sandy', 'Sam', 'Frank', 'Fred', 'Daniel', 'Andrew']);
    }