you mention "using composer" to setup your Drupal project, but when you cd to the project, I see docker-compose.yml as well, did you generate a docker-compose project and then created a Drupal project in it using composer?
@saiprasadsaiprasad3 жыл бұрын
The given code and execution of commands are not working
@commanderbensisko5 жыл бұрын
Thanks for the tutorial but I'm not getting the desired results even using your code. Executing : "../vendor/bin/phpunit ../modules/custom/drupalup_fibo_test" ... I get the following error: PHP Warning: Class 'PHPUnit\Framework\MockObject\Matcher\InvokedRecorder' not found in /var/www/html/core/tests/bootstrap.php on line 197 Can you help?
@naveen-drupal4 жыл бұрын
while download clone its shows permission denied (public key ) error
@amutylo5 жыл бұрын
Nice. But I think first you need to test if the service return an array and not a tstring or something else and only then test a real number.
@Drupal-up5 жыл бұрын
Hi Andrii, well you could, of course, do that. It is definitely not a must though. When you have a peace of code - it is good first to test the actual returns - those are the things that you were debugging the most when developing. It is much better in our calcSomeFibos() function just to specify a return value type, because generally type checking is a code smell. If I have to go through the code of the service - there is much to be improved. The focus of this video is just to quickly show how one could start with PHPUnit testing inside of Drupal 8. If you want to share here some sources that actually point that one should always first do a type check in his Unit tests - feel free to do so. Cheers and thanks for watching!
@setomber2 жыл бұрын
I am getting this error Warning: Class 'Drupal\TestTools\PhpUnitCompatibility\PhpUnit8\HtmlOutputPrinter' not found in /Users/leventcelik/Sites/x/x/x/core/tests/Drupal/Tests/Listeners/HtmlOutputPrinter.php on line 15 PHPUnit 8.5.31 by Sebastian Bergmann and
@setomber2 жыл бұрын
i downgraded to phpunit 7 than it worked fine to me