예제 #1
0
 public function testUnsetAll()
 {
     $data = array('key' => 'value');
     $this->_model->setData($data);
     $this->assertEquals($data, $this->_model->getData());
     $this->_model->unsetAll();
     $this->assertEquals(array(), $this->_model->getData());
 }
 /**
  * Stores a post's comment data in the session in case of error
  *
  * @param Fishpig_Wordpress_Model_Post $post
  * @param string $author
  * @param string $email 
  * @param string $url
  * @param string $comment
  */
 public function setPostCommentData($post, $author, $email, $url, $comment)
 {
     if (is_object($post)) {
         $token = 'post_comment_data_' . $post->getId();
         $data = new Varien_Object(array('author' => $author, 'email' => $email, 'url' => $url, 'comment' => $comment));
         return parent::setData($token, $data);
     }
 }
 /**
  * {@inheritDoc}
  */
 public function write($key, $data)
 {
     $this->session->setData($key, $data);
 }