Skip to content

yapro/symfony-http-test-ext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

symfony-http-test-ext

Traits for solving the most common problems.

How to use

Create a class with the getHttpClient method, example: src/ExampleTestCase.php

What inside

When you write "YourTest extends \YaPro\SymfonyHttpTestExt\BaseTestCase" you will get the function:

  • $this->getHttpClient() - for working with http client
  • $this->getJsonHelper() - for working with json
  • $this->assertXXX() - for working with assert, example: assertJsonResponse($json)
  • etc: AssertionsTrait, ExtTrait

Useful information

Tests

docker build -t yapro/symfony-http-test-ext:latest -f ./Dockerfile ./
docker run --rm -v $(pwd):/app yapro/symfony-http-test-ext:latest bash -c "cd /app \
  && composer install --optimize-autoloader --no-scripts --no-interaction \
  && /app/vendor/bin/phpunit /app/tests"

Dev

docker build -t yapro/symfony-http-test-ext:latest -f ./Dockerfile ./
docker run -it --rm -v $(pwd):/app -w /app yapro/symfony-http-test-ext:latest bash
composer install -o

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published