/**
  * Try to load the JavaScript source for this callback
  *
  * @return void
  */
 protected function autoloadJS()
 {
     if (!is_string($this->callback)) {
         return;
     }
     try {
         $this->js = FunctionProvider::get($this->callback);
     } catch (InvalidArgumentException $e) {
         // Do nothing
     }
 }
 /**
  * @testdox get() will throw an exception if the function can't be sourced
  * @expectedException InvalidArgumentException
  * @expectedExceptionMessage Unknown function 'foobar'
  */
 public function testInvalid()
 {
     unset(FunctionProvider::$cache['foobar']);
     FunctionProvider::get('foobar');
 }