Skip to content

Commit d590ef2

Browse files
committed
[Workflow] Avoid risky tests
1 parent 89d1b65 commit d590ef2

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)