public function FractionGenerateSampleValueTest::setUp in Fraction 8
Same name and namespace in other branches
- 2.x tests/src/Kernel/FractionGenerateSampleValueTest.php \Drupal\Tests\fraction\Kernel\FractionGenerateSampleValueTest::setUp()
Set the default field storage backend for fields created during tests.
Overrides FieldKernelTestBase::setUp
File
- tests/
src/ Kernel/ FractionGenerateSampleValueTest.php, line 31
Class
- FractionGenerateSampleValueTest
- Class to test generating and setting sample values.
Namespace
Drupal\Tests\fraction\KernelCode
public function setUp() {
parent::setUp();
$this
->installEntitySchema('node');
$this
->installSchema('node', [
'node_access',
]);
NodeType::create([
'type' => 'article',
'label' => 'Article',
])
->save();
FieldStorageConfig::create([
'entity_type' => 'node',
'field_name' => self::FIELD_NAME,
'type' => 'fraction',
])
->save();
FieldConfig::create([
'entity_type' => 'node',
'field_name' => self::FIELD_NAME,
'bundle' => 'article',
])
->save();
}