function HookOrderEqualPriorityTest::testAfter
@covers ::after
File
-
core/
tests/ Drupal/ Tests/ Core/ Hook/ HookOrderEqualPriorityTest.php, line 65
Class
- HookOrderEqualPriorityTest
- @coversDefaultClass \Drupal\Core\Hook\HookOrder
Namespace
Drupal\Tests\Core\HookCode
public function testAfter() : void {
// "c" was first, move it after "b".
HookOrder::after($this->container, 'test', 'c::c', 'b::b');
$this->assertGreaterThan($this->getPriority('c'), $this->getPriority('b'));
// Nothing else can be asserted: by setting the same priority, the setup
// had undefined order and so the services not included in the helper call
// can be in any order.
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.