#!/usr/bin/make -f

%:
	dh $@ --with phpcomposer

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	# keep in sync with debian/tests/phpunit
	find tests/ -type f -print0 | xargs -0 sed -i 's/function setUp()/function setUp(): void/g'
	find tests/ -type f -print0 | xargs -0 sed -i 's/function tearDown()/function tearDown(): void/g'
	phpunit --no-coverage
	find tests/ -type f -print0 | xargs -0 sed -i 's/function setUp(): void/function setUp()/g'
	find tests/ -type f -print0 | xargs -0 sed -i 's/function tearDown(): void/function tearDown()/g'
endif
