#! /bin/bash

APP_NAME=bookmarks

#rm -rf ../server/apps/APP_NAME
#cp -R ./ ../server/apps/APP_NAME
#cd ../server
#echo "Installing nextcloud"
#./core_install.sh sqlite || exit 1
cd /var/www/html
php occ app:enable $APP_NAME || exit 1

# Test lint
cd apps/$APP_NAME
find . -name \*.php -exec php -l "{}" \;

# Run phpunit tests
cd /var/www/html/apps/tests
phpunit --configuration phpunit.xml
