symfony/symfony — pull request #12086 by AlphaStream (2014-09-30 17:14:11+00:00)
Title: [Security][Http][Authentication] Make a test pass on HHVM

The test mocks AuthenticationException mocking all its (and its ancestors') methods. In HHVM's implementation of \Exception, a static method is called upon instantiation. Mock object generator, however, mocks static methods with 'throw' statements. All of these cause the SimpleAuthenticationHandlerTest to fail on HHVM when attempting to instantiate the mock.

The solution is to disable method mocking for AuthenticationException. An instance of this class is merely passed around between the authentication handler and the failure handler, and no methods are invoked on it. Hence, disabling method mocking should not weaken the unit test.

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