function testHeader() { ob_start(); $test = new TestController(); $test->update(); $output = ob_get_contents(); ob_end_clean(); $this->assertTrue(in_array("Location: http://google.com", $test->header)); }