From baab481401285b24ccaffac6b5cdfda7e3c94b3c Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Tue, 18 Nov 2025 09:50:29 +0200 Subject: [PATCH] test get bid link --- src/Bid/Bid.php | 9 +++++++++ tests/Unit/Bid/BidTest.php | 19 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 tests/Unit/Bid/BidTest.php diff --git a/src/Bid/Bid.php b/src/Bid/Bid.php index 3cc7018..b9d73bc 100644 --- a/src/Bid/Bid.php +++ b/src/Bid/Bid.php @@ -29,4 +29,13 @@ class Bid { return $this->carrierId; } + + public function getBidLink(): ?string + { + $id = $this->id; + if ($id === null) { + return null; + } + return "https://freightquotes.com/bid/$id"; + } } diff --git a/tests/Unit/Bid/BidTest.php b/tests/Unit/Bid/BidTest.php new file mode 100644 index 0000000..fae8082 --- /dev/null +++ b/tests/Unit/Bid/BidTest.php @@ -0,0 +1,19 @@ +assertEquals( + "https://freightquotes.com/bid/$bidId", + $bid->getBidLink() + ); + } +}