/** * @test */ public function hashAndValidatePasswordWithDifferentCostsMatch() { $strategy = new BCryptHashingStrategy(10); $otherStrategy = new BCryptHashingStrategy(6); $derivedKeyWithSalt = $otherStrategy->hashPassword('password'); $this->assertTrue($strategy->validatePassword('password', $derivedKeyWithSalt), 'Hashing strategy should validate password with different cost'); }