Наследование: extends Gush\Command\BaseCommand, implements Gush\Feature\IssueTrackerRepoFeature
Пример #1
0
 public function testCopyIssueFromOrganizationToTargetOrganizationWithTitlePrefix()
 {
     $tester = $this->getCommandTester($command = new IssueCopyCommand());
     $tester->execute(['issue_number' => TestAdapter::ISSUE_NUMBER, 'target_username' => 'dantleech', 'target_repository' => 'gushphp', '--prefix' => '[SomePrefix] ', '--close' => true]);
     $display = $tester->getDisplay();
     $this->assertCommandOutputMatches('Closed issue: https://github.com/gushphp/gush/issues/7', $display);
     $issue = $command->getIssueTracker()->getIssue(TestAdapter::ISSUE_NUMBER_CREATED);
     $this->assertEquals('[SomePrefix] Write a behat test to launch strategy', $issue['title']);
     $this->assertEquals('Help me conquer the world. Teach them to use Gush.', $issue['body']);
     $this->assertEquals('dantleech', $issue['org']);
     $this->assertEquals('gushphp', $issue['repo']);
 }