コード例 #1
0
 /**
  * @test
  */
 public function downloadAction()
 {
     $name = '\\Aimeos\\Client\\Html\\Account\\Download\\Standard';
     $client = $this->getMock($name, array('process'), array(), '', false);
     \Aimeos\Client\Html\Account\Download\Factory::injectClient($name, $client);
     $output = $this->object->downloadAction();
     \Aimeos\Client\Html\Account\Download\Factory::injectClient($name, null);
     $this->assertEquals('', $output);
 }
コード例 #2
0
 /**
  * Renders the account download
  */
 public function downloadAction()
 {
     $context = $this->getContext();
     $view = $context->getView();
     $client = \Aimeos\Client\Html\Account\Download\Factory::createClient($context, array());
     $client->setView($view);
     $client->process();
     $response = $view->response();
     $this->response->setStatus($response->getStatusCode());
     foreach ($response->getHeaders() as $key => $value) {
         $this->response->setHeader($key, implode(', ', $value));
     }
     return (string) $response->getBody();
 }
コード例 #3
0
ファイル: FactoryTest.php プロジェクト: aimeos/ai-client-html
 public function testCreateClientNameNotFound()
 {
     $this->setExpectedException('\\Aimeos\\Client\\Html\\Exception');
     \Aimeos\Client\Html\Account\Download\Factory::createClient($this->context, $this->templatePaths, 'notfound');
 }