/** * testQuery * * @since 2.2.0 */ public function testQuery() { /* setup */ Request::setQuery('testKey', 'testValue'); /* result */ $result = Request::getQuery('testKey'); /* compare */ $this->assertEquals('testValue', $result); }
/** * testDetectorTemplate * * @since 2.2.0 */ public function testDetectorQuery() { /* setup */ Request::setQuery('l', 'en'); Request::setQuery('t', 'default'); $this->_registry->init(); $detectorLanguage = new Detector\Language($this->_registry); $detectorTemplate = new Detector\Template($this->_registry); /* result */ $resultLanguage = $detectorLanguage->getOutput(); $resultTemplate = $detectorTemplate->getOutput(); /* compare */ $this->assertEquals('en', $resultLanguage); $this->assertEquals('default', $resultTemplate); }