Skip to content

Commit 31a4131

Browse files
committed
Fix PHPUnit namespace for PHP 7 and above
1 parent 497f885 commit 31a4131

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Tests/HelloWorldTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
class HelloWorldTest extends PHPUnit_Framework_TestCase
3+
class HelloWorldTest extends \PHPUnit\Framework\TestCase
44
{
55
/**
66
* @var PDO
@@ -9,7 +9,7 @@ class HelloWorldTest extends PHPUnit_Framework_TestCase
99

1010
public function setUp()
1111
{
12-
$this->pdo = new PDO($GLOBALS['db_dsn'], $GLOBALS['db_username'], $GLOBALS['db_password']);
12+
$this->pdo = new PDO('mysql:dbname=hello_world_test;host=127.0.0.1', 'root', '');
1313
$this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
1414
$this->pdo->query("CREATE TABLE hello (what VARCHAR(50) NOT NULL)");
1515
}
@@ -44,4 +44,3 @@ public function testWhat()
4444
$this->assertEquals('Bar', $helloWorld->what());
4545
}
4646
}
47-

0 commit comments

Comments
 (0)