Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Install PHPUnit 10 #48210

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions autotest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ if [ -z "$PHP_EXE" ]; then
fi
PHP=$(which "$PHP_EXE")
if [ -z "$PHPUNIT_EXE" ]; then
if [ -f build/integration/vendor/bin/phpunit ]; then
PHPUNIT_EXE="./build/integration/vendor/bin/phpunit"
if [ -f lib/composer/bin/phpunit ]; then
PHPUNIT_EXE="./lib/composer/bin/phpunit"
PHPUNIT=$(readlink -f "$PHPUNIT_EXE")
else
PHPUNIT_EXE=phpunit
Expand Down Expand Up @@ -53,8 +53,8 @@ else
fi

if ! [ -x "$PHPUNIT" ]; then
echo "phpunit executable not found, please install phpunit version >= 9.0 manually or via:" >&2
echo " cd build/integration && composer install" >&2
echo "phpunit executable not found, please install phpunit version >= 10.5 manually or via:" >&2
echo " composer install" >&2
exit 3
fi

Expand All @@ -69,8 +69,8 @@ PHPUNIT_VERSION=$($PHPUNIT --version | cut -d" " -f2)
PHPUNIT_MAJOR_VERSION=$(echo "$PHPUNIT_VERSION" | cut -d"." -f1)
PHPUNIT_MINOR_VERSION=$(echo "$PHPUNIT_VERSION" | cut -d"." -f2)

if ! [ "$PHPUNIT_MAJOR_VERSION" -gt 9 -o \( "$PHPUNIT_MAJOR_VERSION" -eq 9 -a "$PHPUNIT_MINOR_VERSION" -ge 0 \) ]; then
echo "phpunit version >= 9.0 required. Version found: $PHPUNIT_VERSION" >&2
if ! [ "$PHPUNIT_MAJOR_VERSION" -gt 10 -o \( "$PHPUNIT_MAJOR_VERSION" -eq 10 -a "$PHPUNIT_MINOR_VERSION" -ge 5 \) ]; then
echo "phpunit version >= 10.5 required. Version found: $PHPUNIT_VERSION" >&2
exit 4
fi

Expand Down
4 changes: 2 additions & 2 deletions tests/Core/Command/Config/App/SetConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected function setUp(): void {
}


public function setData() {
public static function dataSet() {
return [
[
'name',
Expand All @@ -63,7 +63,7 @@ public function setData() {
}

/**
* @dataProvider setData
* @dataProvider dataSet
*
* @param string $configName
* @param mixed $newValue
Expand Down
4 changes: 2 additions & 2 deletions tests/Core/Command/Config/System/SetConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ protected function setUp(): void {
}


public function setData() {
public static function dataTest() {
return [
[['name'], 'newvalue', null, 'newvalue'],
[['a', 'b', 'c'], 'foobar', null, ['b' => ['c' => 'foobar']]],
Expand All @@ -48,7 +48,7 @@ public function setData() {
}

/**
* @dataProvider setData
* @dataProvider dataTest
*
* @param array $configNames
* @param string $newValue
Expand Down
2 changes: 1 addition & 1 deletion vendor-bin/phpunit/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
}
},
"require": {
"phpunit/phpunit": "^9.6"
"phpunit/phpunit": "^10.5.35"
}
}
Loading
Loading