Content test
This commit is contained in:
parent
9abcf39fe7
commit
07f698e6c0
|
@ -9,6 +9,8 @@ class ExampleTest extends BrowserTestBase {
|
||||||
|
|
||||||
protected $defaultTheme = 'stark';
|
protected $defaultTheme = 'stark';
|
||||||
|
|
||||||
|
protected static $modules = ['node'];
|
||||||
|
|
||||||
public function testFrontPage(): void {
|
public function testFrontPage(): void {
|
||||||
$this->drupalGet('/');
|
$this->drupalGet('/');
|
||||||
|
|
||||||
|
@ -36,4 +38,17 @@ class ExampleTest extends BrowserTestBase {
|
||||||
$this->assertSession()->statusCodeEquals(Response::HTTP_OK);
|
$this->assertSession()->statusCodeEquals(Response::HTTP_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testContent(): void {
|
||||||
|
$this->drupalGet('/node/1');
|
||||||
|
$this->assertSession()->statusCodeEquals(Response::HTTP_NOT_FOUND);
|
||||||
|
|
||||||
|
$this->createContentType(['type' =>'page']);
|
||||||
|
$this->createNode(['type' => 'page']);
|
||||||
|
|
||||||
|
// var_dump($this->getSession()->getPage()->getContent());
|
||||||
|
|
||||||
|
$this->drupalGet('/node/1');
|
||||||
|
$this->assertSession()->statusCodeEquals(Response::HTTP_OK);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue