You are here

public function WebformElementHelperTest::testHasProperty in Webform 6.x

Same name and namespace in other branches
  1. 8.5 tests/src/Unit/Utility/WebformElementHelperTest.php \Drupal\Tests\webform\Unit\Utility\WebformElementHelperTest::testHasProperty()

Tests WebformElementHelper::hasProperty().

@dataProvider providerHasProperty

Parameters

array $arguments: The array of arguments to run through hasProperty().

bool $expected: The expected result from calling the function.

See also

WebformElementHelper::HasProperty()

File

tests/src/Unit/Utility/WebformElementHelperTest.php, line 224

Class

WebformElementHelperTest
Tests webform element utility.

Namespace

Drupal\Tests\webform\Unit\Utility

Code

public function testHasProperty(array $arguments, $expected) {
  $result = WebformElementHelper::hasProperty($arguments[0], $arguments[1], $arguments[2]);
  $this
    ->assertEquals($expected, $result);
}