ILIAS  release_8 Revision v8.24
ilWebDAVMountInstructionsDocumentProcessorBaseTest Class Reference
+ Inheritance diagram for ilWebDAVMountInstructionsDocumentProcessorBaseTest:
+ Collaboration diagram for ilWebDAVMountInstructionsDocumentProcessorBaseTest:

Public Member Functions

 parseInstructionsToAssocArray_noOpenNoCloseTags_returnArrayOnlyWithInputString ()
 
 parseInstructionsToAssocArray_onlyOpenNoCloseTag_returnArrayOnlyWithInputString ()
 
 parseInstructionsToAssocArray_noOpenOnlyCloseTag_returnArrayOnlyWithInputString ()
 
 parseInstructionsToAssocArray_openTagAtStartCloseTagAtEnd_returnArrayOnlyWithInputString ()
 
 parseInstructionsToAssocArray_tagsContainSpaces_returnArrayOnlyWithInputString ()
 
 parseInstructionsToAssocArray_tagsContainSpecialChars_returnArrayOnlyWithInputString ()
 
 parseInstructionsToAssocArray_beforeStartTagAndAfterEndTagIsText_returnArrayOnlyWithStringBetweenTags ()
 
 parseInstructionsToAssocArray_placeholderBeforeStartTag_returnArrayOnlyWithStringBetweenTags ()
 
 parseInstructionsToAssocArray_withTwoOpenAndCloseTags_returnArrayWithBothInstructions ()
 

Private Member Functions

 createDocumentProcessorBaseObject ()
 

Detailed Description

Member Function Documentation

◆ createDocumentProcessorBaseObject()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::createDocumentProcessorBaseObject ( )
private
See also
ilWebDAVMountInstructionsDocumentProcessor::processMountInstructions()

Definition at line 24 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

25 {
26 return new class () extends ilWebDAVMountInstructionsDocumentProcessorBase {
31 public function processMountInstructions(string $a_raw_mount_instructions): array
32 {
33 return [];
34 }
35 };
36 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

Referenced by parseInstructionsToAssocArray_beforeStartTagAndAfterEndTagIsText_returnArrayOnlyWithStringBetweenTags(), parseInstructionsToAssocArray_noOpenNoCloseTags_returnArrayOnlyWithInputString(), parseInstructionsToAssocArray_noOpenOnlyCloseTag_returnArrayOnlyWithInputString(), parseInstructionsToAssocArray_onlyOpenNoCloseTag_returnArrayOnlyWithInputString(), parseInstructionsToAssocArray_openTagAtStartCloseTagAtEnd_returnArrayOnlyWithInputString(), parseInstructionsToAssocArray_placeholderBeforeStartTag_returnArrayOnlyWithStringBetweenTags(), parseInstructionsToAssocArray_tagsContainSpaces_returnArrayOnlyWithInputString(), parseInstructionsToAssocArray_tagsContainSpecialChars_returnArrayOnlyWithInputString(), and parseInstructionsToAssocArray_withTwoOpenAndCloseTags_returnArrayWithBothInstructions().

+ Here is the caller graph for this function:

◆ parseInstructionsToAssocArray_beforeStartTagAndAfterEndTagIsText_returnArrayOnlyWithStringBetweenTags()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_beforeStartTagAndAfterEndTagIsText_returnArrayOnlyWithStringBetweenTags ( )
Test:
@small

Definition at line 156 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

156 : void
157 {
158 // Arrange
159 $instruction_text = 'This are the mount Instructions';
160 $tag_title = 'tag';
161 $start_tag = "[$tag_title]";
162 $end_tag = "[/$tag_title]";
163 $instructions = 'This will be cut off' . $start_tag . $instruction_text . $end_tag . 'and this of will be cut off as well';
164 $doc_processor = $this->createDocumentProcessorBaseObject();
165
166 // Act
167 $parsed_instructions = $doc_processor->parseInstructionsToAssocArray($instructions);
168
169 // Assert
170 $this->assertEquals($instruction_text, $parsed_instructions[$tag_title]);
171 }

References createDocumentProcessorBaseObject().

+ Here is the call graph for this function:

◆ parseInstructionsToAssocArray_noOpenNoCloseTags_returnArrayOnlyWithInputString()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_noOpenNoCloseTags_returnArrayOnlyWithInputString ( )
Test:
@small

Definition at line 42 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

42 : void
43 {
44 // Arrange
45 $instructions = 'hello world';
46 $doc_processor = $this->createDocumentProcessorBaseObject();
47
48 // Act
49 $parsed_instructions = $doc_processor->parseInstructionsToAssocArray($instructions);
50
51 // Assert
52 $this->assertEquals($instructions, $parsed_instructions[0]);
53 }

References createDocumentProcessorBaseObject().

+ Here is the call graph for this function:

◆ parseInstructionsToAssocArray_noOpenOnlyCloseTag_returnArrayOnlyWithInputString()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_noOpenOnlyCloseTag_returnArrayOnlyWithInputString ( )
Test:
@small

Definition at line 76 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

76 : void
77 {
78 // Arrange
79 $instructions = 'There is no start tag but an end [/tag] in the string';
80 $doc_processor = $this->createDocumentProcessorBaseObject();
81
82 // Act
83 $parsed_instructions = $doc_processor->parseInstructionsToAssocArray($instructions);
84
85 // Assert
86 $this->assertEquals($instructions, $parsed_instructions[0]);
87 }

References createDocumentProcessorBaseObject().

+ Here is the call graph for this function:

◆ parseInstructionsToAssocArray_onlyOpenNoCloseTag_returnArrayOnlyWithInputString()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_onlyOpenNoCloseTag_returnArrayOnlyWithInputString ( )
Test:
@small

Definition at line 59 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

59 : void
60 {
61 // Arrange
62 $instructions = 'This is a start [tag] with no end tag';
63 $doc_processor = $this->createDocumentProcessorBaseObject();
64
65 // Act
66 $parsed_instructions = $doc_processor->parseInstructionsToAssocArray($instructions);
67
68 // Assert
69 $this->assertEquals($instructions, $parsed_instructions[0]);
70 }

References createDocumentProcessorBaseObject().

+ Here is the call graph for this function:

◆ parseInstructionsToAssocArray_openTagAtStartCloseTagAtEnd_returnArrayOnlyWithInputString()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_openTagAtStartCloseTagAtEnd_returnArrayOnlyWithInputString ( )
Test:
@small

Definition at line 93 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

93 : void
94 {
95 // Arrange
96 $instrunction_text = 'This are the mount Instructions';
97 $tag_title = 'tag';
98 $start_tag = "[$tag_title]";
99 $end_tag = "[/$tag_title]";
100 $instructions = $start_tag . $instrunction_text . $end_tag;
101 $doc_processor = $this->createDocumentProcessorBaseObject();
102
103 // Act
104 $parsed_instructions = $doc_processor->parseInstructionsToAssocArray($instructions);
105
106 // Assert
107 $this->assertEquals($instrunction_text, $parsed_instructions[$tag_title]);
108 }

References createDocumentProcessorBaseObject().

+ Here is the call graph for this function:

◆ parseInstructionsToAssocArray_placeholderBeforeStartTag_returnArrayOnlyWithStringBetweenTags()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_placeholderBeforeStartTag_returnArrayOnlyWithStringBetweenTags ( )
Test:
@small

Definition at line 177 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

177 : void
178 {
179 // Arrange
180 $instruction_text = 'This are the mount Instructions';
181 $tag_title = 'tag';
182 $start_tag = "[$tag_title]";
183 $end_tag = "[/$tag_title]";
184 $instructions = 'Here is a [placeholder] hidden before the start tag' . $start_tag . $instruction_text . $end_tag;
185 $doc_processor = $this->createDocumentProcessorBaseObject();
186
187 // Act
188 $parsed_instructions = $doc_processor->parseInstructionsToAssocArray($instructions);
189
190 // Assert
191 $this->assertEquals($instruction_text, $parsed_instructions[$tag_title]);
192 }

References createDocumentProcessorBaseObject().

+ Here is the call graph for this function:

◆ parseInstructionsToAssocArray_tagsContainSpaces_returnArrayOnlyWithInputString()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_tagsContainSpaces_returnArrayOnlyWithInputString ( )
Test:
@small

Definition at line 114 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

114 : void
115 {
116 // Arrange
117 $instruction_text = 'This are the mount Instructions';
118 $tag_title = 'tag with spaces';
119 $start_tag = "[$tag_title]";
120 $end_tag = "[/$tag_title]";
121 $instructions = $start_tag . $instruction_text . $end_tag;
122 $doc_processor = $this->createDocumentProcessorBaseObject();
123
124 // Act
125 $parsed_instructions = $doc_processor->parseInstructionsToAssocArray($instructions);
126
127 // Assert
128 $this->assertEquals($instruction_text, $parsed_instructions[$tag_title]);
129 }

References createDocumentProcessorBaseObject().

+ Here is the call graph for this function:

◆ parseInstructionsToAssocArray_tagsContainSpecialChars_returnArrayOnlyWithInputString()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_tagsContainSpecialChars_returnArrayOnlyWithInputString ( )
Test:
@small

Definition at line 135 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

135 : void
136 {
137 // Arrange
138 $instruction_text = 'This are the mount Instructions';
139 $tag_title = 'tag_w!th$pecial"chars?';
140 $start_tag = "[$tag_title]";
141 $end_tag = "[/$tag_title]";
142 $instructions = $start_tag . $instruction_text . $end_tag;
143 $doc_processor = $this->createDocumentProcessorBaseObject();
144
145 // Act
146 $parsed_instructions = $doc_processor->parseInstructionsToAssocArray($instructions);
147
148 // Assert
149 $this->assertEquals($instruction_text, $parsed_instructions[$tag_title]);
150 }

References createDocumentProcessorBaseObject().

+ Here is the call graph for this function:

◆ parseInstructionsToAssocArray_withTwoOpenAndCloseTags_returnArrayWithBothInstructions()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_withTwoOpenAndCloseTags_returnArrayWithBothInstructions ( )
Test:
@small

Definition at line 198 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

198 : void
199 {
200 // Arrange
201 $instruction_text1 = 'This are the first instructions';
202 $instruction_text2 = 'This are the second instructions\'';
203 $tag_title1 = 'tag1';
204 $start_tag1 = "[$tag_title1]";
205 $end_tag1 = "[/$tag_title1]";
206 $tag_title2 = 'tag2';
207 $start_tag2 = "[$tag_title2]";
208 $end_tag2 = "[/$tag_title2]";
209 $instructions = $start_tag1 . $instruction_text1 . $end_tag1 . $start_tag2 . $instruction_text2 . $end_tag2;
210 $doc_processor = $this->createDocumentProcessorBaseObject();
211
212 // Act
213 $parsed_instructions = $doc_processor->parseInstructionsToAssocArray($instructions);
214
215 // Assert
216 $this->assertEquals($instruction_text1, $parsed_instructions[$tag_title1]);
217 $this->assertEquals($instruction_text2, $parsed_instructions[$tag_title2]);
218 }

References createDocumentProcessorBaseObject().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: