You are here

private function Tests::setProfile in Drupal 7 to 8/9 Module Upgrader 8

Sets the test's $profile property.

Parameters

\Pharborist\Objects\ClassNode $test:

1 call to Tests::setProfile()
Tests::convertWeb in src/Plugin/DMU/Converter/Tests.php
Converts a single web test.

File

src/Plugin/DMU/Converter/Tests.php, line 176

Class

Tests
Plugin annotation @Converter( id = "tests", description = @Translation("Modifies test classes.") )

Namespace

Drupal\drupalmoduleupgrader\Plugin\DMU\Converter

Code

private function setProfile(ClassNode $test) {
  if (!$test
    ->hasProperty('profile')) {
    $test
      ->appendProperty(ClassMemberNode::create('profile', StringNode::create("'standard'"), 'protected'));
  }
}