Intermediate commit

remotes/upstream/api-rewrite
Mike Koch 7 years ago
parent ee3a425c59
commit 7e966b93a5

@ -4,6 +4,12 @@ namespace BusinessLogic\Tickets;
class TrackingIdGenerator {
private $ticketGateway;
function __construct($ticketGateway) {
$this->ticketGateway = $ticketGateway;
}
function generateTrackingId() {
}

@ -30,6 +30,7 @@ class TicketGateway extends CommonDao {
while ($row = hesk_dbFetchAssoc($rs)) {
$ticket = new Ticket();
//-- TODO Finish this!
}
}
}

@ -0,0 +1,37 @@
<?php
/**
* Created by PhpStorm.
* User: mkoch
* Date: 2/11/2017
* Time: 4:32 PM
*/
namespace BusinessLogic\Tickets;
use DataAccess\Tickets\TicketGateway;
use PHPUnit\Framework\TestCase;
class TrackingIdGeneratorTest extends TestCase {
/**
* @var $ticketGateway \PHPUnit_Framework_MockObject_MockObject
*/
private $ticketGateway;
private $trackingIdGenerator;
function setUp() {
$this->ticketGateway = $this->createMock(TicketGateway::class);
$this->trackingIdGenerator = new TrackingIdGenerator($this->ticketGateway);
}
function testItReturnsTrackingIdInTheProperFormat() {
//-- Arrange
$format = '';
//-- Act
//-- Assert
}
}
Loading…
Cancel
Save