Skip to content

Commit ee4b994

Browse files
committed
Closes #531
1 parent 69246d2 commit ee4b994

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

rules-tests/CodeQuality/Rector/MethodCall/AssertComparisonToSpecificMethodRector/Fixture/assert_true_to_greater_than.php.inc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
namespace Rector\Tests\PHPUnit\CodeQuality\Rector\MethodCall\AssertComparisonToSpecificMethodRector\Fixture;
34

45
use PHPUnit\Framework\TestCase;
@@ -9,8 +10,8 @@ final class AssertTrueToGreaterThan extends TestCase
910
{
1011
self::assertTrue(0 < $param);
1112
}
12-
1313
}
14+
1415
?>
1516
-----
1617
<?php

rules-tests/CodeQuality/Rector/MethodCall/AssertComparisonToSpecificMethodRector/Fixture/fixture.php.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ final class MyEqualsTest extends \PHPUnit\Framework\TestCase
2626
{
2727
public function test()
2828
{
29-
$this->assertGreaterThan(2, count($something));
30-
$this->assertGreaterThan($something[1]['foo'], $something[0]['foo']);
29+
$this->assertLessThan(2, count($something));
30+
$this->assertLessThan($something[1]['foo'], $something[0]['foo']);
3131
$this->assertNotEquals(__DIR__, $something, 'message');
3232
$this->assertSame(1.0, $something);
3333
$this->assertNotSame(true, in_array('foo', ['bar', 'baz'], true));

rules/CodeQuality/Rector/MethodCall/AssertComparisonToSpecificMethodRector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ public function __construct(
4646
new BinaryOpWithAssertMethod(NotIdentical::class, 'assertNotSame', 'assertSame'),
4747
new BinaryOpWithAssertMethod(Equal::class, 'assertEquals', 'assertNotEquals'),
4848
new BinaryOpWithAssertMethod(NotEqual::class, 'assertNotEquals', 'assertEquals'),
49-
new BinaryOpWithAssertMethod(Greater::class, 'assertGreaterThan', 'assertLessThan'),
50-
new BinaryOpWithAssertMethod(Smaller::class, 'assertLessThan', 'assertGreaterThan'),
49+
new BinaryOpWithAssertMethod(Greater::class, 'assertLessThan', 'assertGreaterThan'),
50+
new BinaryOpWithAssertMethod(Smaller::class, 'assertGreaterThan', 'assertLessThan'),
5151
new BinaryOpWithAssertMethod(
5252
GreaterOrEqual::class,
5353
'assertGreaterThanOrEqual',

0 commit comments

Comments
 (0)