test/snac/server/validation/OperationValidatorTest.php
/**
     * Test delete constellation with delete name
     */
Test delete constellation with delete name
Test delete constellation with delete name
public function testValidateConstellationDeleteDelete() {
        $constellation = new \snac\data\Constellation();
        $constellation->setOperation(\snac\data\Constellation::$OPERATION_DELETE);
        $nameEntry = new \snac\data\NameEntry();
        $nameEntry->setOperation(\snac\data\NameEntry::$OPERATION_DELETE);
        $constellation->addNameEntry($nameEntry);
        try {
            $this->assertTrue($this->ve->validateConstellation($constellation),
                "Could not validate delete constellation with delete nameEntry");
        } catch (\snac\exceptions\SNACValidationException $e) {
            $this->fail("Could not validate delete constellation with delete nameEntry: ". $e);
        }
    }
public function testValidateConstellationDeleteDelete ( ) { $ constellation = new \ snac \ data \ Constellation ( ) ; $ constellation -> setOperation ( \ snac \ data \ Constellation :: $ OPERATION_DELETE ) ; $ nameEntry = new \ snac \ data \ NameEntry ( ) ; $ nameEntry -> setOperation ( \ snac \ data \ NameEntry :: $ OPERATION_DELETE ) ; $ constellation -> addNameEntry ( $ nameEntry ) ; try { $ this -> assertTrue ( $ this -> ve -> validateConstellation ( $ constellation ) , " Could not validate delete constellation with delete nameEntry " ) ; } catch ( \ snac \ exceptions \ SNACValidationException $ e ) { $ this -> fail ( " Could not validate delete constellation with delete nameEntry:  " . $ e ) ; } }
Test delete constellation with delete name
Test delete constellation with delete name