Verified Commit 4f56fe89 authored by Project Update Bot's avatar Project Update Bot Committed by Lee Rowlands
Browse files

Issue #3289138 by Project Update Bot: Automated Drupal 10 compatibility fixes

parent 0ca108eb
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@

namespace Drupal\Tests\preview_site_s3\Kernel;

use Prophecy\PhpUnit\ProphecyTrait;
use Aws\S3\S3Client;
use Drupal\entity_test\Entity\EntityTest;
use Drupal\preview_site\Entity\PreviewSiteBuild;
@@ -19,6 +20,7 @@ use Prophecy\Argument;
 */
class S3DeployPluginTest extends PreviewSiteKernelTestBase {

  use ProphecyTrait;
  /**
   * {@inheritdoc}
   */
+1 −1
Original line number Diff line number Diff line
@@ -94,7 +94,7 @@ class PublicFiles extends DeployPluginBase {
    $destination = sprintf('public://%s', trim($this->token->replace($this->configuration['naming'], [
      'preview_site_build' => $build,
    ], ['clean' => TRUE]), '/'));
    return file_create_url($destination);
    return \Drupal::service('file_url_generator')->generateAbsoluteString($destination);
  }

  /**
+1 −1
Original line number Diff line number Diff line
@@ -165,7 +165,7 @@ class PreviewSiteBuildDeployFormTest extends BrowserTestBase {
    $node_static_file = $this->getGeneratedFileForEntity($node, $build);
    $this->assertTrue(file_exists($node_static_file));

    $path = file_create_url($node_static_file);
    $path = \Drupal::service('file_url_generator')->generateAbsoluteString($node_static_file);
    $this->drupalGet($path);
    $assert->statusCodeEquals(200);
    $assert->pageTextContains($draft_text);
+2 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@

namespace Drupal\Tests\preview_site\Kernel;

use Prophecy\PhpUnit\ProphecyTrait;
use Drupal\Component\Datetime\TimeInterface;
use Drupal\Core\Url;
use Drupal\datetime\Plugin\Field\FieldType\DateTimeItemInterface;
@@ -30,6 +31,7 @@ use Drupal\Tests\taxonomy\Traits\TaxonomyTestTrait;
 */
class PreviewSiteBuildEntityTest extends PreviewSiteKernelTestBase {

  use ProphecyTrait;
  use TaxonomyTestTrait;

  /**
+1 −1
Original line number Diff line number Diff line
@@ -102,7 +102,7 @@ class PublicFilesDeployPluginTest extends PreviewSiteKernelTestBase {
    $build->{$operation}();
    foreach ($build->get('artifacts') as $item) {
      $file = $item->entity;
      $this->assertFileNotExists(sprintf('public://preview-site/%s/%s', $build->uuid(), FileHelper::getFilePathWithoutSchema($file, $build)));
      $this->assertFileDoesNotExist(sprintf('public://preview-site/%s/%s', $build->uuid(), FileHelper::getFilePathWithoutSchema($file, $build)));
    }
  }

Loading