public function EntityUrlTest::testToUrlForNewEntity in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php \Drupal\Tests\Core\Entity\EntityUrlTest::testToUrlForNewEntity()
Tests the toUrl() method when an entity is still "new".
@covers ::toUrl
@expectedException \Drupal\Core\Entity\EntityMalformedException
See also
\Drupal\Core\Entity\EntityInterface::isNew()
File
- core/
tests/ Drupal/ Tests/ Core/ Entity/ EntityUrlTest.php, line 281 - Contains \Drupal\Tests\Core\Entity\EntityUrlTest.
Class
- EntityUrlTest
- @coversDefaultClass \Drupal\Core\Entity\Entity @group Entity
Namespace
Drupal\Tests\Core\EntityCode
public function testToUrlForNewEntity() {
$entity = $this
->getMockForAbstractClass('Drupal\\Core\\Entity\\Entity', array(
array(),
'test_entity_type',
));
$entity
->toUrl();
}