From 6e6a354cf7e7514985b0005b4e3b35cd0167dfa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Dorn?= Date: Fri, 21 Apr 2023 11:28:50 +0200 Subject: [PATCH] update tests --- tests/RuleBuilderTest.php | 6 +++--- tests/TwitterExceptionTest.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/RuleBuilderTest.php b/tests/RuleBuilderTest.php index 796dff0..782d7e9 100644 --- a/tests/RuleBuilderTest.php +++ b/tests/RuleBuilderTest.php @@ -142,9 +142,9 @@ function query(string $q = '') }); it('can pass an array of raw strings to be compiled as is', function () { - expect(query()->raw(['hello', 'world'])->compile())->toBe('hello world'); - expect(query()->raw(['hello', 'world'])->orRaw(['foo', 'bar'])->compile())->toBe('hello world OR foo bar'); - expect(query()->raw(['hello', 'world'])->andRaw(['foo', 'bar'])->compile())->toBe('hello world foo bar'); + expect(query()->raw(['hello', 'world'])->compile())->toBe('hello OR world'); + expect(query()->raw(['hello', 'world'])->orRaw(['foo', 'bar'])->compile())->toBe('hello OR world OR foo OR bar'); + expect(query()->raw(['hello', 'world'])->andRaw(['foo', 'bar'])->compile())->toBe('hello OR world foo OR bar'); }); it('can compile a negated nullcast operator', function () { diff --git a/tests/TwitterExceptionTest.php b/tests/TwitterExceptionTest.php index 6a0cc8e..01cda28 100644 --- a/tests/TwitterExceptionTest.php +++ b/tests/TwitterExceptionTest.php @@ -34,7 +34,7 @@ ])) ); - expect($exception)->getMessage()->toBe(json_encode($error)); + expect($exception)->getMessage()->toBe(json_encode($error, JSON_PRETTY_PRINT)); }); it('can handle 429s', function () {