最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

yii2 - Codeception acceptance tests with i18n - Stack Overflow

programmeradmin0浏览0评论

I have configured i18n in my project. Now i want to test start page with acceptance test. Here is code of my test.

<?php

namespace Tests\Acceptance;

use Tests\Support\AcceptanceTester;
use Yii;

class MainTestCest
{
    public function _before(AcceptanceTester $I)
    {
    }

    // tests
    public function tryToViewIndex(AcceptanceTester $I)
    {
        $I->amOnPage('/');
        $I->see(Yii::t('app','index'));
    }
}

But i have an error during codecept run class Yii not found. How to obtain Yii class in my acceptance tests?

发布评论

评论列表(0)

  1. 暂无评论