test/snac/server/validation/HasOperationValidatorTest.php
/**
     * Test validating a constellation with nothing in it, but an operation
     */
Test validating a constellation with nothing in it, but an operation
Test validating a constellation with nothing in it but an operation
public function testValidateConstellationNoComponents() {
        $constellation = new \snac\data\Constellation();
        $this->assertTrue($constellation->setOperation(\snac\data\AbstractData::$OPERATION_INSERT));
        $this->assertTrue($this->ve->validateConstellation($constellation),
                "Could not validate an empty constellation with insert operation");
        $constellation->setOperation(\snac\data\Constellation::$OPERATION_UPDATE);
        $this->assertTrue($this->ve->validateConstellation($constellation),
                "Could not validate an empty constellation with update operation");
        $constellation->setOperation(\snac\data\Constellation::$OPERATION_DELETE);
        $this->assertTrue($this->ve->validateConstellation($constellation),
                "Could not validate an empty constellation with delete operation");
    }
public function testValidateConstellationNoComponents ( ) { $ constellation = new \ snac \ data \ Constellation ( ) ; $ this -> assertTrue ( $ constellation -> setOperation ( \ snac \ data \ AbstractData :: $ OPERATION_INSERT ) ) ; $ this -> assertTrue ( $ this -> ve -> validateConstellation ( $ constellation ) , " Could not validate an empty constellation with insert operation " ) ; $ constellation -> setOperation ( \ snac \ data \ Constellation :: $ OPERATION_UPDATE ) ; $ this -> assertTrue ( $ this -> ve -> validateConstellation ( $ constellation ) , " Could not validate an empty constellation with update operation " ) ; $ constellation -> setOperation ( \ snac \ data \ Constellation :: $ OPERATION_DELETE ) ; $ this -> assertTrue ( $ this -> ve -> validateConstellation ( $ constellation ) , " Could not validate an empty constellation with delete operation " ) ; }
Test validating a constellation with nothing in it, but an operation
Test validating a constellation with nothing in it but an operation