本文整理汇总了PHP中Executor::expects方法的典型用法代码示例。如果您正苦于以下问题:PHP Executor::expects方法的具体用法?PHP Executor::expects怎么用?PHP Executor::expects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Executor
的用法示例。
在下文中一共展示了Executor::expects方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testExpressionLanguageListenerCreateObject
public function testExpressionLanguageListenerCreateObject()
{
$fixtures = new FixtureCollection(array($this->createFixture('test1', array('key1' => array('foo' => '@expr(object("test2", "key2").test)'))), $this->createFixture('test2', array('key2' => array('test' => '@expr("foo" ~ "bar")')))));
$this->executor->expects($this->once())->method('createObject')->will($this->returnValue((object) array('test' => 'foobar')));
$event = new FixtureCollectionEvent($this->createFixtureManagerMock(), $fixtures);
$this->listener->onPreExecute($event);
$data1 = $fixtures->get('test1')->get('key1')->getData();
$data2 = $fixtures->get('test2')->get('key2')->getData();
$this->assertEquals('foobar', $data1['foo']);
$this->assertEquals('foobar', $data2['test']);
}