public function createInitializesComponentsInTheRightOrderAccordingToThePositionDirective()
{
$chainConfiguration = ['foo' => ['component' => 'Foo\\Component\\ClassName'], 'bar' => ['component' => 'Bar\\Component\\ClassName', 'position' => 'before foo'], 'baz' => ['component' => 'Baz\\Component\\ClassName', 'position' => 'after bar']];
$this->mockObjectManager->expects($this->at(0))->method('get')->with('Bar\\Component\\ClassName')->will($this->returnValue($this->mockComponent));
$this->mockObjectManager->expects($this->at(1))->method('get')->with('Baz\\Component\\ClassName')->will($this->returnValue($this->mockComponent));
$this->mockObjectManager->expects($this->at(2))->method('get')->with('Foo\\Component\\ClassName')->will($this->returnValue($this->mockComponent));
$this->componentChainFactory->create($chainConfiguration);
}