Fixed the support of the insulated tag at the feature level
This commit is contained in:
@@ -83,6 +83,15 @@ class SessionsListenerSpec extends ObjectBehavior
|
|||||||
$this->prepareDefaultMinkSession($event);
|
$this->prepareDefaultMinkSession($event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function it_stops_the_sessions_for_insulated_features($event, $mink, $feature)
|
||||||
|
{
|
||||||
|
$feature->hasTag('insulated')->willReturn(true);
|
||||||
|
$mink->stopSessions()->shouldBeCalled();
|
||||||
|
$mink->setDefaultSessionName('goutte')->shouldBeCalled();
|
||||||
|
|
||||||
|
$this->prepareDefaultMinkSession($event);
|
||||||
|
}
|
||||||
|
|
||||||
function it_stops_the_sessions_at_the_end_of_the_exercise($mink)
|
function it_stops_the_sessions_at_the_end_of_the_exercise($mink)
|
||||||
{
|
{
|
||||||
$mink->stopSessions()->shouldBeCalled();
|
$mink->stopSessions()->shouldBeCalled();
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ class SessionsListener implements EventSubscriberInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($scenario->hasTag('insulated')) {
|
if ($scenario->hasTag('insulated') || $feature->hasTag('insulated')) {
|
||||||
$this->mink->stopSessions();
|
$this->mink->stopSessions();
|
||||||
} else {
|
} else {
|
||||||
$this->mink->resetSessions();
|
$this->mink->resetSessions();
|
||||||
|
|||||||
Reference in New Issue
Block a user