5
5
*/
6
6
declare (strict_types=1 );
7
7
8
- namespace Magento \CustomerGraphQl \Test \Unit \Model \Resolver ;
8
+ namespace Magento \CatalogInventoryGraphQl \Test \Unit \Model \Resolver ;
9
9
10
10
use PHPUnit \Framework \TestCase ;
11
11
use Magento \CatalogInventoryGraphQl \Model \Resolver \OnlyXLeftInStockResolver ;
21
21
use Magento \CatalogInventory \Api \Data \StockStatusInterface ;
22
22
23
23
/**
24
- * Test class for \Magento\CustomerGraphQl \Model\Resolver\GenerateCustomerToken
24
+ * Test class for \Magento\CatalogInventoryGraphQl \Model\Resolver\OnlyXLeftInStockResolver
25
25
*/
26
26
class OnlyXLeftInStockResolverTest extends TestCase
27
27
{
@@ -132,7 +132,6 @@ protected function setUp(): void
132
132
133
133
public function testResolve ()
134
134
{
135
- $ xLeftInstockResult = 1 ;
136
135
$ stockCurrentQty = 3 ;
137
136
$ minQty = 2 ;
138
137
$ thresholdQty = 1 ;
@@ -146,7 +145,7 @@ public function testResolve()
146
145
$ this ->scopeConfigMock ->method ('getValue ' )->willReturn ($ thresholdQty );
147
146
148
147
$ this ->assertEquals (
149
- $ xLeftInstockResult ,
148
+ $ stockCurrentQty ,
150
149
$ this ->resolver ->resolve (
151
150
$ this ->fieldMock ,
152
151
$ this ->contextMock ,
@@ -158,7 +157,6 @@ public function testResolve()
158
157
159
158
public function testResolveOutStock ()
160
159
{
161
- $ xLeftInstockResult = 1 ;
162
160
$ stockCurrentQty = 0 ;
163
161
$ minQty = 2 ;
164
162
$ thresholdQty = 1 ;
@@ -181,11 +179,8 @@ public function testResolveOutStock()
181
179
);
182
180
}
183
181
184
-
185
-
186
182
public function testResolveNoThresholdQty ()
187
183
{
188
- $ xLeftInstockResult = 1 ;
189
184
$ stockCurrentQty = 3 ;
190
185
$ minQty = 2 ;
191
186
$ thresholdQty = null ;
@@ -207,4 +202,4 @@ public function testResolveNoThresholdQty()
207
202
)
208
203
);
209
204
}
210
- }
205
+ }
0 commit comments