Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00%
0 / 1
0.00%
0 / 3
CRAP
0.00%
0 / 12
Fixtures
0.00%
0 / 1
0.00%
0 / 3
20
0.00%
0 / 12
 add($name, $data)
0.00%
0 / 1
2
0.00%
0 / 3
 get($name)
0.00%
0 / 1
6
0.00%
0 / 5
 cleanup()
0.00%
0 / 1
2
0.00%
0 / 4
<?php
namespace Codeception\Util;
class Fixtures
{
protected static $fixtures = array();
public static function add($name, $data) {
self::$fixtures[$name] = $data;
}
public static function get($name)
{
if (!isset(self::$fixtures[$name])) throw new \RuntimeException("$name not found in fixtures");
return self::$fixtures[$name];
}
public static function cleanup()
{
self::$fixtures = array();
}
}