コード例 #1
0
ファイル: Poser.php プロジェクト: kodova/poser
 /**
  * Retuns a single instance of the PoserCore object that controls everything.
  * @return PoserCore
  */
 private static function getPoserCore()
 {
     if (null == self::$poserCore) {
         self::$poserCore = PoserCore::build();
     }
     return self::$poserCore;
 }
コード例 #2
0
ファイル: MockBuilder.php プロジェクト: kodova/poser
 /**
  * Creates and returns the mock built by the builder
  *
  * @return mixed The mocked object
  */
 public function mock()
 {
     $options = new MockOptions();
     $options->setDefaultAnswer($this->defaultAnswer);
     $options->setName($this->name);
     $options->setMockStatic($this->mockStatic);
     $options->setConstants($this->constants);
     return $this->poserCore->mock($this->class, $options);
 }