$tests['module_and_project_names'
] =
['drupal:views', 'views', 'drupal', ''
];
$tests['module_and_constraint'
] =
['views (<8.x-3.1)', 'views', '', '<8.x-3.1'
];
$tests['module_and_project_names_and_constraint'
] =
['drupal:views (>8.x-1.1)', 'views', 'drupal', '>8.x-1.1'
];
return $tests;
} /**
* @covers ::isCompatible
*/
public function testIsCompatible() { $dependency =
new Dependency('paragraphs_demo', 'paragraphs', '>8.x-1.1'
);
$this->
assertFalse($dependency->
isCompatible('1.1'
));
$this->
assertTrue($dependency->
isCompatible('1.2'
));
} /**
* Ensures that constraint objects are not serialized.
*
* @covers ::__sleep
*/
public function testSerialization() { $dependency =
new Dependency('paragraphs_demo', 'paragraphs', '>8.x-1.1'
);
$this->
assertTrue($dependency->
isCompatible('1.2'
));