コード例 #1
0
 protected function setUp()
 {
     $container = new IocContainer();
     $this->binder = new BinderStub();
     $container->register(Binder::class, $this->binder);
     $this->cache = new CachedBinderStub();
     $container->register(CachedBinder::class, $this->cache);
     $this->context = new ContextMock();
     $this->compiler = new ProcessorListStub();
     $handler = new CompilerHandler($this->compiler, $container);
     $executor = new Executor($container, $this->context);
     $this->target = new FluentBuilder($executor, $this->context, $handler);
 }
コード例 #2
0
 /**
  * @test
  * @expectedException Exception
  */
 public function register_failWithRandomString()
 {
     $this->target->register('Lorem ipsum', 'dolor sit amet');
 }