_command = new Solarium_Query_Update_Command_Delete; } public function testGetType() { $this->assertEquals( Solarium_Query_Update::COMMAND_DELETE, $this->_command->getType() ); } public function testConfigMode() { $options = array( 'id' => 1, 'query' => '*:*', ); $command = new Solarium_Query_Update_Command_Delete($options); $this->assertEquals( array(1), $command->getIds() ); $this->assertEquals( array('*:*'), $command->getQueries() ); } public function testConfigModeMultiValue() { $options = array( 'id' => array(1,2), 'query' => array('id:1','id:2'), ); $command = new Solarium_Query_Update_Command_Delete($options); $this->assertEquals( array(1,2), $command->getIds() ); $this->assertEquals( array('id:1','id:2'), $command->getQueries() ); } public function testAddId() { $this->_command->addId(1); $this->assertEquals( array(1), $this->_command->getIds() ); } public function testAddIds() { $this->_command->addId(1); $this->_command->addIds(array(2,3)); $this->assertEquals( array(1,2,3), $this->_command->getIds() ); } public function testAddQuery() { $this->_command->addQuery('*:*'); $this->assertEquals( array('*:*'), $this->_command->getQueries() ); } public function testAddQueries() { $this->_command->addQuery('*:*'); $this->_command->addQueries(array('id:1','id:2')); $this->assertEquals( array('*:*','id:1','id:2'), $this->_command->getQueries() ); } }