本文整理汇总了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]];
}