Registry / testing / weitzman-drupal-test-traits

weitzman-drupal-test-traits

JSON →
library2.7.0phppackagistunverified

Traits for testing Drupal sites that have user content (versus unpopulated sites).

composer require weitzman/drupal-test-traits
INSTALL
IMPORT
SIG · WEITZMAN-DRUPAL-TE
W
weitzman-drupal-test-traits
testingphpv2.7.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ContentTypeCreationTrait
use Drupal\Tests\Traits\Content\ContentTypeCreationTrait;

Create a content type and test its page in a Drupal functional test.

use Drupal\Tests\Traits\Content\ContentTypeCreationTrait; class MyTest extends \Drupal\Tests\BrowserTestBase { use ContentTypeCreationTrait; public function testContentType() { $this->createContentType(['type' => 'article']); $this->drupalGet('/node/add/article'); $this->assertSession()->statusCodeEquals(200); } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
2.7.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
16 hits · last 30 days
node
14
Resources