本文整理汇总了PHP中TYPO3\CMS\Core\Http\AjaxRequestHandler::expects方法的典型用法代码示例。如果您正苦于以下问题:PHP AjaxRequestHandler::expects方法的具体用法?PHP AjaxRequestHandler::expects怎么用?PHP AjaxRequestHandler::expects使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\CMS\Core\Http\AjaxRequestHandler
的用法示例。
在下文中一共展示了AjaxRequestHandler::expects方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: processAjaxRequestUploadProcess
/**
* @test
*/
public function processAjaxRequestUploadProcess()
{
$this->fileController = $this->getAccessibleMock('TYPO3\\CMS\\Backend\\Controller\\File\\FileController', array('init', 'main'));
$this->mockAjaxRequestHandler = $this->getMock('TYPO3\\CMS\\Core\\Http\\AjaxRequestHandler', array('addContent', 'setContentFormat'), array(), '', FALSE);
$fileData = array('upload' => array(array($this->fileResourceMock)));
$result = array('upload' => array(array('id' => 'foo', 'date' => '29-11-73', 'iconClasses' => 't3-icon t3-icon-mimetypes t3-icon-mimetypes-text t3-icon-text-html')));
$this->fileController->_set('fileProcessor', $this->mockFileProcessor);
$this->fileController->_set('fileData', $fileData);
$this->fileController->_set('redirect', FALSE);
$this->fileController->expects($this->once())->method('init');
$this->fileController->expects($this->once())->method('main');
$this->mockAjaxRequestHandler->expects($this->once())->method('addContent')->with('result', $result);
$this->mockAjaxRequestHandler->expects($this->once())->method('setContentFormat')->with('json');
$this->fileController->processAjaxRequest(array(), $this->mockAjaxRequestHandler);
}