PHP code example of funk-spec / symfony-extension
1. Go to this page and download the library: Download funk-spec/symfony-extension 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/ */
funk-spec / symfony-extension example snippets
namespace tests\Doctrine\Repository;
use Symfony\Component\DependencyInjection\ContainerInterface;
final class Products implements \Funk\Spec
{
public function __construct(ContainerInterface $container)
{
$this->products = $container->get('products'); // this is a repository
}
function it_works()
{
$this->products->find('77c4bb2e-2c18-4164-a899-7f969dec5c9d')->getId();
}
}