-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Refactor neo4j queries #1081
base: develop
Are you sure you want to change the base?
Conversation
12392ed
to
d3fc50a
Compare
d3fc50a
to
3541639
Compare
5b8f4f5
to
999703b
Compare
Version
There are 0 BREAKING CHANGE, 0 feature, 1 fix |
$subClasses = $class->getParentClasses(); | ||
|
||
$this->assertCount(0, $subClasses); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$subClasses = $class->getParentClasses(); | |
$this->assertCount(0, $subClasses); | |
$parentClasses = $class->getParentClasses(); | |
$this->assertCount(0, $parentClasses); |
$resource->removePropertyValues($property); | ||
$result = $this->object->getPropertiesValues($resource, [$property]); | ||
|
||
$this->assertFalse(in_array(new core_kernel_classes_Literal('prop1'), $result[$property->getUri()])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe should instead check if result array is empty?
$resource->removePropertyValues($property, ['pattern' => 'prop1']); | ||
$propertiesValues = $this->object->getPropertiesValues($resource, [$property]); | ||
|
||
$this->assertFalse(in_array(new core_kernel_classes_Literal('prop1'), $propertiesValues[$property->getUri()])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe in_array($object, [$some, $other, $objects, $even, $with, $same, $conents])
will always return false
. Unless strict
parameter is passed to in_array
, but then it checks for exact same object instance, and it wouldn't work here. So I think all these test cases doing assertFalse(in_array(...))
actually don't check anything 🤔
$this->assertFalse(in_array(new core_kernel_classes_Literal('prop1'), $propertiesValues[$property->getUri()])); | ||
} | ||
|
||
public function testRemovePropertyValueWithPatternLikeTrueUsingTwoPatternsAndBothOfThemHaveToBeMeet() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public function testRemovePropertyValueWithPatternLikeTrueUsingTwoPatternsAndBothOfThemHaveToBeMeet() | |
public function testRemovePropertyValueWithPatternLikeTrueUsingTwoPatternsAndBothOfThemHaveToBeMet() |
$this->assertFalse(in_array(new core_kernel_classes_Literal('prop1'), $result[$property->getUri()])); | ||
} | ||
|
||
public function testRemovePropertyValueWithPatternLikeTrueUsingThreePatternsTwoOfThemHaveToBeMeetOtherOptional() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public function testRemovePropertyValueWithPatternLikeTrueUsingThreePatternsTwoOfThemHaveToBeMeetOtherOptional() | |
public function testRemovePropertyValueWithPatternLikeTrueUsingThreePatternsTwoOfThemHaveToBeMetOtherOptional() |
$this->assertFalse(in_array(new core_kernel_classes_Literal('prop1'), $propertiesValues[$property->getUri()])); | ||
} | ||
|
||
public function testRemovePropertyValueWithPatternLikeFalseAndTwoPatternsWhichOnlyOneHasToBeMeet() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public function testRemovePropertyValueWithPatternLikeFalseAndTwoPatternsWhichOnlyOneHasToBeMeet() | |
public function testRemovePropertyValueWithPatternLikeFalseAndTwoPatternsWhichOnlyOneHasToBeMet() |
Ticket - https://oat-sa.atlassian.net/browse/REL-1251
Reworking of PR - #1064