-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
100 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
- go to /releases/orientdb-community-2.0-M3/bin | ||
- ./server.sh to start the server | ||
- ./console.sh to start the console | ||
- connet remote:localhost/mydb root password | ||
- http://localhost:2480 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
use PhpOrient\PhpOrient; | ||
use Marcosh\EventGraph\EventGraph; | ||
|
||
require __DIR__.'/vendor/autoload.php'; | ||
|
||
$config = [ | ||
'hostname' => 'localhost', | ||
'port' => 2424, | ||
'username' => 'root', | ||
'password' => 'password' | ||
]; | ||
$client = new PhpOrient(); | ||
$client->configure($config); | ||
$eventGraph = new EventGraph($client, 'mydb'); | ||
|
||
var_dump($eventGraph->getTagHistory('tag')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
namespace Marcosh\EventGraph; | ||
namespace Marcosh\Eventgraph; | ||
|
||
use PhpOrient\Protocols\Binary\Data\Record; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,60 @@ | ||
<?php | ||
|
||
/*namespace Marcosh\EventGraph; | ||
namespace Marcosh\EventGraph; | ||
|
||
use Marcosh\EventGraph\EventGraph; | ||
|
||
class EventGraphTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
// private $client; | ||
// private $eventGraph; | ||
// public function setUp() | ||
// { | ||
// $this->client = \Mockery::mock(); | ||
// $this->client->shouldReceive('dbOpen'); | ||
// $this->eventGraph = new EventGraph($this->client, 'dbName'); | ||
// } | ||
// public function tearDown() | ||
// { | ||
// \Mockery::close(); | ||
// } | ||
// public function testCreateTag() | ||
// { | ||
// $tag = new Tag(); | ||
// $tag->setName('tag'); | ||
// $this->assertEquals($tag, $this->eventGraph->createTag('tag')); | ||
// } | ||
}*/ | ||
private $client; | ||
private $eventGraph; | ||
|
||
public function setUp() | ||
{ | ||
$this->client = \Mockery::mock(); | ||
$this->client->shouldReceive('dbOpen'); | ||
$this->eventGraph = new EventGraph($this->client, 'dbName'); | ||
} | ||
|
||
public function tearDown() | ||
{ | ||
\Mockery::close(); | ||
} | ||
|
||
public function testCreateTagAndPersist() | ||
{ | ||
|
||
} | ||
|
||
public function testCreateTagWithoutPersisting() | ||
{ | ||
$tag = $this->eventGraph->createTag('tag', false); | ||
|
||
$this->assertEquals('Tag', $tag->getRecord()->getOClass()); | ||
} | ||
|
||
public function testSaveTag() | ||
{ | ||
|
||
} | ||
|
||
public function testGetTag() | ||
{ | ||
|
||
} | ||
|
||
public function testCreateEvent() | ||
{ | ||
|
||
} | ||
|
||
public function testSaveEvent() | ||
{ | ||
|
||
} | ||
|
||
public function testGetTagHistory() | ||
{ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters