[BUGFIX] Folders created from BE fail to set permissions
[Packages/TYPO3.CMS.git] / typo3 / sysext / lang / Tests / Unit / Domain / Model / UpdateTranslationFormTest.php
1 <?php
2
3 namespace TYPO3\CMS\Lang\Tests\Unit\Domain\Model;
4
5 /*
6 * This file is part of the TYPO3 CMS project.
7 *
8 * It is free software; you can redistribute it and/or modify it under
9 * the terms of the GNU General Public License, either version 2
10 * of the License, or any later version.
11 *
12 * For the full copyright and license information, please read the
13 * LICENSE.txt file that was distributed with this source code.
14 *
15 * The TYPO3 project - inspiring people to share!
16 */
17
18 /**
19 * Test case
20 */
21 class UpdateTranslationFormTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
22
23 /**
24 * @var \TYPO3\CMS\Lang\Domain\Model\UpdateTranslationForm
25 */
26 protected $fixture = NULL;
27
28 public function setUp() {
29 $this->fixture = new \TYPO3\CMS\Lang\Domain\Model\UpdateTranslationForm();
30 }
31
32 /**
33 * @test
34 */
35 public function getSelectedLanguagesInitiallyReturnsEmptyArray() {
36 $this->assertSame(
37 array(),
38 $this->fixture->getSelectedLanguages()
39 );
40 }
41
42 /**
43 * @test
44 */
45 public function setSelectedLanguagesSetsSelectedLanguages() {
46 $languages = array(
47 'nl',
48 'de',
49 );
50 $this->fixture->setSelectedLanguages($languages);
51
52 $this->assertSame(
53 $languages,
54 $this->fixture->getSelectedLanguages()
55 );
56 }
57
58 /**
59 * @test
60 */
61 public function getExtensionsInitiallyReturnsEmptyArray() {
62 $this->assertSame(
63 array(),
64 $this->fixture->getExtensions()
65 );
66 }
67
68 /**
69 * @test
70 */
71 public function setExtensionsSetsExtensions() {
72 $extensions = array(
73 1 => 'about',
74 2 => 'aboutmodules',
75 3 => 'adodb',
76 );
77 $this->fixture->setExtensions($extensions);
78
79 $this->assertSame(
80 $extensions,
81 $this->fixture->getExtensions()
82 );
83 }
84
85 }