/**
  * Tests the FormatAutocomment hook provided by RepoHooks.
  *
  * @todo move to RepoHooksTest
  *
  * @dataProvider providerOnFormat
  */
 public function testOnFormat($model, $root, $pre, $auto, $post, $title, $local, $expected)
 {
     $itemTitle = $this->getMock($title);
     $itemTitle->expects($this->once())->method('getContentModel')->will($this->returnValue($model));
     $comment = null;
     RepoHooks::onFormat(array($model, $root), $comment, $pre, $auto, $post, $itemTitle, $local);
     if (is_null($expected)) {
         $this->assertEquals($expected, $comment, "Didn't find the expected null");
     } else {
         $this->assertRegExp($expected, $comment, "Didn't find the expected final comment");
     }
 }