From c80da0722e91e2fca39ca25c5e086f7a708d4683 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Sun, 15 Feb 2015 20:17:58 +0300 Subject: [PATCH] Fixed more tests on Windows failing because of line endings --- tests/unit/framework/helpers/VarDumperTest.php | 2 +- tests/unit/framework/mail/BaseMailerTest.php | 4 ++-- tests/unit/framework/widgets/ActiveFieldTest.php | 6 +++--- tests/unit/framework/widgets/MenuTest.php | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/unit/framework/helpers/VarDumperTest.php b/tests/unit/framework/helpers/VarDumperTest.php index 443ef99..6faff10 100644 --- a/tests/unit/framework/helpers/VarDumperTest.php +++ b/tests/unit/framework/helpers/VarDumperTest.php @@ -102,7 +102,7 @@ RESULT; public function testExport($var, $expectedResult) { $exportResult = VarDumper::export($var); - $this->assertEquals($expectedResult, $exportResult); + $this->assertEqualsWithoutLE($expectedResult, $exportResult); $this->assertEquals($var, eval('return ' . $exportResult . ';')); } } diff --git a/tests/unit/framework/mail/BaseMailerTest.php b/tests/unit/framework/mail/BaseMailerTest.php index cc1c7c7..b6d166f 100644 --- a/tests/unit/framework/mail/BaseMailerTest.php +++ b/tests/unit/framework/mail/BaseMailerTest.php @@ -262,8 +262,8 @@ TEXT $message = $mailer->compose([ 'html' => $htmlViewName, ]); - $this->assertEquals($htmlViewFileContent, $message->_htmlBody, 'Unable to render html!'); - $this->assertEquals($expectedTextRendering, $message->_textBody, 'Unable to render text!'); + $this->assertEqualsWithoutLE($htmlViewFileContent, $message->_htmlBody, 'Unable to render html!'); + $this->assertEqualsWithoutLE($expectedTextRendering, $message->_textBody, 'Unable to render text!'); } public function testUseFileTransport() diff --git a/tests/unit/framework/widgets/ActiveFieldTest.php b/tests/unit/framework/widgets/ActiveFieldTest.php index 0773f7d..b026bc1 100644 --- a/tests/unit/framework/widgets/ActiveFieldTest.php +++ b/tests/unit/framework/widgets/ActiveFieldTest.php @@ -56,7 +56,7 @@ class ActiveFieldTest extends \yiiunit\TestCase EOD; $actualValue = $this->activeField->render(); - $this->assertEquals($expectedValue, $actualValue); + $this->assertEqualsWithoutLE($expectedValue, $actualValue); } /** @@ -82,7 +82,7 @@ EOD; EOD; $actualValue = $this->activeField->render($content); - $this->assertEquals($expectedValue, $actualValue); + $this->assertEqualsWithoutLE($expectedValue, $actualValue); } public function testBeginHasErros() @@ -231,7 +231,7 @@ EOD; EOD; $this->activeField->listBox(["1" => "Item One", "2" => "Item 2"]); - $this->assertEquals($expectedValue, $this->activeField->parts['{input}']); + $this->assertEqualsWithoutLE($expectedValue, $this->activeField->parts['{input}']); } diff --git a/tests/unit/framework/widgets/MenuTest.php b/tests/unit/framework/widgets/MenuTest.php index bffe67e..c953bbd 100644 --- a/tests/unit/framework/widgets/MenuTest.php +++ b/tests/unit/framework/widgets/MenuTest.php @@ -35,7 +35,7 @@ class MenuTest extends \yiiunit\TestCase ] ]); - $this->assertEquals(<<assertEqualsWithoutLE(<<
  • Users
  • Authors & Publications
  • HTML @@ -59,7 +59,7 @@ HTML ] ]); - $this->assertEquals(<<assertEqualsWithoutLE(<<
  • Users
  • Authors & Publications
  • HTML