Пример #1
0
	/**
	 * @todo Implement testGetDirection().
	 */
	public function testGetDirection() {
		$this->object = new JDocument;

		$this->object->direction = 'rtl';

		$this->assertThat(
			$this->object->getDirection(),
			$this->equalTo('rtl')
		);
	}
Пример #2
0
 /**
  * Returns direction 'ltr' or 'rtl' for global document
  *
  * @return   string  'ltr' for left-to-right or 'rtl' for right-to-left texts globally on the page
  */
 public function getDirection()
 {
     if ($this->_direction === null) {
         if ($this->_cmsDoc) {
             $this->_direction = $this->_cmsDoc->getDirection();
         } else {
             $this->_direction = 'ltr';
         }
     }
     return $this->_direction;
 }
Пример #3
0
 /**
  * @testdox  Test the default return for getDirection
  */
 public function testTheDefaultReturnForGetDirection()
 {
     $this->assertSame('ltr', $this->object->getDirection());
 }