# Writes only to $AUTOPKGTEST_TMP: the test classmap and phpunit's configuration
# are generated in a copy of the test suite there.
Tests: phpunit
Restrictions: allow-stderr
Depends: php-bz2,
         php-code-lts-u2f-php-server,
         php-curl,
         php-gd,
         php-tcpdf,
         php-zip,
         phpab,
         phpunit (>= 13),
         @

Tests: dbconfig-upgrade-script
Restrictions: allow-stderr, isolation-container
Depends: mariadb-server, php-cli, php-mysql, @

# Installs phpmyadmin itself (after enabling the server password policy), so it
# must NOT be pulled in via "@" (that would configure it before the policy is
# set). Reproduces the dbconfig-common ERROR 1819 password-policy failure.
Tests: dbconfig-password-policy
Restrictions: allow-stderr, isolation-container, needs-root
Depends: mariadb-server, php-cli, php-mysql

# Runs the installed postinst through dpkg-reconfigure to check that it empties
# /var/lib/phpmyadmin/tmp while keeping subdirectories and the targets of
# symlinks (#1054585).
Tests: tmp-cleanup
Restrictions: allow-stderr, isolation-container, needs-root
Depends: debconf, @

# Installs phpmyadmin itself (so it must NOT be pulled in via "@"), first
# hiding dbconfig-common's config hook to reproduce the deferred-registration
# state behind Debian bug #1121130, then restoring it for a clean installation.
Tests: dbconfig-failure-keeps-package-installed
Restrictions: allow-stderr, isolation-container, needs-root
Depends: dbconfig-common,
         mariadb-server,
         php-cli,
         php-mysql

# Installs phpmyadmin itself (so it must NOT be pulled in via "@"), then purges
# it and checks that its runtime directories are gone.
Tests: purge-removes-runtime-dirs
Restrictions: allow-stderr, isolation-container, needs-root
Depends: debconf

# Drives the interface over HTTP against a private database and web server, using
# a throwaway copy of the package, so it writes nothing outside
# $AUTOPKGTEST_TMP and needs no root.
Tests: web-interface
Restrictions: allow-stderr, isolation-container
Depends: curl,
         lighttpd,
         mariadb-server,
         php-cgi,
         php-mysql,
         python3,
         python3-mechanize,
         @
