Ejemplo n.º 1
0
 public function testDoubleObject()
 {
     $user = new demo\UserModel();
     $user = test::doubleProxy($user, ['save' => null]);
     $user->save();
     $user->verifyInvoked('save');
     $this->specify('only selected methods can be added to instance', function () use($user) {
         $user = test::methods($user, ['setName']);
         $user->setName('davert');
         verify($user->getName())->notEquals('davert');
         verify($user->getName())->null();
         verify($user->getObject()->getName())->null();
     });
 }