You are here

protected function ExportTest::captureArg in Acquia Content Hub 8.2

Captures $objects argument value of "putEntities" method.

Parameters

mixed $argument: A method's argument.

Return value

\PHPUnit\Framework\Constraint\Callback Callback.

See also

\Drupal\acquia_contenthub_publisher\Plugin\QueueWorker\ContentHubExportQueueWorker::processItem()

File

tests/src/Kernel/ExportTest.php, line 257

Class

ExportTest
Tests entity exports.

Namespace

Drupal\Tests\acquia_contenthub\Kernel

Code

protected function captureArg(&$argument) {
  return $this
    ->callback(function ($argument_to_mock) use (&$argument) {
    $argument = $argument_to_mock;
    return TRUE;
  });
}