tests: fix PHPUnit @requires for APCU
authorAntoine Musso <hashar@free.fr>
Tue, 3 Apr 2018 08:31:09 +0000 (10:31 +0200)
committerAddshore <addshorewiki@gmail.com>
Tue, 3 Apr 2018 12:21:55 +0000 (12:21 +0000)
@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

tests/phpunit/includes/libs/MemoizedCallableTest.php

index d64ba3d..9127a30 100644 (file)
@@ -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 )