File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
app/code/Meta/BusinessExtension/Test/Unit/Api/CustomApiKey Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 9
9
use Meta \BusinessExtension \Model \System \Config as SystemConfig ;
10
10
use PHPUnit \Framework \MockObject \MockObject ;
11
11
use PHPUnit \Framework \TestCase ;
12
+ use Meta \BusinessExtension \Helper \FBEHelper ;
12
13
13
14
class CustomApiKeyTest extends TestCase
14
15
{
@@ -27,6 +28,11 @@ class CustomApiKeyTest extends TestCase
27
28
*/
28
29
private SystemConfig $ systemConfig ;
29
30
31
+ /**
32
+ * @var MockObject
33
+ */
34
+ private FBEHelper $ fbeHelper ;
35
+
30
36
protected function setUp (): void
31
37
{
32
38
parent ::setUp ();
@@ -39,6 +45,9 @@ protected function setUp(): void
39
45
$ this ->systemConfig = $ this ->getMockBuilder (SystemConfig::class)
40
46
->disableOriginalConstructor ()
41
47
->getMock ();
48
+ $ this ->fbeHelper = $ this ->getMockBuilder (FBEHelper::class)
49
+ ->disableOriginalConstructor ()
50
+ ->getMock ();
42
51
}
43
52
44
53
public function testAuthenticateApiKeyFailed ()
@@ -58,7 +67,8 @@ public function testAuthenticateApiKeyFailed()
58
67
$ authenticator = new Authenticator (
59
68
$ this ->scopeConfig ,
60
69
$ this ->httpRequest ,
61
- $ this ->systemConfig
70
+ $ this ->systemConfig ,
71
+ $ this ->fbeHelper
62
72
);
63
73
$ authenticator ->authenticateRequestDangerouslySkipSignatureValidation ();
64
74
}
@@ -77,7 +87,8 @@ public function testAuthenticateApiKeySuccess()
77
87
$ authenticator = new Authenticator (
78
88
$ this ->scopeConfig ,
79
89
$ this ->httpRequest ,
80
- $ this ->systemConfig
90
+ $ this ->systemConfig ,
91
+ $ this ->fbeHelper
81
92
);
82
93
$ authenticator ->authenticateRequestDangerouslySkipSignatureValidation ();
83
94
}
You can’t perform that action at this time.
0 commit comments