示例#1
0
文件: PluginTest.php 项目: mvc5/tests
 /**
  *
  */
 function test_call()
 {
     $model = new Model();
     $service = new App([Arg::SERVICES => ['foo' => function () {
         return function ($bar) {
             return $bar;
         };
     }]]);
     $model->service($service);
     $this->assertEquals('bar', $model->foo('bar'));
 }
示例#2
0
文件: ModelTest.php 项目: mvc5/tests
 /**
  *
  */
 function test_construct_template_const()
 {
     $model = new Model();
     $this->assertEquals('baz', $model->template());
 }