From 7e966b93a5192937b1c135892868e51e1ad06833 Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Sat, 11 Feb 2017 16:42:40 -0500 Subject: [PATCH] Intermediate commit --- .../Tickets/TrackingIdGenerator.php | 6 +++ api/DataAccess/Tickets/TicketGateway.php | 1 + .../Tickets/TrackingIdGeneratorTest.php | 37 +++++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 api/Tests/BusinessLogic/Tickets/TrackingIdGeneratorTest.php diff --git a/api/BusinessLogic/Tickets/TrackingIdGenerator.php b/api/BusinessLogic/Tickets/TrackingIdGenerator.php index 3a85f350..33793401 100644 --- a/api/BusinessLogic/Tickets/TrackingIdGenerator.php +++ b/api/BusinessLogic/Tickets/TrackingIdGenerator.php @@ -4,6 +4,12 @@ namespace BusinessLogic\Tickets; class TrackingIdGenerator { + private $ticketGateway; + + function __construct($ticketGateway) { + $this->ticketGateway = $ticketGateway; + } + function generateTrackingId() { } diff --git a/api/DataAccess/Tickets/TicketGateway.php b/api/DataAccess/Tickets/TicketGateway.php index 9b05e594..9317aaae 100644 --- a/api/DataAccess/Tickets/TicketGateway.php +++ b/api/DataAccess/Tickets/TicketGateway.php @@ -30,6 +30,7 @@ class TicketGateway extends CommonDao { while ($row = hesk_dbFetchAssoc($rs)) { $ticket = new Ticket(); + //-- TODO Finish this! } } } \ No newline at end of file diff --git a/api/Tests/BusinessLogic/Tickets/TrackingIdGeneratorTest.php b/api/Tests/BusinessLogic/Tickets/TrackingIdGeneratorTest.php new file mode 100644 index 00000000..c851b158 --- /dev/null +++ b/api/Tests/BusinessLogic/Tickets/TrackingIdGeneratorTest.php @@ -0,0 +1,37 @@ +ticketGateway = $this->createMock(TicketGateway::class); + + $this->trackingIdGenerator = new TrackingIdGenerator($this->ticketGateway); + } + + function testItReturnsTrackingIdInTheProperFormat() { + //-- Arrange + $format = ''; + + //-- Act + + //-- Assert + } +}