test/snac/server/validation/HasOperationValidatorTest.php
/**
     * Test null constellation operation with insert Subject
     */
Test null constellation operation with insert Subject
Test null constellation operation with insert Subject
public function testValidateConstellationNullInsert() {
        $constellation = new \snac\data\Constellation();
        $constellation->setOperation(\snac\data\Constellation::$OPERATION_UPDATE);
        $subject = new \snac\data\Subject();
        $subject->setOperation(\snac\data\Subject::$OPERATION_INSERT);
        $constellation->addSubject($subject);
        try {
            $this->assertTrue($this->ve->validateConstellation($constellation),
                    "Could not validate constellation with no operation but subject with insert");
        } catch (\snac\exceptions\SNACValidationException $e) {
            $this->fail("Could not validate constellation with no operation but subject with insert: ". $e);
        }
    }
public function testValidateConstellationNullInsert ( ) { $ constellation = new \ snac \ data \ Constellation ( ) ; $ constellation -> setOperation ( \ snac \ data \ Constellation :: $ OPERATION_UPDATE ) ; $ subject = new \ snac \ data \ Subject ( ) ; $ subject -> setOperation ( \ snac \ data \ Subject :: $ OPERATION_INSERT ) ; $ constellation -> addSubject ( $ subject ) ; try { $ this -> assertTrue ( $ this -> ve -> validateConstellation ( $ constellation ) , " Could not validate constellation with no operation but subject with insert " ) ; } catch ( \ snac \ exceptions \ SNACValidationException $ e ) { $ this -> fail ( " Could not validate constellation with no operation but subject with insert:  " . $ e ) ; } }
Test null constellation operation with insert Subject
Test null constellation operation with insert Subject