File: attribute_formatting_002.phpt

package info (click to toggle)
php-doc 20241205~git.dfcbb86%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 70,956 kB
  • sloc: xml: 968,269; php: 23,883; javascript: 671; sh: 177; makefile: 37
file content (170 lines) | stat: -rw-r--r-- 7,278 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
--TEST--
Attribute formatting 002 - Class and method attributes
--FILE--
<?php
namespace phpdotnet\phd;

require_once __DIR__ . "/../../setup.php";

$xml_file = __DIR__ . "/data/attribute_formatting_002.xml";

$config->setXml_file($xml_file);

$format = new TestGenericChunkedXHTML($config, $outputHandler);

$format->SQLiteIndex(
    null, // $context,
    null, // $index,
    "class.knownattribute", // $id,
    "file.knownattribute.is.in", // $filename,
    "", // $parent,
    "", // $sdesc,
    "", // $ldesc,
    "", // $element,
    "", // $previous,
    "", // $next,
    0, // $chunk
);
$format->SQLiteIndex(
    null, // $context,
    null, // $index,
    "class.anotherknownattribute", // $id,
    "file.anotherknownattribute.is.in", // $filename,
    "", // $parent,
    "", // $sdesc,
    "", // $ldesc,
    "", // $element,
    "", // $previous,
    "", // $next,
    0, // $chunk
);

$render = new TestRender(new Reader($outputHandler), $config, $format);

$render->run();
?>
--EXPECT--
Filename: attribute-formatting-002.html
Content:
<div id="attribute-formatting-002" class="chapter">
 <div class="section">
  <p class="para">1. Class with unknown attributes</p>
  <div class="classsynopsis"><div class="classsynopsisinfo">
   
    <span class="attribute">#[\UnknownAttribute]</span><br>
    <span class="attribute">#[\AnotherUnknownAttribute]</span><br>
    <span class="modifier">class</span> <strong class="classname">DateTime</strong>
    {</div>
  }</div>
 </div>

 <div class="section">
  <p class="para">2. Class with known attributes</p>
  <div class="classsynopsis"><div class="classsynopsisinfo">
   
    <span class="attribute"><a href="file.knownattribute.is.in.html">#[\KnownAttribute]</a> </span><br>
    <span class="attribute"><a href="file.anotherknownattribute.is.in.html">#[\AnotherKnownAttribute]</a> </span><br>
    <span class="modifier">class</span> <strong class="classname">DateTime</strong>
    {</div>
  }</div>
 </div>

 <div class="section">
  <p class="para">3. Method with unknown attributes</p>
  <div class="methodsynopsis dc-description">
   <span class="attribute">#[\UnknownAttribute]</span><br>
   <span class="attribute">#[\AnotherUnknownAttribute]</span><br>
   <span class="modifier">public</span>  <span class="methodname">ClassName::methodName</span>()</div>

 </div>

 <div class="section">
  <p class="para">4. Method with known attributes</p>
  <div class="methodsynopsis dc-description"><span class="attribute"><a href="file.knownattribute.is.in.html">#[\KnownAttribute]</a> </span><br>
   <span class="attribute"><a href="file.anotherknownattribute.is.in.html">#[\AnotherKnownAttribute]</a> </span><br>
   <span class="modifier">public</span>  <span class="methodname">ClassName::methodName</span>()</div>

 </div>

 <div class="section">
  <p class="para">5. Constructor with unknown attributes</p>
  <div class="constructorsynopsis dc-description"><span class="attribute">#[\UnknownAttribute]</span><br>
   <span class="attribute">#[\AnotherUnknownAttribute]</span><br>
   <span class="modifier">public</span>  <span class="methodname">ClassName::__construct</span>()</div>

 </div>

 <div class="section">
  <p class="para">6. Constructor with known attributes</p>
  <div class="constructorsynopsis dc-description"><span class="attribute"><a href="file.knownattribute.is.in.html">#[\KnownAttribute]</a> </span><br>
   <span class="attribute"><a href="file.anotherknownattribute.is.in.html">#[\AnotherKnownAttribute]</a> </span><br>
   <span class="modifier">public</span>  <span class="methodname">ClassName::__construct</span>()</div>

 </div>

 <div class="section">
  <p class="para">7. Class, constructor and methods with unknown attributes</p>
  <div class="classsynopsis"><div class="classsynopsisinfo">
   
    <span class="attribute">#[\UnknownAttribute]</span><br>
    <span class="attribute">#[\AnotherUnknownAttribute]</span><br>
    <span class="modifier">class</span> <strong class="classname">DateTime</strong>
    {</div>
   <div class="constructorsynopsis dc-description">
    <span class="attribute">#[\UnknownAttribute]</span><br>
    <span class="attribute">#[\AnotherUnknownAttribute]</span><br>
    <span class="modifier">public</span>  <span class="methodname">ClassName::__construct</span>()</div>

   <div class="methodsynopsis dc-description"><span class="attribute">#[\UnknownAttribute]</span><br>
    <span class="attribute">#[\AnotherUnknownAttribute]</span><br>
    <span class="modifier">public</span>  <span class="methodname">ClassName::methodName1</span>()</div>

   <div class="methodsynopsis dc-description"><span class="attribute">#[\UnknownAttribute]</span><br>
    <span class="attribute">#[\AnotherUnknownAttribute]</span><br>
    <span class="modifier">public</span>  <span class="methodname">ClassName::methodName2</span>()</div>

  }</div>
 </div>

 <div class="section">
  <p class="para">8. Class, constructor and methods with known attributes</p>
  <div class="classsynopsis"><div class="classsynopsisinfo">
   
    <span class="attribute"><a href="file.knownattribute.is.in.html">#[\KnownAttribute]</a> </span><br>
    <span class="attribute"><a href="file.anotherknownattribute.is.in.html">#[\AnotherKnownAttribute]</a> </span><br>
    <span class="modifier">class</span> <strong class="classname">DateTime</strong>
    {</div>
   <div class="constructorsynopsis dc-description">
    <span class="attribute"><a href="file.knownattribute.is.in.html">#[\KnownAttribute]</a> </span><br>
    <span class="attribute"><a href="file.anotherknownattribute.is.in.html">#[\AnotherKnownAttribute]</a> </span><br>
    <span class="modifier">public</span>  <span class="methodname">ClassName::__construct</span>()</div>

   <div class="methodsynopsis dc-description"><span class="attribute"><a href="file.knownattribute.is.in.html">#[\KnownAttribute]</a> </span><br>
    <span class="attribute"><a href="file.anotherknownattribute.is.in.html">#[\AnotherKnownAttribute]</a> </span><br>
    <span class="modifier">public</span>  <span class="methodname">ClassName::methodName1</span>()</div>

   <div class="methodsynopsis dc-description"><span class="attribute"><a href="file.knownattribute.is.in.html">#[\KnownAttribute]</a> </span><br>
    <span class="attribute"><a href="file.anotherknownattribute.is.in.html">#[\AnotherKnownAttribute]</a> </span><br>
    <span class="modifier">public</span>  <span class="methodname">ClassName::methodName2</span>()</div>

  }</div>
 </div>

 <div class="section">
  <p class="para">9. Function with unknown attributes</p>
  <div class="methodsynopsis dc-description">
   <span class="attribute">#[\UnknownAttribute]</span><br>
   <span class="attribute">#[\AnotherUnknownAttribute]</span><br>
   <span class="type">void</span> <span class="methodname">function_name</span>)</div>

 </div>

 <div class="section">
  <p class="para">10. Function with known attributes</p>
  <div class="methodsynopsis dc-description"><span class="attribute"><a href="file.knownattribute.is.in.html">#[\KnownAttribute]</a> </span><br>
   <span class="attribute"><a href="file.anotherknownattribute.is.in.html">#[\AnotherKnownAttribute]</a> </span><br>
   <span class="type">void</span> <span class="methodname">function_name</span>)</div>

 </div>

</div>