Tests/XdiffTest.php : update the test with Camelcase
This commit is contained in:
@@ -11,7 +11,7 @@ namespace Domframework\Tests;
|
||||
use Domframework\Xdiff;
|
||||
|
||||
/** Test the domframework xdiff part */
|
||||
class xdiffTest extends \PHPUnit_Framework_TestCase
|
||||
class XdiffTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
// Declaration of $string1 and $string2
|
||||
// {{{
|
||||
@@ -72,7 +72,7 @@ to this document.
|
||||
";
|
||||
// }}}
|
||||
|
||||
public function test_diff_normal_1()
|
||||
public function testDiffNormal1()
|
||||
{
|
||||
// Mode normal
|
||||
$xdiff = new Xdiff();
|
||||
@@ -102,7 +102,7 @@ to this document.
|
||||
");
|
||||
}
|
||||
|
||||
public function test_diff_normal_2()
|
||||
public function testDiffNormal2()
|
||||
{
|
||||
// Mode normal
|
||||
$xdiff = new Xdiff();
|
||||
@@ -146,7 +146,7 @@ to this document.
|
||||
");
|
||||
}
|
||||
|
||||
public function test_diff_normal_4()
|
||||
public function testDiffNormal4()
|
||||
{
|
||||
// Mode normal
|
||||
$xdiff = new Xdiff();
|
||||
@@ -158,14 +158,14 @@ to this document.
|
||||
");
|
||||
}
|
||||
|
||||
public function test_diff_normal_5()
|
||||
public function testDiffNormal5()
|
||||
{
|
||||
$xdiff = new Xdiff();
|
||||
$res = $xdiff->diff("\n", "\n");
|
||||
$this->assertSame($res, "");
|
||||
}
|
||||
|
||||
public function test_diff_normal_6()
|
||||
public function testDiffNormal6()
|
||||
{
|
||||
$xdiff = new Xdiff();
|
||||
$res = $xdiff->diff("\n", "");
|
||||
@@ -173,7 +173,7 @@ to this document.
|
||||
< \n");
|
||||
}
|
||||
|
||||
public function test_diff_normal_7()
|
||||
public function testDiffNormal7()
|
||||
{
|
||||
$xdiff = new Xdiff();
|
||||
$res = $xdiff->diff("", "\n");
|
||||
@@ -181,7 +181,7 @@ to this document.
|
||||
> \n");
|
||||
}
|
||||
|
||||
public function test_diff_unified_1()
|
||||
public function testDiffUnified1()
|
||||
{
|
||||
// Mode unified
|
||||
$xdiff = new Xdiff("unified");
|
||||
@@ -215,7 +215,7 @@ to this document.
|
||||
");
|
||||
}
|
||||
|
||||
public function test_diff_unified_2()
|
||||
public function testDiffUnified2()
|
||||
{
|
||||
// Mode unified
|
||||
$xdiff = new Xdiff("unified");
|
||||
@@ -247,7 +247,7 @@ to this document.
|
||||
");
|
||||
}
|
||||
|
||||
public function test_diff_unified_3()
|
||||
public function testDiffUnified3()
|
||||
{
|
||||
$xdiff = new Xdiff("unified");
|
||||
$res = $xdiff->diff("NEWLINE\n", "\n");
|
||||
@@ -259,7 +259,7 @@ to this document.
|
||||
");
|
||||
}
|
||||
|
||||
public function test_diff_unified_4()
|
||||
public function testDiffUnified4()
|
||||
{
|
||||
$xdiff = new Xdiff("unified");
|
||||
$res = $xdiff->diff("\n", "NEWLINE\n");
|
||||
@@ -271,14 +271,14 @@ to this document.
|
||||
");
|
||||
}
|
||||
|
||||
public function test_diff_unified_5()
|
||||
public function testDiffUnified5()
|
||||
{
|
||||
$xdiff = new Xdiff("unified");
|
||||
$res = $xdiff->diff("\n", "\n");
|
||||
$this->assertSame($res, "");
|
||||
}
|
||||
|
||||
public function test_diff_unified_6()
|
||||
public function testDiffUnified6()
|
||||
{
|
||||
$xdiff = new Xdiff("unified");
|
||||
$res = $xdiff->diff("\n", "");
|
||||
@@ -288,7 +288,7 @@ to this document.
|
||||
-\n");
|
||||
}
|
||||
|
||||
public function test_diff_unified_7()
|
||||
public function testDiffUnified7()
|
||||
{
|
||||
$xdiff = new Xdiff("unified");
|
||||
$res = $xdiff->diff("", "\n");
|
||||
@@ -298,7 +298,7 @@ to this document.
|
||||
+\n");
|
||||
}
|
||||
|
||||
public function test_diffFile_unified_1()
|
||||
public function testDiffFileUnified1()
|
||||
{
|
||||
file_put_contents("/tmp/test_xdiff1", $this->string1);
|
||||
file_put_contents("/tmp/test_xdiff2", $this->string2);
|
||||
@@ -330,21 +330,21 @@ to this document.
|
||||
");
|
||||
}
|
||||
|
||||
public function test_diffFile_unified_2()
|
||||
public function testDiffFileUnified2()
|
||||
{
|
||||
$xdiff = new Xdiff("unified");
|
||||
$this->setExpectedException();
|
||||
$res = $xdiff->diffFile("/tmp/test_xdiffNOTEXISTS", "/tmp/test_xdiff2");
|
||||
}
|
||||
|
||||
public function test_diffFile_unified_3()
|
||||
public function testDiffFileUnified3()
|
||||
{
|
||||
$xdiff = new Xdiff("unified");
|
||||
$this->setExpectedException();
|
||||
$res = $xdiff->diffFile("/tmp/test_xdiff1", "/tmp/test_xdiffNOTEXISTS");
|
||||
}
|
||||
|
||||
public function test_diffFile_sideBySide_1()
|
||||
public function testDiffFileSideBySide1()
|
||||
{
|
||||
file_put_contents("/tmp/test_xdiff1", $this->string1);
|
||||
file_put_contents("/tmp/test_xdiff2", $this->string2);
|
||||
@@ -352,7 +352,7 @@ to this document.
|
||||
$res = $xdiff->diffFile("/tmp/test_xdiff1", "/tmp/test_xdiff2");
|
||||
$this->assertSame(
|
||||
$res,
|
||||
" > This is an important
|
||||
" > This is an important
|
||||
> notice! It should
|
||||
> therefore be located at
|
||||
> the beginning of this
|
||||
|
||||
Reference in New Issue
Block a user