File tree Expand file tree Collapse file tree 4 files changed +16
-6
lines changed
Expand file tree Collapse file tree 4 files changed +16
-6
lines changed Original file line number Diff line number Diff line change 3030 "illuminate/support" : " ^10.34|^11.0|^12.0" ,
3131 "illuminate/testing" : " ^10.34|^11.0|^12.0" ,
3232 "laravel/nova" : " ^5.0" ,
33- "phpunit/phpunit" : " ^10.0|^11.0"
33+ "phpunit/phpunit" : " ^10.0|^11.0|^12.0 "
3434 },
3535 "require-dev" : {
3636 "friendsofphp/php-cs-fixer" : " ^3.0" ,
Original file line number Diff line number Diff line change @@ -73,8 +73,12 @@ public function assertHasValidActions(string $message = ''): self
7373 PHPUnit::assertThat (
7474 $ this ->component ->actions (NovaRequest::createFromGlobals ()),
7575 PHPUnit::logicalAnd (
76- new IsType (IsType::TYPE_ARRAY ),
77- new TraversableContainsOnly (Action::class, false )
76+ function_exists ('\PHPUnit\Framework\isArray ' )
77+ ? \PHPUnit \Framework \isArray ()
78+ : new IsType (constant ('PHPUnit\Framework\Constraint\IsType::TYPE_ARRAY ' ) ?? 'array ' ),
79+ method_exists (TraversableContainsOnly::class, 'forClassOrInterface ' )
80+ ? TraversableContainsOnly::forClassOrInterface (Action::class)
81+ : new TraversableContainsOnly (Action::class, false )
7882 ),
7983 $ message
8084 );
Original file line number Diff line number Diff line change @@ -76,7 +76,9 @@ public function assertHasValidFields(string $message = ''): self
7676 PHPUnit::assertThat (
7777 $ this ->component ->fields (NovaRequest::createFromGlobals ()),
7878 PHPUnit::logicalAnd (
79- new IsType (IsType::TYPE_ARRAY ),
79+ function_exists ('\PHPUnit\Framework\isArray ' )
80+ ? \PHPUnit \Framework \isArray ()
81+ : new IsType (constant ('PHPUnit\Framework\Constraint\IsType::TYPE_ARRAY ' ) ?? 'array ' ),
8082 new HasValidFields ($ this ->allowPanels ())
8183 ),
8284 $ message
Original file line number Diff line number Diff line change @@ -71,8 +71,12 @@ public function assertHasValidFilters(string $message = ''): self
7171 PHPUnit::assertThat (
7272 $ this ->component ->filters (NovaRequest::createFromGlobals ()),
7373 PHPUnit::logicalAnd (
74- new IsType (IsType::TYPE_ARRAY ),
75- new TraversableContainsOnly (Filter::class, false )
74+ function_exists ('\PHPUnit\Framework\isArray ' )
75+ ? \PHPUnit \Framework \isArray ()
76+ : new IsType (constant ('PHPUnit\Framework\Constraint\IsType::TYPE_ARRAY ' ) ?? 'array ' ),
77+ method_exists (TraversableContainsOnly::class, 'forClassOrInterface ' )
78+ ? TraversableContainsOnly::forClassOrInterface (Filter::class)
79+ : new TraversableContainsOnly (Filter::class, false )
7680 ),
7781 $ message
7882 );
You can’t perform that action at this time.
0 commit comments