Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
buildTestingResultsEnvironment example
protected
$testRunResultsStorage
;
/** * {@inheritdoc} */
public
function
setUp
(
)
: void
{
parent::
setUp
(
)
;
$this
->connection = Database::
getConnection
(
)
;
$this
->testRunResultsStorage =
new
SimpletestTestRunResultsStorage
(
$this
->connection
)
;
$this
->testRunResultsStorage->
buildTestingResultsEnvironment
(
FALSE
)
;
}
/** * @covers ::createNew * @covers ::get * @covers ::id * @covers ::insertLogEntry * @covers ::setDatabasePrefix * @covers ::getDatabasePrefix * @covers ::getTestClass */
/** * @covers ::buildTestingResultsEnvironment * @covers ::validateTestingResultsEnvironment */
public
function
testBuildNewEnvironment
(
)
: void
{
$schema
=
$this
->connection->
schema
(
)
;
$this
->
assertFalse
(
$schema
->
tableExists
(
'simpletest'
)
)
;
$this
->
assertFalse
(
$schema
->
tableExists
(
'simpletest_test_id'
)
)
;
$this
->
assertFalse
(
$this
->testRunResultsStorage->
validateTestingResultsEnvironment
(
)
)
;
$this
->testRunResultsStorage->
buildTestingResultsEnvironment
(
FALSE
)
;
$this
->
assertTrue
(
$schema
->
tableExists
(
'simpletest'
)
)
;
$this
->
assertTrue
(
$schema
->
tableExists
(
'simpletest_test_id'
)
)
;
$this
->
assertTrue
(
$this
->testRunResultsStorage->
validateTestingResultsEnvironment
(
)
)
;
}
/** * @covers ::buildTestingResultsEnvironment * @covers ::validateTestingResultsEnvironment * @covers ::createNew * @covers ::insertLogEntry * @covers ::cleanUp */