Commit 48aad258 authored by Sergii Bondarenko's avatar Sergii Bondarenko

Fixed SimpleTest: it was not work with disabled module

parent a75535aa
......@@ -29,6 +29,32 @@ class EnvironmentFieldAccessTestCase extends \DrupalWebTestCase {
}
parent::__construct($test_id);
}
/**
* Delete created fields.
*/
public function __destruct() {
$this->fieldsManager->delete();
}
/**
* {@inheritdoc}
*/
public static function getInfo() {
return [
'name' => 'Environment Field Access',
'group' => 'Field API',
'description' => 'Testing field access depending on environment.',
];
}
/**
* {@inheritdoc}
*/
public function setUp() {
// Enable modules.
parent::setUp(self::TEST_MODULE);
$fieldaccess = [];
......@@ -55,32 +81,7 @@ class EnvironmentFieldAccessTestCase extends \DrupalWebTestCase {
],
],
]);
}
/**
* Delete created fields.
*/
public function __destruct() {
$this->fieldsManager->delete();
}
/**
* {@inheritdoc}
*/
public static function getInfo() {
return [
'name' => 'Environment Field Access',
'group' => 'Field API',
'description' => 'Testing field access depending on environment.',
];
}
/**
* {@inheritdoc}
*/
public function setUp() {
// Enable modules.
parent::setUp(self::TEST_MODULE);
// Create fields for testing.
$this->fieldsManager->create();
// Attach field to "user" entity.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment