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

Use Activity log type instead of Movement in testPopulateLogGeometry().

This commit is contained in:
Michael Stenta 2021-12-07 14:27:23 -05:00
parent c9ba9d5d7d
commit 578419eda4
3 changed files with 27 additions and 2 deletions

View file

@ -0,0 +1,8 @@
langcode: en
status: true
id: activity
label: Activity
description: ''
name_pattern: 'Activity log [log:id]'
workflow: log_default
new_revision: true

View file

@ -0,0 +1,17 @@
<?php
namespace Drupal\farm_location_test\Plugin\Log\LogType;
use Drupal\farm_entity\Plugin\Log\LogType\FarmLogType;
/**
* Provides the test activity log type.
*
* @LogType(
* id = "activity",
* label = @Translation("Activity"),
* )
*/
class Activity extends FarmLogType {
}

View file

@ -113,7 +113,7 @@ class LocationTest extends KernelTestBase {
// is copied from the location.
/** @var \Drupal\log\Entity\LogInterface $log */
$log = Log::create([
'type' => 'movement',
'type' => 'activity',
'status' => 'pending',
'location' => ['target_id' => $this->locations[0]->id()],
]);
@ -161,7 +161,7 @@ class LocationTest extends KernelTestBase {
// the location or geometry fields, the geometry is copied from the asset.
/** @var \Drupal\log\Entity\LogInterface $log */
$log = Log::create([
'type' => 'movement',
'type' => 'activity',
'status' => 'pending',
'asset' => ['target_id' => $this->locations[0]->id()],
]);