While using PHPUnit via the below code-snippet in Eclipse, I get the error:
Cannot send session cookie - headers already sent by (output started at C:\wamp\bin\php\php5.3.13\pear\PHPUnit\Util\Printer.php:172)
Session_start() is executed within "LoginTest". How can I stop PHPUnit from interfering with session cookie generation?
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
require_once 'C:\wamp\bin\php\php5.3.13\pear\PHPUnit\autoload.php';
class MyTestCase extends PHPUnit_Framework_TestCase {
static function main(){
$suite = new PHPUnit_Framework_TestSuite("LoginTest");
//$suite = new PHPUnit_Framework_TestSuite("FriendListTest");
//$suite = new PHPUnit_Framework_TestSuite("UserTest");
PHPUnit_TextUI_TestRunner::run($suite);
}
}
MyTestCase::main();
?>
Very similar problem with solution that won't let me debug in Eclipse.