Ejemplo n.º 1
0
 /**
  * @test
  */
 public function selectAction()
 {
     $name = '\\Aimeos\\Client\\Html\\Locale\\Select\\Standard';
     $client = $this->getMock($name, array('getBody', 'getHeader', 'process'), array(), '', false);
     $client->expects($this->once())->method('getBody')->will($this->returnValue('body'));
     $client->expects($this->once())->method('getHeader')->will($this->returnValue('header'));
     \Aimeos\Client\Html\Locale\Select\Factory::injectClient($name, $client);
     $output = $this->object->selectAction();
     \Aimeos\Client\Html\Locale\Select\Factory::injectClient($name, null);
     $this->assertEquals('body', $output);
 }
Ejemplo n.º 2
0
 public function testCreateClientNameNotFound()
 {
     $this->setExpectedException('\\Aimeos\\Client\\Html\\Exception');
     \Aimeos\Client\Html\Locale\Select\Factory::createClient($this->context, $this->templatePaths, 'notfound');
 }
Ejemplo n.º 3
0
 /**
  * Processes requests and renders the locale selector.
  */
 public function selectAction()
 {
     $templatePaths = Base::getAimeos()->getCustomPaths('client/html');
     $client = \Aimeos\Client\Html\Locale\Select\Factory::createClient($this->getContext(), $templatePaths);
     return $this->getClientOutput($client);
 }