Skip to content

Commit 6a37b0d

Browse files
committed
Use ::class keyword when possible
1 parent fddf623 commit 6a37b0d

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
@@ -23,7 +23,7 @@ class WorkflowTest extends TestCase
2323

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

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

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

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

0 commit comments

Comments
 (0)