protected function UrlTest::getRequestConstraint in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/UrlTest.php \Drupal\Tests\Core\UrlTest::getRequestConstraint()
This constraint checks whether a Request object has the right path.
Parameters
string $path: The path.
Return value
\PHPUnit_Framework_Constraint_Callback The constraint checks whether a Request object has the right path.
File
- core/
tests/ Drupal/ Tests/ Core/ UrlTest.php, line 166 - Contains \Drupal\Tests\Core\UrlTest.
Class
- UrlTest
- @coversDefaultClass \Drupal\Core\Url @group UrlTest
Namespace
Drupal\Tests\CoreCode
protected function getRequestConstraint($path) {
return $this
->callback(function (Request $request) use ($path) {
return $request
->getPathInfo() == $path;
});
}