/** * Should generate a password if none given. */ public function testGeneratesPasswordIfNoneGiven() { $this->hasher->expects($this->atLeastOnce())->method('make')->with($this->isType('string'))->willReturn($this->generator()->anyString()); $this->userResource->expects($this->atLeastOnce())->method('setAttribute')->withConsecutive($this->anything(), ['password', $this->isType('string')]); $tester = $this->commandTester($this->makeUser); $tester->execute([]); }