public function UnroutedUrlTest::testCreateFromRequest in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/UnroutedUrlTest.php \Drupal\Tests\Core\UnroutedUrlTest::testCreateFromRequest()
Tests the createFromRequest method.
@covers ::createFromRequest
@expectedException \Symfony\Component\Routing\Exception\ResourceNotFoundException
File
- core/
tests/ Drupal/ Tests/ Core/ UnroutedUrlTest.php, line 143 - Contains \Drupal\Tests\Core\UnroutedUrlTest.
Class
- UnroutedUrlTest
- @coversDefaultClass \Drupal\Core\Url @group UrlTest
Namespace
Drupal\Tests\CoreCode
public function testCreateFromRequest() {
$request = Request::create('/test-path');
$this->router
->expects($this
->once())
->method('matchRequest')
->with($request)
->will($this
->throwException(new ResourceNotFoundException()));
$this
->assertNull(Url::createFromRequest($request));
}