IntegrationBaseTest.php 648 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace GraphAware\NeoClient\Formatter\Tests\Integration;
  3. use Neoxygen\NeoClient\Client;
  4. use Neoxygen\NeoClient\ClientBuilder;
  5. abstract class IntegrationBaseTest
  6. {
  7. /**
  8. * @var \Neoxygen\NeoClient\Client
  9. */
  10. protected $conn;
  11. public function getConnection()
  12. {
  13. if (!$this->conn instanceof Client) {
  14. $this->conn = ClientBuilder::create()
  15. ->addConnection('default', 'http', 'localhost', 7474, true, 'neo4j', 'veryCoolMax')
  16. ->setAutoFormatResponse(true)
  17. ->enableNewFormattingService()
  18. ->build();
  19. }
  20. return $this->conn;
  21. }
  22. }