當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。