src/Yoanm/BehatUtilsExtension/Context/Initializer/BehatContextSubscriberInitializer.php
public function initializeContext(Context $context)
    {
        if (!$context instanceof BehatContextSubscriberInterface) {
            return;
        }
        // This method is called before each scenario/example, so (an instance of) context
        // is probably already registered
        // To avoid any problem, keep a trace of registered contexts instance
        // and remove it at scenario or example end
        // (See clearBehatContextSubscriber method)
        $this->behatEventDispatcher->addSubscriber($context);
        $this->registeredContextList[] = $context;
    }
public function initializeContext(Context $context)
    {
        if (!$context instanceof BehatContextSubscriberInterface) {
            return;
        }
        // This method is called before each scenario/example, so (an instance of) context
        // is probably already registered
        // To avoid any problem, keep a trace of registered contexts instance
        // and remove it at scenario or example end
        // (See clearBehatContextSubscriber method)
        $this->behatEventDispatcher->addSubscriber($context);
        $this->registeredContextList[] = $context;
    }
public function initializeContext ( Context $ context ) { if ( ! $ context instanceof BehatContextSubscriberInterface ) { return ; } // This method is called before each scenario/example, so (an instance of) context // is probably already registered // To avoid any problem, keep a trace of registered contexts instance // and remove it at scenario or example end // (See clearBehatContextSubscriber method) $ this -> behatEventDispatcher -> addSubscriber ( $ context ) ; $ this -> registeredContextList [ ] = $ context ; }
{@inheritdoc}
{