use AdminApiTestBehaviour;
use AdminFunctionalTestBehaviour;
use IntegrationTestBehaviour;
protected function setup(): void
{ $roles =
['product:read', 'product_manufacturer:read', 'user:read'
];
$this->
authorizeBrowser($this->
getBrowser(),
[UserVerifiedScope::IDENTIFIER
],
$roles);
$this->
prepareTestData();
} /**
* @dataProvider searchDataProvider
*/
public function testSearch(array
$data, bool
$hasResponse, array
$expectedEntities, array
$expectedErrors =
[]): void
{ $this->
getBrowser()->
request('POST', '/api/_admin/search',
[],
[],
[],
json_encode($data, \JSON_THROW_ON_ERROR
) ?: null
);
$response =
$this->
getBrowser()->
getResponse();
$content =
json_decode($response->
getContent() ?: '', true, 512, \JSON_THROW_ON_ERROR
);