#!/usr/bin/make -f
%:
	dh $@ --with phpcomposer

override_dh_auto_build:
	# generate autoload-files. keep in sync with debian/tests/phpunit
	phpab --output src/autoload.php \
		--template debian/autoload.php.tpl \
		src

override_dh_auto_test:
	phpab --template debian/autoload-test.php.tpl \
		--output tests/autoload.php \
		tests

	# Symlink needed by CLITest::testStdinPipe
	mkdir -p vendor
	ln -s -f -r tests/autoload.php vendor/autoload.php

	# keep in sync with debian/tests/phpunit
	LC_ALL=C.UTF-8 phpunit --bootstrap tests/autoload.php --no-coverage
