This repository has been archived by the owner on Aug 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5777d03
commit 569644c
Showing
9 changed files
with
198 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
require_once __DIR__.'/../../vendor/autoload.php'; | ||
|
||
use edsonmedina\php_testability\Issues\ExternalClassConstantFetchIssue; | ||
|
||
class ExternalClassConstantFetchIssueTest extends PHPUnit_Framework_TestCase | ||
{ | ||
/** | ||
* @covers edsonmedina\php_testability\Issues\ExternalClassConstantFetchIssue::getTitle | ||
*/ | ||
public function testGetTitle () | ||
{ | ||
$node = $this->getMockBuilder('PhpParser\Node\Stmt\Class_') | ||
->disableOriginalConstructor() | ||
->getMock(); | ||
|
||
$issue = new ExternalClassConstantFetchIssue ($node); | ||
|
||
$this->assertEquals('External class constant fetch', $issue->getTitle()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
require_once __DIR__.'/../../vendor/autoload.php'; | ||
|
||
use edsonmedina\php_testability\Issues\FinalClassIssue; | ||
|
||
class FinalClassIssueTest extends PHPUnit_Framework_TestCase | ||
{ | ||
/** | ||
* @covers edsonmedina\php_testability\Issues\FinalClassIssue::getTitle | ||
*/ | ||
public function testGetTitle () | ||
{ | ||
$node = $this->getMockBuilder('PhpParser\Node\Stmt\Class_') | ||
->disableOriginalConstructor() | ||
->getMock(); | ||
|
||
$issue = new FinalClassIssue ($node); | ||
|
||
$this->assertEquals('Final class declaration', $issue->getTitle()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
require_once __DIR__.'/../../vendor/autoload.php'; | ||
|
||
use edsonmedina\php_testability\Issues\FinalMethodIssue; | ||
|
||
class FinalMethodIssueTest extends PHPUnit_Framework_TestCase | ||
{ | ||
/** | ||
* @covers edsonmedina\php_testability\Issues\FinalMethodIssue::getTitle | ||
*/ | ||
public function testGetTitle () | ||
{ | ||
$node = $this->getMockBuilder('PhpParser\Node\Stmt\ClassMethod') | ||
->disableOriginalConstructor() | ||
->getMock(); | ||
|
||
$issue = new FinalMethodIssue ($node); | ||
|
||
$this->assertEquals('Final method declaration', $issue->getTitle()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
require_once __DIR__.'/../../vendor/autoload.php'; | ||
|
||
use edsonmedina\php_testability\Issues\GlobalFunctionCallIssue; | ||
|
||
class GlobalFunctionCallIssueTest extends PHPUnit_Framework_TestCase | ||
{ | ||
/** | ||
* @covers edsonmedina\php_testability\Issues\GlobalFunctionCallIssue::getTitle | ||
*/ | ||
public function testGetTitle () | ||
{ | ||
$node = $this->getMockBuilder('PhpParser\Node\Stmt\Function_') | ||
->disableOriginalConstructor() | ||
->getMock(); | ||
|
||
$issue = new GlobalFunctionCallIssue ($node); | ||
|
||
$this->assertEquals('Global function call', $issue->getTitle()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
require_once __DIR__.'/../../vendor/autoload.php'; | ||
|
||
use edsonmedina\php_testability\Issues\NewInstanceIssue; | ||
|
||
class NewInstanceIssueTest extends PHPUnit_Framework_TestCase | ||
{ | ||
/** | ||
* @covers edsonmedina\php_testability\Issues\NewInstanceIssue::getTitle | ||
*/ | ||
public function testGetTitle () | ||
{ | ||
$node = $this->getMockBuilder('PhpParser\Node\Expr\New_') | ||
->disableOriginalConstructor() | ||
->getMock(); | ||
|
||
$issue = new NewInstanceIssue ($node); | ||
|
||
$this->assertEquals('New instance', $issue->getTitle()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
require_once __DIR__.'/../../vendor/autoload.php'; | ||
|
||
use edsonmedina\php_testability\Issues\PrivateMethodIssue; | ||
|
||
class PrivateMethodIssueTest extends PHPUnit_Framework_TestCase | ||
{ | ||
/** | ||
* @covers edsonmedina\php_testability\Issues\PrivateMethodIssue::getTitle | ||
*/ | ||
public function testGetTitle () | ||
{ | ||
$node = $this->getMockBuilder('PhpParser\Node\Stmt\ClassMethod') | ||
->disableOriginalConstructor() | ||
->getMock(); | ||
|
||
$issue = new PrivateMethodIssue ($node); | ||
|
||
$this->assertEquals('Private method declaration', $issue->getTitle()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
require_once __DIR__.'/../../vendor/autoload.php'; | ||
|
||
use edsonmedina\php_testability\Issues\ProtectedMethodIssue; | ||
|
||
class ProtectedMethodIssueTest extends PHPUnit_Framework_TestCase | ||
{ | ||
/** | ||
* @covers edsonmedina\php_testability\Issues\ProtectedMethodIssue::getTitle | ||
*/ | ||
public function testGetTitle () | ||
{ | ||
$node = $this->getMockBuilder('PhpParser\Node\Stmt\ClassMethod') | ||
->disableOriginalConstructor() | ||
->getMock(); | ||
|
||
$issue = new ProtectedMethodIssue ($node); | ||
|
||
$this->assertEquals('Protected method declaration', $issue->getTitle()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
require_once __DIR__.'/../../vendor/autoload.php'; | ||
|
||
use edsonmedina\php_testability\Issues\StaticMethodCallIssue; | ||
|
||
class StaticMethodCallIssueTest extends PHPUnit_Framework_TestCase | ||
{ | ||
/** | ||
* @covers edsonmedina\php_testability\Issues\StaticMethodCallIssue::getTitle | ||
*/ | ||
public function testGetTitle () | ||
{ | ||
$node = $this->getMockBuilder('PhpParser\Node\Stmt\ClassMethod') | ||
->disableOriginalConstructor() | ||
->getMock(); | ||
|
||
$issue = new StaticMethodCallIssue ($node); | ||
|
||
$this->assertEquals('Static method call', $issue->getTitle()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
require_once __DIR__.'/../../vendor/autoload.php'; | ||
|
||
use edsonmedina\php_testability\Issues\StaticPropertyFetchIssue; | ||
|
||
class StaticPropertyFetchIssueTest extends PHPUnit_Framework_TestCase | ||
{ | ||
/** | ||
* @covers edsonmedina\php_testability\Issues\StaticPropertyFetchIssue::getTitle | ||
*/ | ||
public function testGetTitle () | ||
{ | ||
$node = $this->getMockBuilder('PhpParser\Node\Expr\StaticPropertyFetch') | ||
->disableOriginalConstructor() | ||
->getMock(); | ||
|
||
$issue = new StaticPropertyFetchIssue ($node); | ||
|
||
$this->assertEquals('Static property fetch', $issue->getTitle()); | ||
} | ||
} |