Exemplo n.º 1
0
 /**
  * @test
  */
 public function addContentToBookmark()
 {
     $bookmarkMock = $this->getMockBuilder('Tx_PtExtlist_Domain_Model_Bookmark_Bookmark')->disableOriginalClone()->getMock();
     $sessionPersistenceManagerMock = $this->getMockBuilder('Tx_PtExtbase_State_Session_SessionPersistenceManager')->setMethods(array('getSessionData'))->disableOriginalConstructor()->getMock();
     $sessionPersistenceManagerMock->expects($this->once())->method('getSessionData')->will($this->returnValue(array('sessionData')));
     $bookmarkStrategyMock = $this->getMockBuilder('Tx_PtExtlist_Domain_Model_Bookmark_BookmarkStrategy')->setMethods(array('addContentToBookmark'))->getMock();
     $bookmarkStrategyMock->expects($this->once())->method('addContentToBookmark')->with($bookmarkMock, $this->configurationBuilderMock, array('sessionData'));
     $this->proxy->_set('sessionPersistenceManager', $sessionPersistenceManagerMock);
     $this->proxy->_set('bookmarkStrategy', $bookmarkStrategyMock);
     $this->proxy->_set('configurationBuilder', $this->configurationBuilderMock);
     $this->proxy->addContentToBookmark($bookmarkMock);
 }