AcMailerTest\Service\MailServiceAbstractFactoryTest::testFileAttachments PHP Method

testFileAttachments() public method

public testFileAttachments ( )
    public function testFileAttachments()
    {
        $cwd = getcwd();
        chdir(dirname(__DIR__));
        $options = ['message_options' => ['attachments' => ['files' => ['attachments/file1', 'attachments/file2'], 'dir' => ['iterate' => true, 'path' => 'attachments/dir', 'recursive' => true]]]];
        $this->initServiceLocator($options);
        $mailService = $this->mailServiceFactory->__invoke($this->serviceLocator, 'acmailer.mailservice.default');
        $this->assertCount(4, $mailService->getAttachments());
        chdir($cwd);
    }