Our first PHPunit test in Drupal 8

  Рет қаралды 10,374

Drupal Up - Drupal 8 Video Tutorials

Drupal Up - Drupal 8 Video Tutorials

Күн бұрын

Пікірлер: 11
@juhkamizato
@juhkamizato 3 жыл бұрын
It was so awesome! It was simple like unit test.
@codewithnacho
@codewithnacho 3 жыл бұрын
Awesome! Thanks for this tutorial
@kahmed2222
@kahmed2222 4 жыл бұрын
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?
@saiprasadsaiprasad
@saiprasadsaiprasad 3 жыл бұрын
The given code and execution of commands are not working
@commanderbensisko
@commanderbensisko 5 жыл бұрын
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-drupal
@naveen-drupal 4 жыл бұрын
while download clone its shows permission denied (public key ) error
@amutylo
@amutylo 5 жыл бұрын
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-up
@Drupal-up 5 жыл бұрын
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!
@setomber
@setomber 2 жыл бұрын
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
@setomber
@setomber 2 жыл бұрын
i downgraded to phpunit 7 than it worked fine to me
Drupal 8 passing JS variables from controller
12:47
Drupal Up - Drupal 8 Video Tutorials
Рет қаралды 7 М.
Vampire SUCKS Human Energy 🧛🏻‍♂️🪫 (ft. @StevenHe )
0:34
Alan Chikin Chow
Рет қаралды 138 МЛН
Maximizing Visual Studio Code with DDEV
54:12
Drupal 4 Gov
Рет қаралды 957
Webinar: Drupal 8 Debugging Techniques
50:23
WebWash
Рет қаралды 13 М.
🚀 Creating an AJAX Form into our Drupal 8 custom module programmatically
12:47
Drupal Up - Drupal 8 Video Tutorials
Рет қаралды 14 М.
JavaScript Unit Testing Tutorial for Beginners
48:32
Programming with Mosh
Рет қаралды 89 М.
Setting up a Multilingual Website with Drupal 8
13:21
Evolving Web
Рет қаралды 19 М.
hook_preprocess and hook_preprocess_hook functions in Drupal 8
8:43
Drupal Up - Drupal 8 Video Tutorials
Рет қаралды 10 М.
Introduction à PHPUnit et au Test Driven Development (TDD)
50:30
LES TEACHERS DU NET
Рет қаралды 6 М.
Unit Testing with PHP Unit
14:35
Søren Spangsberg Jørgensen
Рет қаралды 71 М.