2017 © Pedro Peláez
 

library fixturizer

image

alfred-nutile-inc/fixturizer

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Build Status, (*1)

Fixturizer

Quick way to write and read fixture data., (*2)

Takes php arrays and quickly puts them on the filesystem as yaml files and vice versa., (*3)

See tests folder for Test Examples, (*4)

Non Laravel Usage

You can see in the tests/FixturizerTest.php file some examples of usage. The main goal being that Writer or Reader allow you to easily pass a filename and path to get or put the file / fixture data in yml format., (*5)

If you are using Laravel 5.x

Load up the Provider and Facades, (*6)

config/app.php load under Providers, (*7)


'AlfredNutileInc\Fixturizer\FixturizerServiceProvider'

Load under Facades, (*8)


'FixturizerReader' => 'AlfredNutileInc\Fixturizer\FixturizerReader', 'FixturizerWriter' => 'AlfredNutileInc\Fixturizer\FixturizerWriter',

The default folder is tests/fixtures but you can modify this by running, (*9)

php artisan vendor:publish --provider="AlfredNutileInc\Fixturizer\FixturizerServiceProvider"

Then you can use it as seen below in a test file, (*10)


<?php use AlfredNutileInc\Fixturizer\FixturizerReader; use AlfredNutileInc\Fixturizer\FixturizerWriter; class FixtureTest extends \TestCase { /** * @test */ public function should_write_fixture() { $fixture = ['foo' => 'bar']; FixturizerWriter::createFixture($fixture, 'foo.yml'); $this->assertFileExists(FixturizerWriter::getDestination() . 'foo.yml'); } /** * @test */ public function should_read_fixture() { $name = 'foo.yml'; $path = base_path() . '/tests/fixtures/'; $results = FixturizerReader::getFixture($name, $path); $this->assertNotNull($results); } }

The Versions

04/05 2015

dev-master

9999999-dev

  Sources   Download

The Requires

 

The Development Requires

by Alfred Nutile, Inc

03/05 2015

1.2

1.2.0.0

  Sources   Download

The Requires

 

The Development Requires

by Alfred Nutile, Inc

02/01 2015

1.1

1.1.0.0

  Sources   Download

The Requires

 

The Development Requires

by Alfred Nutile, Inc

30/11 2014

1.0

1.0.0.0

  Sources   Download

The Requires

 

The Development Requires

by Alfred Nutile, Inc