You can use following .htaccess rules direct your web site to sub-folder. However, we always recommended having your web site hosted in the public_html folder to avoid any possible issues with cPanel operations.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain-name.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www.domain-name.com$
RewriteCond %{REQUEST_URI} !folder/
RewriteRule (.*) /folder/$1 [L]
In the above lines you should replace the following:
domain-name.com - Type your own domain name
folder - Type the name of the subfolder which has the test/development website