aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/appframework/http/ResponseTest.php
Commit message (Collapse)AuthorAgeFilesLines
* Move tests/ to PSR-4 (#24731)Joas Schilling2016-05-201-267/+0
| | | | | | | | | | | | | | | | | | | | * Move a-b to PSR-4 * Move c-d to PSR-4 * Move e+g to PSR-4 * Move h-l to PSR-4 * Move m-r to PSR-4 * Move s-u to PSR-4 * Move files/ to PSR-4 * Move remaining tests to PSR-4 * Remove Test\ from old autoloader
* Fix namespaces in AppFramework testsJoas Schilling2016-05-181-1/+1
|
* Add blob: scheme to default CSP policyLukas Reschke2015-09-291-1/+1
| | | | Fixes https://github.com/owncloud/core/issues/19438
* add more unit tests for data: as allowed image domainsualko2015-08-101-1/+1
|
* Add `no-store` to AppFrameworkLukas Reschke2015-06-151-1/+1
|
* Allow AppFramework applications to specify a custom CSP headerLukas Reschke2015-02-161-2/+27
| | | | | | | | | | | | | | | This change allows AppFramework applications to specify a custom CSP header for example when the default policy is too strict. Furthermore this allows us to partially migrate away from CSS and allowed eval() in our JavaScript components. Legacy ownCloud components will still use the previous policy. Application developers can use this as following in their controllers: ```php $response = new TemplateResponse('activity', 'list', []); $cspHelper = new ContentSecurityPolicyHelper(); $cspHelper->addAllowedScriptDomain('www.owncloud.org'); $response->addHeader('Content-Security-Policy', $cspHelper->getPolicy()); return $response; ``` Fixes https://github.com/owncloud/core/issues/11857 which is a pre-requisite for https://github.com/owncloud/core/issues/13458 and https://github.com/owncloud/core/issues/11925
* Add functions to modify cookies to response classLukas Reschke2014-11-271-0/+86
| | | | | | | | | | | | | | | | Currently there is no AppFramework way to modify cookies, which makes it unusable for quite some use-cases or results in untestable code. This PR adds some basic functionalities to add and invalidate cookies. Usage: ```php $response = new TemplateResponse(...); $response->addCookie('foo', 'bar'); $response->invalidateCookie('foo'); $response->addCookie('bar', 'foo', new \DateTime('2015-01-01 00:00')); ``` Existing cookies can be accessed with the AppFramework using `$this->request->getCookie($name)`.
* Make remaining files extend the test baseJoas Schilling2014-11-191-1/+2
|
* add dataresponseBernhard Posselt2014-10-291-6/+20
| | | | | | | | | | | | | | fix docstrings adjust copyright date another copyright date update another header update implement third headers argument, fix indention, fix docstrings fix docstrings
* adjust license headers to new mail addressBernhard Posselt2014-05-111-1/+1
|
* add cors middlewareBernhard Posselt2014-05-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | remove methodannotationreader namespace fix namespace for server container fix tests fail if with cors credentials header is set to true, implement a reusable preflighted cors method in the controller baseclass, make corsmiddleware private and register it for every request remove uneeded local in cors middleware registratio dont uppercase cors to easily use it from routes fix indention comment fixes explicitely set allow credentials header to false dont depend on better controllers PR, fix that stuff later split cors methods to be in a seperate controller for exposing apis remove protected definitions from apicontroller since controller has it
* Chainable Response in AppFrameworkThomas Tanghus2014-03-091-0/+20
|
* use assertSame and assertNotSame for etag checksJörn Friedrich Dreyer2014-02-271-1/+1
|
* Scrutinizer Auto-FixesScrutinizer Auto-Fixer2014-02-191-2/+2
| | | | | | | | | | | This patch was automatically generated as part of the following inspection: https://scrutinizer-ci.com/g/owncloud/core/inspections/cdfecc4e-a37e-4233-8025-f0d7252a8720 Enabled analysis tools: - PHP Analyzer - JSHint - PHP Copy/Paste Detector - PHP PDepend
* Fix namespace for OCP\Appframework\HttpThomas Tanghus2013-10-231-1/+2
| | | | | To avoid having to use OCP\Appframework\Http\Http in the public - and stable - API OCP\Appframework\Http is now both a class and a namespace.
* kill superfluent classloader from tests - this approach might be of interest ↵Thomas Müller2013-08-211-3/+4
| | | | within the apps
* initial import of appframeworkThomas Müller2013-08-171-0/+119