本文整理匯總了PHP中AspectMock\Test::doubleProxy方法的典型用法代碼示例。如果您正苦於以下問題:PHP Test::doubleProxy方法的具體用法?PHP Test::doubleProxy怎麽用?PHP Test::doubleProxy使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類AspectMock\Test
的用法示例。
在下文中一共展示了Test::doubleProxy方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testCleanupSpecificObj
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');
}
示例2: dataProvider_callTypeHintedMethod
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]];
}