Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #31 from elbgoods/bugfix/change_arr_exept_to_arr_diff
Browse files Browse the repository at this point in the history
fix array_diff
  • Loading branch information
Gummibeer authored Aug 4, 2020
2 parents 9b6c766 + 4dc471d commit 17e586e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/PHPUnit/Assertions/ModelAssertions.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Elbgoods\CiTestTools\PHPUnit\Assertions;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Arr;
use PHPUnit\Framework\Assert as PHPUnit;

trait ModelAssertions
Expand All @@ -23,7 +22,7 @@ public static function assertEqualsModel(Model $expected, $actual, ?string $mess
PHPUnit::assertTrue($expected->is($actual));
}

foreach (Arr::except($expected->getFillable(), $expected->getHidden()) as $attribute) {
foreach (array_diff($expected->getFillable(), $expected->getHidden()) as $attribute) {
PHPUnit::assertEquals(
$expected->getAttribute($attribute),
data_get($actual, $attribute),
Expand Down

0 comments on commit 17e586e

Please sign in to comment.