Browse Source

Fixed more tests on Windows failing because of line endings

tags/2.0.3
Alexander Makarov 10 years ago
parent
commit
c80da0722e
  1. 2
      tests/unit/framework/helpers/VarDumperTest.php
  2. 4
      tests/unit/framework/mail/BaseMailerTest.php
  3. 6
      tests/unit/framework/widgets/ActiveFieldTest.php
  4. 4
      tests/unit/framework/widgets/MenuTest.php

2
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 . ';'));
}
}

4
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()

6
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;
</select>
EOD;
$this->activeField->listBox(["1" => "Item One", "2" => "Item 2"]);
$this->assertEquals($expectedValue, $this->activeField->parts['{input}']);
$this->assertEqualsWithoutLE($expectedValue, $this->activeField->parts['{input}']);
}

4
tests/unit/framework/widgets/MenuTest.php

@ -35,7 +35,7 @@ class MenuTest extends \yiiunit\TestCase
]
]);
$this->assertEquals(<<<HTML
$this->assertEqualsWithoutLE(<<<HTML
<ul><li><a href="#"><span class="glyphicon glyphicon-user"></span> Users</a></li>
<li><a href="#">Authors &amp; Publications</a></li></ul>
HTML
@ -59,7 +59,7 @@ HTML
]
]);
$this->assertEquals(<<<HTML
$this->assertEqualsWithoutLE(<<<HTML
<ul><li><a href="#"><span class="glyphicon glyphicon-user"></span> Users</a></li>
<li><a href="#">Authors &amp; Publications</a></li></ul>
HTML

Loading…
Cancel
Save