Class SubjectTest.
More...
Class SubjectTest.
Definition at line 10 of file SubjectTest.php.
◆ oneLevelCountsUsedInIsCorrect()
enshrined\svgSanitize\Tests\SubjectTest::oneLevelCountsUsedInIsCorrect |
( |
| ) |
|
<first> </first>
- Test:
Definition at line 88 of file SubjectTest.php.
90 $first = new \DOMElement(
'first');
91 $firstSubject =
new Subject($first, $this->nestingLimit);
92 self::assertSame(0, $firstSubject->countUsedIn());
◆ oneLevelCountsUseIsCorrect()
enshrined\svgSanitize\Tests\SubjectTest::oneLevelCountsUseIsCorrect |
( |
| ) |
|
<first></first>
- Test:
Definition at line 21 of file SubjectTest.php.
23 $first = new \DOMElement(
'first');
24 $firstSubject =
new Subject($first, $this->nestingLimit);
25 self::assertSame(0, $firstSubject->countUse(
false));
26 self::assertSame(0, $firstSubject->countUse(
true));
◆ threeLevelsCountUsedInIsCorrect()
enshrined\svgSanitize\Tests\SubjectTest::threeLevelsCountUsedInIsCorrect |
( |
| ) |
|
<first> <second> <third> <third> <third> </second> <second> <third> <third> <third> </second> </first>
- Test:
Definition at line 130 of file SubjectTest.php.
132 $first = new \DOMElement(
'first');
133 $second = new \DOMElement(
'second');
134 $third = new \DOMElement(
'third');
135 $firstSubject =
new Subject($first, $this->nestingLimit);
136 $secondSubject =
new Subject($second, $this->nestingLimit);
137 $thirdSubject =
new Subject($third, $this->nestingLimit);
138 $thirdSubject->addUsedIn($secondSubject);
139 $thirdSubject->addUsedIn($secondSubject);
140 $thirdSubject->addUsedIn($secondSubject);
141 $secondSubject->addUsedIn($firstSubject);
142 $secondSubject->addUsedIn($firstSubject);
143 self::assertSame(6, $thirdSubject->countUsedIn());
◆ threeLevelsCountUseIsCorrect()
enshrined\svgSanitize\Tests\SubjectTest::threeLevelsCountUseIsCorrect |
( |
| ) |
|
<first> <second> <third> <third> <third> </second> <second> <third> <third> <third> </second> </first>
- Test:
Definition at line 65 of file SubjectTest.php.
67 $first = new \DOMElement(
'first');
68 $second = new \DOMElement(
'second');
69 $third = new \DOMElement(
'third');
70 $firstSubject =
new Subject($first, $this->nestingLimit);
71 $secondSubject =
new Subject($second, $this->nestingLimit);
72 $thirdSubject =
new Subject($third, $this->nestingLimit);
73 $firstSubject->addUse($secondSubject);
74 $firstSubject->addUse($secondSubject);
75 $secondSubject->addUse($thirdSubject);
76 $secondSubject->addUse($thirdSubject);
77 $secondSubject->addUse($thirdSubject);
78 self::assertSame(6, $firstSubject->countUse(
false));
79 self::assertSame(8, $firstSubject->countUse(
true));
◆ twoLevelsCountUsedInIsCorrect()
enshrined\svgSanitize\Tests\SubjectTest::twoLevelsCountUsedInIsCorrect |
( |
| ) |
|
<first> <second> <second> </first>
- Test:
Definition at line 103 of file SubjectTest.php.
105 $first = new \DOMElement(
'first');
106 $second = new \DOMElement(
'second');
107 $firstSubject =
new Subject($first, $this->nestingLimit);
108 $secondSubject =
new Subject($second, $this->nestingLimit);
109 $secondSubject->addUsedIn($firstSubject);
110 $secondSubject->addUsedIn($firstSubject);
111 self::assertSame(2, $secondSubject->countUsedIn());
◆ twoLevelsCountUseIsCorrect()
enshrined\svgSanitize\Tests\SubjectTest::twoLevelsCountUseIsCorrect |
( |
| ) |
|
<first> <second> <second> </first>
- Test:
Definition at line 37 of file SubjectTest.php.
39 $first = new \DOMElement(
'first');
40 $second = new \DOMElement(
'second');
41 $firstSubject =
new Subject($first, $this->nestingLimit);
42 $secondSubject =
new Subject($second, $this->nestingLimit);
43 $firstSubject->addUse($secondSubject);
44 $firstSubject->addUse($secondSubject);
45 self::assertSame(2, $firstSubject->countUse(
false));
46 self::assertSame(2, $firstSubject->countUse(
true));
◆ $nestingLimit
enshrined\svgSanitize\Tests\SubjectTest::$nestingLimit = 15 |
|
protected |
The documentation for this class was generated from the following file: