ILIAS  trunk Revision v11.0_alpha-1846-g895b5f47236
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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

◆ parseInstructionsToAssocArray_beforeStartTagAndAfterEndTagIsText_returnArrayOnlyWithStringBetweenTags()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_beforeStartTagAndAfterEndTagIsText_returnArrayOnlyWithStringBetweenTags ( )
Test:

Definition at line 155 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

References createDocumentProcessorBaseObject().

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  }
+ Here is the call graph for this function:

◆ parseInstructionsToAssocArray_noOpenNoCloseTags_returnArrayOnlyWithInputString()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_noOpenNoCloseTags_returnArrayOnlyWithInputString ( )
Test:

Definition at line 41 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

References createDocumentProcessorBaseObject().

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  }
+ Here is the call graph for this function:

◆ parseInstructionsToAssocArray_noOpenOnlyCloseTag_returnArrayOnlyWithInputString()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_noOpenOnlyCloseTag_returnArrayOnlyWithInputString ( )
Test:

Definition at line 75 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

References createDocumentProcessorBaseObject().

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  }
+ Here is the call graph for this function:

◆ parseInstructionsToAssocArray_onlyOpenNoCloseTag_returnArrayOnlyWithInputString()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_onlyOpenNoCloseTag_returnArrayOnlyWithInputString ( )
Test:

Definition at line 58 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

References createDocumentProcessorBaseObject().

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  }
+ Here is the call graph for this function:

◆ parseInstructionsToAssocArray_openTagAtStartCloseTagAtEnd_returnArrayOnlyWithInputString()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_openTagAtStartCloseTagAtEnd_returnArrayOnlyWithInputString ( )
Test:

Definition at line 92 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

References createDocumentProcessorBaseObject().

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  }
+ Here is the call graph for this function:

◆ parseInstructionsToAssocArray_placeholderBeforeStartTag_returnArrayOnlyWithStringBetweenTags()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_placeholderBeforeStartTag_returnArrayOnlyWithStringBetweenTags ( )
Test:

Definition at line 176 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

References createDocumentProcessorBaseObject().

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  }
+ Here is the call graph for this function:

◆ parseInstructionsToAssocArray_tagsContainSpaces_returnArrayOnlyWithInputString()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_tagsContainSpaces_returnArrayOnlyWithInputString ( )
Test:

Definition at line 113 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

References createDocumentProcessorBaseObject().

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  }
+ Here is the call graph for this function:

◆ parseInstructionsToAssocArray_tagsContainSpecialChars_returnArrayOnlyWithInputString()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_tagsContainSpecialChars_returnArrayOnlyWithInputString ( )
Test:

Definition at line 134 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

References createDocumentProcessorBaseObject().

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  }
+ Here is the call graph for this function:

◆ parseInstructionsToAssocArray_withTwoOpenAndCloseTags_returnArrayWithBothInstructions()

ilWebDAVMountInstructionsDocumentProcessorBaseTest::parseInstructionsToAssocArray_withTwoOpenAndCloseTags_returnArrayWithBothInstructions ( )
Test:

Definition at line 197 of file ilWebDAVMountInstructionsDocumentProcessorBaseTest.php.

References createDocumentProcessorBaseObject().

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  }
+ Here is the call graph for this function:

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