function HookOrderTest::testFirst
@covers ::first
File
-
core/
tests/ Drupal/ Tests/ Core/ Hook/ HookOrderTest.php, line 50
Class
- HookOrderTest
- @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'));
// The other two shouldn't change.
$this->assertNoChange('a');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.