SensorListenerApiTest.php in farmOS 2.x
File
modules/asset/sensor/modules/listener/tests/src/Functional/SensorListenerApiTest.php
View source
<?php
namespace Drupal\Tests\farm_sensor_listener\Functional;
use Drupal\asset\Entity\AssetInterface;
use Drupal\Tests\farm_sensor\Functional\SensorDataApiTest;
class SensorListenerApiTest extends SensorDataApiTest {
protected static $modules = [
'farm_sensor_listener',
];
protected function buildPath(AssetInterface $asset) {
$public_key = $asset
->get('public_key')->value;
return "base://farm/sensor/listener/{$public_key}";
}
}