Intermediate commit
This commit is contained in:
parent
ee3a425c59
commit
7e966b93a5
@ -4,6 +4,12 @@ namespace BusinessLogic\Tickets;
|
|||||||
|
|
||||||
|
|
||||||
class TrackingIdGenerator {
|
class TrackingIdGenerator {
|
||||||
|
private $ticketGateway;
|
||||||
|
|
||||||
|
function __construct($ticketGateway) {
|
||||||
|
$this->ticketGateway = $ticketGateway;
|
||||||
|
}
|
||||||
|
|
||||||
function generateTrackingId() {
|
function generateTrackingId() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,7 @@ class TicketGateway extends CommonDao {
|
|||||||
while ($row = hesk_dbFetchAssoc($rs)) {
|
while ($row = hesk_dbFetchAssoc($rs)) {
|
||||||
$ticket = new Ticket();
|
$ticket = new Ticket();
|
||||||
|
|
||||||
|
//-- TODO Finish this!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
37
api/Tests/BusinessLogic/Tickets/TrackingIdGeneratorTest.php
Normal file
37
api/Tests/BusinessLogic/Tickets/TrackingIdGeneratorTest.php
Normal file
@ -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…
x
Reference in New Issue
Block a user