[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@52.15.113.71: ~ $
<?php
declare(strict_types=1);

namespace PhpList\Core\TestingSupport;

use PhpList\Core\Core\Bootstrap;
use PhpList\Core\Core\Environment;
use Symfony\Bundle\FrameworkBundle\Client;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

/**
 * Base class for integration tests for controllers.
 *
 * If you have your own setUp method, make sure to call $this->setUpWebTest() first thing in your setUp method.
 *
 * @author Oliver Klee <oliver@phplist.com>
 */
abstract class AbstractWebTest extends WebTestCase
{
    /**
     * @var Client
     */
    protected $client = null;

    protected function setUp()
    {
        $this->setUpWebTest();
    }

    protected function setUpWebTest()
    {
        // This makes sure that all DateTime instances use the same time zone, thus making the dates in the
        // JSON provided by the REST API easier to test.
        date_default_timezone_set('UTC');

        Bootstrap::getInstance()->setEnvironment(Environment::TESTING)->configure();

        $this->client = static::createClient(['environment' => Environment::TESTING]);
    }
}

Filemanager

Name Type Size Permission Actions
Fixtures Folder 0755
Traits Folder 0755
AbstractWebTest.php File 1.06 KB 0644