/** * @param array Configuration settings (e.g. [judoId] => '123-456') **/ public function __construct($settings = null) { // Create new DI container $this->container = new Container(); // Create config object $this->container['configuration'] = function ($c) use($settings) { return new \Judopay\Configuration($settings); }; // Create request factory $this->container['request'] = $this->container->factory(function ($c) { $configuration = $c['configuration']; $request = new \Judopay\Request($configuration); $request->setClient(new \Judopay\Client()); $request->setLogger($configuration->get('logger')); return $request; }); }
protected function concoctRequest($fixtureFile) { $request = new \Judopay\Request($this->configuration); $request->setClient(\Judopay\SpecHelper::getMockResponseClient(200, $fixtureFile)); return $request; }