Beispiel #1
0
 public function case_load_flex_entity()
 {
     $self = $this;
     $this->given($autoloader = new \Mock\Hoa\Consistency\Autoloader(), $autoloader->addNamespace('Foo\\Bar\\', 'Source/Foo/'), $this->calling($autoloader)->runAutoloaderStack = function ($entity) use($self, &$called) {
         $called = true;
         $self->string($entity)->isEqualTo('Foo\\Bar\\Baz\\Baz');
         return;
     }, $autoloader->register())->when($result = $autoloader->load('Foo\\Bar\\Baz'))->then->variable($result)->isNull()->boolean($called)->isTrue();
 }
Beispiel #2
0
 public function case_load_unknown_entity()
 {
     $this->given($autoloader = new \Mock\Hoa\Consistency\Autoloader(), $autoloader->addNamespace('Foo\\Bar\\', 'Source/Foo/Bar/'), $this->function->spl_autoload_call = false)->when($result = $autoloader->load('Foo\\Bar\\Baz\\Qux'))->then->boolean($result)->isFalse();
 }