PMCORE-1159 SpoolRunTest: Solve the incomplete test

This commit is contained in:
Roly Rudy Gutierrez Pinto
2020-02-18 12:03:40 -04:00
parent 8851292713
commit 5a046c8d53
3 changed files with 0 additions and 99 deletions

View File

@@ -190,47 +190,6 @@ class SpoolRunTest extends TestCase
$this->assertTrue($expected);
}
/**
* This test uses the OPENMAIL option in a simple way.
* @test
* @covers \SpoolRun::__construct()
* @covers \SpoolRun::setData()
* @covers \SpoolRun::setConfig()
* @covers \SpoolRun::sendMail()
* @covers \SpoolRun::handleMail()
*/
public function it_should_handle_open_mail_option()
{
$this->markTestIncomplete("The OPENMAIL depends on the package class but this is not found in the environment.");
$appMsgUid = G::generateUniqueID();
factory(AppMessage::class)->create([
'APP_MSG_UID' => $appMsgUid
]);
$emailServer = factory(EmailServerModel::class)->states('OPENMAIL')->make();
$config = $emailServer->toArray();
$faker = Factory::create();
$spoolRun = new SpoolRun();
$spoolRun->setData(
$appMsgUid,
$faker->title,
$faker->companyEmail,
$faker->freeEmail,
$faker->text(),
$faker->dateTime()->format('Y-m-d H:i:s'),
$faker->companyEmail,
$faker->freeEmail
);
$spoolRun->setConfig($config);
$expected = $spoolRun->sendMail();
$this->assertTrue($expected);
}
/**
* This test ensures that characters that are not utf8 are converted properly,
* for subject and body fields.