mime_content_type脚本替换帮助

时间:2016-06-02 00:30:09

标签: php image mime

我正在运行一个更新版本的PHP,并且在加载一个Github PHP脚本后有两个部分的mime_content_type折旧,我想知道是否有人可以帮助我可以用它取代它?

[TestMethod]
public void Report_PDFExport_Returns_ActionResult()
{
    //Arrange
    byte[] fakePDFReport = new byte[0];

    var mockRepository = new Mock<IPDFRepository>();
    mockRepository
        .Setup(x => x.BuildExport(It.IsAny<PDFViewModel>()))
        .Returns(fakePDFReport);

    var fakeViewModel = new PDFViewModel {
        SelectedReport = "FakeReportName"
        //Set the needed properties...
    };

    ReportController controller = new ReportController(mockRepository.Object);

    //Act
    ActionResult result = controller.PDFExport(fakeViewModel);

    //Assert
    Assert.IsInstanceOfType(result, typeof(ActionResult));
}

if (!function_exists('mime_content_type')) {
    throw new Exception('Program needs the FILEINFO PHP extension.');
}

非常感谢任何帮助

由于

罗伯特

0 个答案:

没有答案