My code is :
public function testOne()
{
$mail = ['subject' => 'My subject'];
$this->assertEquals(1, 1);
$mock = Mockery::mock(IlluminateSupportFacadesMail::getSwiftMailer());
$this->app['mailer']->setSwiftMailer($mock);
$msg = $mock->shouldReceive('send')->once()->andRetuUsing(function($msg) {
echo $msg->getSubject();
$this->assertEquals($mail['subject'], $msg->getSubject());
});
$this->assertEquals(1, 1);
}
I get output :
PHPUnit 4.8.24 by Sebastian Bergma and contributors.
My subject
Time: 852 ms, Memory: 26.00Mb
OK (1 test, 2 assertions)
I see from output:
echo $msg->getSubject();
that I get good subject but nothing is asserted, why ?
