Skip to content

Commit

Permalink
IBX-8279: Updated test matrix configuration for 5.0 (#110)
Browse files Browse the repository at this point in the history
* IBX-8279: Updated test matrix configuration for 5.0

* Bumped ibexa/code-style version

* Fix CS

* Fix deprecations

* Fix second deprecation

* Fix warning

* Fix phpstan

---------

Co-authored-by: katarzynazawada <>
  • Loading branch information
micszo authored May 23, 2024
1 parent 5610dcb commit 9f75931
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 26 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ jobs:
fail-fast: false
matrix:
php:
- '7.4'
- '8.0'
- '8.1'
- '8.3'
composer_options: [ "" ]

steps:
Expand Down Expand Up @@ -50,7 +48,7 @@ jobs:
strategy:
matrix:
php:
- '8.1'
- '8.3'
steps:
- uses: actions/checkout@v2

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"symfony/form": "^5.4"
},
"require-dev": {
"ibexa/code-style": "^1.0",
"ibexa/code-style": "~2.0.0",
"friendsofphp/php-cs-fixer": "^3.0",
"ibexa/ci-scripts": "^0.2@dev",
"ibexa/doctrine-schema": "~5.0.0@dev",
Expand Down
10 changes: 0 additions & 10 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -1970,11 +1970,6 @@ parameters:
count: 1
path: src/lib/Browser/Routing/Router.php

-
message: "#^Access to an undefined property Ibexa\\\\Behat\\\\Core\\\\Behat\\\\ArgumentParser\\:\\:\\$roleFacade\\.$#"
count: 2
path: src/lib/Core/Behat/ArgumentParser.php

-
message: "#^Method Ibexa\\\\Behat\\\\Core\\\\Behat\\\\ArgumentParser\\:\\:parseLimitations\\(\\) has no return type specified\\.$#"
count: 1
Expand Down Expand Up @@ -2860,11 +2855,6 @@ parameters:
count: 1
path: tests/lib/Browser/Element/ElementTest.php

-
message: "#^Class Ibexa\\\\Tests\\\\Behat\\\\Browser\\\\Element\\\\Mapper\\\\TextMapperTestCase not found\\.$#"
count: 1
path: tests/lib/Browser/Element/Mapper/ElementTextMapperTest.php

-
message: "#^Method Ibexa\\\\Tests\\\\Behat\\\\Browser\\\\Filter\\\\BrowserLogFilterTest\\:\\:testFiltersOutExcludedPatterns\\(\\) has no return type specified\\.$#"
count: 1
Expand Down
5 changes: 3 additions & 2 deletions src/lib/Core/Behat/ArgumentParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ class ArgumentParser
{
private const ROOT_KEYWORD = 'root';

/** @var \Ibexa\Behat\Browser\Environment\ParameterProviderInterface */
private $parameterProvider;
private ParameterProviderInterface $parameterProvider;

private RoleFacade $roleFacade;

public function __construct(RoleFacade $roleFacade, ParameterProviderInterface $parameterProvider)
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Browser/Element/Assert/CollectionAssertTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function testAssertionPasses(array $expectedElementTexts, array $actualEl
$collectionAssert = new CollectionAssert($this->locator, $collection);
$returnedCollection = $collectionAssert->containsElementsWithText($expectedElementTexts);

$this->assertSame($collection, $returnedCollection);
self::assertSame($collection, $returnedCollection);
}

/**
Expand Down
10 changes: 5 additions & 5 deletions tests/bundle/Form/RetryChoiceListFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ public function testCreateViewFail(): void
}

/**
* @return iterable<array<string,int>>
* @return iterable<string, array{int}>
*/
public static function provider(): iterable
{
yield ['No failures' => 0];
yield ['One failure' => 1];
yield ['Two failures' => 2];
yield ['Three failures' => 3];
yield 'No failures' => [0];
yield 'One failure' => [1];
yield 'Two failures' => [2];
yield 'Three failures' => [3];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private function createChildElement(bool $hasStartedTransition, bool $hasEndedTr
{
$childElement = $this->createStub(ElementInterface::class);
$childElement->method('getText')->willReturn('ChildText');
$childElement->method('hasClass')->will($this->returnValueMap(
$childElement->method('hasClass')->will(self::returnValueMap(
[
['ibexa-selenium-transition-started', $hasStartedTransition],
['ibexa-selenium-transition-ended', $hasEndedTransition],
Expand Down
2 changes: 0 additions & 2 deletions tests/lib/Browser/Element/Mapper/ElementTextMapperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,3 @@ public function testMapsSingleElement(): void
Assert::assertEquals('Element1', $this->mapper->map($element));
}
}

class_alias(TextMapperTestCase::class, 'EzSystems\Behat\Test\Browser\Element\Mapper\TextMapperTestCase');

0 comments on commit 9f75931

Please sign in to comment.