Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F6562667
BootstrapSqliteRepositoryTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
BootstrapSqliteRepositoryTest.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
Nasqueron\SAAS\PhpBB\Tests\Tasks
;
use
Nasqueron\SAAS\PhpBB\Tasks\BootstrapSqliteRepository
;
use
Nasqueron\SAAS\PhpBB\Tests\Utilities\WithSqliteAssertions
;
use
PHPUnit\Framework\TestCase
;
final
class
BootstrapSqliteRepositoryTest
extends
TestCase
{
use
WithSqliteAssertions
;
/**
* @var string
*/
private
$filename
;
///
/// Fixtures
///
public
function
setUp
()
{
$this
->
filename
=
tempnam
(
""
,
"test-db-"
);
}
public
function
tearDown
()
{
unlink
(
$this
->
filename
);
}
///
/// Tests
///
public
function
testBootstrap
()
:
void
{
$task
=
new
BootstrapSqliteRepository
(
$this
->
filename
);
$task
->
run
();
$this
->
assertDatabaseHasBeenCreated
(
$this
->
filename
);
}
public
function
testBootstrapWithDefaultFile
()
:
void
{
putenv
(
"SAAS_SITES_DB=$this->filename"
);
// default file
$task
=
new
BootstrapSqliteRepository
();
$task
->
run
();
$this
->
assertDatabaseHasBeenCreated
(
$this
->
filename
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, Apr 2, 18:22 (12 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2535304
Default Alt Text
BootstrapSqliteRepositoryTest.php (1 KB)
Attached To
Mode
rSAASPHPBB saas-phpbb helper command
Attached
Detach File
Event Timeline
Log In to Comment