Skip to content

Commit

Permalink
UseInAlphabeticalOrder - tests for namespace and trait diffs
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomas Votruba committed Dec 24, 2014
1 parent 0f786a4 commit 3b28ab9
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ public function testDetection()
{
$this->assertSame(1, $this->codeSnifferRunner->getErrorCountInFile(__DIR__ . '/wrong.php'));
$this->assertSame(1, $this->codeSnifferRunner->getErrorCountInFile(__DIR__ . '/wrong2.php'));
$this->assertSame(1, $this->codeSnifferRunner->getErrorCountInFile(__DIR__ . '/wrong3.php'));
$this->assertSame(0, $this->codeSnifferRunner->getErrorCountInFile(__DIR__ . '/correct.php'));
$this->assertSame(0, $this->codeSnifferRunner->getErrorCountInFile(__DIR__ . '/correct2.php'));
$this->assertSame(0, $this->codeSnifferRunner->getErrorCountInFile(__DIR__ . '/correct3.php'));
}

}
13 changes: 13 additions & 0 deletions tests/Sniffs/Namespaces/UseInAlphabeticalOrder/correct3.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

use A;
use C;


class Presenter
{

use B;
use D;

}
13 changes: 13 additions & 0 deletions tests/Sniffs/Namespaces/UseInAlphabeticalOrder/wrong3.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

use A;
use C;


class Presenter
{

use D;
use B;

}

0 comments on commit 3b28ab9

Please sign in to comment.