Skip to content

Commit c2c234d

Browse files
Merge branch '5.1' into 5.2
* 5.1: Use import instead of FQCN
2 parents d4bf2ca + c651438 commit c2c234d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Tests/Constraints/AtLeastOneOfTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Component\Validator\Constraints\AtLeastOneOf;
1616
use Symfony\Component\Validator\Constraints\Valid;
17+
use Symfony\Component\Validator\Exception\ConstraintDefinitionException;
1718

1819
/**
1920
* @author Przemysław Bogusz <[email protected]>
@@ -22,15 +23,15 @@ class AtLeastOneOfTest extends TestCase
2223
{
2324
public function testRejectNonConstraints()
2425
{
25-
$this->expectException(\Symfony\Component\Validator\Exception\ConstraintDefinitionException::class);
26+
$this->expectException(ConstraintDefinitionException::class);
2627
new AtLeastOneOf([
2728
'foo',
2829
]);
2930
}
3031

3132
public function testRejectValidConstraint()
3233
{
33-
$this->expectException(\Symfony\Component\Validator\Exception\ConstraintDefinitionException::class);
34+
$this->expectException(ConstraintDefinitionException::class);
3435
new AtLeastOneOf([
3536
new Valid(),
3637
]);

Tests/Constraints/HostnameValidatorTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use Symfony\Component\Validator\Constraints\Hostname;
1515
use Symfony\Component\Validator\Constraints\HostnameValidator;
16+
use Symfony\Component\Validator\Exception\UnexpectedValueException;
1617
use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
1718

1819
/**
@@ -36,7 +37,7 @@ public function testEmptyStringIsValid()
3637

3738
public function testExpectsStringCompatibleType()
3839
{
39-
$this->expectException(\Symfony\Component\Validator\Exception\UnexpectedValueException::class);
40+
$this->expectException(UnexpectedValueException::class);
4041

4142
$this->validator->validate(new \stdClass(), new Hostname());
4243
}

0 commit comments

Comments
 (0)