Backup chain for DBs restored from a different server
Before running Ola's script, you can check the msdb.dbo.backupset.type = 'D' using top(1) .. ORDER BY backup_finish_date desc. 


If it returns value then you have a full backup done and you can proceed with differential.
If it returns null or no value then you dont have a full backup and you can take a full backup and then proceed with your regular differential backups.


I would agree with JohnM that do you really need differential backups on a test server ? Its easy for you to get a full backup and refresh the environment.