Skip to content

Commit

Permalink
Add tests for setting multiple attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
borkweb committed Jun 9, 2023
1 parent a41402d commit b0f25e4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/wpunit/ModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,17 @@ public function testShouldThrowExceptionForSettingMissingProperty() {
$model->iDontExist = 'foo';
}

public function testShouldSetMultipleAttributes() {
$model = new MockModel();
$model->setAttributes( [
'firstName' => 'Luke',
'lastName' => 'Skywalker',
] );

$this->assertEquals( 'Luke', $model->firstName );
$this->assertEquals( 'Skywalker', $model->lastName );
}

/**
* @since 1.0.0
*
Expand Down

0 comments on commit b0f25e4

Please sign in to comment.