File tree Expand file tree Collapse file tree 3 files changed +9
-10
lines changed Expand file tree Collapse file tree 3 files changed +9
-10
lines changed Original file line number Diff line number Diff line change 3131
3232class PluginFormcreatorGlpiselectField extends PluginFormcreatorDropdownField
3333{
34- public function isPrerequisites () {
35- return true ;
36- }
37-
3834 public function getDesignSpecializationField () {
3935 $ rand = mt_rand ();
4036
Original file line number Diff line number Diff line change @@ -108,8 +108,17 @@ public function testIsAnonymousFormCompatible() {
108108
109109 public function testIsPrerequisites () {
110110 $ instance = $ this ->newTestedInstance (new \PluginFormcreatorQuestion ());
111+ $ instance = $ this ->newTestedInstance ($ this ->getQuestion ([
112+ 'values ' => \Computer::class
113+ ]));
111114 $ output = $ instance ->isPrerequisites ();
112115 $ this ->boolean ($ output )->isEqualTo (true );
116+
117+ $ instance = $ this ->newTestedInstance ($ this ->getQuestion ([
118+ 'values ' => \UndefinedItemtype::class
119+ ]));
120+ $ output = $ instance ->isPrerequisites ();
121+ $ this ->boolean ($ output )->isEqualTo (false );
113122 }
114123
115124 public function testGetValueForDesign () {
Original file line number Diff line number Diff line change @@ -152,12 +152,6 @@ public function testIsAnonymousFormCompatible() {
152152 $ this ->boolean ($ output )->isTrue ();
153153 }
154154
155- public function testIsPrerequisites () {
156- $ instance = $ this ->newTestedInstance ($ this ->getQuestion ());
157- $ output = $ instance ->isPrerequisites ();
158- $ this ->boolean ($ output )->isEqualTo (true );
159- }
160-
161155 public function testCanRequire () {
162156 $ instance = new \PluginFormcreatorSelectField ($ this ->getQuestion ());
163157 $ output = $ instance ->canRequire ();
You can’t perform that action at this time.
0 commit comments