Skip to content
This repository
Browse code

Allowed the fixture to overwrite the LastEdited field on an object

  • Loading branch information...
commit bf2ba121bd50332385f3c167f0955616ba6c598b 1 parent 34cc18e
authored January 10, 2012

Showing 1 changed file with 6 additions and 0 deletions. Show diff stats Hide diff stats

  1. 6  dev/YamlFixture.php
6  dev/YamlFixture.php
@@ -228,6 +228,12 @@ protected function writeDataObject($model, $dataClass, $items) {
228 228
 				}
229 229
 			}
230 230
 			$obj->write();
  231
+            //If LastEdited was set in the fixture, set it here
  232
+            if (array_key_exists('LastEdited', $fields)) {
  233
+                $manip = array($dataClass => array("command" => "update", "id" => $obj->id,
  234
+                    "fields" => array("LastEdited" => $this->parseFixtureVal($fields['LastEdited']))));
  235
+                DB::manipulate($manip);
  236
+            }
231 237
 		}
232 238
 	}
233 239
 	

0 notes on commit bf2ba12

Please sign in to comment.
Something went wrong with that request. Please try again.