Tweak phpunit configuration and fix mocking errors

This commit is contained in:
Mike van Riel
2015-06-13 21:46:07 +02:00
committed by Mike van Riel
parent 056607296e
commit e1e2b5cd98
2 changed files with 19 additions and 6 deletions
+15 -2
View File
@@ -1,8 +1,15 @@
<?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>
<testsuite name="phpDocumentor\Reflection\DocBlock">
<testsuite name="unit">
<directory>./tests/</directory>
</testsuite>
</testsuites>
@@ -14,4 +21,10 @@
<directory>./vendor/</directory>
</blacklist>
</filter>
<listeners>
<listener
class="Mockery\Adapter\Phpunit\TestListener"
file="vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListener.php"
/>
</listeners>
</phpunit>
+4 -4
View File
@@ -117,7 +117,7 @@ class DocBlockTest extends \PHPUnit_Framework_TestCase
$tag1->shouldReceive('getName')->andReturn('abc');
$tag2->shouldReceive('getName')->andReturn('abcd');
$tag3->shouldReceive('getName')->never();
$tag3->shouldReceive('getName')->andReturn('ab');
$fixture = new DocBlock('', null, $tags);
@@ -152,9 +152,9 @@ class DocBlockTest extends \PHPUnit_Framework_TestCase
$tag3 = m::mock(DocBlock\Tag::class);
$tags = [$tag1, $tag2, $tag3];
$tag1->shouldReceive('getName')->andReturn('abc');
$tag2->shouldReceive('getName')->andReturn('abcd');
$tag3->shouldReceive('getName')->never();
$tag1->shouldReceive('getName')->twice()->andReturn('abc');
$tag2->shouldReceive('getName')->twice()->andReturn('abcd');
$tag3->shouldReceive('getName')->once();
$fixture = new DocBlock('', null, $tags);