Mercurial > hg > isophonics-drupal-site
comparison core/modules/search/tests/src/Functional/SearchExactTest.php @ 18:af1871eacc83
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:33:08 +0100 |
parents | 129ea1e6d783 |
children |
comparison
equal
deleted
inserted
replaced
17:129ea1e6d783 | 18:af1871eacc83 |
---|---|
70 $node_type_config->set('display_submitted', TRUE); | 70 $node_type_config->set('display_submitted', TRUE); |
71 $node_type_config->save(); | 71 $node_type_config->save(); |
72 | 72 |
73 $edit = ['keys' => 'Druplicon']; | 73 $edit = ['keys' => 'Druplicon']; |
74 $this->drupalPostForm('search/node', $edit, t('Search')); | 74 $this->drupalPostForm('search/node', $edit, t('Search')); |
75 $this->assertText($user->getUsername(), 'Basic page node displays author name when post settings are on.'); | 75 $this->assertText($user->getAccountName(), 'Basic page node displays author name when post settings are on.'); |
76 $this->assertText(format_date($node->getChangedTime(), 'short'), 'Basic page node displays post date when post settings are on.'); | 76 $this->assertText($this->container->get('date.formatter')->format($node->getChangedTime(), 'short'), 'Basic page node displays post date when post settings are on.'); |
77 | 77 |
78 // Check that with post settings turned off the user and changed date | 78 // Check that with post settings turned off the user and changed date |
79 // information is not displayed. | 79 // information is not displayed. |
80 $node_type_config->set('display_submitted', FALSE); | 80 $node_type_config->set('display_submitted', FALSE); |
81 $node_type_config->save(); | 81 $node_type_config->save(); |
82 $edit = ['keys' => 'Druplicon']; | 82 $edit = ['keys' => 'Druplicon']; |
83 $this->drupalPostForm('search/node', $edit, t('Search')); | 83 $this->drupalPostForm('search/node', $edit, t('Search')); |
84 $this->assertNoText($user->getUsername(), 'Basic page node does not display author name when post settings are off.'); | 84 $this->assertNoText($user->getAccountName(), 'Basic page node does not display author name when post settings are off.'); |
85 $this->assertNoText(format_date($node->getChangedTime(), 'short'), 'Basic page node does not display post date when post settings are off.'); | 85 $this->assertNoText($this->container->get('date.formatter')->format($node->getChangedTime(), 'short'), 'Basic page node does not display post date when post settings are off.'); |
86 | 86 |
87 } | 87 } |
88 | 88 |
89 } | 89 } |