Skip to content

Commit

Permalink
chore: update unit tests to work with latest phpunit (#298)
Browse files Browse the repository at this point in the history
chore: 
- update unit tests to work with latest phpunit
- update main.yml to use php 8.2 8.3 and 8.4
- set php 8.2 as min version for mono repo
- set bundle min php version to 8.2
  • Loading branch information
julianzimmermann authored Nov 26, 2024
1 parent 841f7f5 commit d20350a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: [ "8.0", "8.1", "8.2" ]
php-versions: [ "8.2", "8.3", "8.4" ]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
}
],
"require": {
"php": ">=8.0",
"php": ">=8.2",
"fond-of-impala/company-users-bulk-rest-api-extension": "^1.0.0",
"fond-of-impala/navision-company": "1.0.0",
"spryker/company-business-unit": "^1.0.0 || ^2.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,18 @@ class CompanyUsersBulkRestApiBusinessCentralConnectorDependencyProviderTest exte
*/
protected function _before(): void
{
$this->containerMock = $this->getMockBuilder(Container::class)
->setMethodsExcept(['factory', 'set', 'offsetSet', 'get', 'offsetGet'])
->getMock();
$containerMock = $this->getMockBuilder(Container::class);

/** @phpstan-ignore-next-line */
if (method_exists($containerMock, 'setMethodsExcept')) {
/** @phpstan-ignore-next-line */
$containerMock->setMethodsExcept(['factory', 'set', 'offsetSet', 'get', 'offsetGet']);
} else {
/** @phpstan-ignore-next-line */
$containerMock->onlyMethods(['getLocator'])->enableOriginalClone();
}

$this->containerMock = $containerMock->getMock();

$this->dependencyProvider = new CompanyUsersBulkRestApiBusinessCentralConnectorDependencyProvider();
}
Expand Down

0 comments on commit d20350a

Please sign in to comment.