extend/PHPMailer/test/phpmailerLangTest.php

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php
/**
 * PHPMailer - language file tests
 *
 * PHP version 5.5
 * @package PHPMailer
 * @author Marcus Bointon <phpmailer@synchromedia.co.uk>
 * @author Andy Prevost
 * @copyright 2010 - 2016 Marcus Bointon
 * @copyright 2004 - 2009 Andy Prevost
 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
 */

namespace PHPMailer\PHPMailer;

/**
 * PHPMailer - PHP email transport unit test class
 * Performs authentication tests
 */
class PHPMailerLangTest extends \PHPUnit_Framework_TestCase
{
    /**
     * Holds a PHPMailer instance.
     * @private
     * @var PHPMailer
     */
    public $Mail;

    /**
     * @var string Default include path
     */
    public $INCLUDE_DIR = '../';

    /**
     * Run before each test is started.
     */
    public function setUp()
    {
        $this->Mail = new PHPMailer;
    }

    /**
     * Test language files for missing and excess translations
     * All languages are compared with English
     * @group languages
     */
    public function testTranslations()
    {
        $this->Mail->setLanguage('en');
        $definedStrings = $this->Mail->getTranslations();
        $err = '';
        foreach (new \DirectoryIterator('../language') as $fileInfo) {
            if ($fileInfo->isDot()) {
                continue;
            }
            $matches = [];
            //Only look at language files, ignore anything else in there
            if (preg_match('/^phpmailer\.lang-([a-z_]{2,})\.php$/', $fileInfo->getFilename(), $matches)) {
                $lang = $matches[1]; //Extract language code
                $PHPMAILER_LANG = []; //Language strings get put in here

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。