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
AssertContentTrait::removeWhiteSpace function core/tests/Drupal/KernelTests/AssertContentTrait.php Removes all white-space between HTML tags from the raw content.
AssertContentTrait::setDrupalSettings function core/tests/Drupal/KernelTests/AssertContentTrait.php Sets the value of drupalSettings for the currently-loaded page.
AssertContentTrait::setRawContent function core/tests/Drupal/KernelTests/AssertContentTrait.php Sets the raw content (e.g. HTML).
AssertContentTrait::xpath function core/tests/Drupal/KernelTests/AssertContentTrait.php Performs an xpath search on the contents of the internal browser.
AssertContentTraitTest class core/tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php @coversDefaultClass \Drupal\KernelTests\AssertContentTrait
@group Test
AssertContentTraitTest.php file core/tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php
AssertContentTraitTest::testGetTextContent function core/tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php @covers ::getTextContent
AssertHelperTestClass class core/tests/Drupal/Tests/AssertHelperTraitTest.php
AssertHelperTestClass::testMethod function core/tests/Drupal/Tests/AssertHelperTraitTest.php
AssertHelperTrait trait core/tests/Drupal/Tests/AssertHelperTrait.php Provides helper methods for assertions.
AssertHelperTrait trait core/modules/simpletest/src/AssertHelperTrait.php Provides helper methods for assertions.
AssertHelperTrait.php file core/modules/simpletest/src/AssertHelperTrait.php
AssertHelperTrait.php file core/tests/Drupal/Tests/AssertHelperTrait.php
AssertHelperTrait::castSafeStrings function core/tests/Drupal/Tests/AssertHelperTrait.php Casts MarkupInterface objects into strings.
AssertHelperTraitTest class core/tests/Drupal/Tests/AssertHelperTraitTest.php @coversDefaultClass \Drupal\Tests\AssertHelperTrait
@group simpletest
@group Tests
AssertHelperTraitTest.php file core/tests/Drupal/Tests/AssertHelperTraitTest.php
AssertHelperTraitTest::providerCastSafeStrings function core/tests/Drupal/Tests/AssertHelperTraitTest.php
AssertHelperTraitTest::testCastSafeStrings function core/tests/Drupal/Tests/AssertHelperTraitTest.php @covers ::castSafeStrings
@dataProvider providerCastSafeStrings
AssertLegacyTrait trait core/tests/Drupal/KernelTests/AssertLegacyTrait.php Translates Simpletest assertion methods to PHPUnit.
AssertLegacyTrait trait core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php Provides convenience methods for assertions in browser tests.
AssertLegacyTrait.php file core/tests/Drupal/KernelTests/AssertLegacyTrait.php
AssertLegacyTrait.php file core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php
AssertLegacyTrait::assert function core/tests/Drupal/KernelTests/AssertLegacyTrait.php
AssertLegacyTrait::assertCacheTag function core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php Asserts whether an expected cache tag was present in the last response.
AssertLegacyTrait::assertElementNotPresent function core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php Asserts that the element with the given CSS selector is not present.
AssertLegacyTrait::assertElementPresent function core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php Asserts that the element with the given CSS selector is present.
AssertLegacyTrait::assertEqual function core/tests/Drupal/KernelTests/AssertLegacyTrait.php
AssertLegacyTrait::assertEscaped function core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php Passes if the raw text IS found escaped on the loaded page, fail otherwise.
AssertLegacyTrait::assertField function core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php Asserts that a field exists with the given name or ID.
AssertLegacyTrait::assertFieldById function core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php Asserts that a field exists with the given ID and value.
AssertLegacyTrait::assertFieldByName function core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php Asserts that a field exists with the given name and value.
AssertLegacyTrait::assertFieldByXPath function core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php Asserts that a field exists in the current page by the given XPath.
AssertLegacyTrait::assertFieldChecked function core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php Asserts that a checkbox field in the current page is checked.
AssertLegacyTrait::assertFieldsByValue function core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php Asserts that a field exists in the current page with a given Xpath result.
AssertLegacyTrait::assertHeader function core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php Checks that current response header equals value.
AssertLegacyTrait::assertIdentical function core/tests/Drupal/KernelTests/AssertLegacyTrait.php
AssertLegacyTrait::assertIdenticalObject function core/tests/Drupal/KernelTests/AssertLegacyTrait.php
AssertLegacyTrait::assertLink function core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php Passes if a link with the specified label is found.
AssertLegacyTrait::assertLinkByHref function core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php Passes if a link containing a given href (part) is found.
AssertLegacyTrait::assertNoCacheTag function core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php Asserts whether an expected cache tag was absent in the last response.
AssertLegacyTrait::assertNoEscaped function core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php Passes if the raw text is not found escaped on the loaded page.
AssertLegacyTrait::assertNoField function core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php Asserts that a field does NOT exist with the given name or ID.
AssertLegacyTrait::assertNoFieldById function core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php Asserts that a field does not exist with the given ID and value.
AssertLegacyTrait::assertNoFieldByName function core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php Asserts that a field does not exist with the given name and value.
AssertLegacyTrait::assertNoFieldByXPath function core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php Asserts that a field does not exist or its value does not match, by XPath.
AssertLegacyTrait::assertNoFieldChecked function core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php Asserts that a checkbox field in the current page is not checked.
AssertLegacyTrait::assertNoLink function core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php Passes if a link with the specified label is not found.
AssertLegacyTrait::assertNoLinkByHref function core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php Passes if a link containing a given href (part) is not found.
AssertLegacyTrait::assertNoOption function core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php Asserts that a select option does NOT exist in the current page.
AssertLegacyTrait::assertNoPattern function core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php Triggers a pass if the Perl regex pattern is not found in the raw content.

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