From 4e661e7a73990e1b34f9594005f6614287f6ff21 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Tue, 4 Apr 2017 11:53:57 +0200 Subject: [PATCH] [Workflow] fix risky tests --- .../Workflow/Tests/Validator/StateMachineValidatorTest.php | 3 +++ .../Workflow/Tests/Validator/WorkflowValidatorTest.php | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/src/Symfony/Component/Workflow/Tests/Validator/StateMachineValidatorTest.php b/src/Symfony/Component/Workflow/Tests/Validator/StateMachineValidatorTest.php index 149d7d58f8e30..dccbf383049ad 100644 --- a/src/Symfony/Component/Workflow/Tests/Validator/StateMachineValidatorTest.php +++ b/src/Symfony/Component/Workflow/Tests/Validator/StateMachineValidatorTest.php @@ -94,6 +94,9 @@ public function testValid() (new StateMachineValidator())->validate($definition, 'foo'); + // the test simply ensures that the validation does not fail (i.e. it does not throw any exceptions) + $this->addToAssertionCount(1); + // The graph looks like: // // +----+ +----+ +---+ diff --git a/src/Symfony/Component/Workflow/Tests/Validator/WorkflowValidatorTest.php b/src/Symfony/Component/Workflow/Tests/Validator/WorkflowValidatorTest.php index 60b2c7150e489..245617b682f54 100644 --- a/src/Symfony/Component/Workflow/Tests/Validator/WorkflowValidatorTest.php +++ b/src/Symfony/Component/Workflow/Tests/Validator/WorkflowValidatorTest.php @@ -28,6 +28,9 @@ public function testSinglePlaceWorkflowValidatorAndSimpleWorkflow() $definition = $this->createSimpleWorkflowDefinition(); (new WorkflowValidator(true))->validate($definition, 'foo'); + + // the test simply ensures that the validation does not fail (i.e. it does not throw any exceptions) + $this->addToAssertionCount(1); } /** @@ -60,5 +63,8 @@ public function testSameTransitionNameButNotSamePlace() $definition = new Definition($places, $transitions); (new WorkflowValidator())->validate($definition, 'foo'); + + // the test simply ensures that the validation does not fail (i.e. it does not throw any exceptions) + $this->addToAssertionCount(1); } }