public function OrderLockingTest::testOrderConstraintDefinition in Commerce Core 8.2
Tests our OrderVersion constraint is available.
File
- modules/
order/ tests/ src/ Kernel/ OrderLockingTest.php, line 37
Class
- OrderLockingTest
- Tests order locking.
Namespace
Drupal\Tests\commerce_order\KernelCode
public function testOrderConstraintDefinition() {
// Ensure our OrderVersion constraint is available.
$entity_type_manager = $this->container
->get('entity_type.manager');
$order_type = $entity_type_manager
->getDefinition('commerce_order');
$default_constraints = [
'OrderVersion' => [],
// Added to all ContentEntity implementations.
'EntityUntranslatableFields' => NULL,
];
$this
->assertEquals($default_constraints, $order_type
->getConstraints());
}