Beispiel #1
0
 /**
  * Test Remove Plugin Wrapper
  *
  * @return void
  *
  * @covers \Rcm\Entity\Revision
  */
 public function testRemovePluginWrapper()
 {
     $wrapperOne = new PluginWrapper();
     $wrapperOne->setPluginWrapperId(44);
     $wrapperTwo = new PluginWrapper();
     $wrapperTwo->setPluginWrapperId(45);
     $wrapperThree = new PluginWrapper();
     $wrapperThree->setPluginWrapperId(46);
     $expected = [$wrapperTwo, $wrapperThree];
     $this->revision->addPluginWrapper($wrapperOne);
     $this->revision->addPluginWrapper($wrapperTwo);
     $this->revision->addPluginWrapper($wrapperThree);
     $this->revision->removeInstance($wrapperOne);
     $actual = $this->revision->getPluginWrappers();
     $reIndexedArray = array_values($actual->toArray());
     $this->assertEquals($expected, $reIndexedArray);
 }