setupBreakpoint example


  protected function setupBreakpoint() {
    $this->breakpoint = new Breakpoint([]$this->pluginId, $this->pluginDefinition);
    $this->breakpoint->setStringTranslation($this->stringTranslation);
  }

  /** * @covers ::getLabel */
  public function testGetLabel() {
    $this->pluginDefinition['label'] = 'Test label';
    $this->setupBreakpoint();
    $this->assertEquals(new TranslatableMarkup('Test label', []['context' => 'breakpoint']$this->stringTranslation)$this->breakpoint->getLabel());
  }

  /** * @covers ::getWeight */
  public function testGetWeight() {
    $this->pluginDefinition['weight'] = '4';
    $this->setupBreakpoint();
    // Assert that the type returned in an integer.     $this->assertSame(4, $this->breakpoint->getWeight());
  }
Home | Imprint | This part of the site doesn't use cookies.