PluginProbe ʕ •ᴥ•ʔ
Reviews Feed – Add Testimonials and Customer Reviews From Google Reviews, Yelp, TripAdvisor, and More / 2.11.0
Reviews Feed – Add Testimonials and Customer Reviews From Google Reviews, Yelp, TripAdvisor, and More v2.11.0
2.11.0 2.10.0 2.9.0 2.8.0 2.7.0 2.6.7 2.6.8 2.6.5 2.6.4 2.6.3 2.6.2 2.6.0 2.5.5 2.5.4 2.5.3 2.5.2 trunk 1.0 1.0.1 1.0.2 1.0.3 1.1 1.1.1 1.1.2 1.2.0 2.0 2.1.0 2.1.1 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.5.0 2.5.1
reviews-feed / tests / Unit / ReconcileRemovalTest.php
reviews-feed / tests / Unit Last commit date
Doubles 1 week ago Providers 1 week ago BulkRearmOnGrowthTest.php 1 week ago BulkReviewsUpdateStuckStateTest.php 1 week ago ClearCacheRelayResetTest.php 1 week ago DeleteSourceRelayFailureTest.php 1 week ago ErrorHandlerFalsyOptionTest.php 1 week ago FeedCacheUpdateServiceTest.php 1 week ago FeedMalformedPayloadTest.php 1 week ago ForceKeylessRefetchTest.php 1 week ago LicenseDeactivateStaleStateTest.php 1 week ago MediaFinderMemoTest.php 1 week ago MultiSourceAggregationTest.php 1 week ago ReconcileMigratedLicenseRoutineTest.php 1 week ago ReconcileRemovalTest.php 1 week ago RegisterWebsiteRoutineTest.php 1 week ago RelaySlowEndpointsTest.php 1 week ago RemoteRequestMemoTest.php 1 week ago ReviewAlertHeaderTotalsTest.php 1 week ago ReviewAlertPageTargetingTest.php 1 week ago ReviewAlertStarFillTest.php 1 week ago ShortcodeNeutralizationTest.php 1 week ago SiteMigrationRecoveryTest.php 1 week ago Smash1130UsageTrackingHardeningTest.php 1 week ago Smash1130UsageTrackingHooksTest.php 1 week ago Smash1583HeaderParityTest.php 1 week ago Smash1631MultiLanguageBulkTest.php 1 week ago Smash1631UpdateSingleLangScopeTest.php 1 week ago Smash1706TripAdvisorPlaceIdTest.php 1 week ago Smash1756SchemaServiceTest.php 1 week ago Smash1785AvatarLocalUrlGuardTest.php 1 week ago Smash1785AvatarReHealTest.php 1 week ago Smash1795ReviewTextXssTest.php 1 week ago Smash1835TripAdvisorKeyShapeTest.php 1 week ago Smash1973WordpressOrgPlaceIdNullTest.php 1 week ago Smash1987NestedSourceErrorShapeTest.php 1 week ago Smash782BookingHeaderRatingTest.php 1 week ago Smash782CountryFlagEmojiTest.php 1 week ago Smash782ExternalRefreshCronTest.php 1 week ago Smash782ExtrasTemplateTest.php 1 week ago Smash782ReviewAlertProviderDataTest.php 1 week ago SourceIdLookupTest.php 1 week ago WpmlGetCurrentLanguageTest.php 1 week ago WpmlLanguageMappingTest.php 1 week ago
ReconcileRemovalTest.php
60 lines
1 <?php
2
3 namespace SmashBalloon\Reviews\Tests\Unit;
4
5 use PHPUnit\Framework\TestCase;
6
7 /**
8 * Regression guard for the REMOVAL of the destructive relay source
9 * reconciliation (SMASH-1585 follow-up, 2026-06-24).
10 *
11 * The relay's source-reconcile endpoint treated an empty `place_ids` keep-list
12 * as "remove all". A single false-empty from the plugin (e.g. a transient
13 * `$wpdb` read error returning an empty set) on a routine Clear All Caches could
14 * therefore wipe EVERY relay-side source for a paying customer. The feature was
15 * non-essential — the SMASH-1585 migration fix is the bearer-aware register
16 * rebind, and the per-source delete path already keeps the relay in sync — so it
17 * was removed outright rather than guarded.
18 *
19 * These tests fail if anyone reintroduces the destructive call, forcing a
20 * deliberate re-review (explicit confirmed remove-all signal + cross-repo
21 * place_id/provider pinning) before a keep-list/diff reconcile can return.
22 */
23 final class ReconcileRemovalTest extends TestCase
24 {
25 private static function saverSource(): string
26 {
27 $path = __DIR__ . '/../../class/Common/Builder/SBR_Feed_Saver_Manager.php';
28 self::assertFileExists($path, 'SBR_Feed_Saver_Manager.php not found at expected path');
29
30 return (string) file_get_contents($path);
31 }
32
33 public function test_reconcile_relay_sources_method_is_removed(): void
34 {
35 $this->assertStringNotContainsString(
36 'function reconcile_relay_sources',
37 self::saverSource(),
38 'The destructive reconcile_relay_sources() method must stay removed.'
39 );
40 }
41
42 public function test_plugin_never_posts_to_sources_reconcile(): void
43 {
44 $this->assertStringNotContainsString(
45 "->call('sources/reconcile'",
46 self::saverSource(),
47 'The plugin must not POST to sources/reconcile — an empty keep-list wipes all relay sources.'
48 );
49 }
50
51 public function test_clear_all_caches_does_not_invoke_reconcile(): void
52 {
53 $this->assertStringNotContainsString(
54 'self::reconcile_relay_sources()',
55 self::saverSource(),
56 'clear_all_caches() must not call reconcile_relay_sources().'
57 );
58 }
59 }
60