Do not attach earl report as listener if no filename specified.

This commit is contained in:
Dave Longley 2013-09-15 16:01:10 -04:00
parent d59ffc65bf
commit 3f4dc75ac5

View file

@ -487,7 +487,7 @@ class EarlReport extends PHPUnit_Util_Printer
* @param PHPUnit_Framework_Test $result the result to attach to.
*/
public function attach(PHPUnit_Framework_TestResult $result) {
if(!$this->result) {
if(!$this->result && $this->filename) {
$this->result = $result;
$result->addListener($this);
}