/**
  * Returns the fallback order of an record element.
  *
  * (non-PHPdoc)
  * @see classes/tx_languagevisibility_element#getFallbackOrder($language)
  */
 function getFallbackOrder(tx_languagevisibility_language $language)
 {
     return $language->getFallbackOrderElement($this);
 }
 /**
  *
  * @test
  * @return void
  */
 public function getFallbackOrder()
 {
     $el = $this->getMockForAbstractClass('tx_languagevisibility_element', array(), 'tx_languagevisibility_element_x', false);
     // Create the Array fixture.
     $fixture = array('uid' => 1, 'tx_languagevisibility_complexfallbacksetting' => '0', 'tx_languagevisibility_fallbackorder' => '0,1,2', 'tx_languagevisibility_fallbackorderel' => '0,1', 'tx_languagevisibility_fallbackorderttnewsel' => '0,2');
     $language = new tx_languagevisibility_language();
     $language->setData($fixture);
     $this->assertEquals(array('0', '1', '2'), $language->getFallbackOrder($el), "wrong getFallbackOrder");
     $this->assertEquals(array('0', '1', '2'), $language->getFallbackOrderElement($el), "wrong getFallbackOrder - complex applied where normal is excepted");
     $this->assertEquals(array('0', '1', '2'), $language->getFallbackOrderTTNewsElement($el), "wrong getFallbackOrder - complex applied where normal is excepted");
     // Create the Array fixture.
     $this->assertTrue($language->isLanguageUidInFallbackOrder(0, $el));
     $this->assertTrue($language->isLanguageUidInFallbackOrder(2, $el));
     $this->assertFalse($language->isLanguageUidInFallbackOrder(4711, $el));
     $fixture = array('uid' => 1, 'tx_languagevisibility_complexfallbacksetting' => '1', 'tx_languagevisibility_fallbackorder' => '0,1,2', 'tx_languagevisibility_fallbackorderel' => '0,1', 'tx_languagevisibility_fallbackorderttnewsel' => '0,2');
     $language = new tx_languagevisibility_language();
     $language->setData($fixture);
     $this->assertEquals(array('0', '1', '2'), $language->getFallbackOrder($el), "wrong getFallbackOrder");
     $this->assertEquals(array('0', '1'), $language->getFallbackOrderElement($el), "wrong getFallbackOrder");
     $this->assertEquals(array('0', '2'), $language->getFallbackOrderTTNewsElement($el), "wrong getFallbackOrder");
 }