protected function MediaBridgeMediaTest::await in Open Social 10.0.x
Same name and namespace in other branches
- 10.3.x modules/custom/social_graphql/tests/src/Kernel/MediaBridgeMediaTest.php \Drupal\Tests\social_graphql\Kernel\MediaBridgeMediaTest::await()
- 10.1.x modules/custom/social_graphql/tests/src/Kernel/MediaBridgeMediaTest.php \Drupal\Tests\social_graphql\Kernel\MediaBridgeMediaTest::await()
- 10.2.x modules/custom/social_graphql/tests/src/Kernel/MediaBridgeMediaTest.php \Drupal\Tests\social_graphql\Kernel\MediaBridgeMediaTest::await()
Turns a possible promise into a value.
Parameters
mixed $value: A value that's possible a promise.
Return value
mixed The value or the result of a the promise.
1 call to MediaBridgeMediaTest::await()
- MediaBridgeMediaTest::testMediaSource in modules/
custom/ social_graphql/ tests/ src/ Kernel/ MediaBridgeMediaTest.php - Tests that the MediaBridge class works for Media entities.
File
- modules/
custom/ social_graphql/ tests/ src/ Kernel/ MediaBridgeMediaTest.php, line 107
Class
- MediaBridgeMediaTest
- Tests that the MediaBridge works with Media entities.
Namespace
Drupal\Tests\social_graphql\KernelCode
protected function await($value) {
if ($value instanceof SyncPromise) {
$value::runQueue();
return $value->result;
}
return $value;
}