static public function confirmAspectMockConfigured() {
        // Ensure mocks are configured for SSP classes
        $httpDouble = test::double('SimpleSAML\Utils\HTTP', [
            'getAcceptLanguage' => ['some-lang']
        ]);

        if ( ['some-lang'] !== \SimpleSAML\Utils\HTTP::getAcceptLanguage()) {
            throw new \Exception("Aspect mock does not seem to be configured");
        }
        // You can also validate the that a method was called.
        // $httpDouble->verifyInvokedOnce('getAcceptLanguage');
        return $httpDouble;
    }
static public function confirmAspectMockConfigured() {
        // Ensure mocks are configured for SSP classes
        $httpDouble = test::double('SimpleSAML\Utils\HTTP', [
            'getAcceptLanguage' => ['some-lang']
        ]);

        if ( ['some-lang'] !== \SimpleSAML\Utils\HTTP::getAcceptLanguage()) {
            throw new \Exception("Aspect mock does not seem to be configured");
        }
        // You can also validate the that a method was called.
        // $httpDouble->verifyInvokedOnce('getAcceptLanguage');
        return $httpDouble;
    }
static public function confirmAspectMockConfigured ( ) { // Ensure mocks are configured for SSP classes $ httpDouble = test :: double ( 'SimpleSAML\Utils\HTTP' , [ 'getAcceptLanguage' => [ 'some-lang' ] ] ) ; if ( [ 'some-lang' ] !== \ SimpleSAML \ Utils \ HTTP :: getAcceptLanguage ( ) ) { throw new \ Exception ( "Aspect mock does not seem to be configured" ) ; } // You can also validate the that a method was called. // $httpDouble->verifyInvokedOnce('getAcceptLanguage'); return $ httpDouble ; }
Checks that AspectMock is configured and can override HTTP Util methods
@return \AspectMock\Proxy\ClassProxy|\AspectMock\Proxy\InstanceProxy|\AspectMock\Proxy\Verifier
@throws \Exception
Checks that AspectMock is configured and can override HTTP Util methods