Php 输出中的非拉丁字符
我在使用codeception方面真的是新手,我刚刚根据指南创建了我的第一个验收测试。 你可以看到,如果我使用非拉丁字母,测试将不会通过。但我在页面上有一个字符串“dneska láska”。此外,您可以看到,控制台中的字母“á”在某种程度上发生了变化Php 输出中的非拉丁字符,php,codeception,Php,Codeception,我在使用codeception方面真的是新手,我刚刚根据指南创建了我的第一个验收测试。 你可以看到,如果我使用非拉丁字母,测试将不会通过。但我在页面上有一个字符串“dneska láska”。此外,您可以看到,控制台中的字母“á”在某种程度上发生了变化 $I = new AcceptanceTester($scenario); $I->wantTo('perform actions and see result'); $I->amOnPage('/'); $I->see("dn
$I = new AcceptanceTester($scenario);
$I->wantTo('perform actions and see result');
$I->amOnPage('/');
$I->see("dneska l", "h1");
$I->see("dneska", "h1");
$I->see("dneska láska", "h1");
您可以在此处看到输出:
There was 1 failure:
---------
1) Failed to perform actions and see result in WelcomeCept (tests\acceptance\WelcomeCept.php)
Step I see null,"h1"
Fail Failed asserting that any element by 'h1' on page /
+ <h1>dneska láska</h1>
contains text 'dneska lßska'
Scenario Steps:
4. $I->see(null,"h1") at tests\acceptance\WelcomeCept.php:7
3. $I->see("dneska","h1") at tests\acceptance\WelcomeCept.php:6
2. $I->see("dneska l","h1") at tests\acceptance\WelcomeCept.php:5
1. $I->amOnPage("/") at tests\acceptance\WelcomeCept.php:4
FAILURES!
Tests: 1, Assertions: 3, Failures: 1.
出现1次故障:
---------
1) 未能在WelcomeCept(tests\acceptance\WelcomeCept.php)中执行操作并查看结果
步骤I看到null,“h1”
通过页面上的“h1”断言任何元素失败/
+德涅斯卡├伊斯卡
包含文本“dneska lßska”
场景步骤:
4. $我->在tests\acceptance\WelcomeCept.php:7中看到(null,“h1”)
3. $我->参见tests\acceptance\WelcomeCept.php:6中的(“dneska”、“h1”)
2. $我->参见tests\acceptance\WelcomeCept.php:5中的(“dneska l”、“h1”)
1. $I->tests\acceptance\WelcomeCept.php中的amOnPage(“/”):4
失败!
测试:1,断言:3,失败:1。
你的网站是如何编码的,你的PHP测试文件是什么编码的?哦,真的。你是对的。我检查了一下,但很明显我忽略了。