/** * @covers ::disable * @depends testSetStatus */ public function testDisable() { $this->cacheBackend->expects($this->once())->method('invalidateTags')->with(array($this->entityTypeId . ':' . $this->id)); $this->entity->setStatus(TRUE); $this->assertSame($this->entity, $this->entity->disable()); $this->assertFalse($this->entity->status()); }
/** * @covers ::disable * @depends testSetStatus */ public function testDisable() { $this->cacheTagsInvalidator->expects($this->once())->method('invalidateTags')->with(array('config:test_provider.' . $this->entityTypeId . '.' . $this->id)); $this->entity->setStatus(TRUE); $this->assertSame($this->entity, $this->entity->disable()); $this->assertFalse($this->entity->status()); }
/** * {@inheritdoc} */ public function disable() { parent::disable(); // Allow modules to react on text format deletion. \Drupal::moduleHandler()->invokeAll('filter_format_disable', array($this)); // Clear the filter cache whenever a text format is disabled. filter_formats_reset(); return $this; }
/** * @covers ::disable * @depends testSetStatus */ public function testDisable() { $this->entity->setStatus(TRUE); $this->assertSame($this->entity, $this->entity->disable()); $this->assertFalse($this->entity->status()); }
/** * {@inheritdoc} */ public function disable() { if ($this->isFallbackFormat()) { throw new \LogicException("The fallback text format '{$this->id()}' cannot be disabled."); } parent::disable(); // Allow modules to react on text format deletion. \Drupal::moduleHandler()->invokeAll('filter_format_disable', array($this)); // Clear the filter cache whenever a text format is disabled. filter_formats_reset(); return $this; }