mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 14:25:00 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -15,6 +15,7 @@ namespace Chill\MainBundle\Tests\Search;
|
||||
* Description of AbstractSearch.
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class AbstractSearchTest extends \PHPUnit\Framework\TestCase
|
||||
|
@@ -13,10 +13,10 @@ namespace Search;
|
||||
|
||||
use Chill\MainBundle\Search\SearchApiQuery;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use function is_string;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class SearchApiQueryTest extends TestCase
|
||||
@@ -65,7 +65,7 @@ final class SearchApiQueryTest extends TestCase
|
||||
->setSelectPertinence('1')
|
||||
->setFromClause('badaboum');
|
||||
|
||||
$this->assertTrue(is_string($q->buildQuery()));
|
||||
$this->assertTrue(\is_string($q->buildQuery()));
|
||||
$this->assertEquals([], $q->buildParameters());
|
||||
}
|
||||
}
|
||||
|
@@ -20,6 +20,7 @@ use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class SearchProviderTest extends TestCase
|
||||
@@ -30,12 +31,12 @@ final class SearchProviderTest extends TestCase
|
||||
{
|
||||
$this->search = new SearchProvider();
|
||||
|
||||
//add a default service
|
||||
// add a default service
|
||||
$this->addSearchService(
|
||||
$this->createDefaultSearchService('I am default', 10),
|
||||
'default'
|
||||
);
|
||||
//add a domain service
|
||||
// add a domain service
|
||||
$this->addSearchService(
|
||||
$this->createNonDefaultDomainSearchService('I am domain bar', 20, false),
|
||||
'bar'
|
||||
@@ -44,7 +45,7 @@ final class SearchProviderTest extends TestCase
|
||||
|
||||
public function testAccentued()
|
||||
{
|
||||
//$this->markTestSkipped('accentued characters must be implemented');
|
||||
// $this->markTestSkipped('accentued characters must be implemented');
|
||||
|
||||
$terms = $this->p('manço bélier aztèque à saloù ê');
|
||||
|
||||
@@ -56,7 +57,7 @@ final class SearchProviderTest extends TestCase
|
||||
|
||||
public function testAccentuedCapitals()
|
||||
{
|
||||
//$this->markTestSkipped('accentued characters must be implemented');
|
||||
// $this->markTestSkipped('accentued characters must be implemented');
|
||||
|
||||
$terms = $this->p('MANÉÀ oÛ lÎ À');
|
||||
|
||||
@@ -122,7 +123,7 @@ final class SearchProviderTest extends TestCase
|
||||
{
|
||||
$response = $this->search->getSearchResults('default search');
|
||||
|
||||
//$this->markTestSkipped();
|
||||
// $this->markTestSkipped();
|
||||
|
||||
$this->assertEquals([
|
||||
'I am default',
|
||||
@@ -131,7 +132,7 @@ final class SearchProviderTest extends TestCase
|
||||
|
||||
public function testSearchResultDomainSearch()
|
||||
{
|
||||
//add a search service which will be supported
|
||||
// add a search service which will be supported
|
||||
$this->addSearchService(
|
||||
$this->createNonDefaultDomainSearchService('I am domain foo', 100, true),
|
||||
'foo'
|
||||
@@ -153,7 +154,7 @@ final class SearchProviderTest extends TestCase
|
||||
|
||||
public function testSearchWithinSpecificSearchName()
|
||||
{
|
||||
//add a search service which will be supported
|
||||
// add a search service which will be supported
|
||||
$this->addSearchService(
|
||||
$this->createNonDefaultDomainSearchService('I am domain foo', 100, true),
|
||||
'foo'
|
||||
@@ -244,7 +245,7 @@ final class SearchProviderTest extends TestCase
|
||||
$mock = $this
|
||||
->getMockForAbstractClass(\Chill\MainBundle\Search\AbstractSearch::class);
|
||||
|
||||
//set the mock as default
|
||||
// set the mock as default
|
||||
$mock->expects($this->any())
|
||||
->method('isActiveByDefault')
|
||||
->will($this->returnValue(true));
|
||||
@@ -253,7 +254,7 @@ final class SearchProviderTest extends TestCase
|
||||
->method('getOrder')
|
||||
->will($this->returnValue($order));
|
||||
|
||||
//set the return value
|
||||
// set the return value
|
||||
$mock->expects($this->any())
|
||||
->method('renderResult')
|
||||
->will($this->returnValue($result));
|
||||
@@ -266,7 +267,7 @@ final class SearchProviderTest extends TestCase
|
||||
$mock = $this
|
||||
->getMockForAbstractClass(\Chill\MainBundle\Search\AbstractSearch::class);
|
||||
|
||||
//set the mock as default
|
||||
// set the mock as default
|
||||
$mock->expects($this->any())
|
||||
->method('isActiveByDefault')
|
||||
->will($this->returnValue(false));
|
||||
@@ -279,7 +280,7 @@ final class SearchProviderTest extends TestCase
|
||||
->method('supports')
|
||||
->will($this->returnValue($domain));
|
||||
|
||||
//set the return value
|
||||
// set the return value
|
||||
$mock->expects($this->any())
|
||||
->method('renderResult')
|
||||
->will($this->returnValue($result));
|
||||
|
@@ -12,12 +12,11 @@ declare(strict_types=1);
|
||||
namespace Search\Utils;
|
||||
|
||||
use Chill\MainBundle\Search\Utils\ExtractDateFromPattern;
|
||||
use DateTimeImmutable;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use function array_map;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class ExtractDateFromPatternTest extends TestCase
|
||||
@@ -49,10 +48,10 @@ final class ExtractDateFromPatternTest extends TestCase
|
||||
|
||||
$this->assertCount($count, $result->getFound());
|
||||
$this->assertEquals($filtered, $result->getFilteredSubject());
|
||||
$this->assertContainsOnlyInstancesOf(DateTimeImmutable::class, $result->getFound());
|
||||
$this->assertContainsOnlyInstancesOf(\DateTimeImmutable::class, $result->getFound());
|
||||
|
||||
$dates = array_map(
|
||||
static fn (DateTimeImmutable $d) => $d->format('Y-m-d'),
|
||||
$dates = \array_map(
|
||||
static fn (\DateTimeImmutable $d) => $d->format('Y-m-d'),
|
||||
$result->getFound()
|
||||
);
|
||||
|
||||
|
@@ -17,6 +17,7 @@ use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class ExtractPhonenumberFromPatternTest extends KernelTestCase
|
||||
|
Reference in New Issue
Block a user