public function testGetBrowserTimingHeader() { $includeTags = false; $result = '<p>Foo</p>'; $handler = $this->getHandlerSpy('newrelic_get_browser_timing_header', array($includeTags), $result); $agent = new Newrelic(false, $handler); $this->assertSame($result, $agent->getBrowserTimingHeader($includeTags)); }
/** * Returns the JavaScript string to inject as part of the header for browser timing (real user monitoring). If flag * is specified it must be a boolean, and if omitted, defaults to true. This indicates whether or not surrounding * script tags should be returned as part of the string. * * @param bool $flag * @return string * @static */ public static function getBrowserTimingHeader($flag = true) { return \Intouch\Newrelic\Newrelic::getBrowserTimingHeader($flag); }