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 + } +}