public function testRemoveTargetPath() { $obj =
new TestClassWithTargetPathTrait();
$session =
$this->
createMock(SessionInterface::
class);
$session->
expects($this->
once()) ->
method('remove'
) ->
with('_security.best_firewall.target_path'
);
$obj->
doRemoveTargetPath($session, 'best_firewall'
);
}}class TestClassWithTargetPathTrait{ use TargetPathTrait;
public function doSetTargetPath(SessionInterface
$session,
$firewallName,
$uri) { $this->
saveTargetPath($session,
$firewallName,
$uri);
}