class FakeRecord in Drupal 10
Same name and namespace in other branches
- 8 core/modules/system/tests/src/Functional/Database/FakeRecord.php \Drupal\Tests\system\Functional\Database\FakeRecord
- 9 core/modules/system/tests/src/Functional/Database/FakeRecord.php \Drupal\Tests\system\Functional\Database\FakeRecord
Fetches into a class.
PDO supports using a new instance of an arbitrary class for records rather than just a stdClass or array. This class is for testing that functionality. (See testQueryFetchClass() below)
Hierarchy
- class \Drupal\Tests\system\Functional\Database\FakeRecord
Expanded class hierarchy of FakeRecord
1 file declares its use of FakeRecord
- FetchTest.php in core/
tests/ Drupal/ KernelTests/ Core/ Database/ FetchTest.php
1 string reference to 'FakeRecord'
- drupal7.php in core/
modules/ migrate_drupal/ tests/ fixtures/ drupal7.php - A database agnostic dump for testing purposes.
File
- core/
modules/ system/ tests/ src/ Functional/ Database/ FakeRecord.php, line 12
Namespace
Drupal\Tests\system\Functional\DatabaseView source
class FakeRecord {
/**
* A class variable.
*
* @var int
*/
public $fakeArg;
/**
* Constructs a FakeRecord object with an optional constructor argument.
*
* @param int $fakeArg
* A class variable.
*/
public function __construct($fakeArg = 0) {
$this->fakeArg = $fakeArg;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FakeRecord:: |
public | property | A class variable. | |
FakeRecord:: |
public | function | Constructs a FakeRecord object with an optional constructor argument. |