In magento 2.0, when I run the magento setup:di:compile command, it gives an error:
[ErrorException] Declaration of Magento\Newsletter\Test\Unit\Model\Queue\TransportBuilderTes t::testGetTransport() should be compatible with Magento\Framework\Mail\Test \Unit\Template\TransportBuilderTest::testGetTransport($templateType, $messa geType, $bodyText, $templateNamespace)
How to solve this?
1 Answer 1
For the moment change the
public function testGetTransport(
 $templateType = TemplateTypesInterface::TYPE_HTML,
 $messageType = MessageInterface::TYPE_HTML,
 $bodyText = '<h1>Html message</h1>'
)
to
public function testGetTransport(
 $templateType = TemplateTypesInterface::TYPE_HTML,
 $messageType = MessageInterface::TYPE_HTML,
 $bodyText = '<h1>Html message</h1>',
 $templateNamespace ='Magento\Newsletter\Test\Unit\Model\Queue'
)
in app/code/Magento/Newsletter/Test/Unit/Model/Queue/TransportBuilderTest.php
The string use for $templateNamespace can be probably wrong (however you can keep empty string if you want as this text is not using by the function)
- 
 For Magento2 release version, in /vendor/magento/module-newsletter/Test/Unit/Model/Queue/TransportBuilderTest.phpskynetch– skynetch2016年01月08日 10:31:54 +00:00Commented Jan 8, 2016 at 10:31
Explore related questions
See similar questions with these tags.