title: Unit Testing with items that need to send headers
body: <p>I'm currently working with PHPUnit to try and develop tests alongside what I'm writing, however, I'm currently working on writing the Session Manager, and am having issues doing so...</p>
  
  <p>The constructor for the Session handling class is</p>
  
  <pre><code>private function __construct()
  {
      if (!headers_sent())
      {
          session_start();
          self::$session_id = session_id();
      }
  }
  </code></pre>
  
  <p>However, as PHPUnit sends out text before it starts the testing, any testing on this Object returns a failed test, as the HTTP "Headers" have been sent...</p>