$loader->expects($this->exactly(2))
->method('view')
->withConsecutive(
['shop_confirm', $this->anything(), TRUE],
['shop_tmpl_checkout', $this->anything()]
);
will be
$this->verifyInvokedMultipleTimes(
$loader,
'view',
2,
[
['shop_confirm', $this->anything(), TRUE],
['shop_tmpl_checkout', $this->anything()]
]
);