From b682fe631d39d62f784c6503fa91d0a0fe7bab16 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Thu, 10 Jun 2021 18:40:38 +0100 Subject: [PATCH] chore: bumps expectation plugin --- composer.json | 2 +- tests/Features/BeforeAll.php | 4 ++-- tests/Features/It.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) 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();