/**
  * testDetectorTemplate
  *
  * @since 2.2.0
  */
 public function testDetectorQuery()
 {
     /* setup */
     $this->_registry->init();
     $this->_request->setQuery('l', 'en');
     $this->_request->setQuery('t', 'default');
     $detectorLanguage = new Detector\Language($this->_registry, $this->_request);
     $detectorTemplate = new Detector\Template($this->_registry, $this->_request);
     /* actual */
     $actualLanguage = $detectorLanguage->getOutput();
     $actualTemplate = $detectorTemplate->getOutput();
     /* compare */
     $this->assertEquals('en', $actualLanguage);
     $this->assertEquals('default', $actualTemplate);
 }
Exemple #2
0
 /**
  * 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);
 }