Example #1
0
 public function testCleanupSpecificObj()
 {
     $model = test::double('demo\\UserModel');
     $user1 = test::doubleProxy($model->make(), ['getName' => 'bad boy']);
     $user2 = test::doubleProxy($model->make(), ['getName' => 'good boy']);
     verify($user1->getName())->equals('bad boy');
     verify($user2->getName())->equals('good boy');
     test::clean($user1);
     verify($user1->getName())->null();
     verify($user2->getName())->equals('good boy');
 }
Example #2
0
 public function dataProvider_callTypeHintedMethod()
 {
     return [[new demo\UserModel(), false], [test::doubleProxy(new demo\UserModel()), true], [test::double('demo\\UserModel'), true], [test::double('demo\\UserModel')->construct(), false], [test::double('demo\\UserModel')->make(), false]];
 }