public function StockLevelTest::testInvalidArgumentThrows in Commerce Stock 8
Whether a wrong value is throwing.
File
- modules/
field/ tests/ src/ Kernel/ StockLevelTest.php, line 191
Class
- StockLevelTest
- Ensure the stock level field works.
Namespace
Drupal\Tests\commerce_stock_field\KernelCode
public function testInvalidArgumentThrows() {
$this
->expectException(\InvalidArgumentException::class);
$this->variation
->set('test_stock_level', 'FAIL');
}