Example #1
0
 public function setup()
 {
     $mapper          = new Mapper(__DIR__ . "/../../proxies");
     $mapper->setDocumentDirectories(array('./test/Integration/Document' => 'test'));
     $client          = new \Congow\Orient\Http\Client\Curl(false, 10);
     $binding         = new \Congow\Orient\Foundation\Binding($client, '127.0.0.1', '2480', 'admin', 'admin', 'demo');
     $protocolAdapter = new \Congow\Orient\Foundation\Protocol\Adapter\Http($binding);
     $manager         = new Manager($mapper, $protocolAdapter);
     
     $this->repository = new Repository("test\Integration\Document\Post", $manager, $mapper);
 }
Example #2
0
 /**
  * @expectedException \Congow\Orient\Exception\ODM\OClass\NotFound
  */
 public function testLookingForANonMappedTypeRaisesAnException()
 {
     $mapper          = new Mapper(__DIR__ . "/../../proxies");
     $mapper->setDocumentDirectories(array('./docs' => '\\'));
     $client          = new \Congow\Orient\Http\Client\Curl(false, 10);
     $binding         = new \Congow\Orient\Foundation\Binding($client, '127.0.0.1', '2480', 'admin', 'admin', 'demo');
     $protocolAdapter = new \Congow\Orient\Foundation\Protocol\Adapter\Http($binding);
     $this->manager   = new Manager($mapper, $protocolAdapter);
     $address = $this->manager->find('13:0');
 }