3
0
Fork 0
mirror of https://github.com/farmOS/farmOS.git synced 2024-02-23 11:37:38 +01:00

Remove dependency on farm_quantity_standard from farm_inventory.

This commit is contained in:
Michael Stenta 2022-11-22 07:10:33 -05:00
parent 165547d94f
commit 728797f0f6
5 changed files with 17 additions and 5 deletions

View file

@ -6,3 +6,6 @@ description: ''
name_pattern: 'Adjustment log [log:id]'
workflow: log_default
new_revision: true
third_party_settings:
farm_log_quantity:
default_quantity_type: test

View file

@ -0,0 +1,11 @@
langcode: en
status: true
dependencies:
enforced:
module:
- farm_inventory_test
id: test
label: Test
default_measure: ''
description: 'Test quantity type.'
new_revision: true

View file

@ -5,4 +5,5 @@ package: Testing
core_version_requirement: ^9
dependencies:
- farm:asset
- farm:quantity
- log:log

View file

@ -31,7 +31,6 @@ class InventoryTest extends FarmBrowserTestBase {
protected static $modules = [
'farm_inventory',
'farm_inventory_test',
'farm_quantity_standard',
'farm_unit',
'farm_api',
];
@ -86,7 +85,7 @@ class InventoryTest extends FarmBrowserTestBase {
// Create an inventory adjustment log+quantity that resets the volume
// (liters) inventory of the asset.
$quantity = $quantity_storage->create([
'type' => 'standard',
'type' => 'test',
'measure' => 'volume',
'value' => [
'numerator' => '2',

View file

@ -38,7 +38,6 @@ class InventoryTest extends KernelTestBase {
'farm_inventory_test',
'farm_log',
'farm_log_quantity',
'farm_quantity_standard',
'farm_unit',
'fraction',
'log',
@ -63,7 +62,6 @@ class InventoryTest extends KernelTestBase {
$this->installEntitySchema('taxonomy_term');
$this->installConfig([
'farm_inventory_test',
'farm_quantity_standard',
]);
}
@ -305,7 +303,7 @@ class InventoryTest extends KernelTestBase {
$fraction = Fraction::createFromDecimal($value);
/** @var \Drupal\quantity\Entity\Quantity $quantity */
$quantity = Quantity::create([
'type' => 'standard',
'type' => 'test',
'value' => [
'numerator' => $fraction->getNumerator(),
'denominator' => $fraction->getDenominator(),