Skip to content

Commit

Permalink
[Tests] Added functional tests coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
ciastektk committed Dec 22, 2023
1 parent d859335 commit 1b8acbf
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions tests/bundle/Functional/SearchView/Criterion/ContentNameTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

/**
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);

namespace Ibexa\Tests\Bundle\Rest\Functional\SearchView\Criterion;

use Ibexa\Tests\Bundle\Rest\Functional\SearchView\SearchCriterionTestCase;

final class ContentNameTest extends SearchCriterionTestCase
{
/**
* @return iterable<array{
* string,
* string,
* int,
* }>
*/
public function getCriteriaPayloads(): iterable
{
yield 'Return content items that contain "test" in name' => [
'json',
$this->buildJsonCriterionQuery('"ContentNameCriterion": "test*"'),
3,
];

yield 'No content items found with article in name' => [
'json',
$this->buildJsonCriterionQuery('"ContentNameCriterion": "*article*"'),
0,
];
}
}

0 comments on commit 1b8acbf

Please sign in to comment.