Skip to content

Commit 092448a

Browse files
committed
Update TestBase.php
Trying to fix Error from Scrutinizer: PHP Fatal error: Call to a member function get() on a non-object in /home/scrutinizer/build/package/Tests/TestBase.php on line 60 https://scrutinizer-ci.com/g/codeconsortium/CCDNUserSecurityBundle/inspections/d4678526-3c3f-4ba8-9de4-a01b168bbdfc
1 parent 9929a04 commit 092448a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Tests/TestBase.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ public function setUp()
5757
* message when running many tests
5858
*/
5959
public function tearDown(){
60-
$this->container->get('doctrine')->getConnection()->close();
60+
if($this->container !== null){
61+
$this->container->get('doctrine')->getConnection()->close();
62+
}
6163

6264
parent::tearDown();
6365
}

0 commit comments

Comments
 (0)