Skip to content

Commit f830156

Browse files
committed
refactor: optimize toolTextDoesNotContain assertion for cleaner syntax
1 parent 7f30ceb commit f830156

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tests/Pest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@
3232
expect()->extend('toolTextDoesNotContain', function (mixed ...$needles) {
3333
/** @var ToolResult $this->value */
3434
$output = implode('', array_column($this->value->toArray()['content'], 'text'));
35-
foreach ($needles as $needle) {
36-
expect($output)->not->toContain($needle);
37-
}
35+
expect($output)->not->toContain(...func_get_args());
3836

3937
return $this;
4038
});

0 commit comments

Comments
 (0)