diff --git a/php/Tests.php b/php/Tests.php index dee4e4d..65dc131 100644 --- a/php/Tests.php +++ b/php/Tests.php @@ -2,12 +2,12 @@ use PHPUnit\Framework\TestCase; +require_once __DIR__ . '/code.php'; + class Tests extends TestCase { public function testSkeleton() { - $this->assertSame(true, false); + $this->assertSame("Hi there!", greeting()); } } - -?> \ No newline at end of file diff --git a/php/code.php b/php/code.php index ca8fd95..05ca84e 100644 --- a/php/code.php +++ b/php/code.php @@ -1,9 +1,9 @@ \ No newline at end of file +if (basename(__FILE__) === basename($_SERVER['SCRIPT_FILENAME'] ?? '')) { + echo greeting() . "\n"; +}