diff --git a/classes/PostFixtures.inc b/classes/PostFixtures.inc index ed4cdfa..7a46e37 100644 --- a/classes/PostFixtures.inc +++ b/classes/PostFixtures.inc @@ -209,7 +209,10 @@ class PostFixtures { $value = $matches[0]; $parts = explode(':', $matches[1]); if (count($parts) > 1) { - $source = array_shift($parts); + $source = strtolower(array_shift($parts)); + switch ($source) { + case 'cat': $source = 'category'; break; + } if (count($parts) == 1) { $index = reset($parts); if (isset($this->{"_${source}"})) { diff --git a/test/PostFixturesTest.php b/test/PostFixturesTest.php index c07c061..884d827 100644 --- a/test/PostFixturesTest.php +++ b/test/PostFixturesTest.php @@ -255,6 +255,10 @@ class PostFixturesTest extends PHPUnit_Framework_TestCase { array('test' => '${category:category}'), array('test' => '1') ), + array( + array('test' => '${cat:category}'), + array('test' => '1') + ), ); }