function ConfigTest::testDefaultFile
Same name in other branches
- 9 core/tests/Drupal/Tests/Composer/Plugin/ProjectMessage/ConfigTest.php \Drupal\Tests\Composer\Plugin\ProjectMessage\ConfigTest::testDefaultFile()
- 8.9.x core/tests/Drupal/Tests/Composer/Plugin/ProjectMessage/ConfigTest.php \Drupal\Tests\Composer\Plugin\ProjectMessage\ConfigTest::testDefaultFile()
- 11.x core/tests/Drupal/Tests/Composer/Plugin/ProjectMessage/ConfigTest.php \Drupal\Tests\Composer\Plugin\ProjectMessage\ConfigTest::testDefaultFile()
@covers ::getText
File
-
core/
tests/ Drupal/ Tests/ Composer/ Plugin/ ProjectMessage/ ConfigTest.php, line 77
Class
- ConfigTest
- @coversDefaultClass Drupal\Composer\Plugin\ProjectMessage\Message @group ProjectMessage
Namespace
Drupal\Tests\Composer\Plugin\ProjectMessageCode
public function testDefaultFile() : void {
// Root package has no extra field.
$root = $this->createMock(RootPackageInterface::class);
$root->expects($this->once())
->method('getExtra')
->willReturn([]);
// The default is to try to read from event-name-message.txt, so we expect
// config to try that.
$message = $this->getMockBuilder(Message::class)
->setConstructorArgs([
$root,
'event-name',
])
->onlyMethods([
'getMessageFromFile',
])
->getMock();
$message->expects($this->once())
->method('getMessageFromFile')
->with('event-name-message.txt')
->willReturn([]);
$this->assertSame([], $message->getText());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.