You are here

public function RadioactivityFunctionTestTrait::assertPageEnergyValue in Radioactivity 8.3

Same name and namespace in other branches
  1. 4.0.x tests/src/Traits/RadioactivityFunctionTestTrait.php \Drupal\Tests\radioactivity\Traits\RadioactivityFunctionTestTrait::assertPageEnergyValue()

Assert the energy values from the page.

Parameters

string $fieldName: The field to be asserted.

array|string|int $expectedValues: The expected field values.

string $operator: The operator to be used to compare. Allowed values: '>', '>=', '<', '<=', '=='. The actual value on the left, the expected on the right.

string $message: The assertion message.

1 call to RadioactivityFunctionTestTrait::assertPageEnergyValue()
EmitTest::testCount in tests/src/FunctionalJavascript/EmitTest.php
Tests Radioactivity count functionality.

File

tests/src/Traits/RadioactivityFunctionTestTrait.php, line 332

Class

RadioactivityFunctionTestTrait
Radioactivity functional test trait.

Namespace

Drupal\Tests\radioactivity\Traits

Code

public function assertPageEnergyValue($fieldName, $expectedValues, $operator = '==', $message = '') {
  $expectedValues = is_array($expectedValues) ? $expectedValues : [
    $expectedValues,
  ];
  $actualValues = $this
    ->getPageEnergyValues($fieldName);
  $this
    ->assertEnergyValues($fieldName, $actualValues, $expectedValues, $operator, $message);
}