/**
* Test prettier tables using via().
*/
public function testViaPrettification()
{
R::nuke();
R::renameAssociation('tbl_author_tbl_friend', 'tbl_author_friend');
$author = R::xdispense(AUTHOR);
$author->name = 'Mr. Quill';
$friend = R::xdispense(FRIEND);
$friend->name = 'Muse';
$author->{FRIENDLIST}[] = $friend;
$id = R::store($author);
//print_r(R::inspect()); exit;
$author = R::load(AUTHOR, $id);
$tables = array_flip(R::inspect());
asrt(isset($tables['tbl_author_friend']), TRUE);
asrt(isset($tables['tbl_author_tbl_friend']), FALSE);
asrt(count($author->{FRIENDLIST}), 1);
AQueryWriter::clearRenames();
}