-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from phcorp/master
increase code coverage
- Loading branch information
Showing
16 changed files
with
370 additions
and
80 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
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
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
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
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
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
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
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,44 @@ | ||
<?php | ||
|
||
namespace Janalis\Doctrineviz\Test; | ||
|
||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; | ||
|
||
/** | ||
* Doctrineviz test case. | ||
*/ | ||
class DoctrinevizTestCase extends WebTestCase | ||
{ | ||
/** | ||
* Call protected method. | ||
* | ||
* @param object $object | ||
* @param string $methodName | ||
* @param array ...$arguments | ||
* | ||
* @return mixed | ||
*/ | ||
protected function callProtectedMethod($object, $methodName, ...$arguments) | ||
{ | ||
$method = $this->setMethodAccessible(get_class($object), $methodName); | ||
|
||
return $method->invokeArgs($object, $arguments); | ||
} | ||
|
||
/** | ||
* Set method accessible. | ||
* | ||
* @param string $className | ||
* @param string $methodName | ||
* | ||
* @return \ReflectionMethod | ||
*/ | ||
protected function setMethodAccessible($className, $methodName) | ||
{ | ||
$class = new \ReflectionClass($className); | ||
$method = $class->getMethod($methodName); | ||
$method->setAccessible(true); | ||
|
||
return $method; | ||
} | ||
} |
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
Oops, something went wrong.