tflori/orm

just another orm...

View the Project on GitHub tflori/orm

Build Status Test Coverage Maintainability Latest Stable Version Total Downloads

» API Reference » ORM\Testing\SaveExpectation

ORM\Testing\SaveExpectation

Table of Contents

Abstract

Extends: Mockery\Expectation

Expectation for save() of a mocked entity that can verify the changes that get written

Methods

ORM\Testing\SaveExpectation::withChanges

public function withChanges(
    array|\Mockery\Matcher\MatcherInterface $changes, 
): $this
Expect save() to write these changes

Pass an array of attribute => new value to expect exactly these changes, or a Mockery matcher (e.g. m::subset(['title' => 'New'])) that gets the changes as array of attribute => new value.

Returns $this  
Parameters
Parameter Type Description  
$changes **array Mockery\Matcher\MatcherInterface**  

ORM\Testing\SaveExpectation::withChanges

↑ top