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 JavaScriptLint sniff.
4
 *
5
 * PHP version 5
6
 *
7
 * @category  PHP
8
 * @package   PHP_CodeSniffer
9
 * @author    Greg Sherwood <gsherwood@squiz.net>
10
 * @copyright 2006 Squiz Pty Ltd (ABN 77 084 670 600)
11
 * @license   http://matrix.squiz.net/developer/tools/php_cs/licence BSD Licence
12
 * @version   CVS: $Id: JavaScriptLintUnitTest.php 256389 2008-03-31 00:52:00Z squiz $
13
 * @link      http://pear.php.net/package/PHP_CodeSniffer
14
 */
15
 
16
/**
17
 * Unit test class for the JavaScriptLint sniff.
18
 *
19
 * A sniff unit test checks a .inc file for expected violations of a single
20
 * coding standard. Expected errors and warnings are stored in this class.
21
 *
22
 * @category  PHP
23
 * @package   PHP_CodeSniffer
24
 * @author    Greg Sherwood <gsherwood@squiz.net>
25
 * @copyright 2006 Squiz Pty Ltd (ABN 77 084 670 600)
26
 * @license   http://matrix.squiz.net/developer/tools/php_cs/licence BSD Licence
27
 * @version   Release: 1.2.1
28
 * @link      http://pear.php.net/package/PHP_CodeSniffer
29
 */
30
class Squiz_Tests_Debug_JavaScriptLintUnitTest extends AbstractSniffUnitTest
31
{
32
 
33
 
34
    /**
35
     * Should this test be skipped for some reason.
36
     *
37
     * @return void
38
     */
39
    protected function shouldSkipTest()
40
    {
41
        $jslPath = PHP_CodeSniffer::getConfigData('jsl_path');
42
        return (is_null($jslPath));
43
 
44
    }//end shouldSkipTest()
45
 
46
 
47
    /**
48
     * Returns the lines where errors should occur.
49
     *
50
     * The key of the array should represent the line number and the value
51
     * should represent the number of errors that should occur on that line.
52
     *
53
     * @return array(int => int)
54
     */
55
    public function getErrorList()
56
    {
57
        return array();
58
 
59
    }//end getErrorList()
60
 
61
 
62
    /**
63
     * Returns the lines where warnings should occur.
64
     *
65
     * The key of the array should represent the line number and the value
66
     * should represent the number of warnings that should occur on that line.
67
     *
68
     * @return array(int => int)
69
     */
70
    public function getWarningList()
71
    {
72
        return array(
73
                2 => 1,
74
               );
75
 
76
    }//end getWarningList()
77
 
78
 
79
}//end class
80
 
81
?>