Commit 4005d2a4 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Correction mauvaise classe.

parent d0195c34
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
namespace UnicaenAuthTest\Authentication\Storage; namespace UnicaenAuthTest\Authentication\Storage;
use PHPUnit_Framework_TestCase; use PHPUnit_Framework_TestCase;
use UnicaenAppTest\Entity\Ldap\TestAsset\People; use UnicaenApp\Entity\Ldap\People;
use UnicaenAppTest\Entity\Ldap\TestAsset\People as PeopleTestAsset;
use UnicaenAuth\Authentication\Storage\Ldap; use UnicaenAuth\Authentication\Storage\Ldap;
use Zend\ServiceManager\ServiceManager; use Zend\ServiceManager\ServiceManager;
...@@ -93,7 +94,7 @@ class LdapTest extends PHPUnit_Framework_TestCase ...@@ -93,7 +94,7 @@ class LdapTest extends PHPUnit_Framework_TestCase
public function testReadingReturnsFoundUser() public function testReadingReturnsFoundUser()
{ {
$entity = new People(); $entity = new People(PeopleTestAsset::$data1);
$this->mapper->expects($this->once()) $this->mapper->expects($this->once())
->method('findOneByUsername') ->method('findOneByUsername')
...@@ -108,7 +109,7 @@ class LdapTest extends PHPUnit_Framework_TestCase ...@@ -108,7 +109,7 @@ class LdapTest extends PHPUnit_Framework_TestCase
{ {
$this->mapper->expects($this->once()) $this->mapper->expects($this->once())
->method('findOneByUsername') ->method('findOneByUsername')
->will($this->returnValue(new People())); ->will($this->returnValue(new People(PeopleTestAsset::$data1)));
$this->storage->write('username'); $this->storage->write('username');
$firestResult = $this->storage->read(); $firestResult = $this->storage->read();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment