/**
  * This check forces these tests to only run on Travis.
  * If we can reliably start and stop web-push-testing-service and
  * detect current OS, we can probably run this automatically
  * for Linux and OS X at a later date.
  */
 protected function checkRequirements()
 {
     parent::checkRequirements();
     if (!(getenv('TRAVIS') || getenv('CI'))) {
         $this->markTestSkipped('This test does not run on Travis.');
     }
 }
Exemple #2
0
 protected function checkRequirements()
 {
     if (null !== ($message = self::getConfig()->skipMessage(get_class($this), $this->getName(false)))) {
         $this->markTestSkipped($message);
     }
     parent::checkRequirements();
 }
Exemple #3
0
 protected function checkRequirements()
 {
     parent::checkRequirements();
     if (getenv('TRAVIS') || getenv('CI')) {
         $this->markTestSkipped('This test does not run on Travis.');
     }
     if (!getenv('STANDARD_ENDPOINT')) {
         $this->markTestSkipped('No \'STANDARD_ENDPOINT\' found in env.');
     }
     if (!getenv('GCM_ENDPOINT')) {
         $this->markTestSkipped('No \'GCM_ENDPOINT\' found in env.');
     }
     if (!getenv('USER_PUBLIC_KEY')) {
         $this->markTestSkipped('No \'USER_PUBLIC_KEY\' found in env.');
     }
     if (!getenv('GCM_USER_PUBLIC_KEY')) {
         $this->markTestSkipped('No \'GCM_USER_PUBLIC_KEY\' found in env.');
     }
     if (!getenv('USER_AUTH_TOKEN')) {
         $this->markTestSkipped('No \'USER_PUBLIC_KEY\' found in env.');
     }
     if (!getenv('GCM_USER_AUTH_TOKEN')) {
         $this->markTestSkipped('No \'GCM_USER_AUTH_TOKEN\' found in env.');
     }
     if (!getenv('VAPID_PUBLIC_KEY')) {
         $this->markTestSkipped('No \'VAPID_PUBLIC_KEY\' found in env.');
     }
     if (!getenv('VAPID_PRIVATE_KEY')) {
         $this->markTestSkipped('No \'VAPID_PRIVATE_KEY\' found in env.');
     }
 }
Exemple #4
0
 protected function checkRequirements()
 {
     parent::checkRequirements();
     // Core tests no longer check against open Trac tickets, but others using WP_UnitTestCase may do so.
     if (defined('WP_RUN_CORE_TESTS') && WP_RUN_CORE_TESTS) {
         return;
     }
     if (WP_TESTS_FORCE_KNOWN_BUGS) {
         return;
     }
     $tickets = PHPUnit_Util_Test::getTickets(get_class($this), $this->getName(false));
     foreach ($tickets as $ticket) {
         if (is_numeric($ticket)) {
             $this->knownWPBug($ticket);
         } elseif ('UT' == substr($ticket, 0, 2)) {
             $ticket = substr($ticket, 2);
             if ($ticket && is_numeric($ticket)) {
                 $this->knownUTBug($ticket);
             }
         } elseif ('Plugin' == substr($ticket, 0, 6)) {
             $ticket = substr($ticket, 6);
             if ($ticket && is_numeric($ticket)) {
                 $this->knownPluginBug($ticket);
             }
         }
     }
 }
 protected function checkRequirements()
 {
     parent::checkRequirements();
     if (WP_TESTS_FORCE_KNOWN_BUGS) {
         return;
     }
     $tickets = PHPUnit_Util_Test::getTickets(get_class($this), $this->getName(false));
     foreach ($tickets as $ticket) {
         if (is_numeric($ticket)) {
             $this->knownWPBug($ticket);
         } elseif ('UT' == substr($ticket, 0, 2)) {
             $ticket = substr($ticket, 2);
             if ($ticket && is_numeric($ticket)) {
                 $this->knownUTBug($ticket);
             }
         } elseif ('Plugin' == substr($ticket, 0, 6)) {
             $ticket = substr($ticket, 6);
             if ($ticket && is_numeric($ticket)) {
                 $this->knownPluginBug($ticket);
             }
         }
     }
 }
 /**
  * {@inheritdoc}
  */
 protected function checkRequirements()
 {
     parent::checkRequirements();
     $this->checkRequiredRedisServerVersion();
 }