0

I am using PHPStorm to run unit tests using PHPUnit, some previous tests have worked but now all tests are failing with exit code 255.

Some previous tests have worked but now all tests seem to fail. I haven't changed any configuration settings, all I have done is created a new test.

I have read on so many things but nothing seems to work and really need help.

here are my configuration settings:

config settings

And here is a test that has recently passed but now fails.

use app\Mailer;
require_once '../app/Mailer.php';

class MailerTest extends \PHPUnit_Framework_TestCase

 private $_mailer;

public function setUp()
{
    $this->_mailer = new Mailer();

}

public function tearDown(){}

public function testMailerClass()
{
    $this->_mailer->Subject = "test email";
    $this->_mailer->Recipient = "email address";
    $this->_mailer->Message = "This is a test email";

    $this->assertTrue($this->_mailer->Send(), 'Expects an email to be sent');
}

}

2
  • 1
    Looks like a likely dupe of stackoverflow.com/questions/16222504/… Commented Dec 30, 2016 at 22:17
  • I have read the article but it doesn't seem to help. It is weird as it works fine in a different project and code and configuration settings is basically similar. Commented Jan 7, 2017 at 17:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.