category short name
This commit is contained in:
parent
1c298f4105
commit
6f5d8c620f
@ -209,7 +209,10 @@ class PostFixtures {
|
|||||||
$value = $matches[0];
|
$value = $matches[0];
|
||||||
$parts = explode(':', $matches[1]);
|
$parts = explode(':', $matches[1]);
|
||||||
if (count($parts) > 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) {
|
if (count($parts) == 1) {
|
||||||
$index = reset($parts);
|
$index = reset($parts);
|
||||||
if (isset($this->{"_${source}"})) {
|
if (isset($this->{"_${source}"})) {
|
||||||
|
@ -255,6 +255,10 @@ class PostFixturesTest extends PHPUnit_Framework_TestCase {
|
|||||||
array('test' => '${category:category}'),
|
array('test' => '${category:category}'),
|
||||||
array('test' => '1')
|
array('test' => '1')
|
||||||
),
|
),
|
||||||
|
array(
|
||||||
|
array('test' => '${cat:category}'),
|
||||||
|
array('test' => '1')
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user