From f1dadb5da7ae572deff830f19b3cf7c9cf558ce1 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Fri, 26 Nov 2021 17:26:07 +0100 Subject: [PATCH] Update amp-wp integration tests --- includes/AMP/Optimization.php | 2 +- scoper.inc.php | 1 + tests/phpunit/integration/tests/AMP/Optimization.php | 4 ++++ tests/phpunit/integration/tests/AMP/Sanitization.php | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/includes/AMP/Optimization.php b/includes/AMP/Optimization.php index b600bd37f290..f91faa53f14b 100644 --- a/includes/AMP/Optimization.php +++ b/includes/AMP/Optimization.php @@ -118,7 +118,7 @@ private function get_optimizer() { * @since 1.1.0 * * @see AmpWPConfiguration::apply_filters() - * @link https://github.com/ampproject/amp-wp/blob/51266bf237184eae06e0d972cf423fa7bef61648/src/Optimizer/AmpWPConfiguration.php#L33-L99 + * @link https://github.com/ampproject/amp-wp/blob/5405daa38e65f0ec16ffc920014d0110b03ee773/src/Optimizer/AmpWPConfiguration.php#L43-L78 * * @return Configuration Optimizer configuration to use. */ diff --git a/scoper.inc.php b/scoper.inc.php index 653412462e6e..8f0572fbeab5 100644 --- a/scoper.inc.php +++ b/scoper.inc.php @@ -93,6 +93,7 @@ 'vendor/ampproject/amp-wp/includes/sanitizers/class-amp-tag-and-attribute-sanitizer.php', 'vendor/ampproject/amp-wp/includes/sanitizers/trait-amp-noscript-fallback.php', 'vendor/ampproject/amp-wp/includes/templates/class-amp-content-sanitizer.php', + 'vendor/ampproject/amp-wp/src/ValidationExemption.php', ] ) ->append( [ 'vendor/ampproject/amp-wp/composer.json' ] ), diff --git a/tests/phpunit/integration/tests/AMP/Optimization.php b/tests/phpunit/integration/tests/AMP/Optimization.php index a3ef79435550..1552deeeb823 100644 --- a/tests/phpunit/integration/tests/AMP/Optimization.php +++ b/tests/phpunit/integration/tests/AMP/Optimization.php @@ -22,6 +22,8 @@ use Google\Web_Stories_Dependencies\AmpProject\Optimizer\Transformer\AmpBoilerplate; use Google\Web_Stories_Dependencies\AmpProject\Optimizer\Transformer\AmpBoilerplateErrorHandler; use Google\Web_Stories_Dependencies\AmpProject\Optimizer\Transformer\AmpRuntimePreloads; +use Google\Web_Stories_Dependencies\AmpProject\Optimizer\Transformer\MinifyHtml; +use Google\Web_Stories_Dependencies\AmpProject\Optimizer\Transformer\OptimizeViewport; use Google\Web_Stories_Dependencies\AmpProject\Optimizer\Transformer\ReorderHead; use Google\Web_Stories_Dependencies\AmpProject\Optimizer\Transformer\GoogleFontsPreconnect; use Google\Web_Stories\Tests\Integration\TestCase; @@ -101,6 +103,8 @@ public function test_get_optimizer_configuration_no_ssr() { AmpRuntimePreloads::class, AmpBoilerplateErrorHandler::class, GoogleFontsPreconnect::class, + MinifyHtml::class, + OptimizeViewport::class, ReorderHead::class, ]; diff --git a/tests/phpunit/integration/tests/AMP/Sanitization.php b/tests/phpunit/integration/tests/AMP/Sanitization.php index b3d30321717e..00bf499ec3a5 100644 --- a/tests/phpunit/integration/tests/AMP/Sanitization.php +++ b/tests/phpunit/integration/tests/AMP/Sanitization.php @@ -355,6 +355,7 @@ public function test_get_extension_sources() { 'amp-story-interactive' => 'v0/amp-story-interactive-0.1.js', 'amp-story-panning-media' => 'v0/amp-story-panning-media-0.1.js', 'amp-story-player' => 'v0/amp-story-player-0.1.js', + 'amp-story-shopping' => 'v0/amp-story-shopping-0.1.js', 'amp-stream-gallery' => 'v0/amp-stream-gallery-0.1.js', 'amp-subscriptions' => 'v0/amp-subscriptions-0.1.js', 'amp-subscriptions-google' => 'v0/amp-subscriptions-google-0.1.js',