Skip to content

Commit 0f97dcd

Browse files
committed
test: fix assert argument order
1 parent 76bd940 commit 0f97dcd

1 file changed

Lines changed: 16 additions & 24 deletions

File tree

tests/system/Entity/EntityTest.php

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -703,13 +703,12 @@ public function testAsArray()
703703

704704
$result = $entity->toArray();
705705

706-
// @TODO arguments are reversed
707-
$this->assertSame($result, [
706+
$this->assertSame([
708707
'foo' => null,
709708
'bar' => ':bar',
710709
'default' => 'sumfin',
711710
'createdAt' => null,
712-
]);
711+
], $result, );
713712
}
714713

715714
public function testAsArrayRecursive()
@@ -739,11 +738,10 @@ public function testAsArrayMapped()
739738

740739
$result = $entity->toArray();
741740

742-
// @TODO arguments are reversed
743-
$this->assertSame($result, [
741+
$this->assertSame([
744742
'bar' => null,
745743
'orig' => ':oo',
746-
]);
744+
], $result);
747745
}
748746

749747
public function testAsArraySwapped()
@@ -752,12 +750,11 @@ public function testAsArraySwapped()
752750

753751
$result = $entity->toArray();
754752

755-
// @TODO arguments are reversed
756-
$this->assertSame($result, [
753+
$this->assertSame([
757754
'bar' => 'foo',
758755
'foo' => 'bar',
759756
'original_bar' => 'bar',
760-
]);
757+
], $result);
761758
}
762759

763760
public function testToArraySkipAttributesWithUnderscoreInFirstCharacter()
@@ -771,10 +768,9 @@ public function testToArraySkipAttributesWithUnderscoreInFirstCharacter()
771768

772769
$result = $entity->toArray();
773770

774-
// @TODO arguments are reversed
775-
$this->assertSame($result, [
771+
$this->assertSame([
776772
'bar' => null,
777-
]);
773+
], $result);
778774
}
779775

780776
public function testAsArrayOnlyChanged()
@@ -784,10 +780,9 @@ public function testAsArrayOnlyChanged()
784780

785781
$result = $entity->toArray(true);
786782

787-
// @TODO arguments are reversed
788-
$this->assertSame($result, [
783+
$this->assertSame([
789784
'bar' => 'bar:foo:bar',
790-
]);
785+
], $result);
791786
}
792787

793788
public function testToRawArray()
@@ -796,13 +791,12 @@ public function testToRawArray()
796791

797792
$result = $entity->toRawArray();
798793

799-
// @TODO arguments are reversed
800-
$this->assertSame($result, [
794+
$this->assertSame([
801795
'foo' => null,
802796
'bar' => null,
803797
'default' => 'sumfin',
804798
'created_at' => null,
805-
]);
799+
], $result);
806800
}
807801

808802
public function testToRawArrayRecursive()
@@ -812,8 +806,7 @@ public function testToRawArrayRecursive()
812806

813807
$result = $entity->toRawArray(false, true);
814808

815-
// @TODO arguments are reversed
816-
$this->assertSame($result, [
809+
$this->assertSame([
817810
'foo' => null,
818811
'bar' => null,
819812
'default' => 'sumfin',
@@ -824,7 +817,7 @@ public function testToRawArrayRecursive()
824817
'default' => 'sumfin',
825818
'created_at' => null,
826819
],
827-
]);
820+
], $result);
828821
}
829822

830823
public function testToRawArrayOnlyChanged()
@@ -834,10 +827,9 @@ public function testToRawArrayOnlyChanged()
834827

835828
$result = $entity->toRawArray(true);
836829

837-
// @TODO arguments are reversed
838-
$this->assertSame($result, [
830+
$this->assertSame([
839831
'bar' => 'bar:foo',
840-
]);
832+
], $result);
841833
}
842834

843835
public function testFilledConstruction()

0 commit comments

Comments
 (0)