public function testConstruct()
 {
     $literal = new EasyRdf_Literal('Rat');
     $this->assertEquals('Rat', $literal->getValue());
     $this->assertEquals(null, $literal->getLang());
     $this->assertEquals(null, $literal->getDatatype());
 }
Ejemplo n.º 2
0
 public function testConstructWithObjectDatatype()
 {
     $datatype = new EasyRdf_ParsedUri('http://www.w3.org/2001/XMLSchema#integer');
     $literal = new EasyRdf_Literal(1, null, $datatype);
     $this->assertSame('1', $literal->getValue());
     $this->assertSame(null, $literal->getLang());
     $this->assertSame('xsd:integer', $literal->getDatatype());
 }
Ejemplo n.º 3
0
 public function testConstructWithBooleanFalse()
 {
     $literal = new EasyRdf_Literal(false);
     $this->assertEquals(false, $literal->getValue());
     $this->assertEquals('xsd:boolean', $literal->getDatatype());
     $this->assertEquals(null, $literal->getLang());
 }