本文整理汇总了PHP中PHPUnit_Framework_MockObject_MockObject::startTest方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPUnit_Framework_MockObject_MockObject::startTest方法的具体用法?PHP PHPUnit_Framework_MockObject_MockObject::startTest怎么用?PHP PHPUnit_Framework_MockObject_MockObject::startTest使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPUnit_Framework_MockObject_MockObject
的用法示例。
在下文中一共展示了PHPUnit_Framework_MockObject_MockObject::startTest方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testInitStoreAfter
/**
* @magentoAdminConfigFixture any_config some_value
*/
public function testInitStoreAfter()
{
$this->_object->startTest($this);
$this->_object->expects($this->at(0))->method('_getConfigValue')->with('any_config')->will($this->returnValue('some_value'));
$this->_object->expects($this->at(1))->method('_setConfigValue')->with('any_config', 'some_value');
$this->_object->initStoreAfter();
}
示例2: testInitStoreAfter
/**
* @magentoConfigFixture current_store web/unsecure/base_url http://example.com/
*/
public function testInitStoreAfter()
{
$this->_object->startTest($this);
$this->_object->expects($this->at(0))->method('_getConfigValue')->with('web/unsecure/base_url')->will($this->returnValue('http://localhost/'));
$this->_object->expects($this->at(1))->method('_setConfigValue')->with('web/unsecure/base_url', 'http://example.com/');
$this->_object->initStoreAfter();
}
示例3: testSpecificStoreConfig
/**
* @magentoConfigFixture admin_store dev/restrict/allow_ips 192.168.0.2
*/
public function testSpecificStoreConfig()
{
$this->_annotation->expects($this->at(0))->method('_getConfigValue')->with('dev/restrict/allow_ips', 'admin')->will($this->returnValue('192.168.0.1'));
$this->_annotation->expects($this->at(1))->method('_setConfigValue')->with('dev/restrict/allow_ips', '192.168.0.2', 'admin');
$this->_annotation->startTest();
$this->_annotation->expects($this->once())->method('_setConfigValue')->with('dev/restrict/allow_ips', '192.168.0.1', 'admin');
$this->_annotation->endTest();
}
示例4: testEndTestSuiteRollbackTransaction
public function testEndTestSuiteRollbackTransaction()
{
$this->_imitateTransactionStartRequest('startTestTransactionRequest');
$this->_object->startTest($this);
$this->_expectTransactionRollback($this->once());
$this->_object->endTestSuite();
}
示例5: testRevertFixtureFile
/**
* @magentoDataFixture path/to/fixture/script.php
* @magentoDataFixture ../framework/tests/unit/testsuite/Magento/Test/Listener/_files/sample_fixture_two.php
* @covers Magento_Test_Listener_Annotation_Fixture::_revertFixture
*/
public function testRevertFixtureFile()
{
$this->_annotation->startTest();
$this->_annotation->expects($this->at(1))->method('_applyOneFixture')->with($this->stringEndsWith('Magento/Test/Listener/_files/sample_fixture_two_rollback.php'));
$this->_annotation->endTest();
}