protected function TestToolkit::logCall

Stores the values passed to a toolkit call.

Parameters

string $op: One of the image toolkit operations: 'get_info', 'load', 'save', 'settings', 'resize', 'rotate', 'crop', 'desaturate'.

array $args: Values passed to hook.

See also

\Drupal\system\Tests\Image\ToolkitTestBase::imageTestReset()

\Drupal\system\Tests\Image\ToolkitTestBase::imageTestGetAllCalls()

8 calls to TestToolkit::logCall()
TestToolkit::crop in drupal/core/modules/system/tests/modules/image_test/lib/Drupal/image_test/Plugin/ImageToolkit/TestToolkit.php
Implements \Drupal\system\Plugin\ImageToolkitInterface::crop().
TestToolkit::desaturate in drupal/core/modules/system/tests/modules/image_test/lib/Drupal/image_test/Plugin/ImageToolkit/TestToolkit.php
Implements \Drupal\system\Plugin\ImageToolkitInterface::desaturate().
TestToolkit::getInfo in drupal/core/modules/system/tests/modules/image_test/lib/Drupal/image_test/Plugin/ImageToolkit/TestToolkit.php
Implements \Drupal\system\Plugin\ImageToolkitInterface::getInfo().
TestToolkit::load in drupal/core/modules/system/tests/modules/image_test/lib/Drupal/image_test/Plugin/ImageToolkit/TestToolkit.php
Implements \Drupal\system\Plugin\ImageToolkitInterface::load().
TestToolkit::resize in drupal/core/modules/system/tests/modules/image_test/lib/Drupal/image_test/Plugin/ImageToolkit/TestToolkit.php
Implements \Drupal\system\Plugin\ImageToolkitInterface::resize().

... See full list

File

drupal/core/modules/system/tests/modules/image_test/lib/Drupal/image_test/Plugin/ImageToolkit/TestToolkit.php, line 108
Contains \Drupal\image_test\Plugin\ImageToolkit\TestToolkit.

Class

TestToolkit
Defines a Test toolkit for image manipulation within Drupal.

Namespace

Drupal\image_test\Plugin\ImageToolkit

Code

protected function logCall($op, $args) {
  $results = \Drupal::state()
    ->get('image_test.results') ?: array();
  $results[$op][] = $args;
  \Drupal::state()
    ->set('image_test.results', $results);
}