function hold_test_response

Same name and namespace in other branches
  1. 8.9.x core/modules/system/tests/modules/hold_test/hold_test.module \hold_test_response()
  2. 10 core/modules/system/tests/modules/hold_test/hold_test.module \hold_test_response()
  3. 11.x core/modules/system/tests/modules/hold_test/hold_test.module \hold_test_response()

Response hold.

Parameters

bool $status: TRUE - enable hold, FALSE - disable hold.

7 calls to hold_test_response()
CKEditor5IntegrationTest::testArticleNode in core/modules/quickedit/tests/src/FunctionalJavascript/CKEditor5IntegrationTest.php
Tests if an article node can be in-place edited with Quick Edit.
CKEditor5IntegrationTest::testDiscard in core/modules/quickedit/tests/src/FunctionalJavascript/CKEditor5IntegrationTest.php
Tests that changes can be discarded.
hold_test_install in core/modules/system/tests/modules/hold_test/hold_test.install
Implements hook_install().
LayoutBuilderIntegrationTest::testArticleNode in core/modules/quickedit/tests/src/FunctionalJavascript/LayoutBuilderIntegrationTest.php
Tests if an article node can be in-place edited with Quick Edit.
MediaLibraryTestBase::switchToMediaLibraryTable in core/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php
Switches to the table display of the widget view.

... See full list

File

core/modules/system/tests/modules/hold_test/hold_test.module, line 32

Code

function hold_test_response($status) {
    $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.