<commit_before>#!/bin/sh

DIR=`dirname $0`
CYAN='\033[4;36m'
DEFAULT='\033[0m'

echo "${CYAN}Enter $DIR directory${DEFAULT}"
cd $DIR

echo "${CYAN}Update composer${DEFAULT}"
composer self-update
composer install --no-interaction --ignore-platform-reqs --prefer-source

echo "${CYAN}Copy latest configuration files${DEFAULT}"
cp config/autoload/local.php.dist config/autoload/local.php
cp config/autoload/oauth2.local.php.dist config/autoload/oauth2.local.php

echo "${CYAN}Run phpunit tests${DEFAULT}"
phpunit -c module/Channel/test/phpunit.xml<commit_msg>improve api module test script<commit_after>#!/bin/sh

DIR=`dirname $0`
CYAN='\033[4;36m'
DEFAULT='\033[0m'

cd $DIR

echo "${CYAN}Update composer${DEFAULT}"
composer self-update
composer install --no-interaction --ignore-platform-reqs --prefer-source

echo "${CYAN}Copy latest configuration files${DEFAULT}"
cp -v config/autoload/local.php.dist config/autoload/local.php
cp -v config/autoload/oauth2.local.php.dist config/autoload/oauth2.local.php

echo "${CYAN}Run phpunit tests${DEFAULT}"
phpunit -c module/Channel/test/phpunit.xml
{'fraction_non_alphanumeric': 0.15504587155963304, 'fraction_numerical': 0.023853211009174313, 'mean_word_length': 5.693251533742331, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2911381', 'n_tokens_mistral': 402, 'n_tokens_neox': 383, 'n_words': 79}