Changed to check if the publishdate is set before checking./
Updated bootstrap for tests to run.
Updated check of variables in if statement.