Skip to content

Commit

Permalink
fix phpunit deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
smhg committed Dec 11, 2024
1 parent bbb64a8 commit 571e6e6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function testObjectAttributes()
{
$expectedAttributes = ['nestedSetQueries'];
foreach ($expectedAttributes as $attribute) {
$this->assertClassHasAttribute($attribute, 'NestedSetTable9');
$this->assertTrue(property_exists('NestedSetTable9', $attribute));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ protected function checkClassHasValidateBehavior($class)
$this->assertTrue(method_exists($class, 'validate'), "Class $class has no validate() method");
$this->assertTrue(method_exists($class, 'getValidationFailures'), "Class $class has no getValidationFailures() method");
$this->assertTrue(method_exists($class, 'loadValidatorMetadata'), "Class $class has no loadValidatorMetadata() method");
$this->assertClassHasAttribute('alreadyInValidation', $class, "Class $class has no 'alreadyInValidation' property");
$this->assertClassHasAttribute('validationFailures', $class, "Class $class has no 'validationFailures' property");
$this->assertTrue(property_exists($class, 'alreadyInValidation'), "Class $class has no 'alreadyInValidation' property");
$this->assertTrue(property_exists($class, 'validationFailures'), "Class $class has no 'validationFailures' property");
$method = new ReflectionMethod($class, 'loadValidatorMetadata');
$this->assertTrue($method->isStatic(), "Method loadValidatorMetadata() of class $class isn't static");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function testHasLoadValidatorMetadataMethod()
public function testHasAlreadyInValidationAttribute()
{
foreach ($this->classes as $class) {
$this->assertClassHasAttribute('alreadyInValidation', $class);
$this->assertTrue(property_exists($class, 'alreadyInValidation'));
}
}

Expand All @@ -89,7 +89,7 @@ public function testHasAlreadyInValidationAttribute()
public function testHasValidationFailuresAttribute()
{
foreach ($this->classes as $class) {
$this->assertClassHasAttribute('validationFailures', $class);
$this->assertTrue(property_exists($class, 'validationFailures'));
}
}

Expand Down

0 comments on commit 571e6e6

Please sign in to comment.