‪TYPO3CMS  9.5
DemandTest.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
17 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
18 
22 class ‪DemandTest extends UnitTestCase
23 {
27  protected ‪$subject;
28 
29  protected function ‪setUp()
30  {
31  $this->subject = new \TYPO3\CMS\Beuser\Domain\Model\Demand();
32  }
33 
37  public function ‪setUserTypeAllExpectedValueForInt()
38  {
40  $this->subject->setUserType($userType);
41  $this->assertSame($this->subject->getUserType(), $userType);
42  }
43 
48  {
50  $this->subject->setUserType($userType);
51  $this->assertSame($this->subject->getUserType(), $userType);
52  }
53 
58  {
60  $this->subject->setUserType($userType);
61  $this->assertSame($this->subject->getUserType(), $userType);
62  }
63 
67  public function ‪setStatusAllExpectedValueForInt()
68  {
70  $this->subject->setStatus($status);
71  $this->assertSame($this->subject->getStatus(), $status);
72  }
73 
78  {
80  $this->subject->setStatus($status);
81  $this->assertSame($this->subject->getStatus(), $status);
82  }
83 
88  {
90  $this->subject->setStatus($status);
91  $this->assertSame($this->subject->getStatus(), $status);
92  }
93 
97  public function ‪setLoginAllExpectedValueForInt()
98  {
100  $this->subject->setLogins($login);
101  $this->assertSame($this->subject->getLogins(), $login);
102  }
103 
107  public function ‪setLoginNoneExpectedValueForInt()
108  {
110  $this->subject->setLogins($login);
111  $this->assertSame($this->subject->getLogins(), $login);
112  }
113 
117  public function ‪setLoginxSameExpectedValueForInt()
118  {
120  $this->subject->setLogins($login);
121  $this->assertSame($this->subject->getLogins(), $login);
122  }
123 
127  public function ‪getUserNameInitialValueForString()
128  {
129  $this->assertSame($this->subject->getUserName(), '', 'UserName must be empty string.');
130  }
131 
136  {
137  $newUserName = 'User#รครค*%^name';
138  $this->subject->setUserName($newUserName);
139  $this->assertSame($this->subject->getUserName(), $newUserName, 'UserName is not as set before.');
140  }
141 }
‪TYPO3\CMS\Beuser\Tests\Unit\Domain\Model\DemandTest\setUserTypeUserOnlyExpectedValueForInt
‪setUserTypeUserOnlyExpectedValueForInt()
Definition: DemandTest.php:56
‪TYPO3\CMS\Beuser\Tests\Unit\Domain\Model\DemandTest\setUp
‪setUp()
Definition: DemandTest.php:28
‪TYPO3\CMS\Beuser\Tests\Unit\Domain\Model
Definition: BackendUserTest.php:2
‪TYPO3\CMS\Beuser\Tests\Unit\Domain\Model\DemandTest\setUserTypeAdminOnlyExpectedValueForInt
‪setUserTypeAdminOnlyExpectedValueForInt()
Definition: DemandTest.php:46
‪TYPO3\CMS\Beuser\Domain\Model\Demand\USERTYPE_ADMINONLY
‪const USERTYPE_ADMINONLY
Definition: Demand.php:30
‪TYPO3\CMS\Beuser\Tests\Unit\Domain\Model\DemandTest\setUserNameReturnExpectedValueForString
‪setUserNameReturnExpectedValueForString()
Definition: DemandTest.php:134
‪TYPO3\CMS\Beuser\Tests\Unit\Domain\Model\DemandTest\setStatusInactiveExpectedValueForInt
‪setStatusInactiveExpectedValueForInt()
Definition: DemandTest.php:86
‪TYPO3\CMS\Beuser\Tests\Unit\Domain\Model\DemandTest\getUserNameInitialValueForString
‪getUserNameInitialValueForString()
Definition: DemandTest.php:126
‪TYPO3\CMS\Beuser\Tests\Unit\Domain\Model\DemandTest\setLoginAllExpectedValueForInt
‪setLoginAllExpectedValueForInt()
Definition: DemandTest.php:96
‪TYPO3\CMS\Beuser\Tests\Unit\Domain\Model\DemandTest\setStatusAllExpectedValueForInt
‪setStatusAllExpectedValueForInt()
Definition: DemandTest.php:66
‪TYPO3\CMS\Beuser\Domain\Model\Demand\LOGIN_NONE
‪const LOGIN_NONE
Definition: Demand.php:50
‪TYPO3\CMS\Beuser\Tests\Unit\Domain\Model\DemandTest\setLoginxSameExpectedValueForInt
‪setLoginxSameExpectedValueForInt()
Definition: DemandTest.php:116
‪TYPO3\CMS\Beuser\Tests\Unit\Domain\Model\DemandTest\setUserTypeAllExpectedValueForInt
‪setUserTypeAllExpectedValueForInt()
Definition: DemandTest.php:36
‪TYPO3\CMS\Beuser\Domain\Model\Demand\LOGIN_SOME
‪const LOGIN_SOME
Definition: Demand.php:46
‪TYPO3\CMS\Beuser\Tests\Unit\Domain\Model\DemandTest
Definition: DemandTest.php:23
‪TYPO3\CMS\Beuser\Tests\Unit\Domain\Model\DemandTest\$subject
‪TYPO3 CMS Beuser Domain Model Demand $subject
Definition: DemandTest.php:26
‪TYPO3\CMS\Beuser\Domain\Model\Demand\STATUS_INACTIVE
‪const STATUS_INACTIVE
Definition: Demand.php:42
‪TYPO3\CMS\Beuser\Domain\Model\Demand\ALL
‪const ALL
Definition: Demand.php:26
‪TYPO3\CMS\Beuser\Tests\Unit\Domain\Model\DemandTest\setStatusActiveExpectedValueForInt
‪setStatusActiveExpectedValueForInt()
Definition: DemandTest.php:76
‪TYPO3\CMS\Beuser\Tests\Unit\Domain\Model\DemandTest\setLoginNoneExpectedValueForInt
‪setLoginNoneExpectedValueForInt()
Definition: DemandTest.php:106
‪TYPO3\CMS\Beuser\Domain\Model\Demand\USERTYPE_USERONLY
‪const USERTYPE_USERONLY
Definition: Demand.php:34
‪TYPO3\CMS\Beuser\Domain\Model\Demand\STATUS_ACTIVE
‪const STATUS_ACTIVE
Definition: Demand.php:38