Use splat operator in HamcrestPHPUnitIntegration
authorKunal Mehta <legoktm@member.fsf.org>
Wed, 27 Feb 2019 02:52:03 +0000 (18:52 -0800)
committerKunal Mehta <legoktm@member.fsf.org>
Wed, 27 Feb 2019 02:52:03 +0000 (18:52 -0800)
Change-Id: I1421748fd338137dd6990775e0d79a6cfb82aa9d

tests/phpunit/HamcrestPHPUnitIntegration.php

index def08ff..aa383e2 100644 (file)
@@ -27,8 +27,8 @@ trait HamcrestPHPUnitIntegration {
         * Wrapper around Hamcrest's assertThat, which marks the assertion
         * for PHPUnit so the test is not marked as risky
         */
-       public function assertThatHamcrest( /* ... */ ) {
-               call_user_func_array( 'assertThat', func_get_args() );
+       public function assertThatHamcrest( ...$args ) {
+               assertThat( ...$args );
                $this->addToAssertionCount( 1 );
        }
 }