Search for assert

  1. Search 7.x for assert
  2. Search 9.5.x for assert
  3. Search 8.9.x for assert
  4. Search 10.3.x for assert
  5. Other projects
Title Object type File name Summary
FilterFormTest::assertOptions function core/modules/filter/tests/src/Functional/FilterFormTest.php Asserts that a select element has the correct options.
FilterFormTest::assertRequiredSelectAndOptions function core/modules/filter/tests/src/Functional/FilterFormTest.php Asserts that there is a select element with the given ID that is required.
FilterKernelTest::assertFilteredString function core/modules/filter/tests/src/Kernel/FilterKernelTest.php Asserts multiple filter output expectations for multiple input strings.
FilterKernelTest::assertNoNormalized function core/modules/filter/tests/src/Kernel/FilterKernelTest.php Asserts that text transformed to lowercase with HTML entities decoded does not contain a given string.
FilterKernelTest::assertNormalized function core/modules/filter/tests/src/Kernel/FilterKernelTest.php Asserts that a text transformed to lowercase with HTML entities decoded does contains a given string.
FormAjaxSubscriberTest::assertResponseFromException function core/tests/Drupal/Tests/Core/Form/EventSubscriber/FormAjaxSubscriberTest.php Asserts that the expected response is derived from the given exception.
FormElementsRenderTest::assertRenderedElement function core/modules/system/tests/src/Kernel/Common/FormElementsRenderTest.php Tests that elements are rendered properly.
FormTest::assertFormValuesDefault function core/modules/system/tests/src/Functional/Form/FormTest.php Assert that the values submitted to a form matches the default values of the elements.
FormTestBase::assertFormElement function core/tests/Drupal/Tests/Core/Form/FormTestBase.php Asserts that the expected form structure is found in a form for a given key.
FrameworkTest::assertCommand function core/modules/system/tests/src/Functional/Ajax/FrameworkTest.php Asserts the array of Ajax commands contains the searched command.
FrontPageTest::assertNotInResultSet function core/modules/node/tests/src/Functional/Views/FrontPageTest.php Verifies that an amount of nids aren't in the result.
GenerateThemeTest::assertThemeExists function core/tests/Drupal/Tests/Core/Command/GenerateThemeTest.php Asserts the theme exists. Returns the parsed *.info.yml file.
GenerateThemeTest::assertThemeExists function core/tests/Drupal/BuildTests/Command/GenerateThemeTest.php Asserts the theme exists. Returns the parsed *.info.yml file.
GenericModuleTestBase::assertHookHelp function core/modules/system/tests/src/Functional/Module/GenericModuleTestBase.php Verifies hook_help() syntax.
GraphTest::assertComponents function core/tests/Drupal/Tests/Component/Graph/GraphTest.php Verify expected components in a graph.
GraphTest::assertPaths function core/tests/Drupal/Tests/Component/Graph/GraphTest.php Verify expected paths in a graph.
GraphTest::assertReversePaths function core/tests/Drupal/Tests/Component/Graph/GraphTest.php Verify expected reverse paths in a graph.
GraphTest::assertWeights function core/tests/Drupal/Tests/Component/Graph/GraphTest.php Verify expected order in a graph.
HandlerTest::assertNoDuplicateField function core/modules/views_ui/tests/src/Functional/HandlerTest.php Asserts that fields only appear once.
HelpTopicSearchTest::assertSearchResultsCount function core/modules/help/tests/src/Functional/HelpTopicSearchTest.php Asserts that help search returned the expected number of results.
HighWaterTest::assertNodeDoesNotExist function core/modules/migrate/tests/src/Kernel/HighWaterTest.php Assert that node with given title does not exist.
HighWaterTest::assertNodeExists function core/modules/migrate/tests/src/Kernel/HighWaterTest.php Assert that node with given title exists.
HtaccessTest::assertFileAccess function core/modules/system/tests/src/Functional/System/HtaccessTest.php Asserts that a file exists and requesting it returns a specific response.
HtaccessTest::assertFilePermissions function core/tests/Drupal/KernelTests/Core/File/HtaccessTest.php Asserts expected file permissions for a given file.
HtmlResponseAttachmentsTest::assertFeed function core/modules/system/tests/src/Functional/Render/HtmlResponseAttachmentsTest.php Helper function to make assertions about the presence of an RSS feed.
HtmlResponseAttachmentsTest::assertHead function core/modules/system/tests/src/Functional/Render/HtmlResponseAttachmentsTest.php Helper function to make assertions about HTML head elements.
HtmlResponseAttachmentsTest::assertTeapotHeaders function core/modules/system/tests/src/Functional/Render/HtmlResponseAttachmentsTest.php Helper function to make assertions about added HTTP headers.
HtmlTest::providerTestTransformRootRelativeUrlsToAbsoluteAssertion function core/tests/Drupal/Tests/Component/Utility/HtmlTest.php Provides test data for testTransformRootRelativeUrlsToAbsoluteAssertion().
HtmlTest::testTransformRootRelativeUrlsToAbsoluteAssertion function core/tests/Drupal/Tests/Component/Utility/HtmlTest.php @covers ::transformRootRelativeUrlsToAbsolute
@dataProvider providerTestTransformRootRelativeUrlsToAbsoluteAssertion
HtmlToTextTest::assertHtmlToText function core/modules/system/tests/src/Unit/Mail/HtmlToTextTest.php Helper function to test \Drupal\Core\Mail\MailFormatHelper::htmlToText().
ImageFormatterTest::assertCacheTags function core/modules/image/tests/src/Kernel/ImageFormatterTest.php Asserts that a renderable array has a set of cache tags.
InlineBlockTest::assertBlockRevisionCountByTitle function core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php Assert the number of block content revisions by the block title.
InlineBlockTest::assertNodeRevisionContent function core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php Assert the contents of a node revision.
InlineBlockTestBase::assertDialogClosedAndTextVisible function core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php Asserts that the dialog closes and the new text appears on the main canvas.
InlineBlockTestBase::assertSaveLayout function core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php Saves a layout and asserts the message is correct.
Inspector::assertAll function core/lib/Drupal/Component/Assertion/Inspector.php Asserts callback returns TRUE for each member of a traversable.
Inspector::assertAllArrays function core/lib/Drupal/Component/Assertion/Inspector.php Asserts that all members are arrays.
Inspector::assertAllCallable function core/lib/Drupal/Component/Assertion/Inspector.php Asserts that all members are callable.
Inspector::assertAllFloat function core/lib/Drupal/Component/Assertion/Inspector.php Asserts that all members are float values.
Inspector::assertAllHaveKey function core/lib/Drupal/Component/Assertion/Inspector.php Asserts all given keys exist in every member array.
Inspector::assertAllIntegers function core/lib/Drupal/Component/Assertion/Inspector.php Asserts that all members are integer values.
Inspector::assertAllMatch function core/lib/Drupal/Component/Assertion/Inspector.php Asserts that all members are strings that contain the specified string.
Inspector::assertAllNotEmpty function core/lib/Drupal/Component/Assertion/Inspector.php Asserts that all members are not empty.
Inspector::assertAllNumeric function core/lib/Drupal/Component/Assertion/Inspector.php Asserts all members are numeric data types or strings castable to such.
Inspector::assertAllObjects function core/lib/Drupal/Component/Assertion/Inspector.php Asserts that all members are objects.
Inspector::assertAllRegularExpressionMatch function core/lib/Drupal/Component/Assertion/Inspector.php Asserts that all members are strings matching a regular expression.
Inspector::assertAllStrictArrays function core/lib/Drupal/Component/Assertion/Inspector.php Asserts all members are strict arrays.
Inspector::assertAllStringable function core/lib/Drupal/Component/Assertion/Inspector.php Asserts all members are strings or objects with magic __toString() method.
Inspector::assertAllStrings function core/lib/Drupal/Component/Assertion/Inspector.php Asserts that all members are strings.
Inspector::assertStrictArray function core/lib/Drupal/Component/Assertion/Inspector.php Asserts that the array is strict.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.