class TestingDataManager in Forena Reports 8
Hierarchy
- class \Drupal\forena\DataManager
- class \Drupal\Tests\forena\Unit\Mock\TestingDataManager
Expanded class hierarchy of TestingDataManager
4 files declare their use of TestingDataManager
- AReportTokenTest.php in tests/
src/ Unit/ AReportTokenTest.php - DataManagerTest.php in tests/
src/ Unit/ DataManagerTest.php - Implements DataManagerTest
- FrxTestCase.php in tests/
src/ Unit/ FrxTestCase.php - ReportFileSystemTest.php in tests/
src/ Unit/ File/ ReportFileSystemTest.php - Implements ReportFileSystemTest
File
- tests/
src/ Unit/ Mock/ TestingDataManager.php, line 12
Namespace
Drupal\Tests\forena\Unit\MockView source
class TestingDataManager extends DataManager {
/**
* Create object for testing
*/
public function __construct() {
$path = dirname(dirname(dirname(dirname(__FILE__))));
$this->repositories = [
'test' => [
'source' => "{$path}/data",
'driver' => 'FrxFiles',
'title' => 'Test Data',
'access callback' => array(
$this,
'checkAccess',
),
],
];
$this->app = TestingAppService::instance();
$this->app->data_directory = "{$path}/data_overriden";
$this->dataSvc = new DataContext();
$this->dataSvc
->setContext('site', $this->app->siteContext);
}
/**
* Allows access comments
*
* @param string $right
* The security object to test
* @return bool
* Whether users should have access to the block.
*/
public function checkaccess($right = '') {
return boolval($right);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DataManager:: |
public | property | ||
DataManager:: |
public | property | ||
DataManager:: |
public | property | ||
DataManager:: |
protected static | property | ||
DataManager:: |
public | property | ||
DataManager:: |
function | Check access control using the block in a data block. In this case public assess returns true. | ||
DataManager:: |
public | function | Build an SQL statement from the data provider | |
DataManager:: |
public | function | Load the driver class based on the class name. | |
DataManager:: |
function | Extract the data by running a block | ||
DataManager:: |
function | |||
DataManager:: |
public | function | Save a data block ... | |
DataManager:: |
public static | function | Returns the Data Manager instance. | |
DataManager:: |
public | function | ||
DataManager:: |
public | function | Load Block Enter description here ... | |
DataManager:: |
protected | function | ||
DataManager:: |
public | function | Load repository | |
DataManager:: |
public | function | Save a data block ... | |
DataManager:: |
public | function | Parse a block into its data | |
DataManager:: |
public | function | Execute sql on a provider | |
TestingDataManager:: |
public | function | Allows access comments | |
TestingDataManager:: |
public | function |
Create object for testing Overrides DataManager:: |