Skip to content

Instantly share code, notes, and snippets.

@kleberncto
Created October 20, 2016 13:57
Show Gist options
  • Save kleberncto/8e00ca473f94c4e383b1e0b80cbaf30e to your computer and use it in GitHub Desktop.
Save kleberncto/8e00ca473f94c4e383b1e0b80cbaf30e to your computer and use it in GitHub Desktop.
\ParameterConfigRepository::shouldReceive('findOneByParameterCodeAndPartner')
->once()
->andReturnUsing(function ($code) {
$params = [
'ftp' => '127.0.0.1',
'user' => 'fernandinho',
'password' => '1234'
];
return $params[$code];
});
dump(\ParameterConfigRepository::findOneByParameterCodeAndPartner('ftp', new Partner()));
dump(\ParameterConfigRepository::findOneByParameterCodeAndPartner('user', new Partner()));
dump(\ParameterConfigRepository::findOneByParameterCodeAndPartner('password', new Partner()));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment