diff --git a/composer.json b/composer.json index e7e2b45f..bf12f2c5 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "nunomaduro/collision": "^5.0", "pestphp/pest-plugin": "^1.0", "pestphp/pest-plugin-coverage": "^1.0", - "pestphp/pest-plugin-expectations": "^1.3", + "pestphp/pest-plugin-expectations": "^1.6", "pestphp/pest-plugin-init": "^1.1", "phpunit/phpunit": ">= 9.3.7 <= 9.5.5" }, diff --git a/tests/Features/BeforeAll.php b/tests/Features/BeforeAll.php index e8e458bc..782ebcfa 100644 --- a/tests/Features/BeforeAll.php +++ b/tests/Features/BeforeAll.php @@ -8,11 +8,11 @@ beforeAll(function () use ($foo) { }); it('gets executed before tests', function () use ($foo) { - expect($foo->bar)->toBe(1); + expect($foo)->bar->toBe(1); $foo->bar = 'changed'; }); it('do not get executed before each test', function () use ($foo) { - expect($foo->bar)->toBe('changed'); + expect($foo)->bar->toBe('changed'); }); diff --git a/tests/Features/It.php b/tests/Features/It.php index 384e12bd..dc483a2e 100644 --- a/tests/Features/It.php +++ b/tests/Features/It.php @@ -1,7 +1,7 @@ assertArrayHasKey('key', ['key' => 'foo']); + expect(['key' => 'foo'])->toHaveKey('key')->key->toBeString(); }); it('is a higher order message test')->expect(true)->toBeTrue();