File tree Expand file tree Collapse file tree 4 files changed +7
-10
lines changed
app/code/Magento/Integration Expand file tree Collapse file tree 4 files changed +7
-10
lines changed Original file line number Diff line number Diff line change 7
7
8
8
/**
9
9
* Service config data reader.
10
-
10
+ *
11
11
* @codeCoverageIgnore
12
12
*/
13
13
class Reader extends \Magento \Framework \Config \Reader \Filesystem
Original file line number Diff line number Diff line change @@ -20,11 +20,11 @@ class KeyLength extends \Zend_Validate_StringLength
20
20
/**
21
21
* @var array
22
22
*/
23
- protected $ _messageTemplates = array (
23
+ protected $ _messageTemplates = [
24
24
self ::INVALID => "Invalid type given for %name%. String expected " ,
25
25
self ::TOO_SHORT => "%name% '%value%' is less than %min% characters long " ,
26
26
self ::TOO_LONG => "%name% '%value%' is more than %max% characters long " ,
27
- ) ;
27
+ ] ;
28
28
29
29
/**
30
30
* Additional variables available for validation failure messages
Original file line number Diff line number Diff line change @@ -360,7 +360,6 @@ public function testValidateRequestTokenInvalidVerifier()
360
360
$ oauthVerifier = 1 ;
361
361
$ consumerId = 1 ;
362
362
$ tokenId = 1 ;
363
- $ secret = 'secret ' ;
364
363
365
364
$ this ->requestTokenMock ->expects ($ this ->once ())
366
365
->method ('load ' )
@@ -416,7 +415,6 @@ public function testValidateRequestTokenNotMatchedVerifier()
416
415
$ notMatchedVerifier = '123 ' ;
417
416
$ consumerId = 1 ;
418
417
$ tokenId = 1 ;
419
- $ secret = 'secret ' ;
420
418
421
419
$ this ->requestTokenMock ->expects ($ this ->once ())
422
420
->method ('load ' )
@@ -608,7 +606,7 @@ public function testValidateAccessToken()
608
606
$ this ->consumerMock ->expects ($ this ->any ())->method ('getId ' )->willReturn ($ consumerId );
609
607
610
608
$ this ->accessTokenMock ->expects ($ this ->once ())->method ('getType ' )->willReturn (Token::TYPE_ACCESS );
611
- $ this ->accessTokenMock ->expects ($ this ->once ())->method ('getRevoked ' )->willReturn (0 );;
609
+ $ this ->accessTokenMock ->expects ($ this ->once ())->method ('getRevoked ' )->willReturn (0 );
612
610
$ this ->assertEquals (
613
611
$ consumerId ,
614
612
$ this ->tokenProvider ->validateAccessToken ($ accessTokenString )
Original file line number Diff line number Diff line change 12
12
use Magento \Authorization \Model \UserContextInterface ;
13
13
use Magento \Framework \TestFramework \Unit \Matcher \MethodInvokedAtIndex ;
14
14
15
-
16
15
/**
17
16
* Unit test for \Magento\Integration\Model\Oauth\Nonce
18
17
*/
@@ -209,8 +208,8 @@ public function testCreateVerifierTokenIfNoTokenId()
209
208
$ verifier = 'verifier ' ;
210
209
211
210
$ this ->oauthHelperMock ->expects ($ this ->once ())->method ('generateTokenSecret ' )->willReturn ($ secret );
212
- $ this ->oauthHelperMock ->expects ($ this ->once ())->method ('generateToken ' )->willReturn ($ token );;
213
- $ this ->oauthHelperMock ->expects ($ this ->once ())->method ('generateVerifier ' )->willReturn ($ verifier );;
211
+ $ this ->oauthHelperMock ->expects ($ this ->once ())->method ('generateToken ' )->willReturn ($ token );
212
+ $ this ->oauthHelperMock ->expects ($ this ->once ())->method ('generateVerifier ' )->willReturn ($ verifier );
214
213
215
214
$ this ->resourceMock ->expects ($ this ->once ())
216
215
->method ('selectTokenByType ' )
@@ -301,7 +300,7 @@ public function testCreateRequestToken()
301
300
$ secret = 'secret ' ;
302
301
303
302
$ this ->oauthHelperMock ->expects ($ this ->once ())->method ('generateTokenSecret ' )->willReturn ($ secret );
304
- $ this ->oauthHelperMock ->expects ($ this ->once ())->method ('generateToken ' )->willReturn ($ token );;
303
+ $ this ->oauthHelperMock ->expects ($ this ->once ())->method ('generateToken ' )->willReturn ($ token );
305
304
306
305
$ this ->tokenModel ->setCallbackUrl ($ callbackUrl );
307
306
$ this ->keyLengthFactoryMock ->expects ($ this ->once ())->method ('create ' )->willReturn (
You can’t perform that action at this time.
0 commit comments