code: function selectorClassNameSpyBefore(className) {
                      /*jshint validthis: true */
  
                      var context = phantomas.getDOMPath(this);
  
                      phantomas.incrMetric('DOMqueriesByClassName');
                      phantomas.addOffender('DOMqueriesByClassName', '.%s (in %s)', className, context);
  
                      phantomas.enterContext({
                          type: 'getElementsByClassName',
                          callDetails: {
                              context: {
                                  length: 1,
                                  elements: [context]
                              },
                              arguments: ['.' + className]
                          },
                          backtrace: phantomas.getBacktrace()
                      });
                  }
docs: selectors by class name