Skip to content

Commit 9939519

Browse files
committed
Inline missing method
1 parent 08ec7c8 commit 9939519

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Generators/TestGenerator.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,11 @@ protected function buildTestCases(Controller $controller)
280280
$assertion = sprintf('$response->assertRedirect(route(\'%s\'', $statement->route());
281281

282282
if ($statement->data()) {
283-
$assertion .= ', [' . $this->buildParameters($this->data()) . ']';
283+
$parameters = array_map(function ($parameter) {
284+
return '$' . $parameter;
285+
}, $statement->data());
286+
287+
$assertion .= ', [' . implode(', ', $parameters) . ']';
284288
} elseif (Str::contains($statement->route(), '.')) {
285289
[$model, $action] = explode('.', $statement->route());
286290
if (in_array($action, ['edit', 'update', 'show', 'destroy'])) {

0 commit comments

Comments
 (0)