Search for assert

  1. Search 7.x for assert
  2. Search 9.5.x for assert
  3. Search 10.3.x for assert
  4. Search 11.x for assert
  5. Other projects
Title Object type File name Summary
RESTTestBase::assertResponse function core/modules/rest/src/Tests/RESTTestBase.php Asserts the page responds with the specified response code.
RESTTestBase::assertResponseBody function core/modules/rest/src/Tests/RESTTestBase.php Check to see if the HTTP request response body is identical to the expected
value.
RevisionableContentEntityBaseTest::assertItemsTableCount function core/tests/Drupal/KernelTests/Core/Entity/RevisionableContentEntityBaseTest.php Asserts the amount of items on entity related tables.
RowEntityRenderersTest::assertTranslations function core/modules/views/tests/src/Kernel/Entity/RowEntityRenderersTest.php Checks that the view results match the expected values.
ScaffoldTest::assertAutoloadFileCorrect function core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ScaffoldTest.php Assert that the autoload file was scaffolded and contains correct path.
ScaffoldTest::assertCommonDrupalAssetsWereScaffolded function core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ScaffoldTest.php Asserts that the scaffold files from drupal/assets are placed as expected.
ScaffoldTest::assertDefaultSettingsFromScaffoldOverride function core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ScaffoldTest.php Asserts that the default settings file was overridden by the test.
ScaffoldTest::assertHtaccessExcluded function core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ScaffoldTest.php Asserts that the .htaccess file was excluded by the test.
SchemaCheckTestTrait::assertConfigSchema function core/tests/Drupal/Tests/SchemaCheckTestTrait.php Asserts the TypedConfigManager has a valid schema for the configuration.
SchemaCheckTestTrait::assertConfigSchemaByName function core/tests/Drupal/Tests/SchemaCheckTestTrait.php Asserts configuration, specified by name, has a valid schema.
SchemaIntrospectionTestTrait::assertIndexOnColumns function core/tests/Drupal/Tests/Core/Database/SchemaIntrospectionTestTrait.php Checks that an index covering exactly the given column names exists.
SchemaIntrospectionTestTrait::assertNoIndexOnColumns function core/tests/Drupal/Tests/Core/Database/SchemaIntrospectionTestTrait.php Checks that an index covering exactly the given column names doesn't exist.
SchemaTest::assertFieldAdditionRemoval function core/tests/Drupal/KernelTests/Core/Database/SchemaTest.php Asserts that a given field can be added and removed from a table.
SchemaTest::assertFieldChange function core/tests/Drupal/KernelTests/Core/Database/SchemaTest.php Asserts that a field can be changed from one spec to another.
SchemaTest::assertFieldCharacteristics function core/tests/Drupal/KernelTests/Core/Database/SchemaTest.php Asserts that a newly added field has the correct characteristics.
SearchCommentTest::assertCommentAccess function core/modules/search/tests/src/Functional/SearchCommentTest.php Update search index and search for comment.
SearchConfigSettingsFormTest::assertDefaultSearch function core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php Checks that the default search page matches expectations.
SearchIntegrationTest::assertOneLink function core/modules/views/tests/src/Functional/SearchIntegrationTest.php Asserts that exactly one link exists with the given text.
SearchMultilingualEntityTest::assertDatabaseCounts function core/modules/search/tests/src/Functional/SearchMultilingualEntityTest.php Checks actual database counts of items in the search index.
SearchMultilingualEntityTest::assertIndexCounts function core/modules/search/tests/src/Functional/SearchMultilingualEntityTest.php Verifies the indexing status counts.
SectionStorageTestBase::assertSections function core/modules/layout_builder/tests/src/Kernel/SectionStorageTestBase.php Asserts that the field list has the expected sections.
SectionTest::assertComponents function core/modules/layout_builder/tests/src/Unit/SectionTest.php Asserts that the section has the expected components.
SelectionTest::assertResults function core/modules/field/tests/src/Kernel/EntityReference/Views/SelectionTest.php Confirm the expected results are returned.
SessionAuthenticationTest::assertSessionData function core/modules/system/tests/src/Functional/Session/SessionAuthenticationTest.php Checks the session data returned by the session test routes.
SessionExistsCacheContextTest::assertSessionCookieOnClient function core/modules/system/tests/src/Functional/Cache/SessionExistsCacheContextTest.php Asserts whether a session cookie is present on the client or not.
SessionHttpsTest::assertSessionIds function core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php Test that there exists a session with two specific session IDs.
SessionTest::assertSessionCookie function core/modules/system/tests/src/Functional/Session/SessionTest.php Assert whether the SimpleTest browser sent a session cookie.
SessionTest::assertSessionEmpty function core/modules/system/tests/src/Functional/Session/SessionTest.php Assert whether $_SESSION is empty at the beginning of the request.
SettingsTrayTestBase::assertEditModeDisabled function core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayTestBase.php Assert that edit mode has been properly disabled.
SettingsTrayTestBase::assertEditModeEnabled function core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayTestBase.php Assert that edit mode has been properly enabled.
SettingsTrayTestBase::assertOffCanvasBlockFormIsValid function core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayTestBase.php Asserts that Off-Canvas block form is valid.
ShortcutLinksTest::assertShortcutQuickLink function core/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php Passes if a shortcut quick link with the specified label is found.
SimpleTestErrorCollectorTest::assertError function core/modules/simpletest/src/Tests/SimpleTestErrorCollectorTest.php Asserts that a collected error matches what we are expecting.
SimpleTestTest::assertAssertion function core/modules/simpletest/src/Tests/SimpleTestTest.php Asserts that an assertion with specified values is displayed in results.
SimpleTestTest::assertNothing function core/modules/simpletest/src/Tests/SimpleTestTest.php Assert nothing.
simpletest_insert_assert function core/modules/simpletest/simpletest.module Store an assertion from outside the testing context.
SortArrayTest::assertBothNegativePositiveOrZero function core/tests/Drupal/Tests/Component/Utility/SortArrayTest.php Asserts that numbers are either both negative, both positive or both zero.
StandardJavascriptTest::assertBigPipePlaceholderReplacementCount function core/profiles/standard/tests/src/FunctionalJavascript/StandardJavascriptTest.php Asserts the number of BigPipe placeholders that are replaced on the page.
StandardProfileTest::assertRdfaArticleProperties function core/modules/rdf/tests/src/Functional/StandardProfileTest.php Tests output for article properties displayed in both view modes.
StandardProfileTest::assertRdfaCommonNodeProperties function core/modules/rdf/tests/src/Functional/StandardProfileTest.php Tests output for properties held in common between articles and pages.
StandardProfileTest::assertRdfaNodeCommentProperties function core/modules/rdf/tests/src/Functional/StandardProfileTest.php Tests output for comment properties on nodes in full page view mode.
StyleGridTest::assertGrid function core/modules/views/tests/src/Kernel/Plugin/StyleGridTest.php Generates a grid and asserts that it is displaying correctly.
TableDragTest::assertDraggableTable function core/tests/Drupal/FunctionalJavascriptTests/TableDrag/TableDragTest.php Asserts the whole structure of the draggable test table.
TableDragTest::assertOrder function core/tests/Drupal/FunctionalJavascriptTests/TableDrag/TableDragTest.php Asserts that several pieces of markup are in a given order in the page.
TableDragTest::assertTableRow function core/tests/Drupal/FunctionalJavascriptTests/TableDrag/TableDragTest.php Asserts the values of a draggable row.
TagsTest::assertTags function core/tests/Drupal/Tests/Core/Common/TagsTest.php Helper function: asserts that the ending array of tags is what we wanted.
TaxonomyFieldFilterTest::assertPageCounts function core/modules/taxonomy/tests/src/Functional/Views/TaxonomyFieldFilterTest.php Asserts that the given taxonomy translation counts are correct.
TaxonomyQueryAlterTest::assertQueryTagTestResult function core/modules/taxonomy/tests/src/Kernel/TaxonomyQueryAlterTest.php Verifies invocation of the hooks in the test module.
TaxonomyTermFilterDepthTest::assertTermWithDepthResult function core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermFilterDepthTest.php Changes the tid filter to given term and depth.
TaxonomyTermUpdatePathTest::assertTermName function core/modules/taxonomy/tests/src/Functional/Update/TaxonomyTermUpdatePathTest.php Assert that a term name matches the expectation.

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