public function JobsTest::testBucketJobNameAlter in TMGMT Translator Smartling 8.3
Same name and namespace in other branches
- 8.4 tests/src/Functional/JobsTest.php \Drupal\Tests\tmgmt_smartling\Functional\JobsTest::testBucketJobNameAlter()
Test alter job name hook.
File
- tests/
src/ Functional/ JobsTest.php, line 101
Class
- JobsTest
- Jobs tests.
Namespace
Drupal\Tests\tmgmt_smartling\FunctionalCode
public function testBucketJobNameAlter() {
$name = 'Test bucket job name';
$bucket_job_manager = Drupal::service('tmgmt_smartling.bucket_job_manager');
$reflection = new \ReflectionClass(get_class($bucket_job_manager));
$method = $reflection
->getMethod('getName');
$method
->setAccessible(true);
$job_bucket_name = $method
->invokeArgs($bucket_job_manager, []);
$this
->assertNotEqual($job_bucket_name, $name);
\Drupal::service('module_installer')
->install([
'tmgmt_smartling_test_alter_filename',
]);
$job_bucket_name = $method
->invokeArgs($bucket_job_manager, []);
$this
->assertEqual($job_bucket_name, $name);
}