PHP code example of sweetrdf / rdf-interface-tests

1. Go to this page and download the library: Download sweetrdf/rdf-interface-tests library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sweetrdf / rdf-interface-tests example snippets



namespace myOwnRdf;

class MyOwnNamedNodeTest extends \rdfInterface\tests\DataFactoryTest {

    public static function getDataFactory(): \rdfInterface\DataFactory {
        return new MyDataFactoryClass();
    }

    public static function getForeignDataFactory(): \rdfInterface\DataFactory {
        return new \simpleRdf\DataFactory();
    }

    // override unwanted \rdfInterface\tests\DataFactoryTest methods
    public function testBlankNode(): void {
        $this->assertTrue(true);
    }
    public function testLiteralFactory(): void {
        $this->assertTrue(true);
    }
    (...etc., there is a lot of methods to skip in this scenario...)

    // provide my own test

    public function testMyFeature(): void {
       (...perform some tests...)
    }
}

  vendor/bin/phpunit --bootstrap vendor/autoload.php directoryWithYourTestClasses