public function FeaturesBundleIntegrationTest::testCrud in Features 8.4
Same name and namespace in other branches
- 8.3 tests/src/Kernel/Entity/FeaturesBundleIntegrationTest.php \Drupal\Tests\features\Kernel\Entity\FeaturesBundleIntegrationTest::testCrud()
File
- tests/
src/ Kernel/ Entity/ FeaturesBundleIntegrationTest.php, line 23
Class
- FeaturesBundleIntegrationTest
- @coversDefaultClass \Drupal\features\Entity\FeaturesBundle @group features
Namespace
Drupal\Tests\features\Kernel\EntityCode
public function testCrud() {
$bundle = FeaturesBundle::create([
'machine_name' => 'test',
'name' => 'Test',
]);
$bundle
->save();
/** @var \Drupal\features\Entity\FeaturesBundle $bundle */
$bundle = FeaturesBundle::load('test');
$this
->assertEquals('Test', $bundle
->getName());
}