Questions tagged [simple-phpunit]

The Symfony PHPUnit Bridge provides utilities to test Symfony applications with PHPUnit. Use this tag on questions about using PHPUnit to test Symfony applications.

The Symfony PHPUnit Bridge provides utilities for PHPUnit to report legacy tests and usage of deprecated code and a helper for time-sensitive tests.

More information are available at:

14 questions
7
votes
3 answers

PhpUnit deprecation notice: error guessing kernel directory

This is my PhpUnit test class:
Jacke Dow
  • 189
  • 3
  • 13
4
votes
0 answers

How to see full warning messages during phpunit test?

The terminal only tells me There was 1 Warning:. But how can I see the full warning message and where it's being triggered from? --- this is my phpunit.xml file
Sugam Karki
  • 105
  • 4
4
votes
1 answer

Symfony Simple PHPUnit Exit Code 1, No Errors Shown

I am running some PHPUnit tests on travis ci, and it is telling me that it is exiting with code 1... I have tried this on my local, and have confirmed that it is exiting with code 1. The problem is, is it not showing any errors, no warnings, just…
Jeffrey L. Roberts
  • 2,844
  • 5
  • 34
  • 69
3
votes
2 answers

How to use PHPUnit extensions with Symfony's PHPUnit Bridge?

I'm using PHPUnit Bridge in my Symfony project. I'm currently using PHPUnit 7 and I want to upgrade to PHPUnit 8. In PHPUnit 8 array subset assertions are deprecated and generate warnings. I want to use dms/phpunit-arraysubset-asserts package to…
gronostaj
  • 2,231
  • 2
  • 23
  • 43
2
votes
1 answer

Enable depreciations with phpunit bridge

I want upgrading my symfony 2.8, I would like to have the list of deprecations for my project. so I installed phpunit-bridge to run my unit tests. However, phpunit does not return any deprecation information to me. The documentation does not specify…
oracle972
  • 77
  • 10
2
votes
1 answer

Undefined method ArraySubsetLegacy::exporter() when executing php vendor/bin/simple-phpunit

I'm discovering API Platform and i'm now at the "Testing the API" step. I get two different errors I can't resolve, event avec a composer install / update : 1) App\Tests\BooksTest::testGetCollection Error: Call to undefined method…
SimonFA
  • 31
  • 6
1
vote
1 answer

symfony 3.1 testing Bundle fails with Undefined index: kernel

Symfony3 Unitests fails with the following error Undefined index: kernel
fefe
  • 8,755
  • 27
  • 104
  • 180
1
vote
1 answer

Run a single test with phpUnit

I'm currently introducing tests in my Symfony app. Some of them are failing and it takes ages to run them all. Is it possible to run a single test with the simpl-phpunit command ? I already tested : with the namespace of my test but ended up with…
Pierrick Rambaud
  • 1,726
  • 1
  • 20
  • 47
1
vote
1 answer

PHPUnit and Symfony - CPU Being Chewed at 100% For Simple Test Case

I just joined a project, and I am attempting to get the PHPUnit tests in order. I think there might be something wrong, but I am not sure, so I am posting this question. The following test is taking minutes to fail, and from what I have been…
Jeffrey L. Roberts
  • 2,844
  • 5
  • 34
  • 69
0
votes
0 answers

laravel 10 problems in vendor directory

I've just started laravel 10 and got fresh project. i'm using vs code and i have some extensions for PHP and laravel. i have a strange problem in my vendor dir and this if the full path of the problem…
0
votes
0 answers

Using `SYMFONY_DEPRECATIONS_HELPER` with advanced configuration and still display the full stack trace

We are using symfony's PhpUnitBridge component, to check for the use of deprecated code in our codebase. We use a ignore file to silence some deprecations that we can't fix right now. However for every deprecations that is not ignored we want that…
j_elfering
  • 2,707
  • 6
  • 15
0
votes
1 answer

Symfony PHPUnit tests don't authenticate user

I have a Symfony 4.4 project. Login, authentication, and authorization work fine on web. To simulate authentication in unit tests, I'm using Symfony's example. ...but that's not working. The user is not authenticated in the unit test. I get an…
amacrobert
  • 2,707
  • 2
  • 28
  • 37
-1
votes
1 answer

how to test the value of a textArea?

In my Symfony App, I'm currently writting the test of my forms following the documentation. In a contact form, when the data are validated I empty the form for further usage. I want to check this behaviour in my tests. I have 4 fields that…
Pierrick Rambaud
  • 1,726
  • 1
  • 20
  • 47