Skip to content
No description, website, or topics provided.
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
_config
src/tasks
tests Remove live test. I really don't know anymore Feb 22, 2018
.codeclimate.yml First version of seeder to seed databases for testing Feb 20, 2018
.env
.gitignore
.scrutinizer.yml
CONTRIBUTING.md
LICENSE
README.md Updated readme Feb 20, 2018
codecov.yml First version of seeder to seed databases for testing Feb 20, 2018
composer.json How hard is it? Feb 20, 2018
composer.lock
phpunit.xml.dist add PHPUnit Filter. Still no build though :( ) Feb 20, 2018

README.md

Scrutinizer Code Quality Build Status codecov

SilverStripe Seeder

WARNING

This will not create a test database for you! Do not run this against a production database!

Seed your database for Acceptance testing

Installation

composer require firesphere/seeder

Usage

Create a seeder yml file somewhere in your project, with the same syntax as the standard PHPUnit tests. E.g.

Firesphere\Seeder\Tests\Mock\Page:
  page1:
    Title: The title
    Content: "<p>Well, the way they make shows is, they make one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Some pilots get picked and become television programs. Some don't, become nothing. She starred in one of the ones that became nothing.</p>"

Relations are defined the same way as in PHPUnit.

Then run the seeder

vendor/bin/sake dev/tasks/seeder type=seed flush=all

To unseed, run

vendor/bin/sake dev/tasks/seeder type=seed flush=all

This will destroy all data that is defined in your seeder yml.

You will need to run a database build before seeding, and after unseeding.

todo

Integrate with Codeception/Behat to automatically seed on run

You can’t perform that action at this time.