public function Drupal7Test::testEntityIsDummy in Realistic Dummy Content 8.2
Same name and namespace in other branches
- 7.2 api/src/test/Framework/Drupal7Test.php \Drupal\realistic_dummy_content_api\Framework\Drupal7Test::testEntityIsDummy()
Tests Drupal7::entityIsDummy().
@dataProvider providerTestEntityIsDummy
File
- api/
src/ test/ Framework/ Drupal7Test.php, line 31
Class
Namespace
Drupal\realistic_dummy_content_api\FrameworkCode
public function testEntityIsDummy($account, $type, $expected) {
$framework = $this
->getMockBuilder('Drupal\\realistic_dummy_content_api\\Framework\\Drupal7')
->setMethods(array(
'drupalSubstr',
))
->getMock();
$framework
->method('drupalSubstr')
->will($this
->returnCallback('substr'));
$result = $framework
->entityIsDummy($account, $type);
$this
->assertTrue($result === $expected, 'Account ' . serialize($account) . ' returned ' . serialize($result) . ' (expected result is ' . $expected . ')');
}