def METHOD_NAME(self):
    shutil.copytree('tests/data/app-2', self.build_dir)
    bp = BuildPack({
        'BUILD_DIR': self.build_dir,
        'CACHE_DIR': self.cache_dir,
        'WEBDIR': 'htdocs'
    }, '.')
    # simulate clone, makes debugging easier
    os.rmdir(bp.bp_dir)
    shutil.copytree('.', bp.bp_dir,
                    ignore=shutil.ignore_patterns("binaries",
                                                  "env",
                                                  "fixtures",
                                                  "tests"))
    try:
        output = bp._detect().strip()
        assert re.match('php*', output)
    except Exception, e:
        print str(e)
        if hasattr(e, 'output'):
            print e.output
        raise
    finally:
        if os.path.exists(bp.bp_dir):
            shutil.rmtree(bp.bp_dir)