class DbCommandBaseTester

Same name and namespace in other branches
  1. 8.9.x core/modules/system/tests/src/Kernel/Scripts/DbCommandBaseTest.php \Drupal\Tests\system\Kernel\Scripts\DbCommandBaseTester
  2. 10 core/modules/system/tests/src/Kernel/Scripts/DbCommandBaseTest.php \Drupal\Tests\system\Kernel\Scripts\DbCommandBaseTester
  3. 11.x core/modules/system/tests/src/Kernel/Scripts/DbCommandBaseTest.php \Drupal\Tests\system\Kernel\Scripts\DbCommandBaseTester

Concrete command implementation for testing base features.

Hierarchy

  • class \Drupal\Core\Command\DbCommandBase extends \Symfony\Component\Console\Command\Command
    • class \Drupal\Tests\system\Kernel\Scripts\DbCommandBaseTester extends \Drupal\Core\Command\DbCommandBase

Expanded class hierarchy of DbCommandBaseTester

File

core/modules/system/tests/src/Kernel/Scripts/DbCommandBaseTest.php, line 112

Namespace

Drupal\Tests\system\Kernel\Scripts
View source
class DbCommandBaseTester extends DbCommandBase {
    
    /**
     * {@inheritdoc}
     */
    public function configure() {
        parent::configure();
        $this->setName('test');
    }
    
    /**
     * {@inheritdoc}
     */
    public function getDatabaseConnection(InputInterface $input) {
        return parent::getDatabaseConnection($input);
    }
    
    /**
     * {@inheritdoc}
     */
    protected function execute(InputInterface $input, OutputInterface $output) {
        // Empty implementation for testing.
        return 0;
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
DbCommandBaseTester::configure public function Overrides DbCommandBase::configure
DbCommandBaseTester::execute protected function
DbCommandBaseTester::getDatabaseConnection public function Parse input options decide on a database. Overrides DbCommandBase::getDatabaseConnection

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.