ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilWebDAVMountInstructionsDocumentProcessorBaseTest Class Reference
+ Inheritance diagram for ilWebDAVMountInstructionsDocumentProcessorBaseTest:
+ Collaboration diagram for ilWebDAVMountInstructionsDocumentProcessorBaseTest:

Public Member Functions

 parseInstructionsToAssocArray_noOpenNoCloseTags_returnArrayOnlyWithInputString ()
 @small More...
 
 parseInstructionsToAssocArray_onlyOpenNoCloseTag_returnArrayOnlyWithInputString ()
 @small More...
 
 parseInstructionsToAssocArray_noOpenOnlyCloseTag_returnArrayOnlyWithInputString ()
 @small More...
 
 parseInstructionsToAssocArray_openTagAtStartCloseTagAtEnd_returnArrayOnlyWithInputString ()
 @small More...
 
 parseInstructionsToAssocArray_tagsContainSpaces_returnArrayOnlyWithInputString ()
 @small More...
 
 parseInstructionsToAssocArray_tagsContainSpecialChars_returnArrayOnlyWithInputString ()
 @small More...
 
 parseInstructionsToAssocArray_beforeStartTagAndAfterEndTagIsText_returnArrayOnlyWithStringBetweenTags ()
 @small More...
 
 parseInstructionsToAssocArray_placeholderBeforeStartTag_returnArrayOnlyWithStringBetweenTags ()
 @small More...
 
 parseInstructionsToAssocArray_withTwoOpenAndCloseTags_returnArrayWithBothInstructions ()
 @small More...
 

Private Member Functions

 createDocumentProcessorBaseObject ()
 

Detailed Description

Member Function Documentation

◆ createDocumentProcessorBaseObject()

◆ parseInstructionsToAssocArray_beforeStartTagAndAfterEndTagIsText_returnArrayOnlyWithStringBetweenTags()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_beforeStartTagAndAfterEndTagIsText_returnArrayOnlyWithStringBetweenTags ( )

@small

Definition at line 155 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

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

◆ parseInstructionsToAssocArray_noOpenNoCloseTags_returnArrayOnlyWithInputString()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_noOpenNoCloseTags_returnArrayOnlyWithInputString ( )

@small

Definition at line 41 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

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

References createDocumentProcessorBaseObject().

+ Here is the call graph for this function:

◆ parseInstructionsToAssocArray_noOpenOnlyCloseTag_returnArrayOnlyWithInputString()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_noOpenOnlyCloseTag_returnArrayOnlyWithInputString ( )

@small

Definition at line 75 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

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

References createDocumentProcessorBaseObject().

+ Here is the call graph for this function:

◆ parseInstructionsToAssocArray_onlyOpenNoCloseTag_returnArrayOnlyWithInputString()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_onlyOpenNoCloseTag_returnArrayOnlyWithInputString ( )

@small

Definition at line 58 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

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

References createDocumentProcessorBaseObject().

+ Here is the call graph for this function:

◆ parseInstructionsToAssocArray_openTagAtStartCloseTagAtEnd_returnArrayOnlyWithInputString()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_openTagAtStartCloseTagAtEnd_returnArrayOnlyWithInputString ( )

@small

Definition at line 92 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

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

References createDocumentProcessorBaseObject().

+ Here is the call graph for this function:

◆ parseInstructionsToAssocArray_placeholderBeforeStartTag_returnArrayOnlyWithStringBetweenTags()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_placeholderBeforeStartTag_returnArrayOnlyWithStringBetweenTags ( )

@small

Definition at line 176 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

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

◆ parseInstructionsToAssocArray_tagsContainSpaces_returnArrayOnlyWithInputString()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_tagsContainSpaces_returnArrayOnlyWithInputString ( )

@small

Definition at line 113 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

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

References createDocumentProcessorBaseObject().

+ Here is the call graph for this function:

◆ parseInstructionsToAssocArray_tagsContainSpecialChars_returnArrayOnlyWithInputString()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_tagsContainSpecialChars_returnArrayOnlyWithInputString ( )

@small

Definition at line 134 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

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

References createDocumentProcessorBaseObject().

+ Here is the call graph for this function:

◆ parseInstructionsToAssocArray_withTwoOpenAndCloseTags_returnArrayWithBothInstructions()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_withTwoOpenAndCloseTags_returnArrayWithBothInstructions ( )

@small

Definition at line 197 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

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

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