Esempio n. 1
0
 /**
  * Tests parsing of locales using shortcut methods.
  */
 public function testDecomposeUsingShortcutMethods()
 {
     $this->assertEqual('zh', Locale::language('zh_Hans_HK_REVISED'));
     $this->assertEqual('Hans', Locale::script('zh_Hans_HK_REVISED'));
     $this->assertEqual('HK', Locale::territory('zh_Hans_HK_REVISED'));
     $this->assertEqual('REVISED', Locale::variant('zh_Hans_HK_REVISED'));
     $this->assertNull(Locale::script('zh_HK'));
     $this->assertNull(Locale::territory('zh'));
     $this->assertNull(Locale::variant('zh'));
     $this->assertException('/.*/', function () {
         Locale::notAValidTag('zh_Hans_HK_REVISED');
     });
 }
Esempio n. 2
0
 /**
  * Tests parsing of locales using shortcut methods.
  *
  * @return void
  */
 public function testDecomposeUsingShortcutMethods()
 {
     $this->assertEqual('zh', Locale::language('zh_Hans_HK_REVISED'));
     $this->assertEqual('Hans', Locale::script('zh_Hans_HK_REVISED'));
     $this->assertEqual('HK', Locale::territory('zh_Hans_HK_REVISED'));
     $this->assertEqual('REVISED', Locale::variant('zh_Hans_HK_REVISED'));
     $this->assertNull(Locale::script('zh_HK'));
     $this->assertNull(Locale::territory('zh'));
     $this->assertNull(Locale::variant('zh'));
     $this->expectException();
     try {
         Locale::notAValidTag('zh_Hans_HK_REVISED');
         $this->assert(false);
     } catch (Exception $e) {
         $this->assert(true);
     }
 }
Esempio n. 3
0
	<div class="nav">
		<nav>
			<?php 
echo $this->_view->render(array('element' => 'nav'), compact('object'), array('library' => 'li3_docs'));
?>
		</nav>
	</div>

	<div class="article">
		<article>
			<?php 
echo $this->content;
?>
		</article>
	</div>
	<script type="text/javascript" charset="utf-8">
		$(document).ready(function () {
			RadCli.setup({
				setupGitCopy: false,
				commandBase: 'http://lithify.me/<?php 
echo Locale::language(Environment::get('locale'));
?>
/cmd'
			});
			$('#header').css({ borderTop: '40px solid black' });
		});
	</script>
</body>
</html>