Skip to content
Snippets Groups Projects
Commit d671f38a authored by catch's avatar catch
Browse files

Issue #3433052 by mondrake: Fix remaining return*() methods of class...

Issue #3433052 by mondrake: Fix remaining return*() methods of class PHPUnit\Framework\TestCase deprecated in PHPUnit 10
parent 1f582eb2
No related branches found
No related tags found
29 merge requests!11131[10.4.x-only-DO-NOT-MERGE]: Issue ##2842525 Ajax attached to Views exposed filter form does not trigger callbacks,!9470[10.3.x-only-DO-NOT-MERGE]: #3331771 Fix file_get_contents(): Passing null to parameter,!8540Issue #3457061: Bootstrap Modal dialog Not closing after 10.3.0 Update,!8528Issue #3456871 by Tim Bozeman: Support NULL services,!8373Issue #3427374 by danflanagan8, Vighneshh: taxonomy_tid ViewsArgumentDefault...,!7526Expose roles in response,!7352Draft: Resolve #3203489 "Set filename as",!3878Removed unused condition head title for views,!3818Issue #2140179: $entity->original gets stale between updates,!3742Issue #3328429: Create item list field formatter for displaying ordered and unordered lists,!3731Claro: role=button on status report items,!3651Issue #3347736: Create new SDC component for Olivero (header-search),!3531Issue #3336994: StringFormatter always displays links to entity even if the user in context does not have access,!3355Issue #3209129: Scrolling problems when adding a block via layout builder,!3154Fixes #2987987 - CSRF token validation broken on routes with optional parameters.,!3133core/modules/system/css/components/hidden.module.css,!2964Issue #2865710 : Dependencies from only one instance of a widget are used in display modes,!2812Issue #3312049: [Followup] Fix Drupal.Commenting.FunctionComment.MissingReturnType returns for NULL,!2794Issue #3100732: Allow specifying `meta` data on JSON:API objects,!2378Issue #2875033: Optimize joins and table selection in SQL entity query implementation,!2062Issue #3246454: Add weekly granularity to views date sort,!1105Issue #3025039: New non translatable field on translatable content throws error,!1073issue #3191727: Focus states on mobile second level navigation items fixed,!10223132456: Fix issue where views instances are emptied before an ajax request is complete,!877Issue #2708101: Default value for link text is not saved,!617Issue #3043725: Provide a Entity Handler for user cancelation,!579Issue #2230909: Simple decimals fail to pass validation,!560Move callback classRemove outside of the loop,!555Issue #3202493
Pipeline #127240 canceled
Pipeline: drupal

#127241

    ......@@ -57,17 +57,17 @@ protected function setUp(): void {
    $language_de = $this->createMock(LanguageInterface::class);
    $language_de->expects($this->any())
    ->method('getId')
    ->will($this->returnValue('de'));
    ->willReturn('de');
    $language_de->expects($this->any())
    ->method('getName')
    ->will($this->returnValue('German'));
    ->willReturn('German');
    $language_en = $this->createMock(LanguageInterface::class);
    $language_en->expects($this->any())
    ->method('getId')
    ->will($this->returnValue('en'));
    ->willReturn('en');
    $language_en->expects($this->any())
    ->method('getName')
    ->will($this->returnValue('English'));
    ->willReturn('English');
    $this->languages = [
    'de' => $language_de,
    'en' => $language_en,
    ......@@ -76,10 +76,10 @@ protected function setUp(): void {
    $language_manager = $this->createMock(ConfigurableLanguageManagerInterface::class);
    $language_manager->expects($this->any())
    ->method('getLanguages')
    ->will($this->returnValue($this->languages));
    ->willReturn($this->languages);
    $language_manager->expects($this->any())
    ->method('getNativeLanguages')
    ->will($this->returnValue($this->languages));
    ->willReturn($this->languages);
    $this->languageManager = $language_manager;
    $container = new ContainerBuilder();
    ......@@ -167,10 +167,10 @@ public function testProcessOutbound() {
    ['hasLowerLanguageNegotiationWeight', 'meetsContentEntityRoutesCondition', 'getLangcode']);
    $languageNegotiationContentEntityMock->expects($this->any())
    ->method('hasLowerLanguageNegotiationWeight')
    ->will($this->returnValue(TRUE));
    ->willReturn(TRUE);
    $languageNegotiationContentEntityMock->expects($this->any())
    ->method('meetsContentEntityRoutesCondition')
    ->will($this->returnValue(TRUE));
    ->willReturn(TRUE);
    $languageNegotiationContentEntityMock->expects($this->exactly(2))
    ->method('getLangcode')
    ->willReturnOnConsecutiveCalls(
    ......
    ......@@ -49,7 +49,7 @@ public function testFormatterLinkItemUrlMalformed() {
    $fieldTypePluginManager = $this->createMock(FieldTypePluginManagerInterface::class);
    $fieldTypePluginManager->expects($this->once())
    ->method('createFieldItem')
    ->will($this->returnValue($linkItem));
    ->willReturn($linkItem);
    $urlGenerator = $this->createMock(UrlGenerator::class);
    $urlGenerator->expects($this->once())
    ->method('generateFromRoute')
    ......@@ -91,7 +91,7 @@ public function testFormatterLinkItemUrlUnexpectedException() {
    $fieldTypePluginManager = $this->createMock(FieldTypePluginManagerInterface::class);
    $fieldTypePluginManager->expects($this->once())
    ->method('createFieldItem')
    ->will($this->returnValue($linkItem));
    ->willReturn($linkItem);
    $container = new ContainerBuilder();
    $container->set('plugin.manager.field.field_type', $fieldTypePluginManager);
    \Drupal::setContainer($container);
    ......@@ -128,7 +128,7 @@ public function testFormatterLinkItem() {
    $fieldTypePluginManager = $this->createMock(FieldTypePluginManagerInterface::class);
    $fieldTypePluginManager->expects($this->once())
    ->method('createFieldItem')
    ->will($this->returnValue($linkItem));
    ->willReturn($linkItem);
    $urlGenerator = $this->createMock(UrlGenerator::class);
    $urlGenerator->expects($this->once())
    ->method('generateFromRoute')
    ......
    ......@@ -54,7 +54,7 @@ protected function setUp(): void {
    ->expects($this->once())
    ->method('hasLinkTemplate')
    ->with('version-history')
    ->will($this->returnValue(TRUE));
    ->willReturn(TRUE);
    $entityTypeManager = $this->createMock(EntityTypeManagerInterface::class);
    $entityTypeManager->expects($this->any())
    ->method('getDefinitions')
    ......
    ......@@ -114,10 +114,10 @@ public function testUpdateEmail($notification_threshold, $params, $authorized, a
    $this->configFactory
    ->expects($this->exactly(2))
    ->method('get')
    ->will($this->returnValueMap([
    ->willReturnMap([
    ['system.site', $config_site_name],
    ['update.settings', $config_notification],
    ]));
    ]);
    // The calls to generateFromRoute differ if authorized.
    $count = 2;
    ......@@ -133,11 +133,11 @@ public function testUpdateEmail($notification_threshold, $params, $authorized, a
    $this->urlGenerator
    ->expects($this->exactly($count))
    ->method('generateFromRoute')
    ->will($this->returnValueMap([
    ->willReturnMap([
    ['update.status', [], ['absolute' => TRUE, 'language' => $langcode], FALSE, $update_settings_url],
    ['update.settings', [], ['absolute' => TRUE], FALSE, $available_updates_url],
    ['update.report_update', [], ['absolute' => TRUE, 'language' => $langcode], FALSE, $available_updates_url],
    ]));
    ]);
    // Set the container.
    $this->container->set('language_manager', $this->languageManager);
    ......
    ......@@ -74,7 +74,7 @@ public function testQuery() {
    ]);
    $this->view->expects($this->any())
    ->method('getRequest')
    ->will($this->returnValue($request));
    ->willReturn($request);
    $options = [];
    $this->pager->init($this->view, $this->display, $options);
    ......
    ......@@ -56,13 +56,13 @@ public function testDifferentServices() {
    $container->expects($this->exactly(2))
    ->method('get')
    ->will(
    $this->returnCallback(function ($service) use ($testFastCacheFactory, $testConsistentCacheFactory) {
    ->willReturnCallback(
    function ($service) use ($testFastCacheFactory, $testConsistentCacheFactory) {
    return match ($service) {
    'cache.backend.test_consistent' => $testConsistentCacheFactory,
    'cache.backend.test_fast' => $testFastCacheFactory,
    };
    })
    }
    );
    // The same bin should be retrieved from both backends.
    ......
    ......@@ -51,10 +51,10 @@ protected function setUp(): void {
    $this->sourceStorage->expects($this->atLeastOnce())
    ->method('getCollectionName')
    ->will($this->returnValue(StorageInterface::DEFAULT_COLLECTION));
    ->willReturn(StorageInterface::DEFAULT_COLLECTION);
    $this->targetStorage->expects($this->atLeastOnce())
    ->method('getCollectionName')
    ->will($this->returnValue(StorageInterface::DEFAULT_COLLECTION));
    ->willReturn(StorageInterface::DEFAULT_COLLECTION);
    $this->storageComparer = new StorageComparer($this->sourceStorage, $this->targetStorage);
    }
    ......
    ......@@ -36,10 +36,10 @@ protected function setUp(): void {
    $language = new Language(['langcode' => 'en']);
    $this->languageManager->expects($this->any())
    ->method('getDefaultLanguage')
    ->will($this->returnValue($language));
    ->willReturn($language);
    $this->languageManager->expects($this->any())
    ->method('getCurrentLanguage')
    ->will($this->returnValue($language));
    ->willReturn($language);
    $container->set('language_manager', $this->languageManager);
    \Drupal::setContainer($container);
    ......
    • catch @catch

      mentioned in commit a65d1f9d

      ·

      mentioned in commit a65d1f9d

      Toggle commit list
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment