当前位置: 首页>>代码示例>>PHP>>正文


PHP Reader::expects方法代码示例

本文整理汇总了PHP中Doctrine\Common\Annotations\Reader::expects方法的典型用法代码示例。如果您正苦于以下问题:PHP Reader::expects方法的具体用法?PHP Reader::expects怎么用?PHP Reader::expects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Doctrine\Common\Annotations\Reader的用法示例。


在下文中一共展示了Reader::expects方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testLoadMetadataForClassAddValuesToMetadata

 /**
  * @expectedException \Doctrine\Search\Exception\Driver\PropertyDoesNotExistsInMetadataException
  */
 public function testLoadMetadataForClassAddValuesToMetadata()
 {
     $this->reflectionClass->expects($this->once())->method('getProperties')->will($this->returnValue(array()));
     $this->reader->expects($this->once())->method('getClassAnnotations')->will($this->returnValue(array(0, new TestSearchable(array()))));
     $this->classMetadata->expects($this->once())->method('getReflectionClass')->will($this->returnValue($this->reflectionClass));
     $this->annotationDriver->loadMetadataForClass('Doctrine\\Tests\\Models\\Blog\\BlogPost', $this->classMetadata);
 }
开发者ID:akleiber,项目名称:search,代码行数:10,代码来源:AnnotationDriverTest.php

示例2: setUp

 public function setUp()
 {
     $this->reflectionService = $this->getAccessibleMock(\TYPO3\Flow\Reflection\ReflectionService::class, null);
     $this->mockAnnotationReader = $this->getMockBuilder(\Doctrine\Common\Annotations\Reader::class)->disableOriginalConstructor()->getMock();
     $this->mockAnnotationReader->expects($this->any())->method('getClassAnnotations')->will($this->returnValue(array()));
     $this->inject($this->reflectionService, 'annotationReader', $this->mockAnnotationReader);
 }
开发者ID:kszyma,项目名称:flow-development-collection,代码行数:7,代码来源:ReflectionServiceTest.php

示例3: testGetGeographicalQueryAnnotation

 /**
  * Test the getGeographicalQueryAnnotation method of the AnnotationDriver.
  */
 public function testGetGeographicalQueryAnnotation()
 {
     $this->geographicalQueryAnnotation->expects($this->once())->method('getMethod')->will($this->returnValue('getAddress'));
     $this->reader->expects($this->once())->method('getMethodAnnotation')->with($this->isInstanceOf('\\ReflectionMethod'), $this->equalTo('Vich\\GeographicalBundle\\Annotation\\GeographicalQuery'))->will($this->returnValue($this->geographicalQueryAnnotation));
     $annot = $this->driver->getGeographicalQueryAnnotation($this->geographicalEntity);
     $this->assertNotNull($annot);
     $this->assertEquals('getAddress', $annot->getMethod());
 }
开发者ID:nightchiller,项目名称:GeographicalBundle,代码行数:11,代码来源:AnnotationDriverTest.php


注:本文中的Doctrine\Common\Annotations\Reader::expects方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。