PHP code example of evlz / pest-bundle

1. Go to this page and download the library: Download evlz/pest-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

evlz / pest-bundle example snippets



// app/AppKernel.php

public function registerBundles()

{

    return array(

        // ...

        new Evlz\PestBundle\EvlzPestBundle(),

        // ...

    );

}



$baseUrl = 'http://gdata.youtube.com';

// get service

$rest = $this->get('evlz_pest.rest');

// create client. \PestJSON by default

$client = $rest->createClient($baseUrl);

// create \Pest client

$clientType = \Evlz\PestBundle\Entity\Factory::TYPE_MAIN;//
$client = $rest->createClient($baseUrl, $clientType);

// create \Pest client. forced re-creation

$clientType = \Evlz\PestBundle\Entity\Factory::TYPE_JSON;//
$client = $rest->createClient($baseUrl, $clientType, true);



% phpunit src/Evlz/PestBundle/Tests/Entity/RestTest.php
% phpunit src/Evlz/PestBundle/Tests/Entity/DataConverterTest.php