diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index af985af..a38a036 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: [7.2] + php: [7.2, 7.3, 7.4, 8.0, 8.1, 8.2] fail-fast: true steps: - uses: actions/checkout@v4 diff --git a/composer.json b/composer.json index 1172a43..37555a5 100644 --- a/composer.json +++ b/composer.json @@ -40,7 +40,7 @@ "ext-json": "*", "mikey179/vfsstream": "~1.4", - "phpspec/phpspec": "~4.0", + "phpspec/phpspec": "~6.0|~7.0", "behat/behat": "~3.0", diff --git a/tests/spec/RulerZ/Context/ExecutionContextSpec.php b/tests/spec/RulerZ/Context/ExecutionContextSpec.php index e4732f9..e56ffce 100644 --- a/tests/spec/RulerZ/Context/ExecutionContextSpec.php +++ b/tests/spec/RulerZ/Context/ExecutionContextSpec.php @@ -29,8 +29,8 @@ public function it_allows_property_access_through_offset($object) public function it_allows_testing_property_existence($object) { - $this->offsetExists('some')->shouldReturn(true); - $this->offsetExists('non_existent_offset')->shouldReturn(false); + $this->shouldHaveKey('some'); + $this->shouldNotHaveKey('non_existent_offset'); } public function it_forbids_setting_properties() diff --git a/tests/spec/RulerZ/Context/ObjectContextSpec.php b/tests/spec/RulerZ/Context/ObjectContextSpec.php index 88a8b67..48a0116 100644 --- a/tests/spec/RulerZ/Context/ObjectContextSpec.php +++ b/tests/spec/RulerZ/Context/ObjectContextSpec.php @@ -38,8 +38,8 @@ public function it_allows_testing_property_existence($object) { $object->property = 42; - $this->offsetExists('property')->shouldReturn(true); - $this->offsetExists('non_existent_property')->shouldReturn(false); + $this->shouldHaveKey('property'); + $this->shouldNotHaveKey('non_existent_property'); } public function it_forbids_setting_properties()