function BuildTestBase::getPortNumber
Same name in other branches
- 9 core/tests/Drupal/BuildTests/Framework/BuildTestBase.php \Drupal\BuildTests\Framework\BuildTestBase::getPortNumber()
- 8.9.x core/tests/Drupal/BuildTests/Framework/BuildTestBase.php \Drupal\BuildTests\Framework\BuildTestBase::getPortNumber()
- 10 core/tests/Drupal/BuildTests/Framework/BuildTestBase.php \Drupal\BuildTests\Framework\BuildTestBase::getPortNumber()
Get the port number for requests.
Test should never call this. Used by standUpServer().
Return value
int
4 calls to BuildTestBase::getPortNumber()
- BuildTestBase::standUpServer in core/
tests/ Drupal/ BuildTests/ Framework/ BuildTestBase.php - Makes a local test server using PHP's internal HTTP server.
- BuildTestBase::visit in core/
tests/ Drupal/ BuildTests/ Framework/ BuildTestBase.php - Visit a URI on the HTTP server.
- HtRouterTest::testHtRouter in core/
tests/ Drupal/ BuildTests/ Framework/ Tests/ HtRouterTest.php - @covers ::instantiateServer
- InstallTest::testInstall in core/
tests/ Drupal/ BuildTests/ TestSiteApplication/ InstallTest.php
File
-
core/
tests/ Drupal/ BuildTests/ Framework/ BuildTestBase.php, line 535
Class
- BuildTestBase
- Provides a workspace to test build processes.
Namespace
Drupal\BuildTests\FrameworkCode
protected function getPortNumber() : int {
if (empty($this->hostPort)) {
$this->hostPort = $this->findAvailablePort();
}
return $this->hostPort;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.