Source of file DetectLocaleMiddlewareSpy.php
Size: 0,668 Bytes - Last Modified: 2021-12-23T10:53:31+00:00
/var/www/docs.ssmods.com/process/src/tests/php/Middleware/Stub/DetectLocaleMiddlewareSpy.php
12345678910111213141516171819202122232425 | <?php namespace TractorCow\Fluent\Tests\Middleware\Stub; use SilverStripe\Control\HTTPRequest; use TractorCow\Fluent\Middleware\DetectLocaleMiddleware; use SilverStripe\Dev\TestOnly; /** * Opens up DetectLocaleMiddleware protected methods for unit testing * * @method string getPersistKey() * @method $this setPersistLocale(HTTPRequest $request, $locale) * @method string getLocale(HTTPRequest $request) */ class DetectLocaleMiddlewareSpy extends DetectLocaleMiddleware implements TestOnly { public function __call($method, $arguments) { if (method_exists($this, $method)) { return $this->$method(...$arguments); } } } |