You are here

public static function ImageOptimizePipelineTest::assertFileEqualsString in Image Optimize (or ImageAPI Optimize) 8.2

Same name and namespace in other branches
  1. 8.3 tests/src/Kernel/ImageOptimizePipelineTest.php \Drupal\Tests\imageapi_optimize\Kernel\ImageOptimizePipelineTest::assertFileEqualsString()
  2. 4.x tests/src/Kernel/ImageOptimizePipelineTest.php \Drupal\Tests\imageapi_optimize\Kernel\ImageOptimizePipelineTest::assertFileEqualsString()

Asserts that the contents of a string is equal to the contents of a file.

@since Method available since Release 3.3.0

Parameters

string $extectedString:

string $actualFile:

string $message:

bool $canonicalize:

bool $ignoreCase:

2 calls to ImageOptimizePipelineTest::assertFileEqualsString()
ImageOptimizePipelineTest::testCompoundFailureImagePipeline in tests/src/Kernel/ImageOptimizePipelineTest.php
Test using image pipeline that should not change the image.
ImageOptimizePipelineTest::testCompoundImagePipeline in tests/src/Kernel/ImageOptimizePipelineTest.php
Test procesors are cumulative.

File

tests/src/Kernel/ImageOptimizePipelineTest.php, line 147

Class

ImageOptimizePipelineTest
Tests Image Optimize pipelines.

Namespace

Drupal\Tests\imageapi_optimize\Kernel

Code

public static function assertFileEqualsString($extectedString, $actualFile, $message = '', $canonicalize = false, $ignoreCase = false) {
  self::assertFileExists($actualFile, $message);
  self::assertEquals($extectedString, file_get_contents($actualFile), $message, 0, 10, $canonicalize, $ignoreCase);
}