drupalGet(''); $session = $this->getSession(); $session->resizeWindow(400, 300); $javascript = <<assertJsCondition($javascript); } public function testAssertJsCondition() { $this->drupalGet(''); $session = $this->getSession(); $session->resizeWindow(500, 300); $javascript = <<setExpectedException(\PHPUnit_Framework_AssertionFailedError::class); $this->assertJsCondition($javascript, 100); } /** * Tests creating screenshots. */ public function testCreateScreenshot() { $this->drupalGet(''); $this->createScreenshot('public://screenshot.jpg'); $this->assertFileExists('public://screenshot.jpg'); } }