public function testBuildsResourceIterators() { $factory = new ResourceIteratorClassFactory('Guzzle\\Tests\\Service\\Mock\\Model'); $command = new MockCommand(); $iterator = $factory->build($command, array('client.namespace' => 'Guzzle\\Tests\\Service\\Mock')); $this->assertInstanceOf('Guzzle\\Tests\\Service\\Mock\\Model\\MockCommandIterator', $iterator); }
public function testChecksIfCanBuild() { $factory = new ResourceIteratorClassFactory('Guzzle\\Tests\\Service'); $this->assertFalse($factory->canBuild(new MockCommand())); $factory = new ResourceIteratorClassFactory('Guzzle\\Tests\\Service\\Mock\\Model'); $this->assertTrue($factory->canBuild(new MockCommand())); }