Skip to content

Commit

Permalink
Init.
Browse files Browse the repository at this point in the history
  • Loading branch information
Roy Segall committed Feb 21, 2015
0 parents commit 8434f9a
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 0 deletions.
7 changes: 7 additions & 0 deletions behat.info.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: Behat
type: module
description: 'Provding a BDD framework for other modules.'
package: Testing
core: 8.x
dependencies:
- simpletest
7 changes: 7 additions & 0 deletions behat.routing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
behat.page:
path: '/behat/testing'
defaults:
_controller: '\Drupal\behat\BehatPages::myPage'
_title: 'My first page in D8'
requirements:
_permission: 'access content'
12 changes: 12 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"require": {
"behat/gherkin": "4.3.0"
},
"config": {
"vendor-dir": "src/behat"
},

"autoload": {
"psr-4": {"Behat\\Gherkin": "src/vendor"}
}
}
7 changes: 7 additions & 0 deletions src/BehatBase.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace Drupal\behat;

abstract class BehatBase {

}
23 changes: 23 additions & 0 deletions src/BehatPages.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php
namespace Drupal\behat;

use Behat\Gherkin\Gherkin;
use Drupal\Core\Controller\ControllerBase;

class BehatPages extends ControllerBase {

/**
* Returns a simple page.
*
* @return array
* A simple renderable array.
*/
public function myPage() {
$foo = new Gherkin();
$element = array(
'#markup' => 'Hello, world',
);
return $element;
}

}

0 comments on commit 8434f9a

Please sign in to comment.