Upgrade to Laravel 9 (#4413)
Co-authored-by: DaneEveritt <dane@daneeveritt.com>
This commit is contained in:
parent
95e15d2c8a
commit
cbcf62086f
573 changed files with 4387 additions and 9411 deletions
|
@ -31,10 +31,8 @@ trait AssertsActivityLogged
|
|||
/**
|
||||
* Asserts that a given activity log event was stored with the subjects being
|
||||
* any of the values provided.
|
||||
*
|
||||
* @param \Illuminate\Database\Eloquent\Model|array $subjects
|
||||
*/
|
||||
public function assertActivitySubjects(string $event, $subjects): void
|
||||
public function assertActivitySubjects(string $event, Model|array $subjects): void
|
||||
{
|
||||
if (is_array($subjects)) {
|
||||
\Webmozart\Assert\Assert::lessThanEq(count(func_get_args()), 2, 'Invalid call to ' . __METHOD__ . ': cannot provide additional arguments if providing an array.');
|
||||
|
|
|
@ -9,7 +9,7 @@ trait MiddlewareAttributeAssertionsTrait
|
|||
/**
|
||||
* Assert a request has an attribute assigned to it.
|
||||
*/
|
||||
public function assertRequestHasAttribute(string $attribute)
|
||||
public function assertRequestHasAttribute(string $attribute): void
|
||||
{
|
||||
Assert::assertTrue($this->request->attributes->has($attribute), 'Assert that request mock has ' . $attribute . ' attribute.');
|
||||
}
|
||||
|
@ -17,17 +17,15 @@ trait MiddlewareAttributeAssertionsTrait
|
|||
/**
|
||||
* Assert a request does not have an attribute assigned to it.
|
||||
*/
|
||||
public function assertRequestMissingAttribute(string $attribute)
|
||||
public function assertRequestMissingAttribute(string $attribute): void
|
||||
{
|
||||
Assert::assertFalse($this->request->attributes->has($attribute), 'Assert that request mock does not have ' . $attribute . ' attribute.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Assert a request attribute matches an expected value.
|
||||
*
|
||||
* @param mixed $expected
|
||||
*/
|
||||
public function assertRequestAttributeEquals($expected, string $attribute)
|
||||
public function assertRequestAttributeEquals(mixed $expected, string $attribute): void
|
||||
{
|
||||
Assert::assertEquals($expected, $this->request->attributes->get($attribute));
|
||||
}
|
||||
|
|
Reference in a new issue