Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch '3.4' into 4.3
* 3.4:
  Adopt `@PHPUnit55Migration:risky` rule of php-cs-fixer
  • Loading branch information
nicolas-grekas committed Aug 3, 2019
2 parents 77e23a5 + 234328e commit 7bdf660
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
Expand Up @@ -55,13 +55,15 @@ public function testThrowsConstraintExceptionIfPropertyPath()
{
$this->expectException('Symfony\Component\Validator\Exception\ConstraintDefinitionException');
$this->expectExceptionMessage('The "propertyPath" option of the "Symfony\Component\Validator\Constraints\PositiveOrZero" constraint cannot be set.');

return new PositiveOrZero(['propertyPath' => 'field']);
}

public function testThrowsConstraintExceptionIfValue()
{
$this->expectException('Symfony\Component\Validator\Exception\ConstraintDefinitionException');
$this->expectExceptionMessage('The "value" option of the "Symfony\Component\Validator\Constraints\PositiveOrZero" constraint cannot be set.');

return new PositiveOrZero(['value' => 0]);
}

Expand Down
Expand Up @@ -53,13 +53,15 @@ public function testThrowsConstraintExceptionIfPropertyPath()
{
$this->expectException('Symfony\Component\Validator\Exception\ConstraintDefinitionException');
$this->expectExceptionMessage('The "propertyPath" option of the "Symfony\Component\Validator\Constraints\Positive" constraint cannot be set.');

return new Positive(['propertyPath' => 'field']);
}

public function testThrowsConstraintExceptionIfValue()
{
$this->expectException('Symfony\Component\Validator\Exception\ConstraintDefinitionException');
$this->expectExceptionMessage('The "value" option of the "Symfony\Component\Validator\Constraints\Positive" constraint cannot be set.');

return new Positive(['value' => 0]);
}

Expand Down
Expand Up @@ -53,13 +53,15 @@ public function testThrowsConstraintExceptionIfPropertyPath()
{
$this->expectException('Symfony\Component\Validator\Exception\ConstraintDefinitionException');
$this->expectExceptionMessage('The "propertyPath" option of the "Symfony\Component\Validator\Constraints\NegativeOrZero" constraint cannot be set.');

return new NegativeOrZero(['propertyPath' => 'field']);
}

public function testThrowsConstraintExceptionIfValue()
{
$this->expectException('Symfony\Component\Validator\Exception\ConstraintDefinitionException');
$this->expectExceptionMessage('The "value" option of the "Symfony\Component\Validator\Constraints\NegativeOrZero" constraint cannot be set.');

return new NegativeOrZero(['value' => 0]);
}

Expand Down
Expand Up @@ -53,13 +53,15 @@ public function testThrowsConstraintExceptionIfPropertyPath()
{
$this->expectException('Symfony\Component\Validator\Exception\ConstraintDefinitionException');
$this->expectExceptionMessage('The "propertyPath" option of the "Symfony\Component\Validator\Constraints\Negative" constraint cannot be set.');

return new Negative(['propertyPath' => 'field']);
}

public function testThrowsConstraintExceptionIfValue()
{
$this->expectException('Symfony\Component\Validator\Exception\ConstraintDefinitionException');
$this->expectExceptionMessage('The "value" option of the "Symfony\Component\Validator\Constraints\Negative" constraint cannot be set.');

return new Negative(['value' => 0]);
}

Expand Down
6 changes: 1 addition & 5 deletions Tests/Resources/TranslationFilesTest.php
Expand Up @@ -20,11 +20,7 @@ class TranslationFilesTest extends TestCase
*/
public function testTranslationFileIsValid($filePath)
{
if (class_exists('PHPUnit_Util_XML')) {
\PHPUnit_Util_XML::loadfile($filePath, false, false, true);
} else {
\PHPUnit\Util\XML::loadfile($filePath, false, false, true);
}
\PHPUnit\Util\XML::loadfile($filePath, false, false, true);

$this->addToAssertionCount(1);
}
Expand Down

0 comments on commit 7bdf660

Please sign in to comment.