+ vscode night owl theme
This commit is contained in:
36
dots/vscodium/sdras.night-owl-2.0.1-universal/demo/php.php
Normal file
36
dots/vscodium/sdras.night-owl-2.0.1-universal/demo/php.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
class HelloWorldTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var PDO
|
||||
*/
|
||||
private $pdo;
|
||||
public function setUp()
|
||||
{
|
||||
$this->pdo = new PDO($GLOBALS['db_dsn'], $GLOBALS['db_username'], $GLOBALS['db_password']);
|
||||
$this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
$this->pdo->query("CREATE TABLE hello (what VARCHAR(50) NOT NULL)");
|
||||
}
|
||||
public function tearDown()
|
||||
{
|
||||
$this->pdo->query("DROP TABLE hello");
|
||||
}
|
||||
public function testHelloWorld()
|
||||
{
|
||||
$helloWorld = new HelloWorld($this->pdo);
|
||||
$this->assertEquals('Hello World', $helloWorld->hello());
|
||||
}
|
||||
public function testHello()
|
||||
{
|
||||
$helloWorld = new HelloWorld($this->pdo);
|
||||
$this->assertEquals('Hello Bar', $helloWorld->hello('Bar'));
|
||||
}
|
||||
public function testWhat()
|
||||
{
|
||||
$helloWorld = new HelloWorld($this->pdo);
|
||||
$this->assertFalse($helloWorld->what());
|
||||
$helloWorld->hello('Bar');
|
||||
$this->assertEquals('Bar', $helloWorld->what());
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user