public function ImageEffectsTestBase::assertColorsAreNotEqual in Image Effects 8
Same name and namespace in other branches
- 8.3 tests/src/Functional/ImageEffectsTestBase.php \Drupal\Tests\image_effects\Functional\ImageEffectsTestBase::assertColorsAreNotEqual()
- 8.2 tests/src/Functional/ImageEffectsTestBase.php \Drupal\Tests\image_effects\Functional\ImageEffectsTestBase::assertColorsAreNotEqual()
Assert two colors are not equal by RGBA.
1 call to ImageEffectsTestBase::assertColorsAreNotEqual()
- WatermarkTest::testWatermarkEffect in tests/
src/ Functional/ Effect/ WatermarkTest.php - Watermark effect test.
File
- tests/
src/ Functional/ ImageEffectsTestBase.php, line 263
Class
- ImageEffectsTestBase
- Base test class for image_effects tests.
Namespace
Drupal\Tests\image_effects\FunctionalCode
public function assertColorsAreNotEqual(array $actual, array $expected) {
// Fully transparent colors are equal, regardless of RGB.
if ($expected[3] == 127) {
$this
->assertNotEquals(127, $actual[3]);
return;
}
$this
->assertColorsAreNotClose($actual, $expected, 0);
}