Skip to content

Commit 7db5a73

Browse files
committed
minor symfony#26077 [Workflow] Avoid risky tests (lyrixx)
This PR was merged into the 4.1-dev branch. Discussion ---------- [Workflow] Avoid risky tests | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- d590ef2 [Workflow] Avoid risky tests
2 parents ad13f07 + d590ef2 commit 7db5a73

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Symfony/Component/Workflow/Tests/RegistryTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,13 @@ protected function tearDown()
3535
*/
3636
public function testAddIsDeprecated()
3737
{
38-
$this->registry->add(new Workflow(new Definition(array(), array()), $this->getMockBuilder(MarkingStoreInterface::class)->getMock(), $this->getMockBuilder(EventDispatcherInterface::class)->getMock(), 'workflow1'), $this->createSupportStrategy(Subject1::class));
38+
$registry = new Registry();
39+
40+
$registry->add($w = new Workflow(new Definition(array(), array()), $this->getMockBuilder(MarkingStoreInterface::class)->getMock(), $this->getMockBuilder(EventDispatcherInterface::class)->getMock(), 'workflow1'), $this->createSupportStrategy(Subject1::class));
41+
42+
$workflow = $registry->get(new Subject1());
43+
$this->assertInstanceOf(Workflow::class, $workflow);
44+
$this->assertSame('workflow1', $workflow->getName());
3945
}
4046

4147
public function testGetWithSuccess()

0 commit comments

Comments
 (0)