コード例 #1
0
ファイル: Util.php プロジェクト: inetprocess/sugarcli
 public static function getEntryPointInstance()
 {
     if (!EntryPoint::isCreated()) {
         $logger = new NullLogger();
         EntryPoint::createInstance(new SugarApp($logger, getenv('SUGARCLI_SUGAR_PATH')), '1');
     }
     return EntryPoint::getInstance();
 }
コード例 #2
0
 public function getEntryPointInstance()
 {
     if (!EntryPoint::isCreated()) {
         $logger = new NullLogger();
         EntryPoint::createInstance(new SugarApp($logger, getenv('SUGARCLI_SUGAR_PATH')), '1');
         $this->assertInstanceOf('Inet\\SugarCRM\\EntryPoint', EntryPoint::getInstance());
     }
     return EntryPoint::getInstance();
 }
コード例 #3
0
 public function getEntryPointInstance()
 {
     if (!EntryPoint::isCreated()) {
         $logger = new NullLogger();
         EntryPoint::createInstance(new Application($logger, getenv('SUGARCRM_PATH')), getenv('SUGARCRM_CURRENT_USER_ID'));
         $this->assertInstanceOf('Inet\\SugarCRM\\EntryPoint', EntryPoint::getInstance());
     }
     return EntryPoint::getInstance();
 }
コード例 #4
0
 public function testCreateTwice()
 {
     $first = $this->getEntryPointInstance();
     $second = EntryPoint::createInstance(new Application(new NullLogger(), $first->getPath()), '1');
     $this->assertEquals($first, $second);
 }