本文整理匯總了PHP中BaseTest::setup方法的典型用法代碼示例。如果您正苦於以下問題:PHP BaseTest::setup方法的具體用法?PHP BaseTest::setup怎麽用?PHP BaseTest::setup使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類BaseTest
的用法示例。
在下文中一共展示了BaseTest::setup方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: setup
public function setup()
{
parent::setup();
$this->model = new TestPrecisionModel();
$viewStub = $this->getMockBuilder('AListView')->disableOriginalConstructor()->getMock();
$this->view = $viewStub;
$this->adapter = new DecimalListViewColumnAdapter('numberPositive5Precision', $this->view, array());
$this->decimal = 'numberPositive5Precision';
}
示例2: setup
public function setup()
{
parent::setup();
Yii::app()->user->userModel = User::getByUsername('super');
Yii::app()->user->userModel->timeZone = 'America/Chicago';
//Deal with daylight savings time.
$timeZoneObject = new DateTimeZone(Yii::app()->user->userModel->timeZone);
$offsetInSeconds = $timeZoneObject->getOffset(new DateTime());
$this->assertTrue($offsetInSeconds == -18000 || $offsetInSeconds == -21600);
self::$chicagoOffsetInSeconds = $offsetInSeconds;
}
示例3: setUp
public function setUp()
{
parent::setup();
$this->exception = "{$this->namespace}\\Exceptions\\MessageException";
}
示例4: setUp
public function setUp()
{
parent::setup();
$this->client = new \MessageBird\Client('YOUR_ACCESS_KEY', $this->mockClient);
}
示例5: setUp
public function setUp()
{
parent::setup();
$this->client = new \BulkSmsCenter\Client($this->mockAuth, $this->mockClient);
$this->exception = "{$this->namespace}\\Exceptions\\ClientException";
}
示例6: setup
public function setup()
{
parent::setup();
$this->formatter = new Formatter();
}
示例7: setUp
public function setUp()
{
$this->testClass = new VocabFetcher($this->getLogger(), array("api" => $this->getApi(), "file" => $this->getFile()));
parent::setup();
}
示例8: setup
public function setup()
{
$this->invitationObject = new CustomerInvitation(__DIR__ . '/../data/customers.json');
//static::$pathToCustomersJsonFile, 53.3381985, -6.2592576);
parent::setup();
}
示例9: setup
public function setup()
{
parent::setup();
Yii::app()->user->userModel = User::getByUsername('super');
}