Example #1
0
 public function testRenderAlias()
 {
     $renderer = new Renderer();
     $this->assertEquals('window.analytics.alias("foo_id",null);', $renderer->renderAlias('foo_id'));
     $this->assertEquals('window.analytics.alias("foo_id","bar_id");', $renderer->renderAlias('foo_id', 'bar_id'));
 }
Example #2
0
 /**
  * Renders the alias method.
  *
  * @param string $newId
  * @param string $oldId
  *
  * @return string
  */
 public function alias($newId, $oldId = null)
 {
     return $this->renderer->renderAlias($newId, $oldId);
 }