$owner->addUser($bob); $owner->addUser($joe); $owner->addUser($blah); $expectArray = array($bob, $joe, $blah); $actualArray = $owner->getUsers(); expect($actualArray)->to->be->{$expectArray}; }); }); describe('->removeUser()', function () { it('should return a list of users', function () { $owner = new Owner(); expect($owner)->to->be->instanceof('Notes\\Domain\\Entity\\UserGroup\\Owner'); $bob = new User(new StringLiteral('Bob')); $joe = new User(new StringLiteral('joe')); $blah = new User(new StringLiteral('Blah')); $owner->addUser($bob); $owner->addUser($joe); $owner->addUser($blah); $owner->removeUser($blah); $expectArray = array($bob, $joe); $actualArray = $owner->getUsers(); expect($actualArray)->to->be->{$expectArray}; }); }); describe('->getName()', function () { it('should return the default name of the group', function () { $owner = new Owner(); expect($owner->getName())->equal('Owner'); }); }); });