Ejemplo n.º 1
0
 /**
  * @param AbstractTestCase $test
  * @return bool
  */
 public function enforceSkipTest(AbstractTestCase $test)
 {
     if ($test instanceof SkippableFeatureTestInterface) {
         foreach ($test->skipIfAny() as $key) {
             if ($this->isSkipKey($key)) {
                 /** @var AbstractTestCase $test */
                 $test->markTestSkipped("Reason: skipped by config '{$key}'");
             }
         }
     }
 }
Ejemplo n.º 2
0
 /**
  * @throws \RuntimeException
  */
 private static function initConfig()
 {
     $config_path = __DIR__ . '/config.php';
     if (!is_readable($config_path)) {
         throw new \RuntimeException("Could not read config.php");
     }
     self::$config = (include $config_path);
     AbstractTestCase::$appId = self::$config['app_id'];
     AbstractTestCase::$appSecret = self::$config['app_secret'];
     AbstractTestCase::$accessToken = self::$config['access_token'];
     AbstractTestCase::$actId = self::$config['act_id'];
     AbstractTestCase::$pageId = self::$config['page_id'];
     AbstractTestCase::$testRunId = md5((isset($_SERVER['LOGNAME']) ? $_SERVER['LOGNAME'] : uniqid(true)) . microtime(true));
     $timezone = self::DEFAULT_TIMEZONE;
     if (isset(self::$config['act_timezone']) && !empty(self::$config['act_timezone'])) {
         $timezone = self::$config['act_timezone'];
     }
     if (!date_default_timezone_set($timezone)) {
         exit;
     }
 }
Ejemplo n.º 3
0
 public function tearDown()
 {
     $this->api = null;
     $this->httpClient = null;
     $this->session = null;
     $this->logger = null;
     parent::tearDown();
 }
Ejemplo n.º 4
0
 public function tearDown()
 {
     $this->response = null;
     parent::tearDown();
 }