protected function setUp()
 {
     $boot = new Boot();
     $boot->setConfigArray(['id' => 'paymenttest', 'basePath' => dirname(__DIR__), 'modules' => ['payment' => ['class' => 'luya\\payment\\Module']], 'components' => ['db' => ['class' => 'yii\\db\\Connection', 'dsn' => DB_DSN, 'username' => DB_USER, 'password' => DB_PASS, 'charset' => 'utf8']]]);
     $boot->setYiiPath(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php');
     $boot->mockOnly = true;
     $boot->applicationWeb();
 }
示例#2
0
文件: BootTest.php 项目: luyadev/luya
 /**
  * @expectedException Exception
  */
 public function testYiiNotFound()
 {
     $boot = new Boot();
     $boot->configFile = __DIR__ . '/../../data/configs/console.php';
     $boot->setYiiPath('wrongPathToYii.php');
     $boot->mockOnly = true;
     $boot->applicationConsole();
 }
示例#3
0
 public function testBaseObject()
 {
     $boot = new Boot();
     $this->assertEquals('cli', $boot->getSapiName());
 }