Exemplo n.º 1
0
 public function testRemoveModifier()
 {
     $modifierA = $this->getModifierMock();
     $modifierB = $this->getFilterMock();
     $modifierC = $this->getValidatorMock();
     $this->builder->addModifier($modifierA);
     $this->builder->addModifier($modifierB);
     $this->builder->addModifier($modifierC);
     $this->builder->removeModifier($modifierB);
     $this->assertSame(2, sizeof($this->builder->getModifiers()));
     $this->assertNotContains($modifierB, array_map(function (array $mod) {
         list($modifier) = $mod;
         return $modifier;
     }, $this->builder->getModifiers()));
 }