Pantheon\Terminus\UnitTests\Commands\Backup\CreateCommandTest::testCreateBackupElement PHP Method

testCreateBackupElement() public method

Tests the backup:create command when creating a backup for a specific element
    public function testCreateBackupElement()
    {
        $this->environment->id = 'env_id';
        $params = ['element' => 'db'];
        $this->backups->expects($this->once())->method('create')->with($this->equalTo(['element' => 'database']))->willReturn($this->workflow);
        $this->workflow->expects($this->once())->method('wait')->with();
        $this->logger->expects($this->once())->method('log')->with($this->equalTo('notice'), $this->equalTo('Created a backup of the {env} environment.'), $this->equalTo(['env' => $this->environment->id]));
        $out = $this->command->create("mysite.{$this->environment->id}", $params);
        $this->assertNull($out);
    }