-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
464 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
namespace ImovelWeb\Informacao; | ||
|
||
use ImovelWeb\Base\Base; | ||
|
||
final class Anuncio extends Base | ||
{ | ||
/** | ||
* As especificações de um atributo de um campo do anúncio. | ||
* | ||
* @param int $campoPai | ||
* @param int $campoFilho | ||
* @return mixed | ||
*/ | ||
public function subCampo(int $campoPai, int $campoFilho) | ||
{ | ||
return $this->request('GET', "informacao/anuncio/{$campoPai}/{$campoFilho}"); | ||
} | ||
|
||
/** | ||
* As especificações de um campo do anúncio. | ||
* | ||
* @param int $campo | ||
* @return mixed | ||
*/ | ||
public function campo(int $campo) | ||
{ | ||
return $this->request('GET', "informacao/anuncio/{$campo}}"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
namespace ImovelWeb\Informacao; | ||
|
||
use ImovelWeb\Base\Base; | ||
|
||
final class Lancamento extends Base | ||
{ | ||
/** | ||
* As especificações de um atributo de um campo do lançamento. | ||
* | ||
* @param int $campoPai | ||
* @param int $campoFilho | ||
* @return mixed | ||
*/ | ||
public function subCampo(int $campoPai, int $campoFilho) | ||
{ | ||
return $this->request('GET', "informacao/lancamento/{$campoPai}/{$campoFilho}"); | ||
} | ||
|
||
/** | ||
* As especificações de um atributo do lançamento. | ||
* | ||
* @param int $campo | ||
* @return mixed | ||
*/ | ||
public function campo(int $campo) | ||
{ | ||
return $this->request('GET', "informacao/lancamento/{$campo}}"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
namespace ImovelWeb\Informacao; | ||
|
||
use ImovelWeb\Base\Base; | ||
|
||
final class Multimidia extends Base | ||
{ | ||
/** | ||
* As especificações de um atributo de um campo de multimídia. | ||
* | ||
* @param int $campoPai | ||
* @param int $campoFilho | ||
* @return mixed | ||
*/ | ||
public function subCampo(int $campoPai, int $campoFilho) | ||
{ | ||
return $this->request('GET', "informacao/multimidia/{$campoPai}/{$campoFilho}"); | ||
} | ||
|
||
/** | ||
* As especificações de um atributo do multimidia. | ||
* | ||
* @param int $campo | ||
* @return mixed | ||
*/ | ||
public function campo(int $campo) | ||
{ | ||
return $this->request('GET', "informacao/multimidia/{$campo}}"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
namespace ImovelWeb\Informacao; | ||
|
||
use ImovelWeb\Base\Base; | ||
|
||
final class Unidade extends Base | ||
{ | ||
/** | ||
* As especificações de um atributo de um campo da unidade do lançamento. | ||
* | ||
* @param int $campoPai | ||
* @param int $campoFilho | ||
* @return mixed | ||
*/ | ||
public function subCampo(int $campoPai, int $campoFilho) | ||
{ | ||
return $this->request('GET', "informacao/unidade/{$campoPai}/{$campoFilho}"); | ||
} | ||
|
||
/** | ||
* As especificações de um atributo da unidade do lançamento. | ||
* | ||
* @param int $campo | ||
* @return mixed | ||
*/ | ||
public function campo(int $campo) | ||
{ | ||
return $this->request('GET', "informacao/unidade/{$campo}}"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?php | ||
namespace ImovelWeb\Tests\Informacao; | ||
|
||
use GuzzleHttp\Psr7\Response; | ||
use ImovelWeb\Informacao\Anuncio; | ||
use ImovelWeb\Tests\Base\Base; | ||
|
||
final class AnuncioTest extends Base | ||
{ | ||
/** | ||
* @test | ||
*/ | ||
public function anuncioSubCampo() | ||
{ | ||
$handleResponse = $this->fixture(__FUNCTION__, 'Responses'); | ||
$handlerStack = [new Response(200, [], $handleResponse)]; | ||
|
||
$this->client = $this->getClient($handlerStack); | ||
$this->service = new Anuncio($this->client); | ||
|
||
$result = $this->service->subCampo( | ||
$this->faker->randomNumber(4), | ||
$this->faker->randomNumber(4) | ||
); | ||
|
||
$this->assertArrayHasKey('descripcion', $result); | ||
$this->assertArrayHasKey('ejemplo', $result); | ||
$this->assertArrayHasKey('esObligatorio', $result); | ||
$this->assertArrayHasKey('especificacion', $result); | ||
$this->assertArrayHasKey('maximo', $result); | ||
$this->assertArrayHasKey('minimo', $result); | ||
$this->assertArrayHasKey('nombre', $result); | ||
$this->assertArrayHasKey('posiblesValores', $result); | ||
$this->assertArrayHasKey('recomendaciones', $result); | ||
$this->assertArrayHasKey('tipo', $result); | ||
} | ||
|
||
/** | ||
* @test | ||
*/ | ||
public function anuncioCampo() | ||
{ | ||
$handleResponse = $this->fixture(__FUNCTION__, 'Responses'); | ||
$handlerStack = [new Response(200, [], $handleResponse)]; | ||
|
||
$this->client = $this->getClient($handlerStack); | ||
$this->service = new Anuncio($this->client); | ||
|
||
$result = $this->service->campo($this->faker->randomNumber(4)); | ||
|
||
$this->assertArrayHasKey('descripcion', $result); | ||
$this->assertArrayHasKey('ejemplo', $result); | ||
$this->assertArrayHasKey('esObligatorio', $result); | ||
$this->assertArrayHasKey('especificacion', $result); | ||
$this->assertArrayHasKey('maximo', $result); | ||
$this->assertArrayHasKey('minimo', $result); | ||
$this->assertArrayHasKey('nombre', $result); | ||
$this->assertArrayHasKey('posiblesValores', $result); | ||
$this->assertArrayHasKey('recomendaciones', $result); | ||
$this->assertArrayHasKey('tipo', $result); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?php | ||
namespace ImovelWeb\Tests\Informacao; | ||
|
||
use GuzzleHttp\Psr7\Response; | ||
use ImovelWeb\Informacao\Lancamento; | ||
use ImovelWeb\Tests\Base\Base; | ||
|
||
final class LancamentoTest extends Base | ||
{ | ||
/** | ||
* @test | ||
*/ | ||
public function lancamentoSubCampo() | ||
{ | ||
$handleResponse = $this->fixture(__FUNCTION__, 'Responses'); | ||
$handlerStack = [new Response(200, [], $handleResponse)]; | ||
|
||
$this->client = $this->getClient($handlerStack); | ||
$this->service = new Lancamento($this->client); | ||
|
||
$result = $this->service->subCampo( | ||
$this->faker->randomNumber(4), | ||
$this->faker->randomNumber(4) | ||
); | ||
|
||
$this->assertArrayHasKey('descripcion', $result); | ||
$this->assertArrayHasKey('ejemplo', $result); | ||
$this->assertArrayHasKey('esObligatorio', $result); | ||
$this->assertArrayHasKey('especificacion', $result); | ||
$this->assertArrayHasKey('maximo', $result); | ||
$this->assertArrayHasKey('minimo', $result); | ||
$this->assertArrayHasKey('nombre', $result); | ||
$this->assertArrayHasKey('posiblesValores', $result); | ||
$this->assertArrayHasKey('recomendaciones', $result); | ||
$this->assertArrayHasKey('tipo', $result); | ||
} | ||
|
||
/** | ||
* @test | ||
*/ | ||
public function lancamentoCampo() | ||
{ | ||
$handleResponse = $this->fixture(__FUNCTION__, 'Responses'); | ||
$handlerStack = [new Response(200, [], $handleResponse)]; | ||
|
||
$this->client = $this->getClient($handlerStack); | ||
$this->service = new Lancamento($this->client); | ||
|
||
$result = $this->service->campo($this->faker->randomNumber(4)); | ||
|
||
$this->assertArrayHasKey('descripcion', $result); | ||
$this->assertArrayHasKey('ejemplo', $result); | ||
$this->assertArrayHasKey('esObligatorio', $result); | ||
$this->assertArrayHasKey('especificacion', $result); | ||
$this->assertArrayHasKey('maximo', $result); | ||
$this->assertArrayHasKey('minimo', $result); | ||
$this->assertArrayHasKey('nombre', $result); | ||
$this->assertArrayHasKey('posiblesValores', $result); | ||
$this->assertArrayHasKey('recomendaciones', $result); | ||
$this->assertArrayHasKey('tipo', $result); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?php | ||
namespace ImovelWeb\Tests\Informacao; | ||
|
||
use GuzzleHttp\Psr7\Response; | ||
use ImovelWeb\Informacao\Multimidia; | ||
use ImovelWeb\Tests\Base\Base; | ||
|
||
final class MultimidiaTest extends Base | ||
{ | ||
/** | ||
* @test | ||
*/ | ||
public function multimidiaSubCampo() | ||
{ | ||
$handleResponse = $this->fixture(__FUNCTION__, 'Responses'); | ||
$handlerStack = [new Response(200, [], $handleResponse)]; | ||
|
||
$this->client = $this->getClient($handlerStack); | ||
$this->service = new Multimidia($this->client); | ||
|
||
$result = $this->service->subCampo( | ||
$this->faker->randomNumber(4), | ||
$this->faker->randomNumber(4) | ||
); | ||
|
||
$this->assertArrayHasKey('descripcion', $result); | ||
$this->assertArrayHasKey('ejemplo', $result); | ||
$this->assertArrayHasKey('esObligatorio', $result); | ||
$this->assertArrayHasKey('especificacion', $result); | ||
$this->assertArrayHasKey('maximo', $result); | ||
$this->assertArrayHasKey('minimo', $result); | ||
$this->assertArrayHasKey('nombre', $result); | ||
$this->assertArrayHasKey('posiblesValores', $result); | ||
$this->assertArrayHasKey('recomendaciones', $result); | ||
$this->assertArrayHasKey('tipo', $result); | ||
} | ||
|
||
/** | ||
* @test | ||
*/ | ||
public function multimidiaCampo() | ||
{ | ||
$handleResponse = $this->fixture(__FUNCTION__, 'Responses'); | ||
$handlerStack = [new Response(200, [], $handleResponse)]; | ||
|
||
$this->client = $this->getClient($handlerStack); | ||
$this->service = new Multimidia($this->client); | ||
|
||
$result = $this->service->campo($this->faker->randomNumber(4)); | ||
|
||
$this->assertArrayHasKey('descripcion', $result); | ||
$this->assertArrayHasKey('ejemplo', $result); | ||
$this->assertArrayHasKey('esObligatorio', $result); | ||
$this->assertArrayHasKey('especificacion', $result); | ||
$this->assertArrayHasKey('maximo', $result); | ||
$this->assertArrayHasKey('minimo', $result); | ||
$this->assertArrayHasKey('nombre', $result); | ||
$this->assertArrayHasKey('posiblesValores', $result); | ||
$this->assertArrayHasKey('recomendaciones', $result); | ||
$this->assertArrayHasKey('tipo', $result); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"descripcion": "string", | ||
"ejemplo": "string", | ||
"esObligatorio": "string", | ||
"especificacion": "string", | ||
"maximo": "string", | ||
"minimo": "string", | ||
"nombre": "string", | ||
"posiblesValores": "string", | ||
"recomendaciones": "string", | ||
"tipo": "string" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"descripcion": "string", | ||
"ejemplo": "string", | ||
"esObligatorio": "string", | ||
"especificacion": "string", | ||
"maximo": "string", | ||
"minimo": "string", | ||
"nombre": "string", | ||
"posiblesValores": "string", | ||
"recomendaciones": "string", | ||
"tipo": "string" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"descripcion": "string", | ||
"ejemplo": "string", | ||
"esObligatorio": "string", | ||
"especificacion": "string", | ||
"maximo": "string", | ||
"minimo": "string", | ||
"nombre": "string", | ||
"posiblesValores": "string", | ||
"recomendaciones": "string", | ||
"tipo": "string" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"descripcion": "string", | ||
"ejemplo": "string", | ||
"esObligatorio": "string", | ||
"especificacion": "string", | ||
"maximo": "string", | ||
"minimo": "string", | ||
"nombre": "string", | ||
"posiblesValores": "string", | ||
"recomendaciones": "string", | ||
"tipo": "string" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"descripcion": "string", | ||
"ejemplo": "string", | ||
"esObligatorio": "string", | ||
"especificacion": "string", | ||
"maximo": "string", | ||
"minimo": "string", | ||
"nombre": "string", | ||
"posiblesValores": "string", | ||
"recomendaciones": "string", | ||
"tipo": "string" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"descripcion": "string", | ||
"ejemplo": "string", | ||
"esObligatorio": "string", | ||
"especificacion": "string", | ||
"maximo": "string", | ||
"minimo": "string", | ||
"nombre": "string", | ||
"posiblesValores": "string", | ||
"recomendaciones": "string", | ||
"tipo": "string" | ||
} |
Oops, something went wrong.