function HookOrderEqualPriorityTest::testFirst
@covers ::first
File
-
core/
tests/ Drupal/ Tests/ Core/ Hook/ HookOrderEqualPriorityTest.php, line 27
Class
- HookOrderEqualPriorityTest
- @coversDefaultClass \Drupal\Core\Hook\HookOrder
Namespace
Drupal\Tests\Core\HookCode
public function testFirst() : void {
// "c" was first, make "a" the first.
HookOrder::first($this->container, 'test', 'a::a');
$this->assertGreaterThan($this->getPriority('c'), $this->getPriority('a'));
$this->assertGreaterThan($this->getPriority('b'), $this->getPriority('a'));
// 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.