Ejemplo n.º 1
0
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @return void
  */
 protected function setUp()
 {
     $this->object = new Po();
     $testObject = json_decode(file_get_contents(TEST_ROOT . '/tests/testLangDir/test/po_good.json'));
     $fileInfo = new FileInfo();
     foreach ($testObject as $k => $v) {
         if (is_object($v)) {
             $val = [];
             foreach ($v as $k1 => $v1) {
                 $val[$k1] = $v1;
             }
         } else {
             $val = $v;
         }
         $fileInfo->{$k} = $val;
     }
     $this->testObject = $fileInfo;
     G11n::getDefault();
 }
Ejemplo n.º 2
0
 /**
  * Test method.
  *
  * @return void
  */
 public function testSetDefault()
 {
     G11n::setDefault('yy-YY');
     $this->assertThat(G11n::getDefault(), $this->equalTo('yy-YY'));
 }