jenkins-bot has submitted this change and it was merged.

Change subject: Remove kzykhys/pygments dependency
......................................................................


Remove kzykhys/pygments dependency

No longer required by SyntaxHighlight GeSHi.

Bug: T120068
Change-Id: I279b270232d08f5a295edac12271e6fac722d609
---
M composer.json
M composer.lock
M composer/ClassLoader.php
M composer/autoload_classmap.php
M composer/autoload_namespaces.php
M composer/installed.json
D kzykhys/pygments/.gitignore
D kzykhys/pygments/.travis.yml
D kzykhys/pygments/README.md
D kzykhys/pygments/composer.json
D kzykhys/pygments/composer.lock
D kzykhys/pygments/phpunit.xml.dist
D kzykhys/pygments/src/KzykHys/Pygments/Pygments.php
D kzykhys/pygments/test/KzykHys/Pygments/PygmentsTest.php
D kzykhys/pygments/test/KzykHys/Pygments/Resources/css/default.css
D kzykhys/pygments/test/KzykHys/Pygments/Resources/css/default.prefix.css
D kzykhys/pygments/test/KzykHys/Pygments/Resources/example/php.php.in
D kzykhys/pygments/test/KzykHys/Pygments/Resources/example/php.php.linenos.out
D kzykhys/pygments/test/KzykHys/Pygments/Resources/example/php.php.out
19 files changed, 6 insertions(+), 883 deletions(-)

Approvals:
  Reedy: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/composer.json b/composer.json
index 9f622af..b08e58c 100644
--- a/composer.json
+++ b/composer.json
@@ -12,7 +12,6 @@
                "composer/semver": "1.2.0",
                "cssjanus/cssjanus": "1.1.1",
                "firebase/php-jwt": "3.0.0",
-               "kzykhys/pygments": "1.0",
                "liuggio/statsd-php-client": "1.0.18",
                "mediawiki/at-ease": "1.1.0",
                "monolog/monolog": "1.17.2",
diff --git a/composer.lock b/composer.lock
index f3f661a..43ad73c 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,8 +4,8 @@
         "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file";,
         "This file is @generated automatically"
     ],
-    "hash": "2bf3578cd0c7ca64838be5ef94f48015",
-    "content-hash": "58ea380b7fb92fb7542d29b2f67f63ed",
+    "hash": "20e6535617eaa380124684ed67deada9",
+    "content-hash": "f75303fa9485bf8d0508875e7ad9e7c8",
     "packages": [
         {
             "name": "composer/semver",
@@ -146,37 +146,6 @@
             "description": "A simple library to encode and decode JSON Web 
Tokens (JWT) in PHP. Should conform to the current spec.",
             "homepage": "https://github.com/firebase/php-jwt";,
             "time": "2015-07-22 18:31:08"
-        },
-        {
-            "name": "kzykhys/pygments",
-            "version": "v1.0.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/kzykhys/Pygments.php.git";,
-                "reference": "7bde970d3c378d075ef0e005bb93a91055e17994"
-            },
-            "dist": {
-                "type": "zip",
-                "url": 
"https://api.github.com/repos/kzykhys/Pygments.php/zipball/7bde970d3c378d075ef0e005bb93a91055e17994";,
-                "reference": "7bde970d3c378d075ef0e005bb93a91055e17994",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.3.2",
-                "symfony/process": ">=2.3"
-            },
-            "require-dev": {
-                "symfony/finder": ">=2.3"
-            },
-            "type": "library",
-            "autoload": {
-                "psr-0": {
-                    "": "src"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/";,
-            "description": "A Thin Wrapper for the Python Pygments",
-            "time": "2013-12-18 15:22:37"
         },
         {
             "name": "liuggio/statsd-php-client",
diff --git a/composer/ClassLoader.php b/composer/ClassLoader.php
index edca538..990cfdc 100644
--- a/composer/ClassLoader.php
+++ b/composer/ClassLoader.php
@@ -344,7 +344,7 @@
     private function findFileWithExtension($class, $ext)
     {
         // PSR-4 lookup
-        $logicalPathPsr4 = ('\\' !== DIRECTORY_SEPARATOR ? str_replace('\\', 
DIRECTORY_SEPARATOR, $class) : $class) . $ext;
+        $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
 
         $first = $class[0];
         if (isset($this->prefixLengthsPsr4[$first])) {
@@ -370,10 +370,10 @@
         if (false !== $pos = strrpos($class, '\\')) {
             // namespaced class name
             $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
-                . str_replace('_', DIRECTORY_SEPARATOR, 
substr($logicalPathPsr4, $pos + 1));
+                . strtr(substr($logicalPathPsr4, $pos + 1), '_', 
DIRECTORY_SEPARATOR);
         } else {
             // PEAR-like class name
-            $logicalPathPsr0 = str_replace('_', DIRECTORY_SEPARATOR, $class) . 
$ext;
+            $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
         }
 
         if (isset($this->prefixesPsr0[$first])) {
diff --git a/composer/autoload_classmap.php b/composer/autoload_classmap.php
index ed971b5..62c20c1 100644
--- a/composer/autoload_classmap.php
+++ b/composer/autoload_classmap.php
@@ -315,7 +315,6 @@
     'Kafka\\Protocol\\Protocol' => $vendorDir . 
'/nmred/kafka-php/src/Kafka/Protocol/Protocol.php',
     'Kafka\\Socket' => $vendorDir . '/nmred/kafka-php/src/Kafka/Socket.php',
     'Kafka\\ZooKeeper' => $vendorDir . 
'/nmred/kafka-php/src/Kafka/ZooKeeper.php',
-    'KzykHys\\Pygments\\Pygments' => $vendorDir . 
'/kzykhys/pygments/src/KzykHys/Pygments/Pygments.php',
     'LCRun3' => $vendorDir . '/zordius/lightncandy/src/lightncandy.php',
     'Less_Autoloader' => $vendorDir . 
'/oyejorge/less.php/lib/Less/Autoloader.php',
     'Less_Cache' => $vendorDir . '/oyejorge/less.php/lib/Less/Cache.php',
diff --git a/composer/autoload_namespaces.php b/composer/autoload_namespaces.php
index 653e51b..39bb61e 100644
--- a/composer/autoload_namespaces.php
+++ b/composer/autoload_namespaces.php
@@ -10,5 +10,5 @@
     'Liuggio' => array($vendorDir . '/liuggio/statsd-php-client/src'),
     'Less' => array($vendorDir . '/oyejorge/less.php/lib'),
     'Kafka\\' => array($vendorDir . '/nmred/kafka-php/src'),
-    '' => array($vendorDir . '/cssjanus/cssjanus/src', $vendorDir . 
'/kzykhys/pygments/src'),
+    '' => array($vendorDir . '/cssjanus/cssjanus/src'),
 );
diff --git a/composer/installed.json b/composer/installed.json
index cca8ea7..f394b48 100644
--- a/composer/installed.json
+++ b/composer/installed.json
@@ -173,39 +173,6 @@
         ]
     },
     {
-        "name": "kzykhys/pygments",
-        "version": "v1.0.0",
-        "version_normalized": "1.0.0.0",
-        "source": {
-            "type": "git",
-            "url": "https://github.com/kzykhys/Pygments.php.git";,
-            "reference": "7bde970d3c378d075ef0e005bb93a91055e17994"
-        },
-        "dist": {
-            "type": "zip",
-            "url": 
"https://api.github.com/repos/kzykhys/Pygments.php/zipball/7bde970d3c378d075ef0e005bb93a91055e17994";,
-            "reference": "7bde970d3c378d075ef0e005bb93a91055e17994",
-            "shasum": ""
-        },
-        "require": {
-            "php": ">=5.3.2",
-            "symfony/process": ">=2.3"
-        },
-        "require-dev": {
-            "symfony/finder": ">=2.3"
-        },
-        "time": "2013-12-18 15:22:37",
-        "type": "library",
-        "installation-source": "dist",
-        "autoload": {
-            "psr-0": {
-                "": "src"
-            }
-        },
-        "notification-url": "https://packagist.org/downloads/";,
-        "description": "A Thin Wrapper for the Python Pygments"
-    },
-    {
         "name": "wikimedia/wrappedstring",
         "version": "v2.0.0",
         "version_normalized": "2.0.0.0",
diff --git a/kzykhys/pygments/.gitignore b/kzykhys/pygments/.gitignore
deleted file mode 100644
index 809b698..0000000
--- a/kzykhys/pygments/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-/vendor/
-/build/
-composer.phar
\ No newline at end of file
diff --git a/kzykhys/pygments/.travis.yml b/kzykhys/pygments/.travis.yml
deleted file mode 100644
index 3b42073..0000000
--- a/kzykhys/pygments/.travis.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-language: php
-
-php:
-  - 5.5
-  - 5.4
-  - 5.3
-
-before_install:
-  - sudo easy_install Pygments
-
-before_script:
-  - composer require --no-update satooshi/php-coveralls:dev-master 
sensiolabs/security-checker:dev-master
-  - composer update --dev --no-interaction
-
-script:
-  - mkdir -p build/logs
-  - phpunit -c phpunit.xml.dist --coverage-clover build/logs/clover.xml
-  - php vendor/bin/security-checker security:check composer.lock
-
-after_script:
-  - php vendor/bin/coveralls
\ No newline at end of file
diff --git a/kzykhys/pygments/README.md b/kzykhys/pygments/README.md
deleted file mode 100644
index 64ead7c..0000000
--- a/kzykhys/pygments/README.md
+++ /dev/null
@@ -1,99 +0,0 @@
-Pygments.php - A Thin Wrapper for the Python Pygments
-=====================================================
-
-[![Latest Stable 
Version](https://poser.pugx.org/kzykhys/pygments/v/stable.png)](https://packagist.org/packages/kzykhys/pygments)
-[![Build 
Status](https://travis-ci.org/kzykhys/Pygments.php.png?branch=master)](https://travis-ci.org/kzykhys/Pygments.php)
-[![Coverage 
Status](https://coveralls.io/repos/kzykhys/Pygments.php/badge.png)](https://coveralls.io/r/kzykhys/Pygments.php)
-
-A PHP wrapper for the Python Pygments syntax highlighter
-
-Requirements
-------------
-
-* PHP5.3+
-* Python 2.4+
-* Pygments (`sudo easy_install Pygments`)
-
-Installation
-------------
-
-Create or update your composer.json and run `composer update`
-
-``` json
-{
-    "require": {
-        "kzykhys/pygments": ">=1.0"
-    }
-}
-```
-
-Usage
------
-
-### Highlight the source code
-
-``` php
-<?php
-
-use KzykHys\Pygments\Pygments;
-
-$pygments = new Pygments();
-$html = $pygments->highlight(file_get_contents('index.php'), 'php', 'html');
-$text = $pygments->highlight('package main', 'go', 'ansi');
-```
-
-### Generate a CSS
-
-``` php
-<?php
-
-use KzykHys\Pygments\Pygments;
-
-$pygments = new Pygments();
-$css = $pygments->getCss('monokai');
-$prefixedCss = $pygments->getCss('default', '.syntax');
-```
-
-### Guesses a lexer name
-
-``` php
-<?php
-
-use KzykHys\Pygments\Pygments;
-
-$pygments = new Pygments();
-$pygments->guessLexer('foo.rb'); // ruby
-```
-
-### Get a list of lexers/formatters/styles
-
-``` php
-<?php
-
-use KzykHys\Pygments\Pygments;
-
-$pygments = new Pygments();
-$pygments->getLexers()
-$pygments->getFormatters();
-$pygments->getStyles();
-```
-
-### Custom `pygmentize` path
-
-``` php
-<?php
-
-use KzykHys\Pygments\Pygments;
-
-$pygments = new Pygments('/path/to/pygmentize');
-```
-
-License
--------
-
-The MIT License
-
-Author
-------
-
-Kazuyuki Hayashi (@kzykhys)
\ No newline at end of file
diff --git a/kzykhys/pygments/composer.json b/kzykhys/pygments/composer.json
deleted file mode 100644
index e9809a4..0000000
--- a/kzykhys/pygments/composer.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
-    "name": "kzykhys/pygments",
-    "description": "A Thin Wrapper for the Python Pygments",
-    "minimum-stability": "stable",
-    "require": {
-        "php": ">=5.3.2",
-        "symfony/process": ">=2.3"
-    },
-    "require-dev": {
-        "symfony/finder": ">=2.3"
-    },
-    "autoload": {
-        "psr-0": {
-            "": "src"
-        }
-    }
-}
\ No newline at end of file
diff --git a/kzykhys/pygments/composer.lock b/kzykhys/pygments/composer.lock
deleted file mode 100644
index fa03182..0000000
--- a/kzykhys/pygments/composer.lock
+++ /dev/null
@@ -1,118 +0,0 @@
-{
-    "_readme": [
-        "This file locks the dependencies of your project to a known state",
-        "Read more about it at 
http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file";
-    ],
-    "hash": "d2e111fb167611c09ab96baa0504b60b",
-    "packages": [
-        {
-            "name": "symfony/process",
-            "version": "v2.4.0",
-            "target-dir": "Symfony/Component/Process",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/Process.git";,
-                "reference": "87738ff42e2467730ed74d941866e95513844b70"
-            },
-            "dist": {
-                "type": "zip",
-                "url": 
"https://api.github.com/repos/symfony/Process/zipball/87738ff42e2467730ed74d941866e95513844b70";,
-                "reference": "87738ff42e2467730ed74d941866e95513844b70",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.3.3"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "2.4-dev"
-                }
-            },
-            "autoload": {
-                "psr-0": {
-                    "Symfony\\Component\\Process\\": ""
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/";,
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Fabien Potencier",
-                    "email": "[email protected]"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "http://symfony.com/contributors";
-                }
-            ],
-            "description": "Symfony Process Component",
-            "homepage": "http://symfony.com";,
-            "time": "2013-11-26 16:40:27"
-        }
-    ],
-    "packages-dev": [
-        {
-            "name": "symfony/finder",
-            "version": "v2.4.0",
-            "target-dir": "Symfony/Component/Finder",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/Finder.git";,
-                "reference": "72356bf0646b11af1bae666c28a639bd8ede459f"
-            },
-            "dist": {
-                "type": "zip",
-                "url": 
"https://api.github.com/repos/symfony/Finder/zipball/72356bf0646b11af1bae666c28a639bd8ede459f";,
-                "reference": "72356bf0646b11af1bae666c28a639bd8ede459f",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.3.3"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "2.4-dev"
-                }
-            },
-            "autoload": {
-                "psr-0": {
-                    "Symfony\\Component\\Finder\\": ""
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/";,
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Fabien Potencier",
-                    "email": "[email protected]"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "http://symfony.com/contributors";
-                }
-            ],
-            "description": "Symfony Finder Component",
-            "homepage": "http://symfony.com";,
-            "time": "2013-11-26 16:40:27"
-        }
-    ],
-    "aliases": [
-
-    ],
-    "minimum-stability": "stable",
-    "stability-flags": [
-
-    ],
-    "platform": {
-        "php": ">=5.3.2"
-    },
-    "platform-dev": [
-
-    ]
-}
diff --git a/kzykhys/pygments/phpunit.xml.dist 
b/kzykhys/pygments/phpunit.xml.dist
deleted file mode 100644
index ad8dd7b..0000000
--- a/kzykhys/pygments/phpunit.xml.dist
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- http://www.phpunit.de/manual/current/en/appendixes.configuration.html -->
-<phpunit
-    backupGlobals = "false"
-    backupStaticAttributes = "false"
-    colors = "true"
-    convertErrorsToExceptions = "true"
-    convertNoticesToExceptions = "true"
-    convertWarningsToExceptions = "true"
-    processIsolation = "false"
-    stopOnFailure = "false"
-    syntaxCheck = "false"
-    bootstrap = "vendor/autoload.php" >
-
-  <testsuites>
-    <testsuite name="Project Test Suite">
-      <directory>test</directory>
-    </testsuite>
-  </testsuites>
-
-  <filter>
-    <whitelist>
-      <directory>src</directory>
-    </whitelist>
-  </filter>
-
-</phpunit>
\ No newline at end of file
diff --git a/kzykhys/pygments/src/KzykHys/Pygments/Pygments.php 
b/kzykhys/pygments/src/KzykHys/Pygments/Pygments.php
deleted file mode 100644
index 6ebd652..0000000
--- a/kzykhys/pygments/src/KzykHys/Pygments/Pygments.php
+++ /dev/null
@@ -1,200 +0,0 @@
-<?php
-
-namespace KzykHys\Pygments;
-
-use Symfony\Component\Process\Process;
-use Symfony\Component\Process\ProcessBuilder;
-
-/**
- * Pygments.php - A Thin Wrapper for the Python Pygments
- *
- * @author Kazuyuki Hayashi <[email protected]>
- */
-class Pygments
-{
-
-    /**
-     * @var string
-     */
-    private $pygmentize;
-
-    /**
-     * Constructor
-     *
-     * @param string $pygmentize The path to pygmentize command
-     */
-    public function __construct($pygmentize = 'pygmentize')
-    {
-        $this->pygmentize = $pygmentize;
-    }
-
-    /**
-     * Highlight the input code
-     *
-     * @param string $code      The code to highlight
-     * @param string $lexer     The name of the lexer (php, html,...)
-     * @param string $formatter The name of the formatter (html, ansi,...)
-     * @param array  $options   An array of options
-     *
-     * @return string
-     */
-    public function highlight($code, $lexer = null, $formatter = null, 
$options = array())
-    {
-        $builder = $this->createProcessBuilder();
-
-        if ($lexer) {
-            $builder->add('-l')->add($lexer);
-        } else {
-            $builder->add('-g');
-        }
-
-        if ($formatter) {
-            $builder->add('-f')->add($formatter);
-        }
-
-        if (count($options)) {
-            $arg = array();
-
-            foreach ($options as $key => $value) {
-                $arg[] = sprintf('%s=%s', $key, $value);
-            }
-
-            $builder->add('-O')->add(implode(',', $arg));
-        }
-
-        $process = $builder->getProcess()->setStdin($code);
-
-        return $this->getOutput($process);
-    }
-
-    /**
-     * Gets style definition
-     *
-     * @param string $style    The name of the style (default, colorful,...)
-     * @param string $selector The css selector
-     *
-     * @return string
-     */
-    public function getCss($style = 'default', $selector = null)
-    {
-        $builder = $this->createProcessBuilder();
-        $builder->add('-f')->add('html');
-        $builder->add('-S')->add($style);
-
-        if ($selector) {
-            $builder->add('-a')->add($selector);
-        }
-
-        return $this->getOutput($builder->getProcess());
-    }
-
-    /**
-     * Guesses a lexer name based solely on the given filename
-     *
-     * @param string $fileName The file does not need to exist, or be readable.
-     *
-     * @return string
-     */
-    public function guessLexer($fileName)
-    {
-        $process = $this->createProcessBuilder()
-            ->setArguments(array('-N', $fileName))
-            ->getProcess();
-
-        return trim($this->getOutput($process));
-    }
-
-    /**
-     * Gets a list of lexers
-     *
-     * @return array
-     */
-    public function getLexers()
-    {
-        $process = $this->createProcessBuilder()
-            ->setArguments(array('-L', 'lexer'))
-            ->getProcess();
-
-        $output = $this->getOutput($process);
-
-        return $this->parseList($output);
-    }
-
-    /**
-     * Gets a list of formatters
-     *
-     * @return array
-     */
-    public function getFormatters()
-    {
-        $process = $this->createProcessBuilder()
-            ->setArguments(array('-L', 'formatter'))
-            ->getProcess();
-
-        $output = $this->getOutput($process);
-
-        return $this->parseList($output);
-    }
-
-    /**
-     * Gets a list of styles
-     *
-     * @return array
-     */
-    public function getStyles()
-    {
-        $process = $this->createProcessBuilder()
-            ->setArguments(array('-L', 'style'))
-            ->getProcess();
-
-        $output = $this->getOutput($process);
-
-        return $this->parseList($output);
-    }
-
-    /**
-     * @return ProcessBuilder
-     */
-    protected function createProcessBuilder()
-    {
-        return ProcessBuilder::create()->setPrefix($this->pygmentize);
-    }
-
-    /**
-     * @param Process $process
-     * @throws \RuntimeException
-     * @return string
-     */
-    protected function getOutput(Process $process)
-    {
-        $process->run();
-
-        if (!$process->isSuccessful()) {
-            throw new \RuntimeException($process->getErrorOutput());
-        }
-
-        return $process->getOutput();
-    }
-
-    /**
-     * @param string $input
-     * @return array
-     */
-    protected function parseList($input)
-    {
-        $list = array();
-
-        if (preg_match_all('/^\* (.*?):\r?\n *([^\r\n]*?)$/m', $input, 
$matches, PREG_SET_ORDER)) {
-            foreach ($matches as $match) {
-                $names = explode(',', $match[1]);
-
-                foreach ($names as $name) {
-                    $list[trim($name)] = $match[2];
-                }
-            }
-        }
-
-        return $list;
-    }
-
-} 
\ No newline at end of file
diff --git a/kzykhys/pygments/test/KzykHys/Pygments/PygmentsTest.php 
b/kzykhys/pygments/test/KzykHys/Pygments/PygmentsTest.php
deleted file mode 100644
index 2110e0d..0000000
--- a/kzykhys/pygments/test/KzykHys/Pygments/PygmentsTest.php
+++ /dev/null
@@ -1,116 +0,0 @@
-<?php
-
-use KzykHys\Pygments\Pygments;
-use Symfony\Component\Finder\Finder;
-
-/**
- * @author Kazuyuki Hayashi <[email protected]>
- */
-class PygmentsTest extends PHPUnit_Framework_TestCase
-{
-
-    /**
-     * @dataProvider provideSamples
-     */
-    public function testHighlight($input, $expected, $expectedL, $lexer)
-    {
-        $pygments = new Pygments();
-
-        $this->assertEquals($expected, $pygments->highlight($input, null, 
'html'));
-        $this->assertEquals($expected, $pygments->highlight($input, $lexer, 
'html'));
-        $this->assertEquals($expectedL, $pygments->highlight($input, null, 
'html', array('linenos' => 1)));
-    }
-
-    /**
-     * @dataProvider provideCss
-     */
-    public function testGetCss($expected, $expectedA, $style)
-    {
-        $pygments = new Pygments();
-
-        $this->assertEquals($expected, $pygments->getCss($style));
-        $this->assertEquals($expectedA, $pygments->getCss($style, '.syntax'));
-    }
-
-    public function testGetLexers()
-    {
-        $pygments = new Pygments();
-        $lexers = $pygments->getLexers();
-
-        $this->assertArrayHasKey('python', $lexers);
-    }
-
-    public function testGetFormatters()
-    {
-        $pygments = new Pygments();
-        $formatters = $pygments->getFormatters();
-
-        $this->assertArrayHasKey('html', $formatters);
-    }
-
-    public function testGetStyles()
-    {
-        $pygments = new Pygments();
-        $styles = $pygments->getStyles();
-
-        $this->assertArrayHasKey('monokai', $styles);
-    }
-
-    public function testGuessLexer()
-    {
-        $pygments = new Pygments();
-
-        $this->assertEquals('php', $pygments->guessLexer('index.php'));
-        $this->assertEquals('go', $pygments->guessLexer('main.go'));
-    }
-
-    public function provideSamples()
-    {
-        $finder = new Finder();
-        $finder
-            ->in(__DIR__ . '/Resources/example')
-            ->name("*.in")
-            ->notName('*.linenos.out')
-            ->files()
-            ->ignoreVCS(true);
-
-        $samples = array();
-
-        /* @var \Symfony\Component\Finder\SplFileInfo $file */
-        foreach ($finder as $file) {
-            $samples[] = array(
-                $file->getContents(),
-                file_get_contents(str_replace('.in', '.out', 
$file->getPathname())),
-                file_get_contents(str_replace('.in', '.linenos.out', 
$file->getPathname())),
-                preg_replace('/\..*/', '', $file->getFilename())
-            );
-        }
-
-        return $samples;
-    }
-
-    public function provideCss()
-    {
-        $finder = new Finder();
-        $finder
-            ->in(__DIR__ . '/Resources/css')
-            ->files()
-            ->ignoreVCS(true)
-            ->name('*.css')
-            ->notName('*.prefix.css');
-
-        $css = array();
-
-        /* @var \Symfony\Component\Finder\SplFileInfo $file */
-        foreach ($finder as $file) {
-            $css[] = array(
-                $file->getContents(),
-                file_get_contents(str_replace('.css', '.prefix.css', 
$file->getPathname())),
-                str_replace('.css', '', $file->getFilename())
-            );
-        }
-
-        return $css;
-    }
-
-} 
\ No newline at end of file
diff --git a/kzykhys/pygments/test/KzykHys/Pygments/Resources/css/default.css 
b/kzykhys/pygments/test/KzykHys/Pygments/Resources/css/default.css
deleted file mode 100644
index 67e6ea3..0000000
--- a/kzykhys/pygments/test/KzykHys/Pygments/Resources/css/default.css
+++ /dev/null
@@ -1,61 +0,0 @@
-.hll { background-color: #ffffcc }
-.c { color: #408080; font-style: italic } /* Comment */
-.err { border: 1px solid #FF0000 } /* Error */
-.k { color: #008000; font-weight: bold } /* Keyword */
-.o { color: #666666 } /* Operator */
-.cm { color: #408080; font-style: italic } /* Comment.Multiline */
-.cp { color: #BC7A00 } /* Comment.Preproc */
-.c1 { color: #408080; font-style: italic } /* Comment.Single */
-.cs { color: #408080; font-style: italic } /* Comment.Special */
-.gd { color: #A00000 } /* Generic.Deleted */
-.ge { font-style: italic } /* Generic.Emph */
-.gr { color: #FF0000 } /* Generic.Error */
-.gh { color: #000080; font-weight: bold } /* Generic.Heading */
-.gi { color: #00A000 } /* Generic.Inserted */
-.go { color: #888888 } /* Generic.Output */
-.gp { color: #000080; font-weight: bold } /* Generic.Prompt */
-.gs { font-weight: bold } /* Generic.Strong */
-.gu { color: #800080; font-weight: bold } /* Generic.Subheading */
-.gt { color: #0044DD } /* Generic.Traceback */
-.kc { color: #008000; font-weight: bold } /* Keyword.Constant */
-.kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
-.kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
-.kp { color: #008000 } /* Keyword.Pseudo */
-.kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
-.kt { color: #B00040 } /* Keyword.Type */
-.m { color: #666666 } /* Literal.Number */
-.s { color: #BA2121 } /* Literal.String */
-.na { color: #7D9029 } /* Name.Attribute */
-.nb { color: #008000 } /* Name.Builtin */
-.nc { color: #0000FF; font-weight: bold } /* Name.Class */
-.no { color: #880000 } /* Name.Constant */
-.nd { color: #AA22FF } /* Name.Decorator */
-.ni { color: #999999; font-weight: bold } /* Name.Entity */
-.ne { color: #D2413A; font-weight: bold } /* Name.Exception */
-.nf { color: #0000FF } /* Name.Function */
-.nl { color: #A0A000 } /* Name.Label */
-.nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
-.nt { color: #008000; font-weight: bold } /* Name.Tag */
-.nv { color: #19177C } /* Name.Variable */
-.ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
-.w { color: #bbbbbb } /* Text.Whitespace */
-.mf { color: #666666 } /* Literal.Number.Float */
-.mh { color: #666666 } /* Literal.Number.Hex */
-.mi { color: #666666 } /* Literal.Number.Integer */
-.mo { color: #666666 } /* Literal.Number.Oct */
-.sb { color: #BA2121 } /* Literal.String.Backtick */
-.sc { color: #BA2121 } /* Literal.String.Char */
-.sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
-.s2 { color: #BA2121 } /* Literal.String.Double */
-.se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
-.sh { color: #BA2121 } /* Literal.String.Heredoc */
-.si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
-.sx { color: #008000 } /* Literal.String.Other */
-.sr { color: #BB6688 } /* Literal.String.Regex */
-.s1 { color: #BA2121 } /* Literal.String.Single */
-.ss { color: #19177C } /* Literal.String.Symbol */
-.bp { color: #008000 } /* Name.Builtin.Pseudo */
-.vc { color: #19177C } /* Name.Variable.Class */
-.vg { color: #19177C } /* Name.Variable.Global */
-.vi { color: #19177C } /* Name.Variable.Instance */
-.il { color: #666666 } /* Literal.Number.Integer.Long */
diff --git 
a/kzykhys/pygments/test/KzykHys/Pygments/Resources/css/default.prefix.css 
b/kzykhys/pygments/test/KzykHys/Pygments/Resources/css/default.prefix.css
deleted file mode 100644
index eb17bc3..0000000
--- a/kzykhys/pygments/test/KzykHys/Pygments/Resources/css/default.prefix.css
+++ /dev/null
@@ -1,62 +0,0 @@
-.syntax .hll { background-color: #ffffcc }
-.syntax  { background: #f8f8f8; }
-.syntax .c { color: #408080; font-style: italic } /* Comment */
-.syntax .err { border: 1px solid #FF0000 } /* Error */
-.syntax .k { color: #008000; font-weight: bold } /* Keyword */
-.syntax .o { color: #666666 } /* Operator */
-.syntax .cm { color: #408080; font-style: italic } /* Comment.Multiline */
-.syntax .cp { color: #BC7A00 } /* Comment.Preproc */
-.syntax .c1 { color: #408080; font-style: italic } /* Comment.Single */
-.syntax .cs { color: #408080; font-style: italic } /* Comment.Special */
-.syntax .gd { color: #A00000 } /* Generic.Deleted */
-.syntax .ge { font-style: italic } /* Generic.Emph */
-.syntax .gr { color: #FF0000 } /* Generic.Error */
-.syntax .gh { color: #000080; font-weight: bold } /* Generic.Heading */
-.syntax .gi { color: #00A000 } /* Generic.Inserted */
-.syntax .go { color: #888888 } /* Generic.Output */
-.syntax .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
-.syntax .gs { font-weight: bold } /* Generic.Strong */
-.syntax .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
-.syntax .gt { color: #0044DD } /* Generic.Traceback */
-.syntax .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
-.syntax .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
-.syntax .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
-.syntax .kp { color: #008000 } /* Keyword.Pseudo */
-.syntax .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
-.syntax .kt { color: #B00040 } /* Keyword.Type */
-.syntax .m { color: #666666 } /* Literal.Number */
-.syntax .s { color: #BA2121 } /* Literal.String */
-.syntax .na { color: #7D9029 } /* Name.Attribute */
-.syntax .nb { color: #008000 } /* Name.Builtin */
-.syntax .nc { color: #0000FF; font-weight: bold } /* Name.Class */
-.syntax .no { color: #880000 } /* Name.Constant */
-.syntax .nd { color: #AA22FF } /* Name.Decorator */
-.syntax .ni { color: #999999; font-weight: bold } /* Name.Entity */
-.syntax .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
-.syntax .nf { color: #0000FF } /* Name.Function */
-.syntax .nl { color: #A0A000 } /* Name.Label */
-.syntax .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
-.syntax .nt { color: #008000; font-weight: bold } /* Name.Tag */
-.syntax .nv { color: #19177C } /* Name.Variable */
-.syntax .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
-.syntax .w { color: #bbbbbb } /* Text.Whitespace */
-.syntax .mf { color: #666666 } /* Literal.Number.Float */
-.syntax .mh { color: #666666 } /* Literal.Number.Hex */
-.syntax .mi { color: #666666 } /* Literal.Number.Integer */
-.syntax .mo { color: #666666 } /* Literal.Number.Oct */
-.syntax .sb { color: #BA2121 } /* Literal.String.Backtick */
-.syntax .sc { color: #BA2121 } /* Literal.String.Char */
-.syntax .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
-.syntax .s2 { color: #BA2121 } /* Literal.String.Double */
-.syntax .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
-.syntax .sh { color: #BA2121 } /* Literal.String.Heredoc */
-.syntax .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
-.syntax .sx { color: #008000 } /* Literal.String.Other */
-.syntax .sr { color: #BB6688 } /* Literal.String.Regex */
-.syntax .s1 { color: #BA2121 } /* Literal.String.Single */
-.syntax .ss { color: #19177C } /* Literal.String.Symbol */
-.syntax .bp { color: #008000 } /* Name.Builtin.Pseudo */
-.syntax .vc { color: #19177C } /* Name.Variable.Class */
-.syntax .vg { color: #19177C } /* Name.Variable.Global */
-.syntax .vi { color: #19177C } /* Name.Variable.Instance */
-.syntax .il { color: #666666 } /* Literal.Number.Integer.Long */
diff --git 
a/kzykhys/pygments/test/KzykHys/Pygments/Resources/example/php.php.in 
b/kzykhys/pygments/test/KzykHys/Pygments/Resources/example/php.php.in
deleted file mode 100644
index b5d9404..0000000
--- a/kzykhys/pygments/test/KzykHys/Pygments/Resources/example/php.php.in
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-class Foo
-{
-    const TEST_CONST = 1;
-
-    public static $staticProperty = null;
-
-    public $property = null;
-
-    public static function staticMethod()
-    {
-        return new static();
-    }
-
-    public function method()
-    {
-        return $this;
-    }
-
-}
\ No newline at end of file
diff --git 
a/kzykhys/pygments/test/KzykHys/Pygments/Resources/example/php.php.linenos.out 
b/kzykhys/pygments/test/KzykHys/Pygments/Resources/example/php.php.linenos.out
deleted file mode 100644
index c646cc9..0000000
--- 
a/kzykhys/pygments/test/KzykHys/Pygments/Resources/example/php.php.linenos.out
+++ /dev/null
@@ -1,43 +0,0 @@
-<table class="highlighttable"><tr><td class="linenos"><div 
class="linenodiv"><pre> 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21</pre></div></td><td class="code"><div class="highlight"><pre><span 
class="cp">&lt;?php</span>
-
-<span class="k">class</span> <span class="nc">Foo</span>
-<span class="p">{</span>
-    <span class="k">const</span> <span class="no">TEST_CONST</span> <span 
class="o">=</span> <span class="mi">1</span><span class="p">;</span>
-
-    <span class="k">public</span> <span class="k">static</span> <span 
class="nv">$staticProperty</span> <span class="o">=</span> <span 
class="k">null</span><span class="p">;</span>
-
-    <span class="k">public</span> <span class="nv">$property</span> <span 
class="o">=</span> <span class="k">null</span><span class="p">;</span>
-
-    <span class="k">public</span> <span class="k">static</span> <span 
class="k">function</span> <span class="nf">staticMethod</span><span 
class="p">()</span>
-    <span class="p">{</span>
-        <span class="k">return</span> <span class="k">new</span> <span 
class="k">static</span><span class="p">();</span>
-    <span class="p">}</span>
-
-    <span class="k">public</span> <span class="k">function</span> <span 
class="nf">method</span><span class="p">()</span>
-    <span class="p">{</span>
-        <span class="k">return</span> <span class="nv">$this</span><span 
class="p">;</span>
-    <span class="p">}</span>
-
-<span class="p">}</span>
-</pre></div>
-</td></tr></table>
\ No newline at end of file
diff --git 
a/kzykhys/pygments/test/KzykHys/Pygments/Resources/example/php.php.out 
b/kzykhys/pygments/test/KzykHys/Pygments/Resources/example/php.php.out
deleted file mode 100644
index c5e907f..0000000
--- a/kzykhys/pygments/test/KzykHys/Pygments/Resources/example/php.php.out
+++ /dev/null
@@ -1,22 +0,0 @@
-<div class="highlight"><pre><span class="cp">&lt;?php</span>
-
-<span class="k">class</span> <span class="nc">Foo</span>
-<span class="p">{</span>
-    <span class="k">const</span> <span class="no">TEST_CONST</span> <span 
class="o">=</span> <span class="mi">1</span><span class="p">;</span>
-
-    <span class="k">public</span> <span class="k">static</span> <span 
class="nv">$staticProperty</span> <span class="o">=</span> <span 
class="k">null</span><span class="p">;</span>
-
-    <span class="k">public</span> <span class="nv">$property</span> <span 
class="o">=</span> <span class="k">null</span><span class="p">;</span>
-
-    <span class="k">public</span> <span class="k">static</span> <span 
class="k">function</span> <span class="nf">staticMethod</span><span 
class="p">()</span>
-    <span class="p">{</span>
-        <span class="k">return</span> <span class="k">new</span> <span 
class="k">static</span><span class="p">();</span>
-    <span class="p">}</span>
-
-    <span class="k">public</span> <span class="k">function</span> <span 
class="nf">method</span><span class="p">()</span>
-    <span class="p">{</span>
-        <span class="k">return</span> <span class="nv">$this</span><span 
class="p">;</span>
-    <span class="p">}</span>
-
-<span class="p">}</span>
-</pre></div>

-- 
To view, visit https://gerrit.wikimedia.org/r/258932
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I279b270232d08f5a295edac12271e6fac722d609
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vendor
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to