public function testReturnReportWithEventsOnEnterWorkflow()
{
$model = new Item04();
$model->on(WorkflowEvent::beforeEnterStatus('Item04Workflow/A'), function ($event) {
$event->invalidate('my error message');
});
$report = $model->getNextStatuses(false, true);
$this->assertCount(1, $report);
$this->assertArrayHasKey('Item04Workflow/A', $report);
$this->assertInstanceOf('raoul2000\\workflow\\base\\Status', $report['Item04Workflow/A']['status']);
$this->assertCount(3, $report['Item04Workflow/A']['event']);
$this->assertEquals([0 => ['name' => SimpleWorkflowBehavior::EVENT_BEFORE_CHANGE_STATUS, 'success' => null], 1 => ['name' => 'beforeEnterWorkflow{Item04Workflow}', 'success' => null], 2 => ['name' => 'beforeEnterStatus{Item04Workflow/A}', 'success' => false, 'messages' => [0 => 'my error message']]], $report['Item04Workflow/A']['event']);
$this->assertEquals(false, $report['Item04Workflow/A']['isValid']);
}