Skip to content
This repository has been archived by the owner on Apr 4, 2019. It is now read-only.

Commit

Permalink
Merge pull request #108 from cleverti/bdd_create_contenttypegroup
Browse files Browse the repository at this point in the history
Bdd create contenttypegroup
  • Loading branch information
andrerom committed Apr 16, 2014
2 parents 2f68497 + 61c400c commit 28f8846
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 0 deletions.
@@ -0,0 +1,23 @@
@contenttypegroup @adminFeature
Feature: Creating a Content Type Group
Create Content Type Group
As an administrator or anonymous user
I want to create a Content Type Group

Scenario: Create a valid Content Type Group
Given I am logged as an "administrator"
And I don't have a Content Type Group "A"
When I create a Content Type Group "A"
Then I see a Content Type Group "A"

Scenario: Attempt to create a Content Type Group with same name of an existing group
Given I am logged as an "administrator"
And I have a Content Type Group "A"
When I create a Content Type Group "A"
Then I see an invalid field error
And I see 1 Content Type Group "A"

Scenario: Attempt to create a Content Type Group with not authorized user
Given I am not logged in
When I create a Content Type Group "A"
Then I see not authorized error
@@ -0,0 +1,50 @@
<?php
/**
* File containing the ContentTypeGroup class.
*
* This interface has the sentences definitions for the ContentTypeGroup steps
*
* @copyright Copyright (C) 1999-2014 eZ Systems AS. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2
* @version //autogentag//
*/

namespace EzSystems\BehatBundle\Features\Context\SentencesInterfaces;

use Behat\Gherkin\Node\TableNode;

/**
* ContentTypeGroup Sentences Interface
*/
interface ContentTypeGroup
{
/**
* @Given /^I have (?:a |)Content Type Group "(?P<identifier>[A-Z])"$/
* @Given /^I have (?:a |)Content Type Group with "(?P<identifier>[^"])" identifier$/
*/
public function iHaveContentTypeGroup( $identifier );

/**
* @Given /^I (?:do not|don\'t) have a Content Type Group "(?P<identifier>[A-Z])"$/
* @Given /^I (?:do not|don\'t) have a Content Type Group with "(?P<identifier>[^"])" identifier$/
*/
public function iDonTHaveContentTypeGroup( $identifier );

/**
* @When /^I create a Content Type Group "(?P<identifier>[A-Z])"$/
* @When /^I create a Content Type Group with "(?P<identifier>[^"])" identifier$/
*/
public function iCreateContentTypeGroup( $identifier );

/**
* @Then /^I see a Content Type Group "(?P<identifier>[A-Z])"$/
* @Then /^I see a Content Type Group with "(?P<identifier>[^"])" identifier$/
*/
public function iSeeContentTypeGroup( $identifier );

/**
* @Then /^I see (?P<total>\d+) Content Type Group(?:s|) "(?P<identifier>[A-Z])"$/
* @Then /^I see (?P<total>\d+) Content Type Group(?:s|) with "(?P<identifier>[^"])" identifier$/
*/
public function iSeeTotalContentTypeGroup( $total, $identifier );
}
@@ -0,0 +1,28 @@
<?php
/**
* File containing the Error class.
*
* This interface has the sentences definitions for the Error steps
*
* @copyright Copyright (C) 1999-2014 eZ Systems AS. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2
* @version //autogentag//
*/

namespace EzSystems\BehatBundle\Features\Context\SentencesInterfaces;

/**
* Errors Sentences Interface
*/
interface Error
{
/**
* @Then /^I see an invalid field error$/
*/
public function iSeeAnInvalidFieldError();

/**
* @Then /^I see not authorized error$/
*/
public function iSeeNotAuthorizedError();
}

0 comments on commit 28f8846

Please sign in to comment.