public function StockLevelTest::testStockLevelStockIn in Commerce Stock 8
Whether setting a plain value results in increased stock level.
Throws
\Drupal\Core\Entity\EntityStorageException
File
- modules/
field/ tests/ src/ Kernel/ StockLevelTest.php, line 169
Class
- StockLevelTest
- Ensure the stock level field works.
Namespace
Drupal\Tests\commerce_stock_field\KernelCode
public function testStockLevelStockIn() {
$this->variation
->set('test_stock_level', 10);
$this->variation
->save();
$this
->assertEquals(65, $this->checker
->getTotalStockLevel($this->variation, $this->locations));
}