PartKeepr\DoctrineReflectionBundle\Tests\AdvancedSearchFilterTest::testSorter PHP Method

testSorter() public method

public testSorter ( )
    public function testSorter()
    {
        $client = static::makeClient(true);
        $order = [["property" => "storageLocation.name", "direction" => "ASC"]];
        $client->request('GET', "/api/parts?order=" . json_encode($order), [], [], ['CONTENT_TYPE' => 'application/json']);
        $data = json_decode($client->getResponse()->getContent(), true);
        $this->assertArrayHasKey("hydra:member", $data);
        $this->assertCount(2, $data["hydra:member"]);
    }