2017 © Pedro Peláez
 

silverstripe-module frameworktest

image

silverstripe/frameworktest

  • Thursday, August 2, 2018
  • by tractorcow
  • Repository
  • 15 Watchers
  • 15 Stars
  • 215 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 8 Forks
  • 2 Open issues
  • 7 Versions
  • 3 % Grown

The README.md

Framework Test Module

Introduction

Aids core and module developers in testing their code against a set of sample data and behaviour., (*1)

  • Shows all core form fields, including their disabled and readonly state
  • Shows sample GridField instance including data
  • Creates sample members (to efficiently test SecurityAdmin)
  • Creates a sample ModelAdmin instance (available at admin/test)
  • (Optional) Three-step process for the multiform module
  • (Optional) Sample page for the tagfield module
  • (Optional) Sample page for the recaptcha module

Usage

Simply running dev/build will take care of most sample data setup., (*2)

In order to use any of the optional test behaviour targeted at modules, install the module and remove the _manifest_exclude file from the relevant folder. For example, to test the tagfield module, remove the frameworktest/code/tagfield/_manifest_exclude file., (*3)

More sample data

The module creates some default pages for different CMS behaviours. The CMS is intended to be perform well with a couple of thousand pages. If you want to test the CMS behaviour for a large and nested tree, the module includes a simple generator task: dev/tasks/FTPageMakerTask. It will create 3^5 pages by default, so takes a while to run through., (*4)

Configuring the amount of data

Both FTPageMagerTask and FTFileMakerTask allow the amount of generated content to be configured. To do this, pass a comma-seprarated list of integers representing the amount of records to create at each depth., (*5)

$ vendor/bin/sake dev/tasks/FTPageMakerTask pageCounts=10,200,5,5, (*6)

$ vendor/bin/sake dev/tasks/FTFileMakerTask fileCounts=5,300,55,5 folderCounts=1,5,5,5, (*7)

Guaranteed unique images

The FTFileMakerTask will randomly watermark each reference to your images by default. If you want to disable this, set the uniqueImages config variable to false., (*8)

Blocks

When dnadesign/silverstripe-elemental is installed, the FTPageMakerTask can also generate blocks within those pages automatically. It has a few hardcoded sample data structures for common block types, and randomly creates a number of blocks, as well as randomly choosing to publish them. Relies on files and images being available to add as sample data., (*9)

Additional setup:, (*10)

composer require dnadesign/silverstripe-elemental
composer require silverstripe/elemental-bannerblock
composer require silverstripe/elemental-fileblock

Usage:, (*11)

# Generate some sample files to associate with blocks
sake dev/tasks/FTFileMakerTask
sake dev/tasks/FTPageMakerTask withBlocks=true

Requirements

The module is intended to run against the latest core codebase, but also includes branches matching earlier core releases for backwards compatibility., (*12)

The Versions

02/08 2018

2.4.x-dev

2.4.9999999.9999999-dev

  Sources   Download

02/08 2018

2.3.x-dev

2.3.9999999.9999999-dev

  Sources   Download

09/04 2018

dev-master

9999999-dev

Aids core and module developers in testing their code against a set of sample data and behaviour.

  Sources   Download

BSD-3-Clause

The Requires

 

testing silverstripe frameworktest

20/12 2016

dev-features/4.0/ui-button-refresh

dev-features/4.0/ui-button-refresh

Aids core and module developers in testing their code against a set of sample data and behaviour.

  Sources   Download

BSD-3-Clause

The Requires

 

testing silverstripe frameworktest

18/04 2016

3.1.x-dev

3.1.9999999.9999999-dev

Aids core and module developers in testing their code against a set of sample data and behaviour.

  Sources   Download

BSD-3-Clause

The Requires

 

testing silverstripe frameworktest

18/04 2016

3.x-dev

3.9999999.9999999.9999999-dev

Aids core and module developers in testing their code against a set of sample data and behaviour.

  Sources   Download

BSD-3-Clause

The Requires

 

testing silverstripe frameworktest

13/08 2013

3.0.x-dev

3.0.9999999.9999999-dev

Aids core and module developers in testing their code against a set of sample data and behaviour.

  Sources   Download

BSD-3-Clause

The Requires

 

testing silverstripe frameworktest