October 2017
Intermediate to advanced
566 pages
14h 31m
English
When learning about Kernel tests, we wrote a test for the CsvImporter that focused on the importing functionality given an existing Importer configuration entity (which we created programmatically). However, another important angle of this functionality is the process of creating this configuration entity as we are relying on Ajax to dynamically inject form elements related to the selected Importer plugin. So let's write a test for that as well.
Just as before, the test class can start with something like this:
namespace Drupal\Tests\products\FunctionalJavascript; use Drupal\file\Entity\File; use Drupal\FunctionalJavascriptTests\JavascriptTestBase; use Drupal\products\Entity\Importer; use Drupal\products\Entity\ProductType; ...
Read now
Unlock full access