Skip to content

Commit

Permalink
no need for fake values, set values in the test
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul M. Jones committed Nov 7, 2014
1 parent d7bfcf3 commit 357ab37
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
4 changes: 0 additions & 4 deletions config/Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,20 @@ public function define(Container $di)
*/
$di->params['Aura\Auth\Adapter\HtpasswdAdapter'] = array(
'verifier' => $di->lazyNew('Aura\Auth\Verifier\HtpasswdVerifier'),
'file' => 'NO_FILE_SPECIFIED',
);

/**
* Aura\Auth\Adapter\ImapAdapter
*/
$di->params['Aura\Auth\Adapter\ImapAdapter'] = array(
'phpfunc' => $di->lazyNew('Aura\Auth\Phpfunc'),
'mailbox' => 'NO_MAILBOX_SPECIFIED',
);

/**
* Aura\Auth\Adapter\LdapAdapter
*/
$di->params['Aura\Auth\Adapter\LdapAdapter'] = array(
'phpfunc' => $di->lazyNew('Aura\Auth\Phpfunc'),
'server' => 'NO_SERVER_SPECIFIED',
'dnformat' => 'NO_DNFORMAT_SPECIFIED',
);

/**
Expand Down
18 changes: 14 additions & 4 deletions tests/container/src/CommonTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,20 @@ public function provideGet()
public function provideNewInstance()
{
return array(
array('Aura\Auth\Adapter\HtpasswdAdapter'),
array('Aura\Auth\Adapter\ImapAdapter'),
array('Aura\Auth\Adapter\LdapAdapter'),
array('Aura\Auth\Adapter\PdoAdapter', array('pdo' => new FakePDO)),
array('Aura\Auth\Adapter\HtpasswdAdapter', array(
'file' => 'fake-file',
)),
array('Aura\Auth\Adapter\ImapAdapter', array(
'mailbox' => 'fake-mailbox',
)),
array('Aura\Auth\Adapter\LdapAdapter', array(
'server' => 'fake-server',
'dnformat' => 'fake-dnformat',
)),
array('Aura\Auth\Adapter\PdoAdapter', array(
'pdo' => new FakePDO,
'verifier' => new \Aura\Auth\Verifier\PasswordVerifier('md5'),
)),
array('Aura\Auth\Auth'),
array('Aura\Auth\Service\LoginService'),
array('Aura\Auth\Service\LogoutService'),
Expand Down

0 comments on commit 357ab37

Please sign in to comment.