add php sapi test on faker scripts

This commit is contained in:
Manuel Raynaud
2014-04-01 12:16:52 +02:00
parent 0ba3ec475a
commit d2f1ade702
6 changed files with 19 additions and 5 deletions

View File

@@ -20,7 +20,9 @@
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
if (php_sapi_name() != 'cli') {
throw new \Exception('this script can only be launched with cli sapi');
}
require __DIR__ . '/../core/bootstrap.php';
$thelia = new Thelia\Core\Thelia("dev", true);