1+ <?php
2+ /**
3+ * PHP_CodeCoverage
4+ *
5+ * Copyright (c) 2009-2014, Sebastian Bergmann <[email protected] >. 6+ * All rights reserved.
7+ *
8+ * Redistribution and use in source and binary forms, with or without
9+ * modification, are permitted provided that the following conditions
10+ * are met:
11+ *
12+ * * Redistributions of source code must retain the above copyright
13+ * notice, this list of conditions and the following disclaimer.
14+ *
15+ * * Redistributions in binary form must reproduce the above copyright
16+ * notice, this list of conditions and the following disclaimer in
17+ * the documentation and/or other materials provided with the
18+ * distribution.
19+ *
20+ * * Neither the name of Sebastian Bergmann nor the names of his
21+ * contributors may be used to endorse or promote products derived
22+ * from this software without specific prior written permission.
23+ *
24+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
27+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
28+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
29+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
30+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
32+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
34+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35+ * POSSIBILITY OF SUCH DAMAGE.
36+ *
37+ * @category PHP
38+ * @package CodeCoverage
39+ * @subpackage Tests
40+ * @author Sebastian Bergmann <[email protected] > 41+ * @copyright 2009-2014 Sebastian Bergmann <[email protected] > 42+ * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
43+ * @link http://github.com/sebastianbergmann/php-code-coverage
44+ */
45+
46+ /**
47+ * Tests for the PHP_CodeCoverage_Report_Node class.
48+ *
49+ * @category PHP
50+ * @package CodeCoverage
51+ * @subpackage Tests
52+ * @author Sebastian Bergmann <[email protected] > 53+ * @copyright 2009-2014 Sebastian Bergmann <[email protected] > 54+ * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
55+ * @link http://github.com/sebastianbergmann/php-code-coverage
56+ */
57+ class PHP_CodeCoverage_Report_NodeTest extends PHPUnit_Framework_TestCase
58+ {
59+ public function testTrimsTailingSlashes ()
60+ {
61+ $ node = new DefaultNode ('/SomeName.php/ ' );
62+ $ this ->assertEquals ('/SomeName.php ' , $ node ->getPath ());
63+ }
64+
65+ public function testNodeAcceptsRootScope ()
66+ {
67+ $ node = new DefaultNode ('/ ' );
68+ $ this ->assertEquals ('/ ' , $ node ->getPath ());
69+ }
70+ }
71+
72+ class DefaultNode extends PHP_CodeCoverage_Report_Node
73+ {
74+
75+ /**
76+ * Returns the classes of this node.
77+ *
78+ * @return array
79+ */
80+ public function getClasses ()
81+ {
82+ // TODO: Implement getClasses() method.
83+ }
84+
85+ /**
86+ * Returns the traits of this node.
87+ *
88+ * @return array
89+ */
90+ public function getTraits ()
91+ {
92+ // TODO: Implement getTraits() method.
93+ }
94+
95+ /**
96+ * Returns the functions of this node.
97+ *
98+ * @return array
99+ */
100+ public function getFunctions ()
101+ {
102+ // TODO: Implement getFunctions() method.
103+ }
104+
105+ /**
106+ * Returns the LOC/CLOC/NCLOC of this node.
107+ *
108+ * @return array
109+ */
110+ public function getLinesOfCode ()
111+ {
112+ // TODO: Implement getLinesOfCode() method.
113+ }
114+
115+ /**
116+ * Returns the number of executable lines.
117+ *
118+ * @return integer
119+ */
120+ public function getNumExecutableLines ()
121+ {
122+ // TODO: Implement getNumExecutableLines() method.
123+ }
124+
125+ /**
126+ * Returns the number of executed lines.
127+ *
128+ * @return integer
129+ */
130+ public function getNumExecutedLines ()
131+ {
132+ // TODO: Implement getNumExecutedLines() method.
133+ }
134+
135+ /**
136+ * Returns the number of classes.
137+ *
138+ * @return integer
139+ */
140+ public function getNumClasses ()
141+ {
142+ // TODO: Implement getNumClasses() method.
143+ }
144+
145+ /**
146+ * Returns the number of tested classes.
147+ *
148+ * @return integer
149+ */
150+ public function getNumTestedClasses ()
151+ {
152+ // TODO: Implement getNumTestedClasses() method.
153+ }
154+
155+ /**
156+ * Returns the number of traits.
157+ *
158+ * @return integer
159+ */
160+ public function getNumTraits ()
161+ {
162+ // TODO: Implement getNumTraits() method.
163+ }
164+
165+ /**
166+ * Returns the number of tested traits.
167+ *
168+ * @return integer
169+ */
170+ public function getNumTestedTraits ()
171+ {
172+ // TODO: Implement getNumTestedTraits() method.
173+ }
174+
175+ /**
176+ * Returns the number of methods.
177+ *
178+ * @return integer
179+ */
180+ public function getNumMethods ()
181+ {
182+ // TODO: Implement getNumMethods() method.
183+ }
184+
185+ /**
186+ * Returns the number of tested methods.
187+ *
188+ * @return integer
189+ */
190+ public function getNumTestedMethods ()
191+ {
192+ // TODO: Implement getNumTestedMethods() method.
193+ }
194+
195+ /**
196+ * Returns the number of functions.
197+ *
198+ * @return integer
199+ */
200+ public function getNumFunctions ()
201+ {
202+ // TODO: Implement getNumFunctions() method.
203+ }
204+
205+ /**
206+ * Returns the number of tested functions.
207+ *
208+ * @return integer
209+ */
210+ public function getNumTestedFunctions ()
211+ {
212+ // TODO: Implement getNumTestedFunctions() method.
213+ }
214+
215+ /**
216+ * (PHP 5 >= 5.1.0)<br/>
217+ * Count elements of an object
218+ * @link http://php.net/manual/en/countable.count.php
219+ * @return int The custom count as an integer.
220+ * </p>
221+ * <p>
222+ * The return value is cast to an integer.
223+ */
224+ public function count ()
225+ {
226+ // TODO: Implement count() method.
227+ }
228+ }
0 commit comments