public function testRenderIdentify() { $renderer = new Renderer(); $this->assertEquals('window.analytics.identify("foo_id",[]);', $renderer->renderIdentify('foo_id')); $this->assertEquals('window.analytics.identify("foo_id",{"foo":"bar"});', $renderer->renderIdentify('foo_id', array('foo' => 'bar'))); }
/** * Renders the identify method. * * @param string $userId * @param array $traits * * @return string */ public function identify($userId, array $traits = array()) { return $this->renderer->renderIdentify($userId, $traits); }