public function testOperations() { $operations = [['id' => 'bar', 'description' => 'Dumbo Drop'], ['id' => 'baz', 'description' => 'Dumbo Pick Back Up Again']]; $container = $this->getMockBuilder(Container::class)->disableOriginalConstructor()->getMock(); foreach ($operations as $i => $op) { $container->expects($this->at($i))->method('get')->with(WorkflowOperation::class, [$op])->willReturn(new WorkflowOperation($op)); } $this->workflow->setContainer($container); $this->workflow->set('operations', $operations); $this->workflow->operations(); }