Exemple #1
0
 public function testGetInstance2()
 {
     $data = new FooEntity();
     $propRef = new PropertyReflection('ActiveMapperTests\\MetaData\\FooEntity', 'text');
     $propRef->setAccessible(TRUE);
     $propRef->setValue($data, "Test text");
     $propRef->setAccessible(FALSE);
     $this->assertEquals($data, Metadata::getMetadata('ActiveMapperTests\\MetaData\\FooEntity')->getInstance(\ActiveMapper\Manager::getManager(), array('text' => "Test text")));
 }
Exemple #2
0
 public function setUp()
 {
     $this->object = new Map(\ActiveMapper\Manager::getManager());
 }
 protected function setUp()
 {
     $this->manager = Manager::getManager();
     $this->object = new DibiPersister($this->manager, 'App\\Models\\Author');
 }
Exemple #4
0
 protected function setUp()
 {
     $this->manager = \ActiveMapper\Manager::getManager();
 }
 protected function setUp()
 {
     $this->manager = Manager::getManager();
     $this->object = new UnitOfWork($this->manager);
 }
 public function setUp()
 {
     $this->object = new IdentityMap(\ActiveMapper\Manager::getManager(), 'App\\Models\\Author');
 }
Exemple #7
0
 public function testGetInstance()
 {
     $data = new Manager(dibi::getConnection());
     $this->assertEquals($data, Manager::getManager());
     $this->assertEquals($data, Manager::getManager(dibi::getConnection()));
 }
Exemple #8
0
 public function setUp()
 {
     $this->object = new FooEntity(array('id' => 1, 'text' => "Test text"));
     $this->manager = \ActiveMapper\Manager::getManager();
 }