コード例 #1
0
 /**
  * @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());
 }
コード例 #2
0
 /**
  * @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());
 }
コード例 #3
0
ファイル: FilterFormat.php プロジェクト: anyforsoft/csua_d8
 /**
  * {@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;
 }
コード例 #4
0
 /**
  * @covers ::disable
  * @depends testSetStatus
  */
 public function testDisable()
 {
     $this->entity->setStatus(TRUE);
     $this->assertSame($this->entity, $this->entity->disable());
     $this->assertFalse($this->entity->status());
 }
コード例 #5
0
ファイル: FilterFormat.php プロジェクト: papillon-cendre/d8
 /**
  * {@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;
 }