خرید بک لینک

Vote count: 0

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 ?

asked 43 secs ago

برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 27 ارديبهشت 1395 ساعت: 15:10

صفحه بندی