You are here

protected function SensorListenerApiTest::buildPath in farmOS 2.x

Helper function to build the path to the sensor API.

Parameters

\Drupal\asset\Entity\AssetInterface $asset: The asset.

Return value

string The path.

Overrides SensorDataApiTest::buildPath

File

modules/asset/sensor/modules/listener/tests/src/Functional/SensorListenerApiTest.php, line 31

Class

SensorListenerApiTest
Test the sensor listener (legacy) API.

Namespace

Drupal\Tests\farm_sensor_listener\Functional

Code

protected function buildPath(AssetInterface $asset) {
  $public_key = $asset
    ->get('public_key')->value;
  return "base://farm/sensor/listener/{$public_key}";
}