some generic testing... will port these to PHPUnit soonish.