Skip to content

Commit

Permalink
Updated test case
Browse files Browse the repository at this point in the history
  • Loading branch information
batumibiz committed Jan 21, 2024
1 parent 8294822 commit 4b76968
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,12 @@
<directory>src</directory>
</include>
</source>

<php>
<var name="test_db_host" value="127.0.0.1"/>
<var name="test_db_port" value="3306"/>
<var name="test_db_user" value="root"/>
<var name="test_db_pass" value="root"/>
<var name="test_db_name" value="tmp_test_database"/>
</php>
</phpunit>
Empty file added tests/stubs/.gitkeep
Empty file.
2 changes: 1 addition & 1 deletion tests/unit/SessionHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class SessionHandlerTest extends MysqlTestCase
public function setUp(): void
{
$loader = new SqlDumpLoader(self::getPdo());
$loader->loadFile('install/sql/system.sql');
$loader->loadFile('install/sql/tables.sql');

if ($loader->hasErrors()) {
$this->fail(implode("\n", $loader->getErrors()));
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/SessionMiddlewareFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class SessionMiddlewareFactoryTest extends MysqlTestCase

public function setUp(): void
{
$this->file = __DIR__ . '/../../stubs/gc.timestamp';
$this->file = __DIR__ . '/../stubs/gc.timestamp';
$this->factory = new SessionMiddlewareFactory();
}

Expand Down Expand Up @@ -87,7 +87,7 @@ public function testCreateTimestampFile(): void
public function testFactoryReturnsSessionMiddlewareInstance()
{
$loader = new SqlDumpLoader(self::getPdo());
$loader->loadFile('install/sql/system.sql');
$loader->loadFile('install/sql/tables.sql');

if ($loader->hasErrors()) {
$this->fail(implode("\n", $loader->getErrors()));
Expand Down

0 comments on commit 4b76968

Please sign in to comment.