/** * @test */ public function passesCommandThrough() { $key = 0; $definition = new ExecuteMethodCommand('cropThumbnailImage', [800, 200]); $command = Command::createCommandFromDefinition($key, $definition); $this->assertSame($definition, $command); }
/** * @param string $identifier * @param array $commandDefinitions * @param string $mimeType */ public function __construct($identifier, array $commandDefinitions = array(), $mimeType = null) { $this->mimeType = $mimeType; $this->identifier = $identifier; foreach ($commandDefinitions as $key => $commandDefinition) { $this->addCommand(Command::createCommandFromDefinition($key, $commandDefinition)); } }