silverstripe-framework/tests
Daniel Hensby 3b9056fc01 NEW Cookie_Backend for managing cookie state
I've decoupled `Cookie` from the actual act of setting and getting
cookies. Currently there are a few limitations to how Cookie works that
this change mitigates:

0. `Cookie` currently changes the super global `$_COOKIE` when setting
to make the state of an application a bit more managable, but this is
bad because we shouldn't be modifying super globals
0. One can't actually change the `$cookie_class` once the
`Cookie::$inst` has been instantiated
0. One can't test cookies as there is no class that holds the state of
the cookies (it's just held in the super global which is reset as part
of `Director::test()`
0. One can't tell the origin of a cookie (eg: did the application set it
and it needs to be sent, or did we receive it from the browser?)
0. `time()` was used, so testing was made difficult
0. There was no way to get all the cookies at once (without accessing
the super global)

Todos are on the phpdoc and I'd like to write some tests for the backend
as well as update the docs (if there are any) around cookies.
DOCS Adding `Cookie` docs

Explains basic usage of `Cookie` as well as how the `Cookie_Backend`
controls the setting and getting of cookies and manages state of sent vs
received cookies
Fixing `Cookie` usage

`Cookie` is being used inconsistently with the API throughout framework.
Either by not using `force_expiry` to expire cookies or setting them to
null and then expiring them (which is redundant).
NEW `Director::test()` takes `Cookie_Backend` rather than `array` for `$cookies` param
2014-10-06 17:44:51 +13:00
..
api Remove all redundant whitespace 2014-08-19 09:17:15 +12:00
assets FIX extra_requirements to accept non associative arrays. 2013-06-02 13:37:34 +12:00
behat Remove all redundant whitespace 2014-08-19 09:17:15 +12:00
cache Remove all redundant whitespace 2014-08-19 09:17:15 +12:00
control NEW Cookie_Backend for managing cookie state 2014-10-06 17:44:51 +13:00
core BUG ErrorControlChain now supports exception handling 2014-09-26 16:54:34 +12:00
dev Remove all redundant whitespace 2014-08-19 09:17:15 +12:00
email API Mailer can be configured to use different encoding mechanisms, and added support for unicode quoted-string encoding 2014-09-25 16:04:56 +12:00
filesystem Remove all redundant whitespace 2014-08-19 09:17:15 +12:00
forms Fixing the failure of some tests if the framework dir is named something other than 'framework' (which is a legitimate option) 2014-09-01 13:53:06 +01:00
i18n Remove all redundant whitespace 2014-08-19 09:17:15 +12:00
injector Remove all redundant whitespace 2014-08-19 09:17:15 +12:00
integration Remove all redundant whitespace 2014-08-19 09:17:15 +12:00
javascript Add codesniffer that ensures indentation is with tabs. 2012-12-12 17:33:31 +13:00
model Merge pull request #3025 from tractorcow/pulls/3.2-date-relevance 2014-09-25 18:28:30 +12:00
oembed Remove all redundant whitespace 2014-08-19 09:17:15 +12:00
parsers Remove all redundant whitespace 2014-08-19 09:17:15 +12:00
phpcs Add code-sniffs other than line length to scrutinizer 2013-05-23 10:39:01 +12:00
search Remove all redundant whitespace 2014-08-19 09:17:15 +12:00
security Remove all redundant whitespace 2014-08-19 09:17:15 +12:00
tasks Remove all redundant whitespace 2014-08-19 09:17:15 +12:00
templates FEATURE: <% include %> inherits iterator scope of parent template 2013-07-07 12:39:42 +00:00
testing Remove all redundant whitespace 2014-08-19 09:17:15 +12:00
view Fixing the failure of some tests if the framework dir is named something other than 'framework' (which is a legitimate option) 2014-09-01 13:53:06 +01:00
Bare.yml MINOR: Added small fixture YML that just lets you log in, for bootstrapping browser automation tests. 2011-02-02 14:17:57 +13:00
bootstrap.php Remove all redundant whitespace 2014-08-19 09:17:15 +12:00
FakeController.php Remove all redundant whitespace 2014-08-19 09:17:15 +12:00
MemoryLimitTest.php Remove all redundant whitespace 2014-08-19 09:17:15 +12:00
phpcs_runner.php Only have Scrutinizer check PHP files 2013-08-21 21:02:12 +12:00
PhpSyntaxTest.php Remove all redundant whitespace 2014-08-19 09:17:15 +12:00