AcMailerTest\Controller\Plugin\SendMailPluginTest::testArgumentsAreProperlyMapped PHP Метод

testArgumentsAreProperlyMapped() публичный метод

    public function testArgumentsAreProperlyMapped()
    {
        $result = $this->plugin->__invoke('theBody', 'theSubject', ['[email protected]'], ['[email protected]' => 'From Me'], ['[email protected]'], ['[email protected]'], ['attachments/attachment1.zip', 'attachments/attachment2.zip'], ['[email protected]' => 'Reply To Me'], 'utf-8');
        $this->assertInstanceOf('AcMailer\\Result\\ResultInterface', $result);
        $this->assertEquals('theBody', $this->service->getMessage()->getBody());
        $this->assertEquals('theSubject', $this->service->getMessage()->getSubject());
        $this->assertEquals('[email protected]', $this->service->getMessage()->getTo()->current()->getEmail());
        $this->assertEquals('[email protected]', $this->service->getMessage()->getFrom()->current()->getEmail());
        $this->assertEquals('From Me', $this->service->getMessage()->getFrom()->current()->getName());
        $this->assertEquals('[email protected]', $this->service->getMessage()->getCc()->current()->getEmail());
        $this->assertEquals('[email protected]', $this->service->getMessage()->getBcc()->current()->getEmail());
        $this->assertEquals('utf-8', $this->service->getMessage()->getEncoding());
        $this->assertEquals('[email protected]', $this->service->getMessage()->getReplyTo()->current()->getEmail());
        $this->assertEquals('Reply To Me', $this->service->getMessage()->getReplyTo()->current()->getName());
    }