Code Duplication    Length = 19-19 lines in 2 locations

eZ/Publish/API/Repository/Tests/SearchServiceLocationTest.php 1 location

@@ 127-145 (lines=19) @@
124
     * @see \eZ\Publish\API\Repository\SearchService::findLocations()
125
     * @depends eZ\Publish\API\Repository\Tests\SearchServiceTest::testFieldCollectionContains
126
     */
127
    public function testFieldCollectionContainsNoMatch()
128
    {
129
        $this->createMultipleCountriesContent();
130
        $query = new LocationQuery(
131
            array(
132
                'query' => new Criterion\Field(
133
                    'countries',
134
                    Criterion\Operator::CONTAINS,
135
                    'Netherlands Antilles'
136
                ),
137
            )
138
        );
139
140
        $repository = $this->getRepository();
141
        $searchService = $repository->getSearchService();
142
        $result = $searchService->findLocations($query);
143
144
        $this->assertEquals(0, $result->totalCount);
145
    }
146
147
    /**
148
     * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException

eZ/Publish/API/Repository/Tests/SearchServiceTest.php 1 location

@@ 1088-1106 (lines=19) @@
1085
     * @see \eZ\Publish\API\Repository\SearchService::findContent()
1086
     * @depends eZ\Publish\API\Repository\Tests\SearchServiceTest::testFieldCollectionContains
1087
     */
1088
    public function testFieldCollectionContainsNoMatch()
1089
    {
1090
        $this->createMultipleCountriesContent();
1091
        $query = new Query(
1092
            array(
1093
                'query' => new Criterion\Field(
1094
                    'countries',
1095
                    Criterion\Operator::CONTAINS,
1096
                    'Netherlands Antilles'
1097
                ),
1098
            )
1099
        );
1100
1101
        $repository = $this->getRepository();
1102
        $searchService = $repository->getSearchService();
1103
        $result = $searchService->findContent($query);
1104
1105
        $this->assertEquals(0, $result->totalCount);
1106
    }
1107
1108
    /**
1109
     * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException