X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fcontent_moderation%2Ftests%2Fsrc%2FKernel%2FEntityOperationsTest.php;fp=web%2Fcore%2Fmodules%2Fcontent_moderation%2Ftests%2Fsrc%2FKernel%2FEntityOperationsTest.php;h=63f2c9a7321f836c95e8fcca0a8bfd0636cc7203;hp=60e9edf648bab6e3612a35b94f24e4dacb8ee180;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/web/core/modules/content_moderation/tests/src/Kernel/EntityOperationsTest.php b/web/core/modules/content_moderation/tests/src/Kernel/EntityOperationsTest.php index 60e9edf64..63f2c9a73 100644 --- a/web/core/modules/content_moderation/tests/src/Kernel/EntityOperationsTest.php +++ b/web/core/modules/content_moderation/tests/src/Kernel/EntityOperationsTest.php @@ -2,7 +2,6 @@ namespace Drupal\Tests\content_moderation\Kernel; - use Drupal\KernelTests\KernelTestBase; use Drupal\node\Entity\Node; use Drupal\node\Entity\NodeType; @@ -55,9 +54,9 @@ class EntityOperationsTest extends KernelTestBase { } /** - * Verifies that the process of saving forward-revisions works as expected. + * Verifies that the process of saving pending revisions works as expected. */ - public function testForwardRevisions() { + public function testPendingRevisions() { // Create a new node in draft. $page = Node::create([ 'type' => 'page', @@ -68,9 +67,9 @@ class EntityOperationsTest extends KernelTestBase { $id = $page->id(); - // Verify the entity saved correctly, and that the presence of forward + // Verify the entity saved correctly, and that the presence of pending // revisions doesn't affect the default node load. - /** @var Node $page */ + /** @var \Drupal\node\Entity\Node $page */ $page = Node::load($id); $this->assertEquals('A', $page->getTitle()); $this->assertTrue($page->isDefaultRevision()); @@ -87,7 +86,7 @@ class EntityOperationsTest extends KernelTestBase { $this->assertTrue($page->isDefaultRevision()); $this->assertTrue($page->isPublished()); - // Make a new forward-revision in Draft. + // Make a new pending revision in Draft. $page->setTitle('C'); $page->moderation_state->value = 'draft'; $page->save(); @@ -96,7 +95,7 @@ class EntityOperationsTest extends KernelTestBase { $page = Node::load($id); $this->assertEquals('B', $page->getTitle()); - // Verify we can load the forward revision, even if the mechanism is kind + // Verify we can load the pending revision, even if the mechanism is kind // of gross. Note: revisionIds() is only available on NodeStorageInterface, // so this won't work for non-nodes. We'd need to use entity queries. This // is a core bug that should get fixed. @@ -143,7 +142,7 @@ class EntityOperationsTest extends KernelTestBase { $id = $page->id(); // Verify the entity saved correctly. - /** @var Node $page */ + /** @var \Drupal\node\Entity\Node $page */ $page = Node::load($id); $this->assertEquals('A', $page->getTitle()); $this->assertTrue($page->isDefaultRevision());