Subversion Repositories Applications.framework

Rev

Rev 5 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5 aurelien 1
<?php
2
/**
3
 * Unit test class for FunctionCommentSniff.
4
 *
5
 * PHP version 5
6
 *
7
 * @category  PHP
8
 * @package   PHP_CodeSniffer
9
 * @author    Greg Sherwood <gsherwood@squiz.net>
10
 * @author    Marc McIntyre <mmcintyre@squiz.net>
11
 * @copyright 2006 Squiz Pty Ltd (ABN 77 084 670 600)
12
 * @license   http://matrix.squiz.net/developer/tools/php_cs/licence BSD Licence
34 aurelien 13
 * @version   CVS: $Id: FileCommentUnitTest.php 34 2009-04-09 07:34:39Z aurelien $
5 aurelien 14
 * @link      http://pear.php.net/package/PHP_CodeSniffer
15
 */
16
 
17
/**
18
 * Unit test class for FunctionCommentSniff.
19
 *
20
 * Verifies that :
21
 * <ul>
22
 *  <li>A doc comment exists.</li>
23
 *  <li>Short description must start with a capital letter and end with a period.</li>
24
 *  <li>There must be one blank newline after the short description.</li>
25
 *  <li>A PHP version is specified.</li>
26
 *  <li>Check the order of the tags.</li>
27
 *  <li>Check the indentation of each tag.</li>
28
 *  <li>Check required and optional tags and the format of their content.</li>
29
 * </ul>
30
 *
31
 * @category  PHP
32
 * @package   PHP_CodeSniffer
33
 * @author    Greg Sherwood <gsherwood@squiz.net>
34
 * @author    Marc McIntyre <mmcintyre@squiz.net>
35
 * @copyright 2006 Squiz Pty Ltd (ABN 77 084 670 600)
36
 * @license   http://matrix.squiz.net/developer/tools/php_cs/licence BSD Licence
37
 * @version   Release: 1.2.0RC1
38
 * @link      http://pear.php.net/package/PHP_CodeSniffer
39
 */
40
class PEAR_Tests_Commenting_FileCommentUnitTest extends AbstractSniffUnitTest
41
{
42
 
43
 
44
    /**
45
     * Returns the lines where errors should occur.
46
     *
47
     * The key of the array should represent the line number and the value
48
     * should represent the number of errors that should occur on that line.
49
     *
50
     * @return array(int => int)
51
     */
52
    public function getErrorList()
53
    {
54
        return array(
55
                6  => 1,
56
                8  => 1,
57
                21 => 2,
58
                23 => 2,
59
                24 => 1,
60
                26 => 2,
61
                27 => 1,
62
                28 => 1,
63
                29 => 1,
64
                30 => 1,
65
                31 => 2,
66
                32 => 1,
67
                34 => 1,
68
                35 => 1,
69
                36 => 1,
70
                39 => 1,
71
               );
72
 
73
    }//end getErrorList()
74
 
75
 
76
    /**
77
     * Returns the lines where warnings should occur.
78
     *
79
     * The key of the array should represent the line number and the value
80
     * should represent the number of warnings that should occur on that line.
81
     *
82
     * @return array(int => int)
83
     */
84
    public function getWarningList()
85
    {
86
        return array(
87
                28 => 1,
88
                29 => 1,
89
                33 => 1,
90
                39 => 1,
91
               );
92
 
93
    }//end getWarningList()
94
 
95
 
96
}//end class
97
 
98
?>