ILIAS  release_7 Revision v7.30-3-g800a261c036
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()

◆ parseInstructionsToAssocArray_beforeStartTagAndAfterEndTagIsText_returnArrayOnlyWithStringBetweenTags()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_beforeStartTagAndAfterEndTagIsText_returnArrayOnlyWithStringBetweenTags ( )
Test:
@small

Definition at line 136 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

137 {
138 // Arrange
139 $instruction_text = 'This are the mount Instructions';
140 $tag_title = 'tag';
141 $start_tag = "[$tag_title]";
142 $end_tag = "[/$tag_title]";
143 $instructions = 'This will be cut off' . $start_tag . $instruction_text . $end_tag . 'and this of will be cut off as well';
144 $doc_processor = $this->createDocumentProcessorBaseObject();
145
146 // Act
147 $parsed_instructions = $doc_processor->parseInstructionsToAssocArray($instructions);
148
149 // Assert
150 $this->assertEquals($instruction_text, $parsed_instructions[$tag_title]);
151 }

References createDocumentProcessorBaseObject().

+ Here is the call graph for this function:

◆ parseInstructionsToAssocArray_noOpenNoCloseTags_returnArrayOnlyWithInputString()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_noOpenNoCloseTags_returnArrayOnlyWithInputString ( )
Test:
@small

Definition at line 22 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

23 {
24 // Arrange
25 $instructions = 'hello world';
26 $doc_processor = $this->createDocumentProcessorBaseObject();
27
28 // Act
29 $parsed_instructions = $doc_processor->parseInstructionsToAssocArray($instructions);
30
31 // Assert
32 $this->assertEquals($instructions, $parsed_instructions[0]);
33 }

References createDocumentProcessorBaseObject().

+ Here is the call graph for this function:

◆ parseInstructionsToAssocArray_noOpenOnlyCloseTag_returnArrayOnlyWithInputString()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_noOpenOnlyCloseTag_returnArrayOnlyWithInputString ( )
Test:
@small

Definition at line 56 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

57 {
58 // Arrange
59 $instructions = 'There is no start tag but an end [/tag] in the string';
60 $doc_processor = $this->createDocumentProcessorBaseObject();
61
62 // Act
63 $parsed_instructions = $doc_processor->parseInstructionsToAssocArray($instructions);
64
65 // Assert
66 $this->assertEquals($instructions, $parsed_instructions[0]);
67 }

References createDocumentProcessorBaseObject().

+ Here is the call graph for this function:

◆ parseInstructionsToAssocArray_onlyOpenNoCloseTag_returnArrayOnlyWithInputString()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_onlyOpenNoCloseTag_returnArrayOnlyWithInputString ( )
Test:
@small

Definition at line 39 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

40 {
41 // Arrange
42 $instructions = 'This is a start [tag] with no end tag';
43 $doc_processor = $this->createDocumentProcessorBaseObject();
44
45 // Act
46 $parsed_instructions = $doc_processor->parseInstructionsToAssocArray($instructions);
47
48 // Assert
49 $this->assertEquals($instructions, $parsed_instructions[0]);
50 }

References createDocumentProcessorBaseObject().

+ Here is the call graph for this function:

◆ parseInstructionsToAssocArray_openTagAtStartCloseTagAtEnd_returnArrayOnlyWithInputString()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_openTagAtStartCloseTagAtEnd_returnArrayOnlyWithInputString ( )
Test:
@small

Definition at line 73 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

74 {
75 // Arrange
76 $instrunction_text = 'This are the mount Instructions';
77 $tag_title = 'tag';
78 $start_tag = "[$tag_title]";
79 $end_tag = "[/$tag_title]";
80 $instructions = $start_tag . $instrunction_text . $end_tag;
81 $doc_processor = $this->createDocumentProcessorBaseObject();
82
83 // Act
84 $parsed_instructions = $doc_processor->parseInstructionsToAssocArray($instructions);
85
86 // Assert
87 $this->assertEquals($instrunction_text, $parsed_instructions[$tag_title]);
88 }

References createDocumentProcessorBaseObject().

+ Here is the call graph for this function:

◆ parseInstructionsToAssocArray_placeholderBeforeStartTag_returnArrayOnlyWithStringBetweenTags()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_placeholderBeforeStartTag_returnArrayOnlyWithStringBetweenTags ( )
Test:
@small

Definition at line 157 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

158 {
159 // Arrange
160 $instruction_text = 'This are the mount Instructions';
161 $tag_title = 'tag';
162 $start_tag = "[$tag_title]";
163 $end_tag = "[/$tag_title]";
164 $instructions = 'Here is a [placeholder] hidden before the start tag' . $start_tag . $instruction_text . $end_tag;
165 $doc_processor = $this->createDocumentProcessorBaseObject();
166
167 // Act
168 $parsed_instructions = $doc_processor->parseInstructionsToAssocArray($instructions);
169
170 // Assert
171 $this->assertEquals($instruction_text, $parsed_instructions[$tag_title]);
172 }

References createDocumentProcessorBaseObject().

+ Here is the call graph for this function:

◆ parseInstructionsToAssocArray_tagsContainSpaces_returnArrayOnlyWithInputString()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_tagsContainSpaces_returnArrayOnlyWithInputString ( )
Test:
@small

Definition at line 94 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

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

References createDocumentProcessorBaseObject().

+ Here is the call graph for this function:

◆ parseInstructionsToAssocArray_tagsContainSpecialChars_returnArrayOnlyWithInputString()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_tagsContainSpecialChars_returnArrayOnlyWithInputString ( )
Test:
@small

Definition at line 115 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

116 {
117 // Arrange
118 $instruction_text = 'This are the mount Instructions';
119 $tag_title = 'tag_w!th$pecial"chars?';
120 $start_tag = "[$tag_title]";
121 $end_tag = "[/$tag_title]";
122 $instructions = $start_tag . $instruction_text . $end_tag;
123 $doc_processor = $this->createDocumentProcessorBaseObject();
124
125 // Act
126 $parsed_instructions = $doc_processor->parseInstructionsToAssocArray($instructions);
127
128 // Assert
129 $this->assertEquals($instruction_text, $parsed_instructions[$tag_title]);
130 }

References createDocumentProcessorBaseObject().

+ Here is the call graph for this function:

◆ parseInstructionsToAssocArray_withTwoOpenAndCloseTags_returnArrayWithBothInstructions()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_withTwoOpenAndCloseTags_returnArrayWithBothInstructions ( )
Test:
@small

Definition at line 178 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

179 {
180 // Arrange
181 $instruction_text1 = 'This are the first instructions';
182 $instruction_text2 = 'This are the second instructions\'';
183 $tag_title1 = 'tag1';
184 $start_tag1 = "[$tag_title1]";
185 $end_tag1 = "[/$tag_title1]";
186 $tag_title2 = 'tag2';
187 $start_tag2 = "[$tag_title2]";
188 $end_tag2 = "[/$tag_title2]";
189 $instructions = $start_tag1 . $instruction_text1 . $end_tag1 . $start_tag2 . $instruction_text2 . $end_tag2;
190 $doc_processor = $this->createDocumentProcessorBaseObject();
191
192 // Act
193 $parsed_instructions = $doc_processor->parseInstructionsToAssocArray($instructions);
194
195 // Assert
196 $this->assertEquals($instruction_text1, $parsed_instructions[$tag_title1]);
197 $this->assertEquals($instruction_text2, $parsed_instructions[$tag_title2]);
198 }

References createDocumentProcessorBaseObject().

+ Here is the call graph for this function:

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