public function testGetOrderedSteps() { $stepOne = new Step(); $stepOne->setOrder(1); $stepTwo = new Step(); $stepTwo->setOrder(2); $stepThree = new Step(); $stepThree->setOrder(3); $steps = new ArrayCollection(array($stepTwo, $stepOne, $stepThree)); $workflow = $this->createWorkflow(); $workflow->getStepManager()->setSteps($steps); $ordered = $workflow->getStepManager()->getOrderedSteps(); $this->assertInstanceOf('Doctrine\\Common\\Collections\\ArrayCollection', $ordered); $this->assertSame($stepOne, $ordered->get(0), 'Steps are not in correct order'); $this->assertSame($stepTwo, $ordered->get(1), 'Steps are not in correct order'); $this->assertSame($stepThree, $ordered->get(2), 'Steps are not in correct order'); }