Skip to content

Commit 5b908fe

Browse files
committed
Merge branch '5.1' into 5.2
* 5.1: Use ::class keyword when possible
2 parents 5de00ac + 6a37b0d commit 5b908fe

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Tests/Metadata/InMemoryMetadataStoreTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function testGetMetadata()
7777

7878
public function testGetMetadataWithUnknownType()
7979
{
80-
$this->expectException('Symfony\Component\Workflow\Exception\InvalidArgumentException');
80+
$this->expectException(\Symfony\Component\Workflow\Exception\InvalidArgumentException::class);
8181
$this->expectExceptionMessage('Could not find a MetadataBag for the subject of type "bool".');
8282
$this->store->getMetadata('title', true);
8383
}

Tests/Validator/WorkflowValidatorTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class WorkflowValidatorTest extends TestCase
1414

1515
public function testWorkflowWithInvalidNames()
1616
{
17-
$this->expectException('Symfony\Component\Workflow\Exception\InvalidDefinitionException');
17+
$this->expectException(\Symfony\Component\Workflow\Exception\InvalidDefinitionException::class);
1818
$this->expectExceptionMessage('All transitions for a place must have an unique name. Multiple transitions named "t1" where found for place "a" in workflow "foo".');
1919
$places = range('a', 'c');
2020

Tests/WorkflowTest.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class WorkflowTest extends TestCase
2424

2525
public function testGetMarkingWithInvalidStoreReturn()
2626
{
27-
$this->expectException('Symfony\Component\Workflow\Exception\LogicException');
27+
$this->expectException(\Symfony\Component\Workflow\Exception\LogicException::class);
2828
$this->expectExceptionMessage('The value returned by the MarkingStore is not an instance of "Symfony\Component\Workflow\Marking" for workflow "unnamed".');
2929
$subject = new Subject();
3030
$workflow = new Workflow(new Definition([], []), $this->getMockBuilder(MarkingStoreInterface::class)->getMock());
@@ -34,7 +34,7 @@ public function testGetMarkingWithInvalidStoreReturn()
3434

3535
public function testGetMarkingWithEmptyDefinition()
3636
{
37-
$this->expectException('Symfony\Component\Workflow\Exception\LogicException');
37+
$this->expectException(\Symfony\Component\Workflow\Exception\LogicException::class);
3838
$this->expectExceptionMessage('The Marking is empty and there is no initial place for workflow "unnamed".');
3939
$subject = new Subject();
4040
$workflow = new Workflow(new Definition([], []), new MethodMarkingStore());
@@ -44,7 +44,7 @@ public function testGetMarkingWithEmptyDefinition()
4444

4545
public function testGetMarkingWithImpossiblePlace()
4646
{
47-
$this->expectException('Symfony\Component\Workflow\Exception\LogicException');
47+
$this->expectException(\Symfony\Component\Workflow\Exception\LogicException::class);
4848
$this->expectExceptionMessage('Place "nope" is not valid for workflow "unnamed".');
4949
$subject = new Subject();
5050
$subject->setMarking(['nope' => 1]);
@@ -171,7 +171,7 @@ public function testCanWithSameNameTransition()
171171

172172
public function testBuildTransitionBlockerListReturnsUndefinedTransition()
173173
{
174-
$this->expectException('Symfony\Component\Workflow\Exception\UndefinedTransitionException');
174+
$this->expectException(UndefinedTransitionException::class);
175175
$this->expectExceptionMessage('Transition "404 Not Found" is not defined for workflow "unnamed".');
176176
$definition = $this->createSimpleWorkflowDefinition();
177177
$subject = new Subject();

0 commit comments

Comments
 (0)