Skip to content

Commit

Permalink
bot: fix cs [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
kbond committed Jan 16, 2024
1 parent d58e3e6 commit 26a5d2b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/TestEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ final public function call(callable $callback)
Parameter::typed(self::class, Parameter::factory(function(string $class) {
/** @var class-string<TestEmail> $class */
return $this->as($class);
}))
})),
));
}

Expand Down Expand Up @@ -239,7 +239,7 @@ final public function assertTextContains(string $expected): self
final public function assertHasFile(
string $expectedFilename,
?string $expectedContentType = null,
?string $expectedContents = null
?string $expectedContents = null,
): self {
foreach ($this->email->getAttachments() as $attachment) {
/** @var ParameterizedHeader $header */
Expand Down Expand Up @@ -339,7 +339,7 @@ private function assertEmail(array $addresses, string $expectedEmail, ?string $e

Assert::fail('Message does not have {type} {expected}', [
'type' => \mb_strtoupper($type),
'expected' => $expectedEmail, ]
'expected' => $expectedEmail, ],
);
}
}
10 changes: 5 additions & 5 deletions tests/TestEmailTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ public function can_assert_has_tag(): void
$withTags->assertHasTag('bar');

Assert::that(fn() => $withTags->assertHasTag('baz'))->throws(
AssertionFailedError::class, 'Expected to have tag "baz".'
AssertionFailedError::class, 'Expected to have tag "baz".',
);
Assert::that(fn() => (new TestEmail(new Email()))->assertHasTag('foo'))->throws(
AssertionFailedError::class, 'No tags found.'
AssertionFailedError::class, 'No tags found.',
);
}

Expand All @@ -91,13 +91,13 @@ public function can_assert_has_metadata(): void
$withMetadata->assertHasMetadata('color', 'blue');

Assert::that(fn() => $withMetadata->assertHasMetadata('color', 'red'))->throws(
AssertionFailedError::class, 'Expected metadata "color" to be "red".'
AssertionFailedError::class, 'Expected metadata "color" to be "red".',
);
Assert::that(fn() => $withMetadata->assertHasMetadata('foo'))->throws(
AssertionFailedError::class, 'Expected to have metadata key "foo"'
AssertionFailedError::class, 'Expected to have metadata key "foo"',
);
Assert::that(fn() => (new TestEmail(new Email()))->assertHasMetadata('foo'))->throws(
AssertionFailedError::class, 'No metadata found.'
AssertionFailedError::class, 'No metadata found.',
);
}

Expand Down

0 comments on commit 26a5d2b

Please sign in to comment.