From: Antoine Musso Date: Tue, 3 Apr 2018 08:31:09 +0000 (+0200) Subject: tests: fix PHPUnit @requires for APCU X-Git-Tag: 1.31.0-rc.0~222 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=bb683d51765a4eb6443c02bc39ed5bae89a4b06a tests: fix PHPUnit @requires for APCU @requires is an annotation used by PHPUnit to flag a test as requiring a PHP function or extension. c214c9a95 changed it to list two functions separated by a slash: @requires function apc_store/apcu_store However that is not recognized by PHPUnit and the test is always skipped. Change the @requires to require the APCU extension. Repro case: phpunit.php --verbose includes/libs/MemoizedCallableTest.php Follow-up c214c9a95255abf1032d389d0fe8bcbde38b55db Bug: T140587 Change-Id: I1fdd52c8fc8ca1c7c0c7f914e6da8774799ba5d8 --- diff --git a/tests/phpunit/includes/libs/MemoizedCallableTest.php b/tests/phpunit/includes/libs/MemoizedCallableTest.php index d64ba3d41f..9127a30f7a 100644 --- a/tests/phpunit/includes/libs/MemoizedCallableTest.php +++ b/tests/phpunit/includes/libs/MemoizedCallableTest.php @@ -47,7 +47,7 @@ class MemoizedCallableTest extends PHPUnit\Framework\TestCase { * Consecutive calls to the memoized callable with the same arguments * should result in just one invocation of the underlying callable. * - * @requires function apc_store/apcu_store + * @requires extension apcu */ public function testCallableMemoized() { $observer = $this->getMockBuilder( stdClass::class )