当前位置: 首页>>代码示例>>PHP>>正文


PHP Email::dropTransport方法代码示例

本文整理汇总了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();
 }
开发者ID:drmonkeyninja,项目名称:users,代码行数:12,代码来源:SocialAccountBehaviorTest.php

示例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();
 }
开发者ID:drmonkeyninja,项目名称:users,代码行数:14,代码来源:UsersTableTest.php

示例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();
 }
开发者ID:OrigamiStructures,项目名称:users,代码行数:14,代码来源:SocialAccountsControllerTest.php

示例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();
 }
开发者ID:cakedc,项目名称:users,代码行数:15,代码来源:BaseTraitTest.php

示例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.');
 }
开发者ID:rashmi,项目名称:newrepo,代码行数:12,代码来源:EmailTest.php

示例6: tearDown

 /**
  * tearDown
  *
  * @return void
  */
 public function tearDown()
 {
     unset($this->Table, $this->Behavior);
     Email::dropTransport('test');
     parent::tearDown();
 }
开发者ID:drmonkeyninja,项目名称:users,代码行数:11,代码来源:RegisterBehaviorTest.php

示例7: tearDown

 /**
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     Plugin::unload('Union/Core');
     CakeEmail::dropTransport('default');
 }
开发者ID:UnionCMS,项目名称:Core,代码行数:9,代码来源:EmailTest.php

示例8: tearDown

 /**
  * tearDown
  *
  * @return void
  */
 public function tearDown()
 {
     Email::drop('default');
     Email::dropTransport('test');
     parent::tearDown();
 }
开发者ID:OrigamiStructures,项目名称:users,代码行数:11,代码来源:EmailSenderTest.php

示例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');
    }
开发者ID:drmonkeyninja,项目名称:users,代码行数:51,代码来源:PasswordBehaviorTest.php

示例10: tearDown

 public function tearDown()
 {
     Email::dropTransport('default');
 }
开发者ID:cvo-technologies,项目名称:cakephp-gearman,代码行数:4,代码来源:EmailTaskTest.php


注:本文中的Cake\Mailer\Email::dropTransport方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。