From dbc08355e27c67be41c1229f6d390b1d5a57accb Mon Sep 17 00:00:00 2001 From: Lasse Lehtinen Date: Wed, 8 May 2024 18:30:21 +0300 Subject: [PATCH] Upgraded PHPUnit to v10 --- composer.json | 2 +- phpunit.xml | 12 ++++++------ tests/StacksTest.php | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/composer.json b/composer.json index 1c785cd..f7e8d98 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ "guzzlehttp/guzzle": "~6.0|~7.0" }, "require-dev": { - "phpunit/phpunit": "^9.0", + "phpunit/phpunit": "^10.0", "phpro/grumphp": "^1.4", "squizlabs/php_codesniffer": "^3.7", "php-parallel-lint/php-parallel-lint": "^1.4", diff --git a/phpunit.xml b/phpunit.xml index 22b0987..45d4ac9 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,13 +1,13 @@ - - - - src/ - - + tests + + + src/ + + diff --git a/tests/StacksTest.php b/tests/StacksTest.php index e5f1c21..12d10fa 100644 --- a/tests/StacksTest.php +++ b/tests/StacksTest.php @@ -75,11 +75,11 @@ public function testGettingStackDataById() // Get Stack by id $stackData = $stacks->getStackDataById($stacksList->results[0]->id); - $this->assertObjectHasProperty('id', $stackData); + $this->assertTrue(property_exists($stackData, 'id')); $this->assertSame($stacksList->results[0]->id, $stackData->id); - $this->assertObjectHasProperty('title', $stackData); - $this->assertObjectHasProperty('description', $stackData); - $this->assertObjectHasProperty('accessType', $stackData); + $this->assertTrue(property_exists($stackData, 'title')); + $this->assertTrue(property_exists($stackData, 'description')); + $this->assertTrue(property_exists($stackData, 'accessType')); } /**