Ouzo\Tests\Assert::thatModel PHP Method

thatModel() public static method

Sample usage: Assert::thatModel(new User(['name' => 'bob']))->hasSameAttributesAs(new User(['name' => 'bob']));
public static thatModel ( Model $actual ) : ModelAssert
$actual Ouzo\Model
return ModelAssert
    public static function thatModel(Model $actual)
    {
        return ModelAssert::that($actual);
    }

Usage Example

Example #1
0
 /**
  * @test
  */
 public function shouldPassIfModelsAreEqual()
 {
     //given
     $product = new Product(array('name' => 'abc'));
     //when
     $otherProduct = new Product(array('name' => 'abc'));
     //then
     Assert::thatModel($product)->isEqualTo($otherProduct);
 }
All Usage Examples Of Ouzo\Tests\Assert::thatModel