From f0fbf5e2359075bcd9f9ed0802f17f86f1eeda1a Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Tue, 24 Jan 2017 11:00:48 +0100 Subject: [PATCH] Test the bundle with and without the OGM (#12) * Make sure to test with and without the OGM * typo --- .travis.yml | 2 ++ Tests/Functional/BundleInitializationTest.php | 8 +++++--- composer.json | 1 - 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index cb1157f..a5c29af 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,6 +25,8 @@ branches: matrix: fast_finish: true include: + - php: 7.0 + env: SYMFONY_VERSION="3.2.* graphaware/neo4j-php-ogm:^1.0" - php: 7.0 env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci" SYMFONY_VERSION=3.0.* diff --git a/Tests/Functional/BundleInitializationTest.php b/Tests/Functional/BundleInitializationTest.php index c301411..f65365a 100644 --- a/Tests/Functional/BundleInitializationTest.php +++ b/Tests/Functional/BundleInitializationTest.php @@ -23,8 +23,10 @@ public function testRegisterBundle() $client = $container->get('neo4j.client'); $this->assertInstanceOf(ClientInterface::class, $client); - $this->assertTrue($container->has('neo4j.entity_manager')); - $client = $container->get('neo4j.entity_manager'); - $this->assertInstanceOf(EntityManager::class, $client); + if (class_exists('GraphAware\Neo4j\OGM\EntityManager')) { + $this->assertTrue($container->has('neo4j.entity_manager')); + $client = $container->get('neo4j.entity_manager'); + $this->assertInstanceOf(EntityManager::class, $client); + } } } diff --git a/composer.json b/composer.json index ccdfdf4..2e859b6 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,6 @@ "require-dev": { "phpunit/phpunit": "^5.4", "symfony/symfony": "^3.0", - "graphaware/neo4j-php-ogm": "^1.0", "matthiasnoback/symfony-dependency-injection-test": "^1.0" }, "suggest": {