Beispiel #1
0
 /**
  * Return all of the IDs in the fixture of a particular class name.
  *
  * @deprecated 4.0 Use writeInto() and FixtureFactory accessors instead
  * 
  * @return A map of fixture-identifier => object-id
  */
 public function allFixtureIDs($className)
 {
     Deprecation::notice('4.0', 'Use writeInto() and FixtureFactory accessors instead');
     if (!$this->factory) {
         $this->factory = Injector::inst()->create('FixtureFactory');
     }
     return $this->factory->getIds($className);
 }
 public function testGetIds()
 {
     $factory = new FixtureFactory();
     $obj = $factory->createObject('FixtureFactoryTest_DataObject', 'one');
     $this->assertEquals(array('one' => $obj->ID), $factory->getIds('FixtureFactoryTest_DataObject'));
 }