private function configureCreateInstance($sequence)
 {
     if (!is_array($sequence)) {
         $args = func_get_args();
         $sequence = [$args];
     }
     $withSequence = array();
     $willSequence = array();
     foreach ($sequence as $args) {
         $instance = array_shift($args);
         $withSequence[] = $args;
         $willSequence[] = $instance;
     }
     $method = $this->factory->expects($this->exactly(count($sequence)))->method('createInstance');
     call_user_func_array(array($method, 'withConsecutive'), $withSequence);
     call_user_func_array(array($method, 'willReturnOnConsecutiveCalls'), $willSequence);
     return $this;
 }
 public function testItDoesNotExecuteLoadMethodWhenGenerateBlockIsCalledWithArgument()
 {
     $processor = $this->getMockForAbstractClass('EcomDev_LayoutCompiler_Contract_Layout_ProcessorInterface');
     $this->factory->expects($this->never())->method('createInstance')->with('layout_processor')->willReturn($processor);
     $this->layout->generateBlocks(new Mage_Core_Model_Layout_Element('<node />'));
 }