@@ -82,21 +82,6 @@ protected function setUp(): void
82
82
);
83
83
}
84
84
85
- /**
86
- * Test isProductAvailable() without quantity to add
87
- */
88
- public function testIsProductAvailableWithoutQtyToAdd (): void
89
- {
90
- $ cartItemMock = $ this ->getMockBuilder (Item::class)
91
- ->addMethods (['getQtyToAdd ' ])
92
- ->disableOriginalConstructor ()
93
- ->getMock ();
94
- $ cartItemMock ->expects ($ this ->once ())
95
- ->method ('getQtyToAdd ' )
96
- ->willReturn (null );
97
- $ this ->assertFalse ($ this ->productStock ->isProductAvailable ($ cartItemMock ));
98
- }
99
-
100
85
/**
101
86
* Test isProductAvailable() for a simple product with sufficient stock
102
87
*/
@@ -113,7 +98,7 @@ public function testIsProductAvailableForSimpleProductWithStock(): void
113
98
->disableOriginalConstructor ()
114
99
->addMethods (['getHasError ' ])
115
100
->getMockForAbstractClass ();
116
- $ cartItemMock ->expects ($ this ->exactly ( 2 ))
101
+ $ cartItemMock ->expects ($ this ->once ( ))
117
102
->method ('getQtyToAdd ' )
118
103
->willReturn (2 );
119
104
$ cartItemMock ->expects ($ this ->once ())
@@ -164,7 +149,7 @@ public function testIsProductAvailableForSimpleProductWithoutStock(): void
164
149
->disableOriginalConstructor ()
165
150
->addMethods (['getHasError ' ])
166
151
->getMockForAbstractClass ();
167
- $ cartItemMock ->expects ($ this ->exactly ( 2 ))
152
+ $ cartItemMock ->expects ($ this ->once ( ))
168
153
->method ('getQtyToAdd ' )
169
154
->willReturn (5 );
170
155
$ cartItemMock ->expects ($ this ->once ())
0 commit comments