diff --git a/core/modules/node/lib/Drupal/node/Tests/Condition/NodeConditionTest.php b/core/modules/node/lib/Drupal/node/Tests/Condition/NodeConditionTest.php index 2fed3de..e6592b7 100644 --- a/core/modules/node/lib/Drupal/node/Tests/Condition/NodeConditionTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/Condition/NodeConditionTest.php @@ -56,14 +56,20 @@ function testConditions() { ->setConfig('bundles', array('article')) ->setContextValue('node', $page); $this->assertFalse($condition->execute(), 'Page type nodes fail node type checks for articles.'); + // Check for the proper summary. + $this->assertEqual('The node bundle is article', $condition->summary()); // Set the node type check to page. $condition->setConfig('bundles', array('page')); $this->assertTrue($condition->execute(), 'Page type nodes pass node type checks for pages'); + // Check for the proper summary. + $this->assertEqual('The node bundle is page', $condition->summary()); // Set the node type check to page or article. $condition->setConfig('bundles', array('page', 'article')); $this->assertTrue($condition->execute(), 'Page type nodes pass node type checks for pages or articles'); + // Check for the proper summary. + $this->assertEqual('The node bundle is page or article', $condition->summary()); // Set the context to the article node. $condition->setContextValue('node', $article); @@ -72,5 +78,9 @@ function testConditions() { // Set the context to the test node. $condition->setContextValue('node', $test); $this->assertFalse($condition->execute(), 'Test type nodes pass node type checks for pages or articles'); + + // Check a greater than 2 bundles summary scenario. + $condition->setConfig('bundles', array('page', 'article', 'test')); + $this->assertEqual('The node bundle is page, article or test', $condition->summary()); } }