/**
  * @covers ::set
  * @covers ::get
  */
 public function testGet()
 {
     $name = 'id';
     $value = $this->randomMachineName();
     $this->assertSame($this->id, $this->entity->get($name));
     $this->assertSame($this->entity, $this->entity->set($name, $value));
     $this->assertSame($value, $this->entity->get($name));
 }
예제 #2
0
 /**
  * {@inheritdoc}
  */
 public function set($property_name, $value)
 {
     if ($property_name == 'source') {
         // Invalidate the source plugin.
         unset($this->sourcePlugin);
     } elseif ($property_name === 'destination') {
         // Invalidate the destination plugin.
         unset($this->destinationPlugin);
     }
     return parent::set($property_name, $value);
 }