~ubuntu-branches/ubuntu/saucy/php-codesniffer/saucy

« back to all changes in this revision

Viewing changes to PHP_CodeSniffer-1.1.0/CodeSniffer/Standards/MySource/Tests/Channels/IncludeSystemUnitTest.php

  • Committer: Bazaar Package Importer
  • Author(s): Jack Bates
  • Date: 2008-10-01 17:39:43 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20081001173943-2dy06n1e8zwyw1o8
Tags: 1.1.0-1
* New upstream release
* Acknowledge NMU, thanks Jan

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
/**
 
3
 * Unit test class for the IncludeSystem sniff.
 
4
 *
 
5
 * PHP version 5
 
6
 *
 
7
 * @category  PHP
 
8
 * @package   PHP_CodeSniffer_MySource
 
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: IncludeSystemUnitTest.php,v 1.5 2008/01/31 02:39:32 squiz Exp $
 
13
 * @link      http://pear.php.net/package/PHP_CodeSniffer
 
14
 */
 
15
 
 
16
/**
 
17
 * Unit test class for the IncludeSystem 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_MySource
 
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.1.0
 
28
 * @link      http://pear.php.net/package/PHP_CodeSniffer
 
29
 */
 
30
class MySource_Tests_Channels_IncludeSystemUnitTest extends AbstractSniffUnitTest
 
31
{
 
32
 
 
33
 
 
34
    /**
 
35
     * Returns the lines where errors should occur.
 
36
     *
 
37
     * The key of the array should represent the line number and the value
 
38
     * should represent the number of errors that should occur on that line.
 
39
     *
 
40
     * @return array(int => int)
 
41
     */
 
42
    public function getErrorList()
 
43
    {
 
44
        return array(
 
45
                9  => 1,
 
46
                14 => 1,
 
47
                24 => 1,
 
48
                27 => 1,
 
49
                28 => 1,
 
50
                31 => 1,
 
51
                36 => 1,
 
52
                41 => 1,
 
53
                60 => 1,
 
54
                69 => 1,
 
55
               );
 
56
 
 
57
    }//end getErrorList()
 
58
 
 
59
 
 
60
    /**
 
61
     * Returns the lines where warnings should occur.
 
62
     *
 
63
     * The key of the array should represent the line number and the value
 
64
     * should represent the number of warnings that should occur on that line.
 
65
     *
 
66
     * @return array(int => int)
 
67
     */
 
68
    public function getWarningList()
 
69
    {
 
70
        return array();
 
71
 
 
72
    }//end getWarningList()
 
73
 
 
74
 
 
75
}//end class
 
76
 
 
77
?>