We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 497f885 commit 31a4131Copy full SHA for 31a4131
Tests/HelloWorldTest.php
@@ -1,6 +1,6 @@
1
<?php
2
3
-class HelloWorldTest extends PHPUnit_Framework_TestCase
+class HelloWorldTest extends \PHPUnit\Framework\TestCase
4
{
5
/**
6
* @var PDO
@@ -9,7 +9,7 @@ class HelloWorldTest extends PHPUnit_Framework_TestCase
9
10
public function setUp()
11
12
- $this->pdo = new PDO($GLOBALS['db_dsn'], $GLOBALS['db_username'], $GLOBALS['db_password']);
+ $this->pdo = new PDO('mysql:dbname=hello_world_test;host=127.0.0.1', 'root', '');
13
$this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
14
$this->pdo->query("CREATE TABLE hello (what VARCHAR(50) NOT NULL)");
15
}
@@ -44,4 +44,3 @@ public function testWhat()
44
$this->assertEquals('Bar', $helloWorld->what());
45
46
47
-
0 commit comments