From 5e0c5d7f5f63e6393260dc2c6a6889414ff664e0 Mon Sep 17 00:00:00 2001 From: Lenny ROUANET Date: Thu, 28 Mar 2024 08:56:43 +0100 Subject: [PATCH] Get path --- component/File.php | 5 +++++ test/FileTest.php | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/component/File.php b/component/File.php index 5974553..f83b8ce 100644 --- a/component/File.php +++ b/component/File.php @@ -11,6 +11,11 @@ public function __construct( ) { } + public function getPath(): string + { + return $this->path; + } + public function exist(): bool { return file_exists($this->path); diff --git a/test/FileTest.php b/test/FileTest.php index 16b919b..10ed854 100644 --- a/test/FileTest.php +++ b/test/FileTest.php @@ -33,6 +33,13 @@ public function tearDown(): void unlink($this->filePath); } + public function testGetPath(): void + { + $result = $this->fixture->getPath(); + + $this->assertIsString($result); + } + public function testGet(): void { $result = $this->fixture->exist();