Development

/branches/1.1/test/functional/fixtures/project/apps/i18n/modules/i18n/actions/actions.class.php

You must first sign up to be able to contribute.

root/branches/1.1/test/functional/fixtures/project/apps/i18n/modules/i18n/actions/actions.class.php

Revision 8645, 1.2 kB (checked in by fabien, 5 years ago)

fixed tests that failed on case sensitive filesystem and with slightly different default PHP configuration

  • Property svn:mime-type set to text/x-php
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
Line 
1 <?php
2
3 /**
4  * i18n actions.
5  *
6  * @package    project
7  * @subpackage i18n
8  * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
9  * @version    SVN: $Id$
10  */
11 class i18nActions extends sfActions
12 {
13   public function executeIndex()
14   {
15     $i18n = $this->getContext()->getI18N();
16
17     $this->test = $i18n->__('an english sentence');
18     $this->localTest = $i18n->__('a local english sentence');
19     $this->otherTest = $i18n->__('an english sentence', array(), 'other');
20     $this->otherLocalTest = $i18n->__('a local english sentence', array(), 'other');
21   }
22
23   public function executeIndexForFr()
24   {
25     // change user culture
26     $this->getUser()->setCulture('fr');
27     $this->getUser()->setCulture('en');
28     $this->getUser()->setCulture('fr');
29
30     $this->forward('i18n', 'index');
31   }
32  
33   public function executeI18nForm(sfWebRequest $request)
34   {
35     $this->form = new I18nForm();
36     if ($request->isMethod('post'))
37     {
38       $this->form->bind($request->getParameter('i18n'));
39     }
40   }
41  
42   public function executeI18nCustomCatalogueForm(sfWebRequest $request)
43   {
44     $this->form = new I18nCustomCatalogueForm();
45     $this->setTemplate('i18nForm');
46   }
47 }
48
Note: See TracBrowser for help on using the browser.