Skip to content

Commit

Permalink
Remove license_model as a Parameter
Browse files Browse the repository at this point in the history
Remove license_model from SearchImages and SearchImagesCreative.
Update Tests to reflect change.
  • Loading branch information
tcai authored and tcai committed Dec 9, 2019
1 parent c681b31 commit 6f8611a
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 56 deletions.
10 changes: 0 additions & 10 deletions src/Request/Search/SearchImages.php
Expand Up @@ -158,16 +158,6 @@ public function withKeywordIds(array $keywordIds) {
return $this;
}

/**
* @param array $licenseModels An array of license models by which to filter.
* @throws Exception
* @return $this
*/
public function withLicenseModels(array $licenseModels) {
$this->addArrayOfValuesToRequestDetails("license_models",$licenseModels);
return $this;
}

/**
* @param string $minimumSize
* @return $this
Expand Down
10 changes: 0 additions & 10 deletions src/Request/Search/SearchImagesCreative.php
Expand Up @@ -154,16 +154,6 @@ public function withKeywordIds(array $keywordIds) {
return $this;
}

/**
* @param array $licenseModels An array of license models by which to filter.
* @throws Exception
* @return $this
*/
public function withLicenseModels(array $licenseModels) {
$this->addArrayOfValuesToRequestDetails("license_models",$licenseModels);
return $this;
}

/**
* @param string $minimumSize
* @return $this
Expand Down
18 changes: 0 additions & 18 deletions unitTests/Search/SearchImagesCreativeTest.php
Expand Up @@ -247,24 +247,6 @@ public function testSearchImagesCreativeWithKeywordIds()
$this->assertContains("keyword_ids=64284%2C67255", $curlerMock->options[CURLOPT_URL]);
}

public function testSearchImagesCreativeWithLicenseModels()
{
$curlerMock = new CurlerMock();
$builder = new \DI\ContainerBuilder();
$container = $builder->build();
$container->set('ICurler', $curlerMock);

$models = array("rightsmanaged", "royaltyfree");

$client = GettyImages_Client::getClientWithClientCredentials("", "", $container);

$search = $client->SearchImagesCreative()->withPhrase("cat")->withLicenseModels($models)->execute();

$this->assertContains("search/images/creative", $curlerMock->options[CURLOPT_URL]);
$this->assertContains("phrase=cat", $curlerMock->options[CURLOPT_URL]);
$this->assertContains("license_models=rightsmanaged%2Croyaltyfree", $curlerMock->options[CURLOPT_URL]);
}

public function testSearchImagesCreativeWithMinimumSize()
{
$curlerMock = new CurlerMock();
Expand Down
18 changes: 0 additions & 18 deletions unitTests/Search/SearchImagesTest.php
Expand Up @@ -305,24 +305,6 @@ public function testSearchImagesWithKeywordIds()
$this->assertContains("keyword_ids=64284%2C67255", $curlerMock->options[CURLOPT_URL]);
}

public function testSearchImagesWithLicenseModels()
{
$curlerMock = new CurlerMock();
$builder = new \DI\ContainerBuilder();
$container = $builder->build();
$container->set('ICurler', $curlerMock);

$models = array("rightsmanaged", "royaltyfree");

$client = GettyImages_Client::getClientWithClientCredentials("", "", $container);

$search = $client->SearchImages()->withPhrase("cat")->withLicenseModels($models)->execute();

$this->assertContains("search/images", $curlerMock->options[CURLOPT_URL]);
$this->assertContains("phrase=cat", $curlerMock->options[CURLOPT_URL]);
$this->assertContains("license_models=rightsmanaged%2Croyaltyfree", $curlerMock->options[CURLOPT_URL]);
}

public function testSearchImagesWithMinimumSize()
{
$curlerMock = new CurlerMock();
Expand Down

0 comments on commit 6f8611a

Please sign in to comment.