-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide a bit more context on live server failures
- Loading branch information
Showing
4 changed files
with
120 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
framework/Imap_Client/test/Horde/Imap/Client/Live/Base.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
/** | ||
* Copyright 2014 Horde LLC (http://www.horde.org/) | ||
* | ||
* See the enclosed file COPYING for license information (LGPL). If you | ||
* did not receive this file, see http://www.horde.org/licenses/lgpl21. | ||
* | ||
* @category Horde | ||
* @copyright 2014 Horde LLC | ||
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 | ||
* @package Imap_Client | ||
* @subpackage UnitTests | ||
*/ | ||
|
||
/** | ||
* Base class for live server testing. | ||
* | ||
* @author Michael Slusarz <slusarz@horde.org> | ||
* @category Horde | ||
* @copyright 2014 Horde LLC | ||
* @ignore | ||
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 | ||
* @package Imap_Client | ||
* @subpackage UnitTests | ||
*/ | ||
class Horde_Imap_Client_Live_Base extends PHPUnit_Framework_TestCase | ||
{ | ||
static public $live; | ||
|
||
static public function tearDownAfterClass() | ||
{ | ||
self::$live = null; | ||
} | ||
|
||
public function onNotSuccessfulTest(Exception $e) | ||
{ | ||
if ($e instanceof Horde_Imap_Client_Exception) { | ||
$e->setMessage($e->getMessage() . ' [' . self::$live->url . ']'); | ||
} | ||
parent::onNotSuccessfulTest($e); | ||
} | ||
|
||
} |
Oops, something went wrong.