zenstruck / messenger-test

Assertions and helpers for testing your symfony/messenger queues.
MIT License
223 stars 15 forks source link

`InteractsWithMessenger::transport()` perhaps a little to generic #4

Closed kbond closed 3 years ago

kbond commented 3 years ago

A "Transport" is a common concept within Symfony (mailer/notifier/messenger). It isn't entirely clear that this is a messenger transport and could interfere with other test methods in the future. Should it perhaps be renamed to messenger()?

// current
$this->transport()->queue()->assertEmpty(); 
$this->transport()->queue()->assertNotEmpty(); 
$this->transport()->queue()->assertCount(3);

// proposed
$this->messenger()->queue()->assertEmpty(); 
$this->messenger()->queue()->assertNotEmpty(); 
$this->messenger()->queue()->assertCount(3);