#!/usr/bin/env bash
cd "$(dirname "$0")"
. "./.common.sh"
cd ..
tester="./support/test"
if ! chkcmd 'brew'; then
echo ' "brew" command not found.'
echo ' Skipping version based testing for PHP {8.1, 8.2}.'
"$tester"
else
brew unlink
[email protected] > /dev/null \
&& brew link
[email protected] > /dev/null \
&& printf "\nTesting against PHP 8.1\n" \
&& "$tester" \
&& clear \
&& brew unlink
[email protected] > /dev/null \
&& brew link
[email protected] > /dev/null \
&& printf "\nTesting against PHP 8.2\n" \
&& "$tester"
fi