X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fdrupal%2Fdrupal-driver%2Fdoc%2F_static%2Fsnippets%2FphpunitDrupalDriver.php;fp=vendor%2Fdrupal%2Fdrupal-driver%2Fdoc%2F_static%2Fsnippets%2FphpunitDrupalDriver.php;h=0000000000000000000000000000000000000000;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hp=3c700680898e670bb84f1af8569409ad1eaf3109;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0;p=yaffs-website diff --git a/vendor/drupal/drupal-driver/doc/_static/snippets/phpunitDrupalDriver.php b/vendor/drupal/drupal-driver/doc/_static/snippets/phpunitDrupalDriver.php deleted file mode 100644 index 3c7006808..000000000 --- a/vendor/drupal/drupal-driver/doc/_static/snippets/phpunitDrupalDriver.php +++ /dev/null @@ -1,72 +0,0 @@ - 'localhost', - 'port' => 4444, - 'browserName' => 'firefox', - 'baseUrl' => 'http://d8.devl', - ), - ); - - public static function setUpBeforeClass() { - self::$driver = new DrupalDriver(static::$drupalRoot, static::$uri); - self::$driver->setCoreFromVersion(); - self::$driver->bootstrap(); - } - - public function testUsingSession() - { - // This is Mink's Session. - $session = $this->getSession(); - - // Go to a page. - $session->visit(static::$uri); - - // Validate text presence on a page. - $this->assertTrue($session->getPage()->hasContent('Site-Install')); - } - - public function testUsingBrowser() - { - // Prints the name of used browser. - echo sprintf( - "I'm executed using '%s' browser", - $this->getBrowser()->getBrowserName() - ); - } - - public function testNodeCreate() { - $drupal = self::$driver; - $node = (object) [ - 'title' => $drupal->getRandom()->string(), - 'type' => 'article', - ]; - $drupal->createNode($node); - - $session = $this->getSession(); - $session->visit(static::$uri . '/node/' . $node->nid); - - $this->assertTrue($session->getPage()->hasContent($node->title)); - } - -}