dox Executable Documentation

Wrap redirects

Absolute path

Given the box container 'o'
Given the box container 'a' with body ' public function doGet() { return \\watoki\\curir\\responder\\Redirecter::fromString("/some/where/b?foo=baz"); }'
Given 'o' contains 'a'
Given the context is '/some/where'
Given the request argument '_a/foo' is 'bar'
When I get the response from 'o'
Then the response should be a redirection to '/some/where?_a[!]=b&_a[foo]=baz&_=a'

With state

Given the box container 'o'
Given the box container 'a' with body ' public function doGet() { return \\watoki\\curir\\responder\\Redirecter::fromString("b?foo=baz"); }'
Given the box container 'b'
Given the box container 'c'
Given the box container 'd'
Given 'o' contains 'a'
Given 'o' contains 'b'
Given 'b' contains 'c'
Given the request argument 'foo' is 'O'
Given the request argument '_a/foo' is 'A'
Given the request argument '_a/me' is 'you'
Given the request argument '_b/foo' is 'B'
Given the request argument '_b/_c/foo' is 'C'
When I get the response from 'o'
Then the response should be a redirection to '?foo=O&_b[foo]=B&_b[_c][foo]=C&_a[!]=b&_a[foo]=baz&_=a'

Empty path

Given the box container 'o'
Given the box container 'a' with body ' public function doGet() { return \\watoki\\curir\\responder\\Redirecter::fromString("?foo=baz"); }'
Given 'o' contains 'a'
When I get the response from 'o'
Then the response should be a redirection to '?_a[!]=a&_a[foo]=baz&_=a'

Edge case changed context

Given the box container 'o'
Given the box container 'a' with body ' public function doGet() { return \\watoki\\curir\\responder\\Redirecter::fromString("?foo=bar"); }'
Given 'o' contains 'a'
Given the context is 'http://foo'
When I get the response from 'o'
Then the response should be a redirection to 'http://foo?_a[!]=a&_a[foo]=bar&_=a'