使用 janrain 的 OpenId php 库测试脚本。 (PHP单元)

发布于 2024-09-24 03:57:40 字数 671 浏览 0 评论 0原文

我正在尝试运行 JanRain 的 php openid 库附带的测试脚本。我已经使用 pear 安装了 PHPUnit。当我尝试运行脚本时,我得到:

致命错误:在第 72 行 /var/www/localhost/htdocs/openid/openid/Tests/Auth/OpenID/StoreTest.php 中找不到类“PHPUnit_Framework_TestCase”

我确信这是一个非常简单的问题。我就是不明白出了什么问题。

我没有在任何地方看到 PHPUnit 文件被包含,所以我需要让它们自动包含在某个地方吗?

服务器信息: http://info.theunlink.com/info.php 我正在使用最新的 git 源: http://github.com/openid/php-openid

(我正在尝试运行测试内容,因为每次我尝试登录时都会收到“OpenID 身份验证失败:Nonce 已使用或超出范围”,并且我试图找出问题所在。)

I'm trying to run the test scripts that come with JanRain's php openid libraries. I've installed PHPUnit using pear. When I try to run the scripts I get:

Fatal error: Class 'PHPUnit_Framework_TestCase' not found in /var/www/localhost/htdocs/openid/openid/Tests/Auth/OpenID/StoreTest.php on line 72

I'm sure this is a really simple issue. I just can't figure out what's wrong.

I don't see anywhere that the PHPUnit files get included, so do I need to make them automatically included somewhere?

server info: http://info.theunlink.com/info.php
I'm using the latest git sources: http://github.com/openid/php-openid

(I'm trying to run the test stuff because I get "OpenID authentication failed: Nonce already used or out of range" every other time I try to login and I'm trying to find where the issue is.)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

橘香 2024-10-01 03:57:40

你有什么 PHPUnit 版本? PEAR 中有一个非常古老的测试,您需要一个最近的测试 - 3.4

有了这个,您究竟是如何运行测试的?我做了一个 git 克隆,然后执行命令:

php admin/texttest.php

这确实运行了至少部分测试套件。

What PHPUnit version do you have? There is a really ancient one in PEAR, you need a recent one - 3.4

With that out of the way, how exactly are you running the tests? I did a git clone and then executed command:

php admin/texttest.php

This did run at least part of the test suite.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文