public function UuidResolverTest::testResolveNoUuid in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/serialization/tests/src/Unit/EntityResolver/UuidResolverTest.php \Drupal\Tests\serialization\Unit\EntityResolver\UuidResolverTest::testResolveNoUuid()
Test resolve() with a class using the correct interface but no UUID.
File
- core/
modules/ serialization/ tests/ src/ Unit/ EntityResolver/ UuidResolverTest.php, line 58 - Contains \Drupal\Tests\serialization\Unit\EntityResolver\UuidResolverTest.
Class
- UuidResolverTest
- @coversDefaultClass \Drupal\serialization\EntityResolver\UuidResolver @group serialization
Namespace
Drupal\Tests\serialization\Unit\EntityResolverCode
public function testResolveNoUuid() {
$this->entityManager
->expects($this
->never())
->method('loadEntityByUuid');
$normalizer = $this
->getMock('Drupal\\serialization\\EntityResolver\\UuidReferenceInterface');
$normalizer
->expects($this
->once())
->method('getUuid')
->with(array())
->will($this
->returnValue(NULL));
$this
->assertNull($this->resolver
->resolve($normalizer, array(), 'test_type'));
}