hootlex / laravel-moderation

A simple Content Moderation System for Laravel 5.* that allows you to Approve or Reject resources like posts, comments, users, etc.
MIT License
526 stars 68 forks source link

Difficulty in running tests #27

Closed mtvs closed 6 years ago

mtvs commented 6 years ago

Hello, How do you run the tests?

Package developers usually use orchestral/testbench but here it is not the case.

Thanks.

stephane-monnot commented 6 years ago

I think it's better to migrate to orchestral/testbench, but for now, you can see the .travis to know how to configure for testing.

export DB_CONNECTION=sqlite 
export APP_ENV=testing
composer install --dev --prefer-source --no-interaction
cp tests/migrations/create_moderation_posts_table.php
cp src/config/moderation.php vendor/laravel/laravel/config/moderation.php
touch vendor/laravel/laravel/database/database.sqlite
cd vendor/laravel/laravel
composer update --dev --prefer-source --no-interaction
yes | php artisan migrate
cd ../../../../
vendor/bin/phpunit tests