#!/bin/bash
set -e

BASH_XTRACEFD=1
set -x

patch -p1 < debian/patches/DEP-8/Use-installed-class-for-DEP-8-tests.patch
patch -p1 < debian/patches/DEP-8/Tests-against-installed-classes.patch
phpunit --exclude-group online,tty,benchmark,intl-data && exit_code=0 || exit_code=$?
patch -Rp1 < debian/patches/DEP-8/Tests-against-installed-classes.patch
patch -Rp1 < debian/patches/DEP-8/Use-installed-class-for-DEP-8-tests.patch
exit $exit_code
