private function UnserializationTest::initializeContentHubClientExpectation in Acquia Content Hub 8.2
Client expectation.
Parameters
\Acquia\ContentHubClient\CDFDocument $cdf_document: CDF Document for client.
Throws
\Exception
2 calls to UnserializationTest::initializeContentHubClientExpectation()
- UnserializationTest::testConfigEntityUnserialization in tests/
src/ Kernel/ UnserializationTest.php - Tests configuration entity unserialization.
- UnserializationTest::testTaxonomyTermUnserialization in tests/
src/ Kernel/ UnserializationTest.php - Tests content entity unserialization.
File
- tests/
src/ Kernel/ UnserializationTest.php, line 275
Class
- UnserializationTest
- Tests that entities are properly unserialized.
Namespace
Drupal\Tests\acquia_contenthub\KernelCode
private function initializeContentHubClientExpectation(CDFDocument $cdf_document) : void {
$this->contentHubClient
->getSettings()
->willReturn($this->settings);
$cdf_entity = current($cdf_document
->getEntities());
$this->contentHubClient
->getEntity(self::CLIENT_UUID_1)
->willReturn($cdf_entity);
$this->contentHubClient
->putEntities($cdf_entity)
->willReturn(NULL);
}