public function Tests::move in Drupal 7 to 8/9 Module Upgrader 8
2 calls to Tests::move()
- Tests::convertAjax in src/
Plugin/ DMU/ Converter/ Tests.php - Converts a single Ajax test.
- Tests::convertWeb in src/
Plugin/ DMU/ Converter/ Tests.php - Converts a single web test.
File
- src/
Plugin/ DMU/ Converter/ Tests.php, line 182
Class
- Tests
- Plugin annotation @Converter( id = "tests", description = @Translation("Modifies test classes.") )
Namespace
Drupal\drupalmoduleupgrader\Plugin\DMU\ConverterCode
public function move(ClassNode $test) {
$ns = 'Drupal\\' . $this->target
->id() . '\\Tests';
RootNode::create($ns)
->getNamespace($ns)
->append($test
->remove());
WhitespaceNode::create("\n\n")
->insertBefore($test);
$this
->writeClass($this->target, $test);
}