add($command); $this->commandTester = new CommandTester($command); } /** * @test */ public function charactersAreGeneratedFromDefault() { $prefix = 'Character set: '; $this->commandTester->execute([ 'command' => 'config:generate-charset', ]); $output = $this->commandTester->getDisplay(); // Both default character set and the new one should have the same length $this->assertContains($prefix, $output); } protected function orderStringLetters($string) { $letters = str_split($string); sort($letters); return implode('', $letters); } }