I have this strange problem when i call the parent::setUp()
on my TestCase class for unit test a class
when i run phpunit it throw me this error:
In Laravel I avoided the issue by checking the environment and avoiding problematic code for 'testing' environment.
// Code working in Laravel 4.2
if(App::environment() != 'testing') {
// this will be skipped when testing
setcookie('key', $val, time() + (86400 * 999), '/');
}
NOTE - Warning: this means you cannot test this piece of code!