function HookOrderTest::assertNoChange

Asserts no change has happened.

Parameters

string $changed: This one did change. Assert the rest did not change.

6 calls to HookOrderTest::assertNoChange()
HookOrderTest::testAfterNoChange in core/tests/Drupal/Tests/Core/Hook/HookOrderTest.php
@covers ::after
HookOrderTest::testBeforeNoChange in core/tests/Drupal/Tests/Core/Hook/HookOrderTest.php
@covers ::before
HookOrderTest::testFirst in core/tests/Drupal/Tests/Core/Hook/HookOrderTest.php
@covers ::first
HookOrderTest::testFirstNoChange in core/tests/Drupal/Tests/Core/Hook/HookOrderTest.php
@covers ::first
HookOrderTest::testLast in core/tests/Drupal/Tests/Core/Hook/HookOrderTest.php
@covers ::last

... See full list

File

core/tests/Drupal/Tests/Core/Hook/HookOrderTest.php, line 147

Class

HookOrderTest
@coversDefaultClass \Drupal\Core\Hook\HookOrder

Namespace

Drupal\Tests\Core\Hook

Code

protected function assertNoChange(string $changed = '') : void {
    foreach ($this->originalPriorities as $key => $priority) {
        if ($key !== $changed) {
            $this->assertSame($priority, $this->getPriority($key));
        }
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.