public function AmpTestBase::createAmpNode in Accelerated Mobile Pages (AMP) 8.3
Create a node with desired content for testing.
11 calls to AmpTestBase::createAmpNode()
- AmpCSSTest::testCss in tests/
src/ Functional/ AmpCSSTest.php - Test the CSS gets correctly rendered.
- AmpFormatterFacebookTest::createAmpNode in tests/
src/ Functional/ AmpFormatterFacebookTest.php - Create a node with desired content for testing.
- AmpFormatterImageCarouselTest::createAmpNode in tests/
src/ Functional/ AmpFormatterImageCarouselTest.php - Create a node with desired content for testing.
- AmpFormatterImageTest::createAmpNode in tests/
src/ Functional/ AmpFormatterImageTest.php - Create a node with desired content for testing.
- AmpFormatterMediaImageTest::createAmpNode in tests/
src/ Functional/ AmpFormatterMediaImageTest.php - Create a node with desired content for testing.
8 methods override AmpTestBase::createAmpNode()
- AmpFormatterFacebookTest::createAmpNode in tests/
src/ Functional/ AmpFormatterFacebookTest.php - Create a node with desired content for testing.
- AmpFormatterImageCarouselTest::createAmpNode in tests/
src/ Functional/ AmpFormatterImageCarouselTest.php - Create a node with desired content for testing.
- AmpFormatterImageTest::createAmpNode in tests/
src/ Functional/ AmpFormatterImageTest.php - Create a node with desired content for testing.
- AmpFormatterMediaImageTest::createAmpNode in tests/
src/ Functional/ AmpFormatterMediaImageTest.php - Create a node with desired content for testing.
- AmpFormatterTextTest::createAmpNode in tests/
src/ Functional/ AmpFormatterTextTest.php - Create a node with desired content for testing.
File
- tests/
src/ Functional/ AmpTestBase.php, line 202
Class
- AmpTestBase
- Base AMP testing setup.
Namespace
Drupal\Tests\amp\FunctionalCode
public function createAmpNode() {
$title = $this
->randomMachineName();
$text = $this
->bodyText();
$node = $this
->drupalCreateNode([
'type' => $this->contentType,
'title' => $title,
'body' => [
'value' => $text,
'format' => 'full_html',
],
]);
$this->node = $node;
}