function HoldTestHelper::responseHold
Response hold.
Parameters
bool $status: TRUE - enable hold, FALSE - disable hold.
3 calls to HoldTestHelper::responseHold()
- hold_test_install in core/
modules/ system/ tests/ modules/ hold_test/ hold_test.install - Implements hook_install().
- MediaLibraryTestBase::switchToMediaLibraryTable in core/
modules/ media_library/ tests/ src/ FunctionalJavascript/ MediaLibraryTestBase.php - Switches to the table display of the widget view.
- ThrobberTest::testThemingThrobberElement in core/
tests/ Drupal/ FunctionalJavascriptTests/ Ajax/ ThrobberTest.php - Tests theming throbber element.
File
-
core/
modules/ system/ tests/ modules/ hold_test/ src/ HoldTestHelper.php, line 36
Class
- HoldTestHelper
- Contains methods for testing hold request/response.
Namespace
Drupal\hold_testCode
public static function responseHold(bool $status) : void {
$site_path = \Drupal::getContainer()->getParameter('site.path');
file_put_contents($site_path . '/hold_test_response.txt', $status);
// If we're releasing the hold wait for a bit to allow the subscriber to
// read the file.
if (!$status) {
usleep(HoldTestSubscriber::WAIT * 2);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.