function HtmxHeadersTest::setUp
Overrides UnitTestCase::setUp
File
-
core/
tests/ Drupal/ Tests/ Core/ Htmx/ HtmxHeadersTest.php, line 35
Class
- HtmxHeadersTest
- Test all header-related Htmx public methods.
Namespace
Drupal\Tests\Core\HtmxCode
protected function setUp() : void {
parent::setUp();
$this->htmx = new Htmx();
$generated = new GeneratedUrl();
$generated->setGeneratedUrl('https://www.example.test/common-test/destination');
$this->url = $this->getMockBuilder(Url::class)
->disableOriginalConstructor()
->onlyMethods([
'toString',
])
->getMock();
$this->url
->expects($this->any())
->method('toString')
->willReturn($generated);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.