public function doPerPhaseTeardown()
{
// shorthand
$st = $this->st;
$story = $st->getStory();
// do we have anything to do?
if ($story->hasPerPhaseTeardown()) {
// get the callback to call
$callbacks = $story->getPerPhaseTeardown();
// make the call
foreach ($callbacks as $callback) {
call_user_func($callback, $st);
}
}
// stop the test device, if it is still running
if (!$st->getPersistDevice()) {
$st->stopDevice();
}
// all done
}