PHPUnit_Util_Filesystem::collectEndAndAddToBlacklist PHP Метод

collectEndAndAddToBlacklist() публичный статический Метод

Stops the collection of loaded files and adds the names of the loaded files to the blacklist.
public static collectEndAndAddToBlacklist ( ) : array
Результат array
    public static function collectEndAndAddToBlacklist()
    {
        foreach (self::collectEnd() as $blacklistedFile) {
            PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist($blacklistedFile, 'PHPUNIT');
        }
    }

Usage Example

Пример #1
0
 protected function updateTicket($ticketId, $newStatus, $message, $resolution)
 {
     if (PHPUnit_Util_Filesystem::fileExistsInIncludePath('XML/RPC2/Client.php')) {
         PHPUnit_Util_Filesystem::collectStart();
         require_once 'XML/RPC2/Client.php';
         $ticket = XML_RPC2_Client::create($this->scheme . '://' . $this->username . ':' . $this->password . '@' . $this->hostpath, array('prefix' => 'ticket.'));
         try {
             $ticketInfo = $ticket->get($ticketId);
         } catch (XML_RPC2_FaultException $e) {
             throw new PHPUnit_Framework_Exception(sprintf("Trac fetch failure: %d: %s\n", $e->getFaultCode(), $e->getFaultString()));
         }
         try {
             printf("Updating Trac ticket #%d, status: %s\n", $ticketId, $newStatus);
             $ticket->update($ticketId, $message, array('status' => $newStatus, 'resolution' => $resolution));
         } catch (XML_RPC2_FaultException $e) {
             throw new PHPUnit_Framework_Exception(sprintf("Trac update failure: %d: %s\n", $e->getFaultCode(), $e->getFaultString()));
         }
         PHPUnit_Util_Filesystem::collectEndAndAddToBlacklist();
     } else {
         throw new PHPUnit_Framework_Exception('XML_RPC2 is not available.');
     }
 }
All Usage Examples Of PHPUnit_Util_Filesystem::collectEndAndAddToBlacklist