/** * Add a dispatch method to this collection. * * @param MethodInterface $method The dispatch method to add * * @return MethodCollection Returns $this for chainability * * @throws \InvalidArgumentException If a dispatch method with the same name * has already been set on this collection */ public function add(MethodInterface $method) { if (isset($this->methods[$method->getName()])) { throw new \InvalidArgumentException(sprintf('Dispatch method `%s` is already defined', $method->getName())); } $this->_methods[$method->getName()] = $method; return $this; }
public function testYouCanSwitchOffBase64EncodingForDecryption() { $this->method->expects($this->once())->method('decrypt')->will($this->returnValue('bar')); $crypt = $this->sut->mcDecrypt('foo', new BoolType(false)); $this->assertEquals('bar', $crypt); }
/** * @param MethodInterface $method * @return DocBlock */ public function tagMethodObj(MethodInterface $method) { return $this->make('method', [$method->getOutput()]); }