Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Use it for questions about automated Drupal tests.
5
votes
Accepted
How to visit a specific node using behat
You can do two things in this scenario:
You can instruct it to click on "Accomodation Foo" (which should be the linked node title) on this page, to go to the node when the path is unknown.
If you ha …
3
votes
Accepted
Faster phpunit-bootstraping for single Unit-Tests
Kernel and Functional tests are expected to take longer because of a full Drupal bootstrap and site scaffolding per run to test in a clean environment. Unit tests are running raw code and should execu …
4
votes
Accepted
Test fails with custom configuration
Exception Uncaught e ConfigSchemaCheck 86 Drupal\Core\Config\Testing\ConfigSc
Drupal\Core\Config\Schema\SchemaIncompleteException: No schema for
MODULENAME.settings in
Drupal\Core\Config\ … Testing\ConfigSchemaChecker->onConfigSave() (line 86
of
/var/www/docroot/core/lib/Drupal/Core/Config/Testing/ConfigSchemaChecker.php). …
0
votes
Accepted
`Drupal\DrupalExtension` extension file or class could not be located
The Drupal Extension requires no modules, only composer installation.
Execute:
composer require drupal/drupal-extension='~3.0'
See the docs for other setup information: https://github.com/jhedstrom/dr …
1
vote
View test result of BrowserTestBase based test?
Figured it out. Before calling parent::setUp(), I set:
$this->htmlOutputEnabled = true;
0
votes
Accepted
Running tests on fresh 8.2.x install throws "Permission Denied" for Kernel tests
Looks like some tests can only be ran with the command line and will not work with the test runner UI.
0
votes
Accepted
Simpletest fails with "invalid database prefix" - no other information given
After patching that module to have a schema file, the console error AND the generic error in the testing UI went away. I can now execute the test from either interface. …
2
votes
Accepted
drupal behat test assert authenticated by role with given fields
You have a typo in your Given condition - you need to have role(s) after administrator.
Given I am logged in as a user with the 'administrator' role(s) and I have the following fields:
1
vote
Testing strategy, stub, mock, prophecy, what?
The class I am testing only assumes now that a Drupal user object or response from a Netforum call is passed in, or both, making it testable (or, more easy to test) than before.
<? … Would love to know more though about how others are testing their own services or classes. …
1
vote
Mock a service while running a BrowserTest?
I could not quite get my mocked service to be used from the container as per the docs, so I resulted to doing this.
I don't really need a BrowserTest per se, as I just want to ensure the Response obj …
0
votes
Accepted
Can't set a default theme in a FunctionalJavascript test with $defaultTheme class property
I wound up installing a barebones install with drush si and exporting certain configuration to an install profile. After adding this to drush si in CI and local, all functional javascript browser test …
0
votes
Basic kernel test fails with Type of Drupal\KernelTests\Core\Entity\EntityKernelTestBase::$m...
Looks like my problem stemmed entirely from using the wrong KernelTestBase include. My IDE suggested KernelTestBase as I was typing, and I did not look at the path:
use Drupal\Tests\token\Kernel\Kerne …
0
votes
Easy way to add Functional or Kernel tests to a View?
I wound up using Drupal Test Traits.
The only thing left for me to do is obtain a copy of the database to run the tests in CI, which I can use Drush to grab.
3
votes
PHPUNIT is running successfully on local but giving error on acquia-pipleine
-- To disable deprecation testing completely uncomment the next line. -->
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak"/>
I never have tests fail because of deprecation notices. …
2
votes
Functional tests performance
Note that the more test methods you define, more modules you require, the longer it will take to set up the testing instance of Drupal. …