/** * Tests Hooks::register(). * * @test * @dataProvider provider_register * @param string event * @param string function * @param array expected */ public function test_register($event, $function, $args, $expected) { Hooks::reset(); Hooks::register($event, $function, $args); $registered = Hooks::registered($event); $this->assertSame(sizeof($expected), sizeof($registered)); $this->assertSame($expected, $registered); }