_command = new Solarium_Query_Update_Command_Optimize; } public function testConfigMode() { $options = array( 'waitflush' => true, 'waitsearcher' => false, 'maxsegments' => 6, ); $command = new Solarium_Query_Update_Command_Optimize($options); $this->assertEquals( true, $command->getWaitFlush() ); $this->assertEquals( false, $command->getWaitSearcher() ); $this->assertEquals( 6, $command->getMaxSegments() ); } public function testGetType() { $this->assertEquals( Solarium_Query_Update::COMMAND_OPTIMIZE, $this->_command->getType() ); } public function testGetAndSetWaitFlush() { $this->_command->setWaitFlush(false); $this->assertEquals( false, $this->_command->getWaitFlush() ); } public function testGetAndSetWaitSearcher() { $this->_command->setWaitSearcher(false); $this->assertEquals( false, $this->_command->getWaitSearcher() ); } public function testGetAndSetMaxSegments() { $this->_command->setMaxSegments(12); $this->assertEquals( 12, $this->_command->getMaxSegments() ); } }