/**
  * @expectedException InvalidArgumentException
  * @expectedExceptionMessage Invalid format
  */
 public function testCreateWithInvalidRelationFormat()
 {
     $factory = new FixtureFactory();
     $blueprint = new FixtureBlueprint('FixtureFactoryTest_DataObject');
     $relation1 = new FixtureFactoryTest_DataObjectRelation();
     $relation1->write();
     $obj = $blueprint->createObject('one', array('ManyMany' => 'FixtureFactoryTest_DataObjectRelation.relation1'), array('FixtureFactoryTest_DataObjectRelation' => array('relation1' => $relation1->ID)));
 }
 public function testClearWithClass()
 {
     $factory = new FixtureFactory();
     $obj1 = $factory->createObject('FixtureFactoryTest_DataObject', 'object-one');
     $relation1 = $factory->createObject('FixtureFactoryTest_DataObjectRelation', 'relation-one');
     $factory->clear('FixtureFactoryTest_DataObject');
     $this->assertFalse($factory->getId('FixtureFactoryTest_DataObject', 'one'));
     $this->assertNull(FixtureFactoryTest_DataObject::get()->byId($obj1->ID));
     $this->assertEquals($relation1->ID, $factory->getId('FixtureFactoryTest_DataObjectRelation', 'relation-one'));
     $this->assertInstanceOf('FixtureFactoryTest_DataObjectRelation', FixtureFactoryTest_DataObjectRelation::get()->byId($relation1->ID));
 }