get_the_title outputs title until spacing; it does not get full length of title

Your title isn’t correctly encoded for use in a query variable. Try this:

echo ' <a href="http://www.testungsss.com/search?q=' . urlencode($titletest) . '">' . $titletest . '</a>';