public function testCanEndAnActionWithNoMessage()
{
// ----------------------------------------------------------------
// setup your test
// the message we are logging
$startMsg = "This is a test message";
// our DI container
$i = new Injectables();
// our mocked output object
$i->output = Mockery::mock("DataSift\\Storyplayer\\Output");
$i->output->shouldReceive('logPhaseActivity')->once()->with($startMsg, null);
// our real data formatter
$i->dataFormatter = new DataFormatter();
// our unit under test
$obj = new Action_LogItem($i, 1);
$obj->startAction($startMsg);
// make sure the message started
$this->assertNotNull($obj->getStartTime());
$this->assertNull($obj->getEndTime());
// ----------------------------------------------------------------
// perform the change
$obj->endAction();
// ----------------------------------------------------------------
// test the results
$this->assertNotNull($obj->getEndTime());
$this->assertNull($obj->getOpenAction());
Mockery::close();
}