unit tests for unit.php