public function setUp()
    {
        parent::setUp();
        $code = <<<'END'
<?php

class FooTestCase extends DrupalWebTestCase {}
END;
        $this->dir->getChild('foo.test')->setContent($code);
        $indexer = new Classes([], 'class', [], $this->db, $this->target);
        $indexer->build();
        $this->container->get('plugin.manager.drupalmoduleupgrader.indexer')->method('createInstance')->with('class')->willReturn($indexer);
        $this->analyzer = $this->getPlugin();
    }
    public function setUp()
    {
        parent::setUp();
        $code = <<<'END'
<?php

function foo_blorf() {
  $data = array();
  drupal_write_record($data, 'id');
}
END;
        $this->dir->getChild('foo.module')->setContent($code);
        $indexer = new FunctionCalls([], 'function', [], $this->db, $this->target);
        $indexer->build();
        $this->container->get('plugin.manager.drupalmoduleupgrader.indexer')->method('createInstance')->with('function_call')->willReturn($indexer);
        $this->analyzer = $this->getPlugin([], ['function' => 'drupal_write_record']);
    }
    public function setUp()
    {
        parent::setUp();
        $code = <<<'END'
<?php

/**
 * Implements hook_uninstall().
 */
function foo_uninstall() {
  variable_del('foo_baz');
}
END;
        $this->dir->getChild('foo.install')->setContent($code);
        $indexer = new Functions([], 'function', [], $this->db, $this->target);
        $indexer->build();
        $this->container->get('plugin.manager.drupalmoduleupgrader.indexer')->method('createInstance')->with('function')->willReturn($indexer);
        $this->analyzer = $this->getPlugin();
    }
    public function setUp()
    {
        parent::setUp();
        $code = <<<'END'
<?php

/**
 * Implements hook_block_info().
 */
function foo_block_info() {
  return array();
}
END;
        $this->dir->getChild('foo.module')->setContent($code);
        $indexer = new Functions([], 'function', [], $this->db, $this->target);
        $indexer->build();
        $this->container->get('plugin.manager.drupalmoduleupgrader.indexer')->method('createInstance')->with('function')->willReturn($indexer);
        $this->analyzer = $this->getPlugin([], ['hook' => 'block_info']);
    }
    public function setUp()
    {
        parent::setUp();
        $code = <<<'END'
<?php

/**
 * Implements hook_form_alter().
 */
function foo_form_alter(array &$form, array &$form_state, $form_id) {
}

/**
 * Implements hook_form_FORM_ID_alter().
 */
function foo_form_blarg_alter(array &$form, array &$form_state) {
}
END;
        $this->dir->getChild('foo.module')->setContent($code);
        $function_indexer = new Functions([], 'function', [], $this->db, $this->target);
        $function_indexer->build();
        $this->container->get('plugin.manager.drupalmoduleupgrader.indexer')->method('createInstance')->with('function')->willReturn($function_indexer);
        $this->analyzer = $this->getPlugin();
    }