function testInitScripts() { global $action; $scriptStub = new WpScriptIncludes(); $si = new ScriptIncludes($scriptStub); $si->register($this->getTestFI()); $si->enqueue('administration', $this->getTestFI()); $si->init(); $this->assertArrayHasKey('admin_enqueue_scripts', $action); }
/** * Enqueue the resource to be loaded. * * @param string $location */ public function enqueue($location) { $si = new ScriptIncludes(); $si->enqueue($location, $this->getHandle()); }