File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 4
4
5
5
namespace Sinnbeck \DomAssertions \Asserts ;
6
6
7
+ use Closure ;
7
8
use Illuminate \Support \Str ;
8
9
use Illuminate \Testing \Assert as PHPUnit ;
9
10
use PHPUnit \Framework \Assert ;
@@ -72,7 +73,7 @@ protected function getAttributeFromForm(string $attribute)
72
73
73
74
public function findSelect ($ selector = 'select ' , $ callback = null ): static
74
75
{
75
- if (is_callable ( $ selector) ) {
76
+ if ($ selector instanceof Closure ) {
76
77
$ callback = $ selector ;
77
78
$ selector = 'select ' ;
78
79
}
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ public function assertElementExists(): Closure
33
33
Assert::fail ($ exception ->getMessage ());
34
34
}
35
35
36
- if (is_callable ( $ selector) ) {
36
+ if ($ selector instanceof Closure ) {
37
37
$ callback = $ selector ;
38
38
$ selector = 'body ' ;
39
39
}
@@ -69,7 +69,7 @@ public function assertFormExists(): Closure
69
69
Assert::fail ($ exception ->getMessage ());
70
70
}
71
71
72
- if (is_callable ( $ selector) ) {
72
+ if ($ selector instanceof Closure ) {
73
73
$ callback = $ selector ;
74
74
$ selector = 'form ' ;
75
75
}
You can’t perform that action at this time.
0 commit comments