test/snac/server/validation/ResourceValidatorTest.php
/**
     * Test validating a constellation with resource containing id/version
     */
Test validating a constellation with resource containing id/version
Test validating a constellation with resource containing id / version
public function testValidateConstellationWithResource() {
        $constellation = new \snac\data\Constellation();
        $resource = new \snac\data\Resource();
        $resource->setID(1);
        $resource->setVersion(2);
        $resourceRelation = new \snac\data\ResourceRelation();
        $resourceRelation->setResource($resource);
        $constellation->addResourceRelation($resourceRelation);
        $this->assertTrue($this->ve->validateConstellation($constellation),
                "Couldn't validate constellation with resource containing id and version");
    }
public function testValidateConstellationWithResource ( ) { $ constellation = new \ snac \ data \ Constellation ( ) ; $ resource = new \ snac \ data \ Resource ( ) ; $ resource -> setID ( 1 ) ; $ resource -> setVersion ( 2 ) ; $ resourceRelation = new \ snac \ data \ ResourceRelation ( ) ; $ resourceRelation -> setResource ( $ resource ) ; $ constellation -> addResourceRelation ( $ resourceRelation ) ; $ this -> assertTrue ( $ this -> ve -> validateConstellation ( $ constellation ) , " Couldn't validate constellation with resource containing id and version " ) ; }
Test validating a constellation with resource containing id/version
Test validating a constellation with resource containing id / version