Projekt

Obecné

Profil

« Předchozí | Další » 

Revize cd149dd5

Přidáno uživatelem Ondřej Fibich před téměř 7 roky(ů)

Refs #1076: member expiration date calculation fix. The calc functionality was separate from Members controller to a new Expiration calc service. The new service comes with unit tests which tests the #1076. Additionally this patch comes with some fixes and improvements in already existing unit and integration tests.

Zobrazit rozdíly:

tests/application/controllers/api_endpoints/AbstractEndPointTestCase.php
protected $api_account;
/**
* Defines authentification type that is used for connecting to API.
* Defines authentication type that is used for connecting to API.
*
* @var string
*/
protected $auth_method;
/**
* Holds state of settings "api_enabled" during test.
*
* @var bool
*/
private static $old_api_enabled = TRUE;
/**
* Enable API and save old state before tests.
*/
public static function setUpBeforeClass() {
parent::setUpBeforeClass();
self::$old_api_enabled = module::e('api');
Settings::set('api_enabled', TRUE);
}
/**
* Restore old API state after all tests done.
*/
public static function tearDownAfterClass() {
parent::tearDownAfterClass();
Settings::set('api_enabled', self::$old_api_enabled);
}
/**
* Prepare base path and add API account.
*/

Také k dispozici: Unified diff