/**
  * Test link method
  * 
  * @return void
  */
 public function testLink()
 {
     $result = $this->CommentWidget->link('Foobar', '/foo', array('class' => 'bar'));
     $expected = array('a' => array('href' => '/foo', 'class' => 'bar'), 'Foobar', '/a');
     $this->assertTags($result, $expected);
     $this->Js->setReturnValue('get', $this->Js);
     $this->Js->setReturnValue('effect', '');
     $this->CommentWidget->options(array('target' => 'wrapper', 'ajaxOptions' => array('update' => 'wrapper')));
     $this->Js->expectOnce('link', array('Foobar', '/foo', array('class' => 'bar', 'update' => 'wrapper')));
     $this->Js->setReturnValueAt(0, 'link', '/ajaxFoo');
     $result = $this->CommentWidget->link('Foobar', '/foo', array('class' => 'bar'));
     $this->assertEqual($result, '/ajaxFoo');
 }