- Timestamp:
- 07/21/2020 03:55:21 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/sitemaps/sitemaps-registry.php
r48536 r48540 9 9 $registry = new WP_Sitemaps_Registry(); 10 10 11 $actual = $registry->add_provider( 'foo', $provider );12 $ sitemaps = $registry->get_providers();11 $actual = $registry->add_provider( 'foo', $provider ); 12 $providers = $registry->get_providers(); 13 13 14 14 $this->assertTrue( $actual ); 15 $this->assertCount( 1, $ sitemaps );16 $this->assertSame( $ sitemaps['foo'], $provider, 'Can not confirm sitemap registration is working.' );15 $this->assertCount( 1, $providers ); 16 $this->assertSame( $providers['foo'], $provider, 'Can not confirm sitemap registration is working.' ); 17 17 } 18 18 … … 22 22 $registry = new WP_Sitemaps_Registry(); 23 23 24 $actual1 = $registry->add_provider( 'foo', $provider1 );25 $actual2 = $registry->add_provider( 'foo', $provider2 );26 $ sitemaps = $registry->get_providers();24 $actual1 = $registry->add_provider( 'foo', $provider1 ); 25 $actual2 = $registry->add_provider( 'foo', $provider2 ); 26 $providers = $registry->get_providers(); 27 27 28 28 $this->assertTrue( $actual1 ); 29 29 $this->assertFalse( $actual2 ); 30 $this->assertCount( 1, $ sitemaps );31 $this->assertSame( $ sitemaps['foo'], $provider1, 'Can not confirm sitemap registration is working.' );30 $this->assertCount( 1, $providers ); 31 $this->assertSame( $providers['foo'], $provider1, 'Can not confirm sitemap registration is working.' ); 32 32 } 33 33 }
Note: See TracChangeset
for help on using the changeset viewer.