Pinq\Tests\Integration\Traversable\OrderByTest::testThatOrderStringsCharsAndLengthCharsDescendingOrdersCorrectly PHP 메소드

testThatOrderStringsCharsAndLengthCharsDescendingOrdersCorrectly() 공개 메소드

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']);
    }