public function testOne() { $container = []; $history = Middleware::history($container); $stack = HandlerStack::create(); // Add the history middleware to the handler stack. $stack->push($history); $client = new Client(['handler' => $stack]); $manager = new ListManager(); $manager->setClient($client)->setConfigurator(new RequestConfigurator()); // $response = $manager->one('foo', ['fields' => ['title', 'description']]); // // $this->assertCount(1, $container); // $this->assertEquals('GET', $container[0]['request']->getMethod()); $this->assertEquals(1, 1); }
/** * @param null $handler * @return ListManager */ public function lists($handler = null) { $manager = new ListManager(); $manager->setClient($this->buildClient($handler))->setConfigurator(new RequestConfigurator()); return $manager; }