mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 18:13:13 +00:00
Tweak phpunit configuration and fix mocking errors
This commit is contained in:
committed by
Mike van Riel
parent
056607296e
commit
e1e2b5cd98
+15
-2
@@ -1,8 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<phpunit colors="true" strict="true" bootstrap="vendor/autoload.php">
|
<phpunit
|
||||||
|
colors="true"
|
||||||
|
checkForUnintentionallyCoveredCode="true"
|
||||||
|
beStrictAboutOutputDuringTests="true"
|
||||||
|
forceCoversAnnotation="true"
|
||||||
|
verbose="true"
|
||||||
|
bootstrap="vendor/autoload.php"
|
||||||
|
>
|
||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="phpDocumentor\Reflection\DocBlock">
|
<testsuite name="unit">
|
||||||
<directory>./tests/</directory>
|
<directory>./tests/</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
@@ -14,4 +21,10 @@
|
|||||||
<directory>./vendor/</directory>
|
<directory>./vendor/</directory>
|
||||||
</blacklist>
|
</blacklist>
|
||||||
</filter>
|
</filter>
|
||||||
|
<listeners>
|
||||||
|
<listener
|
||||||
|
class="Mockery\Adapter\Phpunit\TestListener"
|
||||||
|
file="vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListener.php"
|
||||||
|
/>
|
||||||
|
</listeners>
|
||||||
</phpunit>
|
</phpunit>
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ class DocBlockTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
$tag1->shouldReceive('getName')->andReturn('abc');
|
$tag1->shouldReceive('getName')->andReturn('abc');
|
||||||
$tag2->shouldReceive('getName')->andReturn('abcd');
|
$tag2->shouldReceive('getName')->andReturn('abcd');
|
||||||
$tag3->shouldReceive('getName')->never();
|
$tag3->shouldReceive('getName')->andReturn('ab');
|
||||||
|
|
||||||
$fixture = new DocBlock('', null, $tags);
|
$fixture = new DocBlock('', null, $tags);
|
||||||
|
|
||||||
@@ -152,9 +152,9 @@ class DocBlockTest extends \PHPUnit_Framework_TestCase
|
|||||||
$tag3 = m::mock(DocBlock\Tag::class);
|
$tag3 = m::mock(DocBlock\Tag::class);
|
||||||
$tags = [$tag1, $tag2, $tag3];
|
$tags = [$tag1, $tag2, $tag3];
|
||||||
|
|
||||||
$tag1->shouldReceive('getName')->andReturn('abc');
|
$tag1->shouldReceive('getName')->twice()->andReturn('abc');
|
||||||
$tag2->shouldReceive('getName')->andReturn('abcd');
|
$tag2->shouldReceive('getName')->twice()->andReturn('abcd');
|
||||||
$tag3->shouldReceive('getName')->never();
|
$tag3->shouldReceive('getName')->once();
|
||||||
|
|
||||||
$fixture = new DocBlock('', null, $tags);
|
$fixture = new DocBlock('', null, $tags);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user