Skip to content

Commit 5129c24

Browse files
ISSUE-209: Added @Covers and @uses annotation to unit-tests
1 parent 311cd0d commit 5129c24

5 files changed

+15
-1
lines changed

phpunit.xml.dist

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
bootstrap="vendor/autoload.php"
55
colors="true"
66
executionOrder="depends,defects"
7-
forceCoversAnnotation="false"
7+
forceCoversAnnotation="true"
88
beStrictAboutCoversAnnotation="true"
99
beStrictAboutOutputDuringTests="true"
1010
beStrictAboutTodoAnnotatedTests="true"

tests/BsnValidatorTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
3030
use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
3131

32+
/**
33+
* @covers \DarkWebDesign\SymfonyAddonConstraints\BsnValidator
34+
*/
3235
class BsnValidatorTest extends ConstraintValidatorTestCase
3336
{
3437
protected function createValidator(): BsnValidator

tests/CollectionTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
use Symfony\Component\Validator\Exception\ConstraintDefinitionException;
2929
use Symfony\Component\Validator\Exception\MissingOptionsException;
3030

31+
/**
32+
* @covers \DarkWebDesign\SymfonyAddonConstraints\Collection
33+
*/
3134
class CollectionTest extends TestCase
3235
{
3336
public function testConstruct(): void

tests/CollectionValidatorTest.php

+5
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@
2929
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
3030
use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
3131

32+
/**
33+
* @covers \DarkWebDesign\SymfonyAddonConstraints\CollectionValidator
34+
*
35+
* @uses \DarkWebDesign\SymfonyAddonConstraints\Collection
36+
*/
3237
class CollectionValidatorTest extends ConstraintValidatorTestCase
3338
{
3439
protected function createValidator(): CollectionValidator

tests/JsonValidatorTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
3030
use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
3131

32+
/**
33+
* @covers \DarkWebDesign\SymfonyAddonConstraints\JsonValidator
34+
*/
3235
class JsonValidatorTest extends ConstraintValidatorTestCase
3336
{
3437
protected function createValidator(): JsonValidator

0 commit comments

Comments
 (0)