/** * @dataProvider contextProvider */ public function testContext($maxContext, $from, $to, $expected) { $gh = new GithubMarkdown(); $context = new ContextDiff(); $context->setMaxContext($maxContext); $this->assertEquals($expected, $gh->format(Diff::create($from, $to, $context))); }
/** * @dataProvider contextProvider * * @param int $maxContext * @param string $from * @param string $to * @param string $expected */ public function testContext($maxContext, $from, $to, $expected) { $context = new ContextDiff(); $context->setMaxContext($maxContext); $diff = Diff::create($from, $to, $context); $formatter = new Text(); $this->assertSame($expected, $formatter->format($diff)); }