diff --git a/tests/integration/Core/BaseTestCase.php b/tests/integration/Core/BaseTestCase.php index ea4c2c3455..45e526ce3b 100644 --- a/tests/integration/Core/BaseTestCase.php +++ b/tests/integration/Core/BaseTestCase.php @@ -113,6 +113,8 @@ abstract class BaseTestCase extends \PHPUnit_Framework_TestCase protected function setUp() { + $this->beforeSetUp(); + $params = array( 'dataFile' => $this->dataFile, 'pathToFiles' => $this->pathToFiles, @@ -140,6 +142,11 @@ abstract class BaseTestCase extends \PHPUnit_Framework_TestCase return $this->espoTester->createUser($userData, $role, $isPortal); } + protected function beforeSetUp() + { + + } + protected function beforeStartApplication() { diff --git a/tests/integration/Core/Tester.php b/tests/integration/Core/Tester.php index 1b12542c50..021e4e2304 100644 --- a/tests/integration/Core/Tester.php +++ b/tests/integration/Core/Tester.php @@ -158,6 +158,7 @@ class Tester { $this->install(); $this->loadData(); + $this->getApplication(true)->runRebuild(); } public function terminate() diff --git a/tests/integration/Espo/Account/CreateTest.php b/tests/integration/Espo/Account/CreateTest.php index 8ac30b848a..c507c29b98 100644 --- a/tests/integration/Espo/Account/CreateTest.php +++ b/tests/integration/Espo/Account/CreateTest.php @@ -40,11 +40,11 @@ class CreateTest extends \tests\integration\Core\BaseTestCase { $service = $this->getContainer()->get('serviceFactory')->create('Account'); - $entity = $service->createEntity(array( + $entity = $service->createEntity((object) [ 'name' => 'Test Account', 'emailAddress' => 'test@tester.com', 'phoneNumber' => '123-456-789', - )); + ]); $this->assertInstanceOf('\\Espo\\ORM\\Entity', $entity); $this->assertTrue(!empty($entity->id));