Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
/**
3
 * Unit test class for the ArrayDeclaration sniff.
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
13
 * @version   CVS: $Id: ArrayDeclarationUnitTest.php 287724 2009-08-26 02:56:44Z squiz $
14
 * @link      http://pear.php.net/package/PHP_CodeSniffer
15
 */
16
 
17
/**
18
 * Unit test class for the ArrayDeclaration sniff.
19
 *
20
 * A sniff unit test checks a .inc file for expected violations of a single
21
 * coding standard. Expected errors and warnings are stored in this class.
22
 *
23
 * @category  PHP
24
 * @package   PHP_CodeSniffer
25
 * @author    Greg Sherwood <gsherwood@squiz.net>
26
 * @author    Marc McIntyre <mmcintyre@squiz.net>
27
 * @copyright 2006 Squiz Pty Ltd (ABN 77 084 670 600)
28
 * @license   http://matrix.squiz.net/developer/tools/php_cs/licence BSD Licence
29
 * @version   Release: 1.2.1
30
 * @link      http://pear.php.net/package/PHP_CodeSniffer
31
 */
32
class Squiz_Tests_Arrays_ArrayDeclarationUnitTest extends AbstractSniffUnitTest
33
{
34
 
35
 
36
    /**
37
     * Returns the lines where errors should occur.
38
     *
39
     * The key of the array should represent the line number and the value
40
     * should represent the number of errors that should occur on that line.
41
     *
42
     * @return array(int => int)
43
     */
44
    public function getErrorList()
45
    {
46
        return array(
47
                7   => 2,
48
                9   => 2,
49
                22  => 1,
50
                23  => 1,
51
                24  => 1,
52
                25  => 1,
53
                31  => 1,
54
                35  => 1,
55
                36  => 1,
56
                41  => 1,
57
                46  => 1,
58
                47  => 1,
59
                50 =>  1,
60
                51  => 1,
61
                53  => 1,
62
                56  => 1,
63
                58  => 1,
64
                61  => 1,
65
                62  => 1,
66
                63  => 1,
67
                64  => 1,
68
                65  => 1,
69
                66  => 3,
70
                70  => 1,
71
                76  => 2,
72
                77  => 1,
73
                78  => 7,
74
                79  => 2,
75
                81  => 2,
76
                82  => 4,
77
                87  => 1,
78
                88  => 1,
79
                92  => 1,
80
                97  => 1,
81
                100 => 1,
82
                101 => 1,
83
                102 => 1,
84
                105 => 1,
85
                106 => 1,
86
                107 => 1,
87
                125 => 1,
88
                126 => 1,
89
                141 => 1,
90
                144 => 1,
91
                146 => 1,
92
                148 => 1,
93
                151 => 1,
94
                157 => 1,
95
                174 => 3,
96
               );
97
 
98
    }//end getErrorList()
99
 
100
 
101
    /**
102
     * Returns the lines where warnings should occur.
103
     *
104
     * The key of the array should represent the line number and the value
105
     * should represent the number of warnings that should occur on that line.
106
     *
107
     * @return array(int => int)
108
     */
109
    public function getWarningList()
110
    {
111
        return array();
112
 
113
    }//end getWarningList()
114
 
115
 
116
}//end class
117
 
118
?>