TYPO3 CMS  TYPO3_6-2
LanguageSelectionFormTest.php
Go to the documentation of this file.
1 <?php
2 
21 
25  protected $fixture = NULL;
26 
30  public function setUp() {
31  $this->fixture = new \TYPO3\CMS\Lang\Domain\Model\LanguageSelectionForm();
32  }
33 
38  $this->assertSame(
39  array(),
40  $this->fixture->getLanguages()
41  );
42  }
43 
47  public function setLanguagesSetsLanguage() {
48  $language = array(
49  'nl' => '1',
50  'de' => '0',
51  );
52  $this->fixture->setLanguages($language);
53 
54  $this->assertSame(
55  $language,
56  $this->fixture->getLanguages()
57  );
58  }
59 
64  $this->assertSame(
65  array(),
66  $this->fixture->getSelectedLanguages()
67  );
68  }
69 
74  $selectedLanguages = array('', '', '', '', 'de', '', '', 'nl');
75  $cleanedSelectedLanguages = array('de', 'nl');
76  $this->fixture->setSelectedLanguages($selectedLanguages);
77 
78  $this->assertSame(
79  $cleanedSelectedLanguages,
80  $this->fixture->getSelectedLanguages()
81  );
82  }
83 }