public function __construct(AfterBackgroundTested $event, $steps) { $this->event = $event; $num_steps = count($event->getBackground()->getSteps()); $this->steps = array_slice($steps, -$num_steps); }
public function afterBackground(AfterBackgroundTested $event) { $this->background = new Background($event, $this->steps); $background_steps = count($event->getBackground()->getSteps()); $this->steps = array_slice($this->steps, 0, count($this->steps) - $background_steps); }