本文整理汇总了PHP中Cake\Mailer\Email::dropTransport方法的典型用法代码示例。如果您正苦于以下问题:PHP Email::dropTransport方法的具体用法?PHP Email::dropTransport怎么用?PHP Email::dropTransport使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cake\Mailer\Email
的用法示例。
在下文中一共展示了Email::dropTransport方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tearDown
/**
* tearDown
*
* @return void
*/
public function tearDown()
{
unset($this->Table, $this->Behavior, $this->Email);
Router::fullBaseUrl($this->fullBaseBackup);
Email::dropTransport('test');
parent::tearDown();
}
示例2: tearDown
/**
* tearDown method
*
* @return void
*/
public function tearDown()
{
unset($this->Users);
Router::fullBaseUrl($this->fullBaseBackup);
Email::drop('default');
Email::dropTransport('test');
Email::config('default', $this->configEmail);
parent::tearDown();
}
示例3: tearDown
/**
* tearDown
*
* @return void
*/
public function tearDown()
{
Email::drop('default');
Email::dropTransport('test');
Email::config('default', $this->configEmail);
Configure::write('Opauth', $this->configOpauth);
Configure::write('Users.RememberMe.active', $this->configRememberMe);
parent::tearDown();
}
示例4: tearDown
/**
* tearDown
*
* @return void
*/
public function tearDown()
{
unset($this->table, $this->Trait);
if ($this->mockDefaultEmail) {
Email::drop('default');
Email::dropTransport('test');
Email::config('default', $this->configEmail);
}
parent::tearDown();
}
示例5: testDropTransport
/**
* Test dropping a transport configuration
*
* @return void
*/
public function testDropTransport()
{
$result = Email::configTransport('debug');
$this->assertInternalType('array', $result, 'Should have config data');
Email::dropTransport('debug');
$this->assertNull(Email::configTransport('debug'), 'Should not exist.');
}
示例6: tearDown
/**
* tearDown
*
* @return void
*/
public function tearDown()
{
unset($this->Table, $this->Behavior);
Email::dropTransport('test');
parent::tearDown();
}
示例7: tearDown
/**
* @return void
*/
public function tearDown()
{
parent::tearDown();
Plugin::unload('Union/Core');
CakeEmail::dropTransport('default');
}
示例8: tearDown
/**
* tearDown
*
* @return void
*/
public function tearDown()
{
Email::drop('default');
Email::dropTransport('test');
parent::tearDown();
}
示例9: testSendResetPasswordEmail
/**
* Test method
*
* @return void
*/
public function testSendResetPasswordEmail()
{
$behavior = $this->table->behaviors()->Password;
$this->fullBaseBackup = Router::fullBaseUrl();
Router::fullBaseUrl('http://users.test');
Email::configTransport('test', ['className' => 'Debug']);
$this->Email = new Email(['from' => 'test@example.com', 'transport' => 'test', 'template' => 'CakeDC/Users.reset_password', 'emailFormat' => 'both']);
$user = $this->table->newEntity(['first_name' => 'FirstName', 'email' => 'test@example.com', 'token' => '12345']);
$result = $behavior->sendResetPasswordEmail($user, $this->Email, 'CakeDC/Users.reset_password');
$this->assertTextContains('From: test@example.com', $result['headers']);
$this->assertTextContains('To: test@example.com', $result['headers']);
$this->assertTextContains('Subject: FirstName, Your reset password link', $result['headers']);
$this->assertTextContains('Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Hi FirstName,
Please copy the following address in your web browser http://users.test/users/users/reset-password/12345
Thank you,
', $result['message']);
$this->assertTextContains('Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Email/html</title>
</head>
<body>
<p>
Hi FirstName,
</p>
<p>
<strong><a href="http://users.test/users/users/reset-password/12345">Reset your password here</a></strong>
</p>
<p>
If the link is not correcly displayed, please copy the following address in your web browser http://users.test/users/users/reset-password/12345</p>
<p>
Thank you,
</p>
</body>
</html>
', $result['message']);
Router::fullBaseUrl($this->fullBaseBackup);
Email::dropTransport('test');
}
示例10: tearDown
public function tearDown()
{
Email::dropTransport('default');
}