コード例 #1
0
ファイル: FactoryTest.php プロジェクト: zhulianhai/Rest
 /**
  * @covers Respect\Rest\Routes\Factory::getReflection
  */
 function test_getReflection_should_return_instance_of_current_routed_class()
 {
     $route = new Factory('any', '/', 'DateTime', function () {
         return new \DateTime();
     });
     $refl = $route->getReflection('format');
     $this->assertInstanceOf('ReflectionMethod', $refl);
 }
コード例 #2
0
ファイル: Route.php プロジェクト: supercluster/gravity
 public function unserialize($serialized)
 {
     list($this->method, $this->pattern, $this->class, $this->factory) = unserialize($serialized);
     parent::__construct($this->method, $this->pattern, $this->class, $this->factory);
 }