function testSetMethods() { Api::setApplicationId('demo'); $this->assertEquals('demo', Api::getApplicationId()); Api::setToken('token'); $this->assertEquals('token', Api::getToken()); Api::setRegion('RU'); $this->assertEquals('RU', Api::getRegion()); Api::setProject('wot'); $this->assertEquals('wot', Api::getProject()); }
<?php error_reporting(E_ALL); define('DS', DIRECTORY_SEPARATOR); define('DIR', __DIR__ . DS); require_once '../vendor/autoload.php'; if (file_exists(DIR . '.env')) { Dotenv::load(__DIR__); } \WotApi\Api::create()->setApplicationId('demo');