public function testCanFormatAnAccessRuleModelWithResource()
{
$id = 1;
$users = ['user1', 'user2'];
$resources = ['resource1', 'resource2'];
$model = $this->getMock('Imbo\\Model\\AccessRule');
$model->expects($this->once())->method('getId')->will($this->returnValue($id));
$model->expects($this->once())->method('getUsers')->will($this->returnValue($users));
$model->expects($this->once())->method('getResources')->will($this->returnValue($resources));
$this->assertSame('{"id":1,"users":["user1","user2"],"resources":["resource1","resource2"]}', $this->formatter->format($model));
}