Example #1
0
 /**
  * @return Skeleton
  */
 protected function skeleton()
 {
     if (!$this->skeleton) {
         $this->skeleton = new Skeleton();
         $map = new TestMap($this->skeleton->getMap());
         $this->skeleton->setMap($map);
         $map->override('a', 'a_val');
         $map->override('b', 'b_val');
     }
     return $this->skeleton;
 }
Example #2
0
 /**
  * @param Skeleton $s
  * @return \PHPUnit_Framework_MockObject_MockObject|IMap
  */
 private function mockMap(Skeleton $s)
 {
     /** @var \PHPUnit_Framework_MockObject_MockObject|IMap $map */
     $map = $this->getMock(IMap::class);
     $map->method('loader')->willReturn($this->mockLoader());
     $s->setMap($map);
     return $map;
 }
Example #3
0
 /**
  * @param Skeleton $skeleton
  */
 public function __construct(Skeleton $skeleton)
 {
     $this->testMap = new TestMap($skeleton->getMap());
     $skeleton->setMap($this->testMap);
 }