PHP Class Sulu\Bundle\ContentBundle\Behat\BaseStructureContext

Inheritance: extends Sulu\Bundle\TestBundle\Behat\BaseContext, implements Behat\Behat\Context\SnippetAcceptingContext
Show file Open project: sulu/sulu

Protected Properties

Property Type Description
$templatePaths Temporary structure template paths

Public Methods

Method Description
removeTempStructureTemplates ( ) Remove the generated templates after the scenario has completed.

Protected Methods

Method Description
createStructureTemplate ( string $type, string $name, string $template ) Create a structure and install a structure template of then given type (page|structure), name with the given template contents.
createStructures ( string $type, array $data ) Create structures of the given type using the given data.
getDocumentManager ( ) : Sulu\Component\DocumentManager\DocumentManagerInterface Returns the document manager.

Method Details

createStructureTemplate() protected method

Will choose the directory to install the template into based upon the default directory for the given type. These installed templates will be removed after the scenario has been completed.
protected createStructureTemplate ( string $type, string $name, string $template )
$type string Type of the structure template
$name string Name of the structure template to create
$template string The contents of the XML template

createStructures() protected method

Data should be of the form: array( array( 'title' => null, 'url' => null, 'template' => null, 'locale' => 'de', 'data' => '}', 'parent' => null, ), ),
protected createStructures ( string $type, array $data )
$type string
$data array

getDocumentManager() protected method

Returns the document manager.
protected getDocumentManager ( ) : Sulu\Component\DocumentManager\DocumentManagerInterface
return Sulu\Component\DocumentManager\DocumentManagerInterface

removeTempStructureTemplates() public method

Remove the generated templates after the scenario has completed.

Property Details

$templatePaths protected property

Temporary structure template paths
protected $templatePaths