PayPal\Test\Auth\OAuthTokenCredentialTest::testUpdateAccessTokenNullReturnUnitMock PHP Method

testUpdateAccessTokenNullReturnUnitMock() public method

    public function testUpdateAccessTokenNullReturnUnitMock()
    {
        $config = array('mode' => 'sandbox');
        /** @var OAuthTokenCredential $auth */
        $auth = $this->getMockBuilder('\\PayPal\\Auth\\OAuthTokenCredential')->setConstructorArgs(array('clientId', 'clientSecret'))->setMethods(array('getToken'))->getMock();
        $auth->expects($this->any())->method('getToken')->will($this->returnValue(array()));
        $response = $auth->updateAccessToken($config);
        $this->assertNotNull($response);
        $this->assertEquals('accessToken', $response);
    }