66use Mockery ;
77use ReflectionClass ;
88use Spinen \MailAssertions \Stubs \MailTrackingStub as MailTracking ;
9- use Spinen \MailAssertions \Stubs \OldMailTrackingStub as OldMailTracking ;
109use Swift_Mailer ;
1110use Swift_Message ;
1211
@@ -25,7 +24,7 @@ class MailTrackingTest extends TestCase
2524 /**
2625 * Make a new MailTracking (Stub) instance for each test
2726 */
28- protected function setUp ()
27+ protected function setUp (): void
2928 {
3029 $ this ->mail_tracking = new MailTracking ();
3130
@@ -85,7 +84,6 @@ protected function makeMessage(
8584
8685 /**
8786 * @test
88- * @group unit
8987 */
9088 public function it_can_be_constructed ()
9189 {
@@ -94,7 +92,6 @@ public function it_can_be_constructed()
9492
9593 /**
9694 * @test
97- * @group unit
9895 */
9996 public function it_registers_MailRecorder_withMail_in_the_setup_with_before_annotated_method ()
10097 {
@@ -118,34 +115,6 @@ public function it_registers_MailRecorder_withMail_in_the_setup_with_before_anno
118115
119116 /**
120117 * @test
121- * @group unit
122- */
123- public function it_registers_MailRecorder_without_afterApplicationCreated_method_present ()
124- {
125- // Use a version of the MailTrackingStub without the afterApplicationCreated method
126- $ this ->mail_tracking = new OldMailTracking ();
127-
128- $ swift_mock = Mockery::mock (Swift_Mailer::class);
129-
130- $ swift_mock ->shouldReceive ('registerPlugin ' )
131- ->once ()
132- ->with (Mockery::on (function ($ closure ) {
133- return is_a ($ closure , MailRecorder::class);
134- }))
135- ->andReturnNull ();
136-
137- Mail::shouldReceive ('getSwiftMailer ' )
138- ->once ()
139- ->withNoArgs ()
140- ->andReturn ($ swift_mock );
141-
142- // TODO: Get this method name by parsing annotations
143- $ this ->mail_tracking ->setUpMailTracking ();
144- }
145-
146- /**
147- * @test
148- * @group unit
149118 */
150119 public function it_records_emails_in_collection ()
151120 {
@@ -160,7 +129,6 @@ public function it_records_emails_in_collection()
160129
161130 /**
162131 * @test
163- * @group unit
164132 */
165133 public function it_checks_email_bcc_address ()
166134 {
@@ -173,7 +141,6 @@ public function it_checks_email_bcc_address()
173141
174142 /**
175143 * @test
176- * @group unit
177144 */
178145 public function it_checks_email_cc_address ()
179146 {
@@ -186,7 +153,6 @@ public function it_checks_email_cc_address()
186153
187154 /**
188155 * @test
189- * @group unit
190156 */
191157 public function it_checks_email_content_type ()
192158 {
@@ -199,7 +165,6 @@ public function it_checks_email_content_type()
199165
200166 /**
201167 * @test
202- * @group unit
203168 */
204169 public function it_checks_email_body_for_content ()
205170 {
@@ -211,7 +176,6 @@ public function it_checks_email_body_for_content()
211176
212177 /**
213178 * @test
214- * @group unit
215179 */
216180 public function it_checks_email_body_does_not_have_content ()
217181 {
@@ -223,7 +187,6 @@ public function it_checks_email_body_does_not_have_content()
223187
224188 /**
225189 * @test
226- * @group unit
227190 */
228191 public function it_makes_sure_email_body_is_what_is_expected ()
229192 {
@@ -235,7 +198,6 @@ public function it_makes_sure_email_body_is_what_is_expected()
235198
236199 /**
237200 * @test
238- * @group unit
239201 */
240202 public function it_checks_email_from_address ()
241203 {
@@ -247,7 +209,6 @@ public function it_checks_email_from_address()
247209
248210 /**
249211 * @test
250- * @group unit
251212 */
252213 public function it_checks_email_priority ()
253214 {
@@ -266,7 +227,6 @@ public function it_checks_email_priority()
266227
267228 /**
268229 * @test
269- * @group unit
270230 */
271231 public function it_checks_email_reply_to_address ()
272232 {
@@ -279,7 +239,6 @@ public function it_checks_email_reply_to_address()
279239
280240 /**
281241 * @test
282- * @group unit
283242 */
284243 public function it_knows_how_many_emails_have_been_sent ()
285244 {
@@ -300,7 +259,6 @@ public function it_knows_how_many_emails_have_been_sent()
300259
301260 /**
302261 * @test
303- * @group unit
304262 */
305263 public function it_makes_sure_email_subject_contains_expected_string ()
306264 {
@@ -313,7 +271,6 @@ public function it_makes_sure_email_subject_contains_expected_string()
313271
314272 /**
315273 * @test
316- * @group unit
317274 */
318275 public function it_makes_sure_email_subject_does_not_contain_string ()
319276 {
@@ -325,7 +282,6 @@ public function it_makes_sure_email_subject_does_not_contain_string()
325282
326283 /**
327284 * @test
328- * @group unit
329285 */
330286 public function it_makes_sure_email_subject_is_what_is_expected ()
331287 {
@@ -338,7 +294,6 @@ public function it_makes_sure_email_subject_is_what_is_expected()
338294
339295 /**
340296 * @test
341- * @group unit
342297 */
343298 public function it_checks_email_to_address ()
344299 {
@@ -350,7 +305,6 @@ public function it_checks_email_to_address()
350305
351306 /**
352307 * @test
353- * @group unit
354308 */
355309 public function it_knows_if_email_has_been_sent_or_not ()
356310 {
0 commit comments