Page MenuHomeDevCentral

WithSqliteAssertions.php
No OneTemporary

WithSqliteAssertions.php

<?php
declare(strict_types=1);
namespace Nasqueron\SAAS\PhpBB\Tests\Utilities;
use PHPUnit\Framework\Assert;
trait WithSqliteAssertions {
public function assertDatabaseHasBeenCreated (string $filename) : void {
Assert::assertFileExists($filename);
// Checks the file isn't empty (ie some tables and perhaps data exist)
Assert::assertStringNotEqualsFile(
$filename,
'',
"Database file has been created but schema wasn't applied."
);
}
}

File Metadata

Mime Type
text/x-php
Expires
Wed, Apr 2, 18:14 (12 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2535298
Default Alt Text
WithSqliteAssertions.php (518 B)

Event Timeline