Ejemplo n.º 1
0
 public function testRenderPage()
 {
     $renderer = new Renderer();
     $this->assertEquals('window.analytics.page(null,null,[]);', $renderer->renderPage());
     $this->assertEquals('window.analytics.page(null,"foo",[]);', $renderer->renderPage('foo'));
     $this->assertEquals('window.analytics.page("bar","foo",[]);', $renderer->renderPage('foo', 'bar'));
     $this->assertEquals('window.analytics.page("bar","foo",{"url":"http:\\/\\/foo.bar"});', $renderer->renderPage('foo', 'bar', array('url' => 'http://foo.bar')));
 }
Ejemplo n.º 2
0
 /**
  * Renders the page method.
  *
  * @param string $name
  * @param string $category
  * @param array  $properties
  *
  * @return string
  */
 public function page($name = null, $category = null, array $properties = array())
 {
     return $this->renderer->renderPage($name, $category, $properties);
 }