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
<?php | |
namespace Tests; | |
use GuzzleHttp\Client; | |
use GuzzleHttp\Exception\BadResponseException; | |
use GuzzleHttp\Handler\MockHandler; | |
use GuzzleHttp\HandlerStack; | |
use GuzzleHttp\Psr7\Response; |
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
import json | |
import requests | |
import time | |
class RenovationValidatorConsumer: | |
END_POINT = "/services/renovator/validate?api_version=v1.0®ion=mexico" | |
REQUIRED_PARAMETERS = ['platform', 'user', 'payment_method', 'purchase', 'origin', 'employed_id', 'action'] |
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
<?php | |
define('NECESARY_CHANGES', 3); | |
/** | |
* @param string $string | |
* @return bool | |
*/ | |
function palindrome($string) { | |
$revert = strrev($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
<?php | |
/** | |
* Se creo una interface correspondiente a los medios de pagos para asegurar que implementen el metodo | |
* Se hizo cambio en el nombre de la clase añadiendo el sufijo servicio ya que es un enlace entre el domain y los servicios de medio de pago | |
* Se indico de manera explicita la dependencia de PaymenthMethodInterface a la clase de servicio | |
* Se realizo un FactoryMethod para la creación del medio de pago según lo que venga por parámetros | |
*/ | |
/** |
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
<?php | |
/** | |
* Se aplico la técnica de extract method al metodo calculate dejandolo con | |
* la responsabilidad de solo hacer el calculo y dejandolo legible y eliminandole complejidad ciclica | |
* | |
* Class Order | |
*/ | |
class Order | |
{ |
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
<?php | |
namespace AppBundle\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* Album | |
* | |
* @ORM\Table(name="album") |
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
<?php | |
namespace AppBundle\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* Album | |
* | |
* @ORM\Table(name="album") |
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
<?php | |
namespace AppBundle\Tests\Entity; | |
use \PHPUnit_Framework_TestCase as TestCase; | |
use AppBundle\Entity\Album; | |
use AppBundle\Entity\Artista; | |
/** | |
* Class AlbumTest | |
* @package AppBundle\Tests\Entity |
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
<?php | |
namespace AppBundle\Tests\Entity; | |
use \PHPUnit_Framework_TestCase as TestCase; | |
use AppBundle\Entity\Album; | |
use AppBundle\Entity\Artista; | |
/** | |
* Class AlbumTest | |
* @package AppBundle\Tests\Entity |
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
<?php | |
namespace AppBundle\Tests\Entity; | |
use \PHPUnit_Framework_TestCase as TestCase; | |
use AppBundle\Entity\Album; | |
/** | |
* Class AlbumTest | |
* @package AppBundle\Tests\Entity | |
* @author Carlos Belisario <carlos.belisario.gonzalez@gmail.com> |
NewerOlder