Replace deprecated getObject with getObjectNode
This commit is contained in:
@@ -40,7 +40,7 @@ class NodeReaderMockTest extends \PHPUnit\Framework\TestCase {
|
||||
public function testHasType1() {
|
||||
$coid = new IRI('coid://cloudobjects.io');
|
||||
$this->useRootResourceMock();
|
||||
$object = $this->retriever->getObject($coid);
|
||||
$object = $this->retriever->getObjectNode($coid);
|
||||
|
||||
$this->assertTrue($this->reader->hasType($object, 'coid://cloudobjects.io/Namespace'));
|
||||
$this->assertTrue($this->reader->hasType($object, 'co:Namespace'));
|
||||
@@ -51,7 +51,7 @@ class NodeReaderMockTest extends \PHPUnit\Framework\TestCase {
|
||||
public function testHasPropertyValue1() {
|
||||
$coid = new IRI('coid://cloudobjects.io');
|
||||
$this->useRootResourceMock();
|
||||
$object = $this->retriever->getObject($coid);
|
||||
$object = $this->retriever->getObjectNode($coid);
|
||||
|
||||
$this->assertTrue($this->reader->hasPropertyValue($object, 'http://www.w3.org/2000/01/rdf-schema#label', 'CloudObjects'));
|
||||
$this->assertTrue($this->reader->hasPropertyValue($object, 'rdfs:label', 'CloudObjects'));
|
||||
@@ -60,7 +60,7 @@ class NodeReaderMockTest extends \PHPUnit\Framework\TestCase {
|
||||
public function testGetFirstValueString1() {
|
||||
$coid = new IRI('coid://cloudobjects.io');
|
||||
$this->useRootResourceMock();
|
||||
$object = $this->retriever->getObject($coid);
|
||||
$object = $this->retriever->getObjectNode($coid);
|
||||
|
||||
$this->assertEquals('CloudObjects', $this->reader->getFirstValueString($object, 'http://www.w3.org/2000/01/rdf-schema#label'));
|
||||
$this->assertEquals('CloudObjects', $this->reader->getFirstValueString($object, 'rdfs:label'));
|
||||
@@ -75,7 +75,7 @@ class NodeReaderMockTest extends \PHPUnit\Framework\TestCase {
|
||||
public function testGetFirstValueIRI1() {
|
||||
$coid = new IRI('coid://cloudobjects.io');
|
||||
$this->useRootResourceMock();
|
||||
$object = $this->retriever->getObject($coid);
|
||||
$object = $this->retriever->getObjectNode($coid);
|
||||
|
||||
$this->assertInstanceOf('ML\IRI\IRI', $this->reader->getFirstValueIRI($object, 'coid://cloudobjects.io/isVisibleTo'));
|
||||
$this->assertInstanceOf('ML\IRI\IRI', $this->reader->getFirstValueIRI($object, 'co:isVisibleTo'));
|
||||
@@ -87,7 +87,7 @@ class NodeReaderMockTest extends \PHPUnit\Framework\TestCase {
|
||||
public function testGetFirstValueNode1() {
|
||||
$coid = new IRI('coid://cloudobjects.io');
|
||||
$this->useRootResourceMock();
|
||||
$object = $this->retriever->getObject($coid);
|
||||
$object = $this->retriever->getObjectNode($coid);
|
||||
|
||||
$this->assertInstanceOf('ML\JsonLD\Node', $this->reader->getFirstValueNode($object, 'coid://cloudobjects.io/isVisibleTo'));
|
||||
$this->assertInstanceOf('ML\JsonLD\Node', $this->reader->getFirstValueNode($object, 'co:isVisibleTo'));
|
||||
@@ -99,7 +99,7 @@ class NodeReaderMockTest extends \PHPUnit\Framework\TestCase {
|
||||
public function testGetAllValuesString1() {
|
||||
$coid = new IRI('coid://cloudobjects.io');
|
||||
$this->useRootResourceMock();
|
||||
$object = $this->retriever->getObject($coid);
|
||||
$object = $this->retriever->getObjectNode($coid);
|
||||
|
||||
$this->assertCount(1, $this->reader->getAllValuesString($object, 'http://www.w3.org/2000/01/rdf-schema#label'));
|
||||
$this->assertCount(1, $this->reader->getAllValuesString($object, 'rdfs:label'));
|
||||
@@ -116,7 +116,7 @@ class NodeReaderMockTest extends \PHPUnit\Framework\TestCase {
|
||||
public function testGetAllValuesIRI1() {
|
||||
$coid = new IRI('coid://cloudobjects.io');
|
||||
$this->useRootResourceMock();
|
||||
$object = $this->retriever->getObject($coid);
|
||||
$object = $this->retriever->getObjectNode($coid);
|
||||
|
||||
$this->assertCount(0, $this->reader->getAllValuesIRI($object, 'http://www.w3.org/2000/01/rdf-schema#label'));
|
||||
$this->assertCount(0, $this->reader->getAllValuesIRI($object, 'rdfs:label'));
|
||||
@@ -136,7 +136,7 @@ class NodeReaderMockTest extends \PHPUnit\Framework\TestCase {
|
||||
public function testGetAllValuesNode1() {
|
||||
$coid = new IRI('coid://cloudobjects.io');
|
||||
$this->useRootResourceMock();
|
||||
$object = $this->retriever->getObject($coid);
|
||||
$object = $this->retriever->getObjectNode($coid);
|
||||
|
||||
$this->assertCount(0, $this->reader->getAllValuesNode($object, 'http://www.w3.org/2000/01/rdf-schema#label'));
|
||||
$this->assertCount(0, $this->reader->getAllValuesNode($object, 'rdfs:label'));
|
||||
|
||||
Reference in New Issue
Block a user