summaryrefslogtreecommitdiff
blob: 657a45b11c2a07a6f8e09db95d1de8876c4fa229 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit php-pear-r2

DESCRIPTION="Color conversion and mixing for PHP5"

LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="test"
DEPEND="test? ( >=dev-php/phpunit-5 )"

src_prepare() {
	# Modernize tests
	sed -i -e "/require_once 'PHPUnit\/Framework.php';/d" \
		-e "s/assertType('\(Image_[a-zA-Z2_]*\)',/assertInstanceOf(\1::class,/" \
		-e "s/assertType('array',/assertInternalType('array',/" \
		-e "s/assertType('string',/assertInternalType('string',/" \
		tests/*.php tests/Model/*.php || die
	default
}

src_test() {
	phpunit tests/AllTests.php || die
}