eZ\Publish\Core\Persistence\Legacy\Tests\TestCase::assertPropertiesCorrect PHP Méthode

assertPropertiesCorrect() protected méthode

Asserts that for all keys in $properties a corresponding property exists in $object with the *same* value as in $properties.
protected assertPropertiesCorrect ( array $properties, object $object )
$properties array
$object object
    protected function assertPropertiesCorrect(array $properties, $object)
    {
        if (!is_object($object)) {
            throw new InvalidArgumentException('Expected object as second parameter, received ' . gettype($object));
        }
        foreach ($properties as $propName => $propVal) {
            $this->assertSame($propVal, $object->{$propName}, "Incorrect value for \${$propName}");
        }
    }