Skip to content

Commit

Permalink
fix missing vars in LitCalTest.php
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnRDOrazio committed May 1, 2024
1 parent 9d59b0c commit 742bb56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/LitCalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@ public function runTest(): void {
} else {
$this->setError( $messageIfError . $errorMessage );
}
break;;
break;
case 'eventExists AND hasExpectedTimestamp':
$firstErrorMessage = " The event {$eventKey} should exist, instead it was not found";
if( property_exists( $this->dataToTest->LitCal, $eventKey ) ) {
$actualValue = $this->dataToTest->LitCal->{$eventKey}->date;
$secondErrorMessage = " The event {$eventKey} was expected to have timestamp {$assertion->expectedValue}, instead it had timestamp {$actualValue}";
if( $actualValue === $assertion->expectedValue ) {
$this->setSuccess( "expectedValue = {$assertion->expectedValue}, actualValue = {$actualValue}, rule result is of type " .gettype($rule2). " with a value of " . ($rule2 ? 'true' : 'false') );
$this->setSuccess( "expectedValue = {$assertion->expectedValue}, actualValue = {$actualValue}" );
} else {
$this->setError( $messageIfError . $secondErrorMessage );
}
Expand Down

0 comments on commit 742bb56

Please sign in to comment.