PHPackages                             foothing/laravel-fixture - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. foothing/laravel-fixture

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

foothing/laravel-fixture
========================

Lightweight fixtures for Laravel 4

v0.1.0(11y ago)125PHPPHP &gt;=5.4.0

Since Feb 16Pushed 11y ago1 watchersCompare

[ Source](https://github.com/foothing/laravel-fixture)[ Packagist](https://packagist.org/packages/foothing/laravel-fixture)[ RSS](/packages/foothing-laravel-fixture/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

Laravel Fixture
===============

[](#laravel-fixture)

Basic light-weight fixtures management for Laravel 4.

How to use
----------

[](#how-to-use)

Setup the tearDown() in your test cases

```
public function tearDown() {
	// Your code
    // ...
	Fixture::tearDown();
}
```

### Usage of Fixture::need()

[](#usage-of-fixtureneed)

```
class FooTest {
	public function testBar() {
    	// Create your fixture by passing the namespaced class name
        // you want to fixture and an array of attributes.
        // If an User instance matching the given attributes is found,
        // then it will be returned. Otherwise a new User instance will be
        // saved to the testing database.
        // Note that User must be an Eloquent implementation.
		$user = Fixture::need('User', array('email' => 'email1'));

        // Example, $user now exists with the given attributes.
        $this->assertEquals($user->email, 'email1');

        // ...
        // more tests.
	}
}
```

You'll want to use the *need* method when your test requires a given instance.

### Usage of Fixture::needNot()

[](#usage-of-fixtureneednot)

```
class FooTest {
	public function testBar() {
    	// Ensure that no instances of Some\Object matching the given
        // attributes are stored in the testing database.
		Fixture::needNot('Some\Object', array('attribute' => 'value'));
	}
}
```

You'll use this when your test requires that your database is clean before running.

This may save you some time since you can have a fine data setup instead of running migrations that slower down test execution time.

Note that Fixture is **not** a Facade, so you don't need to configure any service provider.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4102d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9ebf3a4938226620036760ed05bf0d6801b7bc2c383a1fd7dd1a4c48ba84145d?d=identicon)[brazorf](/maintainers/brazorf)

---

Top Contributors

[![brazorf](https://avatars.githubusercontent.com/u/3330031?v=4)](https://github.com/brazorf "brazorf (3 commits)")

### Embed Badge

![Health badge](/badges/foothing-laravel-fixture/health.svg)

```
[![Health](https://phpackages.com/badges/foothing-laravel-fixture/health.svg)](https://phpackages.com/packages/foothing-laravel-fixture)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M686](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[efureev/laravel-trees

Multi-Tree structures for Laravel

14253.3k4](/packages/efureev-laravel-trees)[illuminatech/balance

Provides support for Balance accounting system based on debit and credit principle

16137.4k](/packages/illuminatech-balance)[zonneplan/laravel-module-loader

Module loader for Laravel

24118.4k](/packages/zonneplan-laravel-module-loader)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
