Skip to content

Commit

Permalink
fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wordpressfan committed Nov 15, 2023
1 parent 4100e04 commit 0dbb293
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ public function testShouldReturnAsExpected($config, $expected) {
} else {
$this->cache_purge->shouldReceive('purge_complete_caches')->never();
}
do_action('after_rocket_clean_domain');
do_action('rocket_after_clean_domain');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Test_PurgeSite extends TestCase {
public function testShouldCallSpinUpPurgeSite( ) {
Functions\expect( 'spinupwp_purge_site' )->once();

do_action( 'after_rocket_clean_domain' );
do_action( 'rocket_after_clean_domain' );
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function set_up() {
}

public function testShouldCleanWPEngine() {
do_action( 'after_rocket_clean_domain' );
do_action( 'rocket_after_clean_domain' );

$this->assertEquals( 1, WpeCommon::getNumberTimesPurgeMemcachedCalled() );
$this->assertEquals( 1, WpeCommon::getNumberTimesVarnishCacheCalled() );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Test_PurgeWpCache extends TestCase {
public function testShouldPurgeWpCache( ) {
wp_cache_set( 'homepage_cache', 'Homepage content' );

do_action( 'after_rocket_clean_domain' );
do_action( 'rocket_after_clean_domain' );

$this->assertFalse( wp_cache_get( 'homepage_cache' ) );
}
Expand Down
3 changes: 3 additions & 0 deletions tests/Unit/inc/functions/rocketCleanDomain.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ public function testShouldCleanSingleDomain( $i18n, $expected, $config ) {
Actions\expectDone( 'after_rocket_clean_domain' )
->once()
->with( $config['root'], $lang, $url );
Actions\expectDone( 'rocket_after_clean_domain' )
->once()
->with( $lang, $expected['rocket_clean_domain_urls'] );

// Run it.
rocket_clean_domain( $lang );
Expand Down

0 comments on commit 0dbb293

Please sign in to comment.