<commit_before>#!/bin/sh
TESTS="${1:-.}"

mkdir -p template/default
mkdir -p template/custom
mkdir mincss
echo '<?php print $abc; ?>' > template/default/something.tpl.php
echo '<?php print $abc; ?>' > template/custom/something2.tpl.php
echo '<!DOCTYPE html>
<html lang="<?php print $lang; ?>" dir="<?php print $dir; ?>">
<head>
  <title><?php print $title; ?> | <?php print $site_name; ?></title>
  <?php print $css; ?>
  <?php print $head_js; ?>
</head>
<body class="<?php print $body_class; ?>">
<div id="site-slogan">
<?php print $site_slogan; ?>
</div>
<?php print $content; ?>
<?php print $body_js; ?>
</body>
</html>' > template/custom/page.tpl.php
echo '* {margin:0;padding:0}' > test.css
echo '* {margin:0;padding:0}' > test2.css
echo '* {margin:0;padding:0}' > test3.css

cp -f resources/backup/* resources
rm -f resources/*_copy*

chmod 0700 non-writable-directory &> /dev/null
rmdir non-writable-directory &> /dev/null

touch test.cache

phpunit --stderr -c config.xml "$TESTS"

chmod 0700 non-writable-directory &> /dev/null
rmdir non-writable-directory &> /dev/null

rm -rf flourish__* template mincss test*.css
rm -f resources/*_copy*
rm -f test.cache
git checkout resources/db.sqlite3

echo<commit_msg>Use local copy of phpunit<commit_after>#!/bin/sh
TESTS="${1:-.}"

mkdir -p template/default
mkdir -p template/custom
mkdir mincss
echo '<?php print $abc; ?>' > template/default/something.tpl.php
echo '<?php print $abc; ?>' > template/custom/something2.tpl.php
echo '<!DOCTYPE html>
<html lang="<?php print $lang; ?>" dir="<?php print $dir; ?>">
<head>
  <title><?php print $title; ?> | <?php print $site_name; ?></title>
  <?php print $css; ?>
  <?php print $head_js; ?>
</head>
<body class="<?php print $body_class; ?>">
<div id="site-slogan">
<?php print $site_slogan; ?>
</div>
<?php print $content; ?>
<?php print $body_js; ?>
</body>
</html>' > template/custom/page.tpl.php
echo '* {margin:0;padding:0}' > test.css
echo '* {margin:0;padding:0}' > test2.css
echo '* {margin:0;padding:0}' > test3.css

cp -f resources/backup/* resources
rm -f resources/*_copy*

chmod 0700 non-writable-directory &> /dev/null
rmdir non-writable-directory &> /dev/null

touch test.cache

../bin/phpunit --stderr -c config.xml "$TESTS"

chmod 0700 non-writable-directory &> /dev/null
rmdir non-writable-directory &> /dev/null

rm -rf flourish__* template mincss test*.css
rm -f resources/*_copy*
rm -f test.cache
git checkout resources/db.sqlite3

echo
{'fraction_non_alphanumeric': 0.19486343253159397, 'fraction_numerical': 0.015491235222176927, 'mean_word_length': 4.514606741573034, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 69, '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': '1828717', 'n_tokens_mistral': 920, 'n_tokens_neox': 900, 'n_words': 237}