public function setUp() { parent::setUp(); $this->_SERVER = $_SERVER; // This is a a hacky workaround to the fact that you cannot use the header() // call in PHPUnit because you hit "headers already sent" errors. $this->sent_headers = []; $mock_send_header = function ($key, $value) { $this->sent_headers[$key] = $value; }; CloudStorageTools::setSendHeaderFunction($mock_send_header); }
public function setUp() { parent::setUp(); $this->_SERVER = $_SERVER; self::$mock_upload_max_filesize = '0'; // This is a a hacky workaround to the fact that you cannot use the header() // call in PHPUnit because you hit "headers already sent" errors. $this->sent_headers = []; $mock_send_header = function ($key, $value) { $this->sent_headers[$key] = $value; }; CloudStorageTools::setSendHeaderFunction($mock_send_header); $GLOBALS['expected_apc_fetch_calls'] = []; $GLOBALS['expected_apc_store_calls'] = []; }