Merge pull request #2765 from creative-commoners/pulls/4/rescue-master-no-dopublish

FIX Use publishRecursive() over doPublish()
This commit is contained in:
Steve Boyd 2022-08-25 09:58:46 +12:00 committed by GitHub
commit f51d4f0aeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -1817,7 +1817,7 @@ class SiteTreeTest extends SapphireTest
// END DRAFT // END DRAFT
// BEGIN PUBLISHED // BEGIN PUBLISHED
$page->doPublish(); $page->publishRecursive();
$actions = $page->getCMSActions(); $actions = $page->getCMSActions();
$this->assertNull( $this->assertNull(
$actions->fieldByName('MajorActions.action_save'), $actions->fieldByName('MajorActions.action_save'),
@ -1936,7 +1936,7 @@ class SiteTreeTest extends SapphireTest
// END DRAFT // END DRAFT
// BEGIN PUBLISHED // BEGIN PUBLISHED
$page->doPublish(); $page->publishRecursive();
$actions = $page->getCMSActions(); $actions = $page->getCMSActions();
$this->assertEmpty( $this->assertEmpty(

View File

@ -41,7 +41,7 @@ class DatabaseSearchEngineTest extends SapphireTest
$page = new SiteTree(); $page = new SiteTree();
$page->Title = "This page provides food as bar"; $page->Title = "This page provides food as bar";
$page->write(); $page->write();
$page->doPublish(); $page->publishRecursive();
$results = DB::get_conn()->searchEngine([ SiteTree::class, File::class ], "foo* as* bar*", 0, 100, "\"Relevance\" DESC", "", true); $results = DB::get_conn()->searchEngine([ SiteTree::class, File::class ], "foo* as* bar*", 0, 100, "\"Relevance\" DESC", "", true);