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

testOrFilterJoin() public method

public testOrFilterJoin ( )
    public function testOrFilterJoin()
    {
        $client = static::makeClient(true);
        $filter = [["type" => "OR", "subfilters" => [["property" => "storageLocation.name", "operator" => "=", "value" => "test"], ["property" => "storageLocation.name", "operator" => "=", "value" => "test2"]]]];
        $client->request('GET', "/api/parts?filter=" . json_encode($filter), [], [], ['CONTENT_TYPE' => 'application/json']);
        $data = json_decode($client->getResponse()->getContent(), true);
        $this->assertArrayHasKey("hydra:member", $data);
        $this->assertCount(2, $data["hydra:member"]);
    }