~ubuntu-branches/ubuntu/utopic/php-codesniffer/utopic

« back to all changes in this revision

Viewing changes to PHP_CodeSniffer-1.3.4/tests/Core/Reports/SourceTest.php

  • Committer: Package Import Robot
  • Author(s): Thomas Goirand
  • Date: 2013-07-12 15:16:25 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20130712151625-4autdc0twzbueha9
Tags: 1.5.0~rc2-1
* New upstream release.
* Refreshed patch.
* Standards-Version is now 3.9.4.
* Canonical VCS URLs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php
2
 
/**
3
 
 * Tests for the Source report of PHP_CodeSniffer.
4
 
 *
5
 
 * PHP version 5
6
 
 *
7
 
 * @category  PHP
8
 
 * @package   PHP_CodeSniffer
9
 
 * @author    Gabriele Santini <gsantini@sqli.com>
10
 
 * @author    Greg Sherwood <gsherwood@squiz.net>
11
 
 * @copyright 2009 SQLI <www.sqli.com>
12
 
 * @copyright 2006-2011 Squiz Pty Ltd (ABN 77 084 670 600)
13
 
 * @license   http://matrix.squiz.net/developer/tools/php_cs/licence BSD Licence
14
 
 * @link      http://pear.php.net/package/PHP_CodeSniffer
15
 
 */
16
 
 
17
 
require_once 'PHPUnit/Framework/TestCase.php';
18
 
require_once dirname(__FILE__).'/AbstractTestCase.php';
19
 
 
20
 
/**
21
 
 * Tests for the Source report of PHP_CodeSniffer.
22
 
 *
23
 
 * @category  PHP
24
 
 * @package   PHP_CodeSniffer
25
 
 * @author    Gabriele Santini <gsantini@sqli.com>
26
 
 * @author    Greg Sherwood <gsherwood@squiz.net>
27
 
 * @copyright 2009 SQLI <www.sqli.com>
28
 
 * @copyright 2006-2011 Squiz Pty Ltd (ABN 77 084 670 600)
29
 
 * @license   http://matrix.squiz.net/developer/tools/php_cs/licence BSD Licence
30
 
 * @version   Release: 1.3.4
31
 
 * @link      http://pear.php.net/package/PHP_CodeSniffer
32
 
 */
33
 
class Core_Reports_SourceTest extends Core_Reports_AbstractTestCase
34
 
{
35
 
 
36
 
 
37
 
    /**
38
 
     * Test standard generation.
39
 
     *
40
 
     * @return void
41
 
     */
42
 
    public function testGenerate()
43
 
    {
44
 
        $fullReport = new PHP_CodeSniffer_Reports_Source();
45
 
        $generated  = $this->getFixtureReport($fullReport);
46
 
        $this->assertContains(
47
 
            'A TOTAL OF 10 SNIFF VIOLATION(S) WERE FOUND IN 5 SOURCE(S)',
48
 
            $generated
49
 
        );
50
 
 
51
 
    }//end testGenerate()
52
 
 
53
 
 
54
 
}//end class
55
 
 
56
 
?>