protected function ResponsivePreviewTestBase::getDefaultDevices in Responsive Theme Preview 8
Return the default devices.
Parameters
bool $enabled_only: Whether return only devices enabled by default.
Return value
array An array of the default devices.
4 calls to ResponsivePreviewTestBase::getDefaultDevices()
- ResponsivePreviewAdminTest::testDeviceConfiguration in tests/
src/ Functional/ ResponsivePreviewAdminTest.php - Tests configuring devices.
- ResponsivePreviewBlockTest::testBlock in tests/
src/ Functional/ ResponsivePreviewBlockTest.php - Tests responsive preview block.
- ResponsivePreviewToolbarTest::testCacheInvalidation in tests/
src/ Functional/ ResponsivePreviewToolbarTest.php - Tests cache invalidation.
- ResponsivePreviewToolbarTest::testToolbarIntegration in tests/
src/ Functional/ ResponsivePreviewToolbarTest.php - Tests that the toolbar integration works properly.
File
- tests/
src/ Functional/ ResponsivePreviewTestBase.php, line 32
Class
- ResponsivePreviewTestBase
- Responsive preview base test class.
Namespace
Drupal\Tests\responsive_preview\FunctionalCode
protected function getDefaultDevices($enabled_only = FALSE) {
$devices = [
'galaxy_s9' => 'Galaxy S9',
'galaxy_tab_s4' => 'Galaxy Tab S4',
'ipad_pro' => 'iPad Pro',
'iphone_xs' => 'iPhone XS',
'iphone_xs_max' => 'iPhone XS Max',
];
if ($enabled_only) {
return $devices;
}
$devices += [
'large' => 'Typical desktop',
'medium' => 'Tablet',
'small' => 'Smart phone',
];
return $devices;
}