Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TestEmail tag/metadata access/assertions #10

Merged
merged 1 commit into from
Sep 30, 2021

Conversation

kbond
Copy link
Member

@kbond kbond commented Sep 30, 2021

For use with: https://symfony.com/doc/current/mailer.html#adding-tags-and-metadata-to-emails

$testEmail->tags(); // array of metadata tag values
$testEmail->tag(); // first tag or null if none
$testEmail->metadata(); array of metadata
$testEmail
    ->assertHasTag('password-reset')
    ->assertHasMetadata('user-id') // assert that metadata key exists
    ->assertHasMetadata('color', 'blue') // assert that metadata key exists and is expected value
;

@kbond kbond added the enhancement New feature or request label Sep 30, 2021
@kbond kbond merged commit 5892976 into zenstruck:1.x Sep 30, 2021
@kbond kbond deleted the tag-metadata branch September 30, 2021 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

None yet

1 participant