minor #21918 [hhvm] 3.18-related fix (nicolas-grekas)

This PR was merged into the 3.2 branch.

Discussion
----------

[hhvm] 3.18-related fix

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

See #21914

Commits
-------

bc6c569 [hhvm] 3.18-related fix
This commit is contained in:
Nicolas Grekas 2017-03-07 22:22:04 +01:00
commit 2ec78c2294

View File

@ -21,6 +21,7 @@ class AddClassesToCachePassTest extends TestCase
$r = new \ReflectionClass(AddClassesToCachePass::class);
$pass = $r->newInstanceWithoutConstructor();
$r = new \ReflectionMethod(AddClassesToCachePass::class, 'expandClasses');
$r->setAccessible(true);
$expand = $r->getClosure($pass);
$this->assertSame('Foo', $expand(array('Foo'), array())[0]);