コード例 #1
0
 public function testDirection()
 {
     $derived = new DerivativeResourceLoaderContext(self::getContext());
     $derived->setLanguage('nl');
     $this->assertEquals($derived->getDirection(), 'ltr');
     $derived->setLanguage('he');
     $this->assertEquals($derived->getDirection(), 'rtl');
     $derived->setDirection('ltr');
     $this->assertEquals($derived->getDirection(), 'ltr');
 }
コード例 #2
0
 public function testSetLanguage()
 {
     $context = self::getResourceLoaderContext();
     $derived = new DerivativeResourceLoaderContext($context);
     $derived->setLanguage('nl');
     $this->assertEquals($derived->getLanguage(), 'nl');
     $derived->setLanguage('he');
     $this->assertEquals($derived->getDirection(), 'rtl');
 }