From 19b5cca0648a8072f130c7bab2df4843f4cb8db5 Mon Sep 17 00:00:00 2001 From: madrizcarlose <77582854+madrizcarlose@users.noreply.github.com> Date: Fri, 24 Sep 2021 16:40:11 -0300 Subject: [PATCH] Update HelloWorldTest.php --- Tests/HelloWorldTest.php | 45 +--------------------------------------- 1 file changed, 1 insertion(+), 44 deletions(-) diff --git a/Tests/HelloWorldTest.php b/Tests/HelloWorldTest.php index eaab7996..bae5ac89 100644 --- a/Tests/HelloWorldTest.php +++ b/Tests/HelloWorldTest.php @@ -1,47 +1,4 @@ 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()); - } -} + >