@@ -33,9 +33,8 @@ public static function getInfo() {
* Tests that services provided by module service providers get registered to the DIC.
*/
functiontestServiceProviderRegistration(){
$container=\Drupal::getContainer();
$this->assertTrue($container->getDefinition('file.usage')->getClass()=='Drupal\\service_provider_test\\TestFileUsage','Class has been changed');
$this->assertTrue($container->has('service_provider_test_class'),'The service_provider_test_class service has been registered to the DIC');
$this->assertTrue(\Drupal::getContainer()->getDefinition('file.usage')->getClass()=='Drupal\\service_provider_test\\TestFileUsage','Class has been changed');
$this->assertTrue(\Drupal::hasService('service_provider_test_class'),'The service_provider_test_class service has been registered to the DIC');
// The event subscriber method in the test class calls drupal_set_message with
// a message saying it has fired. This will fire on every page request so it
// should show up on the front page.
...
...
@@ -49,11 +48,11 @@ function testServiceProviderRegistration() {
functiontestServiceProviderRegistrationDynamic(){
// Uninstall the module and ensure the service provider's service is not registered.