summaryrefslogtreecommitdiffstats
path: root/core/modules/breakpoint/src/Tests/BreakpointCRUDTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/breakpoint/src/Tests/BreakpointCRUDTest.php')
-rw-r--r--core/modules/breakpoint/src/Tests/BreakpointCRUDTest.php50
1 files changed, 0 insertions, 50 deletions
diff --git a/core/modules/breakpoint/src/Tests/BreakpointCRUDTest.php b/core/modules/breakpoint/src/Tests/BreakpointCRUDTest.php
deleted file mode 100644
index 5b46d3d..0000000
--- a/core/modules/breakpoint/src/Tests/BreakpointCRUDTest.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-/**
- * @file
- * Definition of Drupal\breakpoint\Tests\BreakpointCRUDTest.
- */
-
-namespace Drupal\breakpoint\Tests;
-
-use Drupal\breakpoint\Tests\BreakpointTestBase;
-use Drupal\breakpoint\Entity\Breakpoint;
-
-/**
- * Tests creation, loading, updating, deleting of breakpoints.
- *
- * @group breakpoint
- */
-class BreakpointCRUDTest extends BreakpointTestBase {
-
- /**
- * Test CRUD operations for breakpoints.
- */
- public function testBreakpointCRUD() {
- // Add a breakpoint with minimum data only.
- $label = $this->randomMachineName();
- $breakpoint = entity_create('breakpoint', array(
- 'label' => $label,
- 'mediaQuery' => '(min-width: 600px)',
- 'name' => drupal_strtolower($label),
- ));
- $breakpoint->save();
-
- $this->verifyBreakpoint($breakpoint);
-
- // Test BreakPoint::loadMultiple().
- $all_breakpoints = Breakpoint::loadMultiple();
- $config_name = $breakpoint->id();
- $this->assertTrue(isset($all_breakpoints[$config_name]), 'New breakpoint is present when loading all breakpoints.');
- $this->verifyBreakpoint($breakpoint, $all_breakpoints[$config_name]);
-
- // Update the breakpoint.
- $breakpoint->weight = 1;
- $breakpoint->multipliers['2x'] = '2x';
- $breakpoint->save();
- $this->verifyBreakpoint($breakpoint);
-
- // Delete the breakpoint.
- $breakpoint->delete();
- $this->assertNull(Breakpoint::load($config_name), 'Loading a deleted breakpoint returns null.', 'Breakpoints API');
- }
-}