public function GridStackSkinManagerTest::testGridStackManagerMethods in GridStack 8.2
Tests cases for various methods.
@covers ::getSkins @covers ::getCache @covers ::libraryInfoBuild
File
- tests/
src/ Kernel/ GridStackSkinManagerTest.php, line 65
Class
- GridStackSkinManagerTest
- Tests the GridStack skin manager methods.
Namespace
Drupal\Tests\gridstack\KernelCode
public function testGridStackManagerMethods() {
$manager = $this->gridstackSkinManager;
// Tests for skins.
$skins = $manager
->getSkins();
$this
->assertArrayHasKey('default', $skins);
// Verify we have cached skins.
$cid = 'gridstack_skins_data';
$cached_skins = $manager
->getCache()
->get($cid);
$this
->assertEquals($cid, $cached_skins->cid);
$this
->assertEquals($skins, $cached_skins->data);
// Verify libraries.
$libraries = $manager
->libraryInfoBuild();
$this
->assertArrayHasKey('gridstack.default', $libraries);
}