public function testRepoSwitching()
{
asrt(class_exists('RedBeanPHP\\Repository'), TRUE);
asrt(class_exists('RedBeanPHP\\Repository\\Fluid'), TRUE);
asrt(class_exists('RedBeanPHP\\Repository\\Frozen'), TRUE);
R::freeze(FALSE);
$redbean = R::getRedBean();
$repo = $redbean->getCurrentRepository();
asrt(is_object($repo), TRUE);
asrt($repo instanceof Repository, TRUE);
asrt($repo instanceof FluidRepo, TRUE);
R::freeze(TRUE);
$fluid = $repo;
$repo = $redbean->getCurrentRepository();
asrt(is_object($repo), TRUE);
asrt($repo instanceof Repository, TRUE);
asrt($repo instanceof FrozenRepo, TRUE);
$frozen = $repo;
R::freeze(FALSE);
$redbean = R::getRedBean();
$repo = $redbean->getCurrentRepository();
asrt(is_object($repo), TRUE);
asrt($repo instanceof Repository, TRUE);
asrt($repo instanceof FluidRepo, TRUE);
asrt($repo, $fluid);
R::freeze(TRUE);
$fluid = $repo;
$repo = $redbean->getCurrentRepository();
asrt(is_object($repo), TRUE);
asrt($repo instanceof Repository, TRUE);
asrt($repo instanceof FrozenRepo, TRUE);
asrt($repo, $frozen);
R::freeze(FALSE);
}