From b4ec45b368a47b24c7f39e962920b1bb8a2e69f2 Mon Sep 17 00:00:00 2001
From: Rolf Kaiser <1090569+rkaiser0324@users.noreply.github.com>
Date: Tue, 19 Jan 2021 17:22:18 -0800
Subject: [PATCH 01/47] fix: correct PHP notice on register-rest-route in
WordPress v5.5.0
---
src/Plugin.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/Plugin.php b/src/Plugin.php
index 734c2030..b26e0559 100644
--- a/src/Plugin.php
+++ b/src/Plugin.php
@@ -164,6 +164,7 @@ private function registerTestEndpoint() {
array(
'methods' => 'POST',
'callback' => '\Rollbar\Wordpress\Plugin::testPhpLogging',
+ 'permission_callback' => '__return_true',
'args' => array(
'server_side_access_token' => array(
'required' => true
From b0d9efbe4dd5894d59d85b56ef7c3c69875dd1ad Mon Sep 17 00:00:00 2001
From: Bart Skowron Error: failed to enable the Rollbar Must-Use plugin. Error: failed to disable the Rollbar Must-Use plugin.
WP_ENV environment variable: ' . getenv('WP_ENV') . ' ' .
+ 'WP_ENV environment variable: ' . self::getEnv() . '
Rollbar for Wordpress honors the WP_ENV environment variable. ' .
'If the environment setting is not specified here, it will take ' .
'precendence over the default value.
WP_ENV environment variable: ' . self::getEnv() . ' ' .
+ 'WP_ENV environment variable: ' . self::getEnvironment() . '
Rollbar for Wordpress honors the WP_ENV environment variable. ' .
'If the environment setting is not specified here, it will take ' .
'precendence over the default value.
WP_ENV environment variable: ' . self::getEnvironment() . ' ' .
+ 'WP_ENV environment variable: ' . $env . '
Rollbar for Wordpress honors the WP_ENV environment variable. ' .
'If the environment setting is not specified here, it will take ' .
'precendence over the default value.
s around - * "paragraphs" that are wrapped in non-block-level tags, such as - * anchors, phrase emphasis, and spans. The list of tags we're looking - * for is hard-coded: - * - * * List "a" is made of tags which can be both inline or block-level. - * These will be treated block-level when the start tag is alone on - * its line, otherwise they're not matched here and will be taken as - * inline later. - * * List "b" is made of tags which are always block-level; - */ - $block_tags_a_re = 'ins|del'; - $block_tags_b_re = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|'. - 'script|noscript|style|form|fieldset|iframe|math|svg|'. - 'article|section|nav|aside|hgroup|header|footer|'. - 'figure'; - - // Regular expression for the content of a block tag. - $nested_tags_level = 4; - $attr = ' - (?> # optional tag attributes - \s # starts with whitespace - (?> - [^>"/]+ # text outside quotes - | - /+(?!>) # slash not followed by ">" - | - "[^"]*" # text inside double quotes (tolerate ">") - | - \'[^\']*\' # text inside single quotes (tolerate ">") - )* - )? - '; - $content = - str_repeat(' - (?> - [^<]+ # content without tag - | - <\2 # nested opening tag - '.$attr.' # attributes - (?> - /> - | - >', $nested_tags_level). // end of opening tag - '.*?'. // last level nested tag content - str_repeat(' - \2\s*> # closing nested tag - ) - | - <(?!/\2\s*> # other tags with a different name - ) - )*', - $nested_tags_level); - $content2 = str_replace('\2', '\3', $content); - - /** - * First, look for nested blocks, e.g.: - *
` blocks.
- * @param string $text
- * @return string
- */
- protected function doCodeBlocks($text) {
- $text = preg_replace_callback('{
- (?:\n\n|\A\n?)
- ( # $1 = the code block -- one or more lines, starting with a space/tab
- (?>
- [ ]{'.$this->tab_width.'} # Lines must start with a tab or a tab-width of spaces
- .*\n+
- )+
- )
- ((?=^[ ]{0,'.$this->tab_width.'}\S)|\Z) # Lookahead for non-space at line-start, or end of doc
- }xm',
- array($this, '_doCodeBlocks_callback'), $text);
-
- return $text;
- }
-
- /**
- * Code block parsing callback
- * @param array $matches
- * @return string
- */
- protected function _doCodeBlocks_callback($matches) {
- $codeblock = $matches[1];
-
- $codeblock = $this->outdent($codeblock);
- if (is_callable($this->code_block_content_func)) {
- $codeblock = call_user_func($this->code_block_content_func, $codeblock, "");
- } else {
- $codeblock = htmlspecialchars($codeblock, ENT_NOQUOTES);
- }
-
- # trim leading newlines and trailing newlines
- $codeblock = preg_replace('/\A\n+|\n+\z/', '', $codeblock);
-
- $codeblock = "$codeblock\n
";
- return "\n\n" . $this->hashBlock($codeblock) . "\n\n";
- }
-
- /**
- * Create a code span markup for $code. Called from handleSpanToken.
- * @param string $code
- * @return string
- */
- protected function makeCodeSpan($code) {
- if (is_callable($this->code_span_content_func)) {
- $code = call_user_func($this->code_span_content_func, $code);
- } else {
- $code = htmlspecialchars(trim($code), ENT_NOQUOTES);
- }
- return $this->hashPart("$code");
- }
-
- /**
- * Define the emphasis operators with their regex matches
- * @var array
- */
- protected $em_relist = array(
- '' => '(?:(? '(? '(? '(?:(? '(? '(? '(?:(? '(? '(?em_relist as $em => $em_re) {
- foreach ($this->strong_relist as $strong => $strong_re) {
- // Construct list of allowed token expressions.
- $token_relist = array();
- if (isset($this->em_strong_relist["$em$strong"])) {
- $token_relist[] = $this->em_strong_relist["$em$strong"];
- }
- $token_relist[] = $em_re;
- $token_relist[] = $strong_re;
-
- // Construct master expression from list.
- $token_re = '{(' . implode('|', $token_relist) . ')}';
- $this->em_strong_prepared_relist["$em$strong"] = $token_re;
- }
- }
- }
-
- /**
- * Convert Markdown italics (emphasis) and bold (strong) to HTML
- * @param string $text
- * @return string
- */
- protected function doItalicsAndBold($text) {
- if ($this->in_emphasis_processing) {
- return $text; // avoid reentrency
- }
- $this->in_emphasis_processing = true;
-
- $token_stack = array('');
- $text_stack = array('');
- $em = '';
- $strong = '';
- $tree_char_em = false;
-
- while (1) {
- // Get prepared regular expression for seraching emphasis tokens
- // in current context.
- $token_re = $this->em_strong_prepared_relist["$em$strong"];
-
- // Each loop iteration search for the next emphasis token.
- // Each token is then passed to handleSpanToken.
- $parts = preg_split($token_re, $text, 2, PREG_SPLIT_DELIM_CAPTURE);
- $text_stack[0] .= $parts[0];
- $token =& $parts[1];
- $text =& $parts[2];
-
- if (empty($token)) {
- // Reached end of text span: empty stack without emitting.
- // any more emphasis.
- while ($token_stack[0]) {
- $text_stack[1] .= array_shift($token_stack);
- $text_stack[0] .= array_shift($text_stack);
- }
- break;
- }
-
- $token_len = strlen($token);
- if ($tree_char_em) {
- // Reached closing marker while inside a three-char emphasis.
- if ($token_len == 3) {
- // Three-char closing marker, close em and strong.
- array_shift($token_stack);
- $span = array_shift($text_stack);
- $span = $this->runSpanGamut($span);
- $span = "$span";
- $text_stack[0] .= $this->hashPart($span);
- $em = '';
- $strong = '';
- } else {
- // Other closing marker: close one em or strong and
- // change current token state to match the other
- $token_stack[0] = str_repeat($token[0], 3-$token_len);
- $tag = $token_len == 2 ? "strong" : "em";
- $span = $text_stack[0];
- $span = $this->runSpanGamut($span);
- $span = "<$tag>$span$tag>";
- $text_stack[0] = $this->hashPart($span);
- $$tag = ''; // $$tag stands for $em or $strong
- }
- $tree_char_em = false;
- } else if ($token_len == 3) {
- if ($em) {
- // Reached closing marker for both em and strong.
- // Closing strong marker:
- for ($i = 0; $i < 2; ++$i) {
- $shifted_token = array_shift($token_stack);
- $tag = strlen($shifted_token) == 2 ? "strong" : "em";
- $span = array_shift($text_stack);
- $span = $this->runSpanGamut($span);
- $span = "<$tag>$span$tag>";
- $text_stack[0] .= $this->hashPart($span);
- $$tag = ''; // $$tag stands for $em or $strong
- }
- } else {
- // Reached opening three-char emphasis marker. Push on token
- // stack; will be handled by the special condition above.
- $em = $token[0];
- $strong = "$em$em";
- array_unshift($token_stack, $token);
- array_unshift($text_stack, '');
- $tree_char_em = true;
- }
- } else if ($token_len == 2) {
- if ($strong) {
- // Unwind any dangling emphasis marker:
- if (strlen($token_stack[0]) == 1) {
- $text_stack[1] .= array_shift($token_stack);
- $text_stack[0] .= array_shift($text_stack);
- $em = '';
- }
- // Closing strong marker:
- array_shift($token_stack);
- $span = array_shift($text_stack);
- $span = $this->runSpanGamut($span);
- $span = "$span";
- $text_stack[0] .= $this->hashPart($span);
- $strong = '';
- } else {
- array_unshift($token_stack, $token);
- array_unshift($text_stack, '');
- $strong = $token;
- }
- } else {
- // Here $token_len == 1
- if ($em) {
- if (strlen($token_stack[0]) == 1) {
- // Closing emphasis marker:
- array_shift($token_stack);
- $span = array_shift($text_stack);
- $span = $this->runSpanGamut($span);
- $span = "$span";
- $text_stack[0] .= $this->hashPart($span);
- $em = '';
- } else {
- $text_stack[0] .= $token;
- }
- } else {
- array_unshift($token_stack, $token);
- array_unshift($text_stack, '');
- $em = $token;
- }
- }
- }
- $this->in_emphasis_processing = false;
- return $text_stack[0];
- }
-
- /**
- * Parse Markdown blockquotes to HTML
- * @param string $text
- * @return string
- */
- protected function doBlockQuotes($text) {
- $text = preg_replace_callback('/
- ( # Wrap whole match in $1
- (?>
- ^[ ]*>[ ]? # ">" at the start of a line
- .+\n # rest of the first line
- (.+\n)* # subsequent consecutive lines
- \n* # blanks
- )+
- )
- /xm',
- array($this, '_doBlockQuotes_callback'), $text);
-
- return $text;
- }
-
- /**
- * Blockquote parsing callback
- * @param array $matches
- * @return string
- */
- protected function _doBlockQuotes_callback($matches) {
- $bq = $matches[1];
- // trim one level of quoting - trim whitespace-only lines
- $bq = preg_replace('/^[ ]*>[ ]?|^[ ]+$/m', '', $bq);
- $bq = $this->runBlockGamut($bq); // recurse
-
- $bq = preg_replace('/^/m', " ", $bq);
- // These leading spaces cause problem with content,
- // so we need to fix that:
- $bq = preg_replace_callback('{(\s*.+?
)}sx',
- array($this, '_doBlockQuotes_callback2'), $bq);
-
- return "\n" . $this->hashBlock("\n$bq\n
") . "\n\n";
- }
-
- /**
- * Blockquote parsing callback
- * @param array $matches
- * @return string
- */
- protected function _doBlockQuotes_callback2($matches) {
- $pre = $matches[1];
- $pre = preg_replace('/^ /m', '', $pre);
- return $pre;
- }
-
- /**
- * Parse paragraphs
- *
- * @param string $text String to process in paragraphs
- * @param boolean $wrap_in_p Whether paragraphs should be wrapped in tags
- * @return string
- */
- protected function formParagraphs($text, $wrap_in_p = true) {
- // Strip leading and trailing lines:
- $text = preg_replace('/\A\n+|\n+\z/', '', $text);
-
- $grafs = preg_split('/\n{2,}/', $text, -1, PREG_SPLIT_NO_EMPTY);
-
- // Wrap
tags and unhashify HTML blocks
- foreach ($grafs as $key => $value) {
- if (!preg_match('/^B\x1A[0-9]+B$/', $value)) {
- // Is a paragraph.
- $value = $this->runSpanGamut($value);
- if ($wrap_in_p) {
- $value = preg_replace('/^([ ]*)/', "
", $value);
- $value .= "
";
- }
- $grafs[$key] = $this->unhash($value);
- } else {
- // Is a block.
- // Modify elements of @grafs in-place...
- $graf = $value;
- $block = $this->html_hashes[$graf];
- $graf = $block;
-// if (preg_match('{
-// \A
-// ( # $1 = tag
-// ]*
-// \b
-// markdown\s*=\s* ([\'"]) # $2 = attr quote char
-// 1
-// \2
-// [^>]*
-// >
-// )
-// ( # $3 = contents
-// .*
-// )
-// () # $4 = closing tag
-// \z
-// }xs', $block, $matches))
-// {
-// list(, $div_open, , $div_content, $div_close) = $matches;
-//
-// // We can't call Markdown(), because that resets the hash;
-// // that initialization code should be pulled into its own sub, though.
-// $div_content = $this->hashHTMLBlocks($div_content);
-//
-// // Run document gamut methods on the content.
-// foreach ($this->document_gamut as $method => $priority) {
-// $div_content = $this->$method($div_content);
-// }
-//
-// $div_open = preg_replace(
-// '{\smarkdown\s*=\s*([\'"]).+?\1}', '', $div_open);
-//
-// $graf = $div_open . "\n" . $div_content . "\n" . $div_close;
-// }
- $grafs[$key] = $graf;
- }
- }
-
- return implode("\n\n", $grafs);
- }
-
- /**
- * Encode text for a double-quoted HTML attribute. This function
- * is *not* suitable for attributes enclosed in single quotes.
- * @param string $text
- * @return string
- */
- protected function encodeAttribute($text) {
- $text = $this->encodeAmpsAndAngles($text);
- $text = str_replace('"', '"', $text);
- return $text;
- }
-
- /**
- * Encode text for a double-quoted HTML attribute containing a URL,
- * applying the URL filter if set. Also generates the textual
- * representation for the URL (removing mailto: or tel:) storing it in $text.
- * This function is *not* suitable for attributes enclosed in single quotes.
- *
- * @param string $url
- * @param string $text Passed by reference
- * @return string URL
- */
- protected function encodeURLAttribute($url, &$text = null) {
- if (is_callable($this->url_filter_func)) {
- $url = call_user_func($this->url_filter_func, $url);
- }
-
- if (preg_match('{^mailto:}i', $url)) {
- $url = $this->encodeEntityObfuscatedAttribute($url, $text, 7);
- } else if (preg_match('{^tel:}i', $url)) {
- $url = $this->encodeAttribute($url);
- $text = substr($url, 4);
- } else {
- $url = $this->encodeAttribute($url);
- $text = $url;
- }
-
- return $url;
- }
-
- /**
- * Smart processing for ampersands and angle brackets that need to
- * be encoded. Valid character entities are left alone unless the
- * no-entities mode is set.
- * @param string $text
- * @return string
- */
- protected function encodeAmpsAndAngles($text) {
- if ($this->no_entities) {
- $text = str_replace('&', '&', $text);
- } else {
- // Ampersand-encoding based entirely on Nat Irons's Amputator
- // MT plugin:
- $text = preg_replace('/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/',
- '&', $text);
- }
- // Encode remaining <'s
- $text = str_replace('<', '<', $text);
-
- return $text;
- }
-
- /**
- * Parse Markdown automatic links to anchor HTML tags
- * @param string $text
- * @return string
- */
- protected function doAutoLinks($text) {
- $text = preg_replace_callback('{<((https?|ftp|dict|tel):[^\'">\s]+)>}i',
- array($this, '_doAutoLinks_url_callback'), $text);
-
- // Email addresses:
- $text = preg_replace_callback('{
- <
- (?:mailto:)?
- (
- (?:
- [-!#$%&\'*+/=?^_`.{|}~\w\x80-\xFF]+
- |
- ".*?"
- )
- \@
- (?:
- [-a-z0-9\x80-\xFF]+(\.[-a-z0-9\x80-\xFF]+)*\.[a-z]+
- |
- \[[\d.a-fA-F:]+\] # IPv4 & IPv6
- )
- )
- >
- }xi',
- array($this, '_doAutoLinks_email_callback'), $text);
-
- return $text;
- }
-
- /**
- * Parse URL callback
- * @param array $matches
- * @return string
- */
- protected function _doAutoLinks_url_callback($matches) {
- $url = $this->encodeURLAttribute($matches[1], $text);
- $link = "$text";
- return $this->hashPart($link);
- }
-
- /**
- * Parse email address callback
- * @param array $matches
- * @return string
- */
- protected function _doAutoLinks_email_callback($matches) {
- $addr = $matches[1];
- $url = $this->encodeURLAttribute("mailto:$addr", $text);
- $link = "$text";
- return $this->hashPart($link);
- }
-
- /**
- * Input: some text to obfuscate, e.g. "mailto:foo@example.com"
- *
- * Output: the same text but with most characters encoded as either a
- * decimal or hex entity, in the hopes of foiling most address
- * harvesting spam bots. E.g.:
- *
- * mailto:foo
- * @example.co
- * m
- *
- * Note: the additional output $tail is assigned the same value as the
- * ouput, minus the number of characters specified by $head_length.
- *
- * Based by a filter by Matthew Wickline, posted to BBEdit-Talk.
- * With some optimizations by Milian Wolff. Forced encoding of HTML
- * attribute special characters by Allan Odgaard.
- *
- * @param string $text
- * @param string $tail Passed by reference
- * @param integer $head_length
- * @return string
- */
- protected function encodeEntityObfuscatedAttribute($text, &$tail = null, $head_length = 0) {
- if ($text == "") {
- return $tail = "";
- }
-
- $chars = preg_split('/(? $char) {
- $ord = ord($char);
- // Ignore non-ascii chars.
- if ($ord < 128) {
- $r = ($seed * (1 + $key)) % 100; // Pseudo-random function.
- // roughly 10% raw, 45% hex, 45% dec
- // '@' *must* be encoded. I insist.
- // '"' and '>' have to be encoded inside the attribute
- if ($r > 90 && strpos('@"&>', $char) === false) {
- /* do nothing */
- } else if ($r < 45) {
- $chars[$key] = ''.dechex($ord).';';
- } else {
- $chars[$key] = ''.$ord.';';
- }
- }
- }
-
- $text = implode('', $chars);
- $tail = $head_length ? implode('', array_slice($chars, $head_length)) : $text;
-
- return $text;
- }
-
- /**
- * Take the string $str and parse it into tokens, hashing embeded HTML,
- * escaped characters and handling code spans.
- * @param string $str
- * @return string
- */
- protected function parseSpan($str) {
- $output = '';
-
- $span_re = '{
- (
- \\\\'.$this->escape_chars_re.'
- |
- (?no_markup ? '' : '
- |
- # comment
- |
- <\?.*?\?> | <%.*?%> # processing instruction
- |
- <[!$]?[-a-zA-Z0-9:_]+ # regular tags
- (?>
- \s
- (?>[^"\'>]+|"[^"]*"|\'[^\']*\')*
- )?
- >
- |
- <[-a-zA-Z0-9:_]+\s*/> # xml-style empty tag
- |
- [-a-zA-Z0-9:_]+\s*> # closing tag
- ').'
- )
- }xs';
-
- while (1) {
- // Each loop iteration seach for either the next tag, the next
- // openning code span marker, or the next escaped character.
- // Each token is then passed to handleSpanToken.
- $parts = preg_split($span_re, $str, 2, PREG_SPLIT_DELIM_CAPTURE);
-
- // Create token from text preceding tag.
- if ($parts[0] != "") {
- $output .= $parts[0];
- }
-
- // Check if we reach the end.
- if (isset($parts[1])) {
- $output .= $this->handleSpanToken($parts[1], $parts[2]);
- $str = $parts[2];
- } else {
- break;
- }
- }
-
- return $output;
- }
-
- /**
- * Handle $token provided by parseSpan by determining its nature and
- * returning the corresponding value that should replace it.
- * @param string $token
- * @param string $str Passed by reference
- * @return string
- */
- protected function handleSpanToken($token, &$str) {
- switch ($token[0]) {
- case "\\":
- return $this->hashPart("". ord($token[1]). ";");
- case "`":
- // Search for end marker in remaining text.
- if (preg_match('/^(.*?[^`])'.preg_quote($token).'(?!`)(.*)$/sm',
- $str, $matches))
- {
- $str = $matches[2];
- $codespan = $this->makeCodeSpan($matches[1]);
- return $this->hashPart($codespan);
- }
- return $token; // Return as text since no ending marker found.
- default:
- return $this->hashPart($token);
- }
- }
-
- /**
- * Remove one level of line-leading tabs or spaces
- * @param string $text
- * @return string
- */
- protected function outdent($text) {
- return preg_replace('/^(\t|[ ]{1,' . $this->tab_width . '})/m', '', $text);
- }
-
-
- /**
- * String length function for detab. `_initDetab` will create a function to
- * handle UTF-8 if the default function does not exist.
- * @var string
- */
- protected $utf8_strlen = 'mb_strlen';
-
- /**
- * Replace tabs with the appropriate amount of spaces.
- *
- * For each line we separate the line in blocks delemited by tab characters.
- * Then we reconstruct every line by adding the appropriate number of space
- * between each blocks.
- *
- * @param string $text
- * @return string
- */
- protected function detab($text) {
- $text = preg_replace_callback('/^.*\t.*$/m',
- array($this, '_detab_callback'), $text);
-
- return $text;
- }
-
- /**
- * Replace tabs callback
- * @param string $matches
- * @return string
- */
- protected function _detab_callback($matches) {
- $line = $matches[0];
- $strlen = $this->utf8_strlen; // strlen function for UTF-8.
-
- // Split in blocks.
- $blocks = explode("\t", $line);
- // Add each blocks to the line.
- $line = $blocks[0];
- unset($blocks[0]); // Do not add first block twice.
- foreach ($blocks as $block) {
- // Calculate amount of space, insert spaces, insert block.
- $amount = $this->tab_width -
- $strlen($line, 'UTF-8') % $this->tab_width;
- $line .= str_repeat(" ", $amount) . $block;
- }
- return $line;
- }
-
- /**
- * Check for the availability of the function in the `utf8_strlen` property
- * (initially `mb_strlen`). If the function is not available, create a
- * function that will loosely count the number of UTF-8 characters with a
- * regular expression.
- * @return void
- */
- protected function _initDetab() {
-
- if (function_exists($this->utf8_strlen)) {
- return;
- }
-
- $this->utf8_strlen = function($text) {
- return preg_match_all('/[\x00-\xBF]|[\xC0-\xFF][\x80-\xBF]*/', $text, $m);
- };
- }
-
- /**
- * Swap back in all the tags hashed by _HashHTMLBlocks.
- * @param string $text
- * @return string
- */
- protected function unhash($text) {
- return preg_replace_callback('/(.)\x1A[0-9]+\1/',
- array($this, '_unhash_callback'), $text);
- }
-
- /**
- * Unhashing callback
- * @param array $matches
- * @return string
- */
- protected function _unhash_callback($matches) {
- return $this->html_hashes[$matches[0]];
- }
-}
diff --git a/vendor/michelf/php-markdown/Michelf/MarkdownExtra.inc.php b/vendor/michelf/php-markdown/Michelf/MarkdownExtra.inc.php
deleted file mode 100644
index d09bd7a4..00000000
--- a/vendor/michelf/php-markdown/Michelf/MarkdownExtra.inc.php
+++ /dev/null
@@ -1,11 +0,0 @@
-
- * @copyright 2004-2019 Michel Fortin
- * @copyright (Original Markdown) 2004-2006 John Gruber
- */
-
-namespace Michelf;
-
-/**
- * Markdown Extra Parser Class
- */
-class MarkdownExtra extends \Michelf\Markdown {
- /**
- * Configuration variables
- */
-
- /**
- * Prefix for footnote ids.
- * @var string
- */
- public $fn_id_prefix = "";
-
- /**
- * Optional title attribute for footnote links.
- * @var string
- */
- public $fn_link_title = "";
-
- /**
- * Optional class attribute for footnote links and backlinks.
- * @var string
- */
- public $fn_link_class = "footnote-ref";
- public $fn_backlink_class = "footnote-backref";
-
- /**
- * Content to be displayed within footnote backlinks. The default is '↩';
- * the U+FE0E on the end is a Unicode variant selector used to prevent iOS
- * from displaying the arrow character as an emoji.
- * Optionally use '^^' and '%%' to refer to the footnote number and
- * reference number respectively. {@see parseFootnotePlaceholders()}
- * @var string
- */
- public $fn_backlink_html = '↩︎';
-
- /**
- * Optional title and aria-label attributes for footnote backlinks for
- * added accessibility (to ensure backlink uniqueness).
- * Use '^^' and '%%' to refer to the footnote number and reference number
- * respectively. {@see parseFootnotePlaceholders()}
- * @var string
- */
- public $fn_backlink_title = "";
- public $fn_backlink_label = "";
-
- /**
- * Class name for table cell alignment (%% replaced left/center/right)
- * For instance: 'go-%%' becomes 'go-left' or 'go-right' or 'go-center'
- * If empty, the align attribute is used instead of a class name.
- * @var string
- */
- public $table_align_class_tmpl = '';
-
- /**
- * Optional class prefix for fenced code block.
- * @var string
- */
- public $code_class_prefix = "";
-
- /**
- * Class attribute for code blocks goes on the `code` tag;
- * setting this to true will put attributes on the `pre` tag instead.
- * @var boolean
- */
- public $code_attr_on_pre = false;
-
- /**
- * Predefined abbreviations.
- * @var array
- */
- public $predef_abbr = array();
-
- /**
- * Only convert atx-style headers if there's a space between the header and #
- * @var boolean
- */
- public $hashtag_protection = false;
-
- /**
- * Determines whether footnotes should be appended to the end of the document.
- * If true, footnote html can be retrieved from $this->footnotes_assembled.
- * @var boolean
- */
- public $omit_footnotes = false;
-
-
- /**
- * After parsing, the HTML for the list of footnotes appears here.
- * This is available only if $omit_footnotes == true.
- *
- * Note: when placing the content of `footnotes_assembled` on the page,
- * consider adding the attribute `role="doc-endnotes"` to the `div` or
- * `section` that will enclose the list of footnotes so they are
- * reachable to accessibility tools the same way they would be with the
- * default HTML output.
- * @var null|string
- */
- public $footnotes_assembled = null;
-
- /**
- * Parser implementation
- */
-
- /**
- * Constructor function. Initialize the parser object.
- * @return void
- */
- public function __construct() {
- // Add extra escapable characters before parent constructor
- // initialize the table.
- $this->escape_chars .= ':|';
-
- // Insert extra document, block, and span transformations.
- // Parent constructor will do the sorting.
- $this->document_gamut += array(
- "doFencedCodeBlocks" => 5,
- "stripFootnotes" => 15,
- "stripAbbreviations" => 25,
- "appendFootnotes" => 50,
- );
- $this->block_gamut += array(
- "doFencedCodeBlocks" => 5,
- "doTables" => 15,
- "doDefLists" => 45,
- );
- $this->span_gamut += array(
- "doFootnotes" => 5,
- "doAbbreviations" => 70,
- );
-
- $this->enhanced_ordered_list = true;
- parent::__construct();
- }
-
-
- /**
- * Extra variables used during extra transformations.
- * @var array
- */
- protected $footnotes = array();
- protected $footnotes_ordered = array();
- protected $footnotes_ref_count = array();
- protected $footnotes_numbers = array();
- protected $abbr_desciptions = array();
- /** @var string */
- protected $abbr_word_re = '';
-
- /**
- * Give the current footnote number.
- * @var integer
- */
- protected $footnote_counter = 1;
-
- /**
- * Ref attribute for links
- * @var array
- */
- protected $ref_attr = array();
-
- /**
- * Setting up Extra-specific variables.
- */
- protected function setup() {
- parent::setup();
-
- $this->footnotes = array();
- $this->footnotes_ordered = array();
- $this->footnotes_ref_count = array();
- $this->footnotes_numbers = array();
- $this->abbr_desciptions = array();
- $this->abbr_word_re = '';
- $this->footnote_counter = 1;
- $this->footnotes_assembled = null;
-
- foreach ($this->predef_abbr as $abbr_word => $abbr_desc) {
- if ($this->abbr_word_re)
- $this->abbr_word_re .= '|';
- $this->abbr_word_re .= preg_quote($abbr_word);
- $this->abbr_desciptions[$abbr_word] = trim($abbr_desc);
- }
- }
-
- /**
- * Clearing Extra-specific variables.
- */
- protected function teardown() {
- $this->footnotes = array();
- $this->footnotes_ordered = array();
- $this->footnotes_ref_count = array();
- $this->footnotes_numbers = array();
- $this->abbr_desciptions = array();
- $this->abbr_word_re = '';
-
- if ( ! $this->omit_footnotes )
- $this->footnotes_assembled = null;
-
- parent::teardown();
- }
-
-
- /**
- * Extra attribute parser
- */
-
- /**
- * Expression to use to catch attributes (includes the braces)
- * @var string
- */
- protected $id_class_attr_catch_re = '\{((?>[ ]*[#.a-z][-_:a-zA-Z0-9=]+){1,})[ ]*\}';
-
- /**
- * Expression to use when parsing in a context when no capture is desired
- * @var string
- */
- protected $id_class_attr_nocatch_re = '\{(?>[ ]*[#.a-z][-_:a-zA-Z0-9=]+){1,}[ ]*\}';
-
- /**
- * Parse attributes caught by the $this->id_class_attr_catch_re expression
- * and return the HTML-formatted list of attributes.
- *
- * Currently supported attributes are .class and #id.
- *
- * In addition, this method also supports supplying a default Id value,
- * which will be used to populate the id attribute in case it was not
- * overridden.
- * @param string $tag_name
- * @param string $attr
- * @param mixed $defaultIdValue
- * @param array $classes
- * @return string
- */
- protected function doExtraAttributes($tag_name, $attr, $defaultIdValue = null, $classes = array()) {
- if (empty($attr) && !$defaultIdValue && empty($classes)) {
- return "";
- }
-
- // Split on components
- preg_match_all('/[#.a-z][-_:a-zA-Z0-9=]+/', $attr, $matches);
- $elements = $matches[0];
-
- // Handle classes and IDs (only first ID taken into account)
- $attributes = array();
- $id = false;
- foreach ($elements as $element) {
- if ($element[0] === '.') {
- $classes[] = substr($element, 1);
- } else if ($element[0] === '#') {
- if ($id === false) $id = substr($element, 1);
- } else if (strpos($element, '=') > 0) {
- $parts = explode('=', $element, 2);
- $attributes[] = $parts[0] . '="' . $parts[1] . '"';
- }
- }
-
- if ($id === false || $id === '') {
- $id = $defaultIdValue;
- }
-
- // Compose attributes as string
- $attr_str = "";
- if (!empty($id)) {
- $attr_str .= ' id="'.$this->encodeAttribute($id) .'"';
- }
- if (!empty($classes)) {
- $attr_str .= ' class="'. implode(" ", $classes) . '"';
- }
- if (!$this->no_markup && !empty($attributes)) {
- $attr_str .= ' '.implode(" ", $attributes);
- }
- return $attr_str;
- }
-
- /**
- * Strips link definitions from text, stores the URLs and titles in
- * hash references.
- * @param string $text
- * @return string
- */
- protected function stripLinkDefinitions($text) {
- $less_than_tab = $this->tab_width - 1;
-
- // Link defs are in the form: ^[id]: url "optional title"
- $text = preg_replace_callback('{
- ^[ ]{0,'.$less_than_tab.'}\[(.+)\][ ]?: # id = $1
- [ ]*
- \n? # maybe *one* newline
- [ ]*
- (?:
- <(.+?)> # url = $2
- |
- (\S+?) # url = $3
- )
- [ ]*
- \n? # maybe one newline
- [ ]*
- (?:
- (?<=\s) # lookbehind for whitespace
- ["(]
- (.*?) # title = $4
- [")]
- [ ]*
- )? # title is optional
- (?:[ ]* '.$this->id_class_attr_catch_re.' )? # $5 = extra id & class attr
- (?:\n+|\Z)
- }xm',
- array($this, '_stripLinkDefinitions_callback'),
- $text);
- return $text;
- }
-
- /**
- * Strip link definition callback
- * @param array $matches
- * @return string
- */
- protected function _stripLinkDefinitions_callback($matches) {
- $link_id = strtolower($matches[1]);
- $url = $matches[2] == '' ? $matches[3] : $matches[2];
- $this->urls[$link_id] = $url;
- $this->titles[$link_id] =& $matches[4];
- $this->ref_attr[$link_id] = $this->doExtraAttributes("", $dummy =& $matches[5]);
- return ''; // String that will replace the block
- }
-
-
- /**
- * HTML block parser
- */
-
- /**
- * Tags that are always treated as block tags
- * @var string
- */
- protected $block_tags_re = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|form|fieldset|iframe|hr|legend|article|section|nav|aside|hgroup|header|footer|figcaption|figure';
-
- /**
- * Tags treated as block tags only if the opening tag is alone on its line
- * @var string
- */
- protected $context_block_tags_re = 'script|noscript|style|ins|del|iframe|object|source|track|param|math|svg|canvas|audio|video';
-
- /**
- * Tags where markdown="1" default to span mode:
- * @var string
- */
- protected $contain_span_tags_re = 'p|h[1-6]|li|dd|dt|td|th|legend|address';
-
- /**
- * Tags which must not have their contents modified, no matter where
- * they appear
- * @var string
- */
- protected $clean_tags_re = 'script|style|math|svg';
-
- /**
- * Tags that do not need to be closed.
- * @var string
- */
- protected $auto_close_tags_re = 'hr|img|param|source|track';
-
- /**
- * Hashify HTML Blocks and "clean tags".
- *
- * We only want to do this for block-level HTML tags, such as headers,
- * lists, and tables. That's because we still want to wrap s around
- * "paragraphs" that are wrapped in non-block-level tags, such as anchors,
- * phrase emphasis, and spans. The list of tags we're looking for is
- * hard-coded.
- *
- * This works by calling _HashHTMLBlocks_InMarkdown, which then calls
- * _HashHTMLBlocks_InHTML when it encounter block tags. When the markdown="1"
- * attribute is found within a tag, _HashHTMLBlocks_InHTML calls back
- * _HashHTMLBlocks_InMarkdown to handle the Markdown syntax within the tag.
- * These two functions are calling each other. It's recursive!
- * @param string $text
- * @return string
- */
- protected function hashHTMLBlocks($text) {
- if ($this->no_markup) {
- return $text;
- }
-
- // Call the HTML-in-Markdown hasher.
- list($text, ) = $this->_hashHTMLBlocks_inMarkdown($text);
-
- return $text;
- }
-
- /**
- * Parse markdown text, calling _HashHTMLBlocks_InHTML for block tags.
- *
- * * $indent is the number of space to be ignored when checking for code
- * blocks. This is important because if we don't take the indent into
- * account, something like this (which looks right) won't work as expected:
- *
- *
- *
- * Hello World. <-- Is this a Markdown code block or text?
- * <-- Is this a Markdown code block or a real tag?
- *
- *
- * If you don't like this, just don't indent the tag on which
- * you apply the markdown="1" attribute.
- *
- * * If $enclosing_tag_re is not empty, stops at the first unmatched closing
- * tag with that name. Nested tags supported.
- *
- * * If $span is true, text inside must treated as span. So any double
- * newline will be replaced by a single newline so that it does not create
- * paragraphs.
- *
- * Returns an array of that form: ( processed text , remaining text )
- *
- * @param string $text
- * @param integer $indent
- * @param string $enclosing_tag_re
- * @param boolean $span
- * @return array
- */
- protected function _hashHTMLBlocks_inMarkdown($text, $indent = 0,
- $enclosing_tag_re = '', $span = false)
- {
-
- if ($text === '') return array('', '');
-
- // Regex to check for the presense of newlines around a block tag.
- $newline_before_re = '/(?:^\n?|\n\n)*$/';
- $newline_after_re =
- '{
- ^ # Start of text following the tag.
- (?>[ ]*)? # Optional comment.
- [ ]*\n # Must be followed by newline.
- }xs';
-
- // Regex to match any tag.
- $block_tag_re =
- '{
- ( # $2: Capture whole tag.
- ? # Any opening or closing tag.
- (?> # Tag name.
- ' . $this->block_tags_re . ' |
- ' . $this->context_block_tags_re . ' |
- ' . $this->clean_tags_re . ' |
- (?!\s)'.$enclosing_tag_re . '
- )
- (?:
- (?=[\s"\'/a-zA-Z0-9]) # Allowed characters after tag name.
- (?>
- ".*?" | # Double quotes (can contain `>`)
- \'.*?\' | # Single quotes (can contain `>`)
- .+? # Anything but quotes and `>`.
- )*?
- )?
- > # End of tag.
- |
- # HTML Comment
- |
- <\?.*?\?> | <%.*?%> # Processing instruction
- |
- # CData Block
- ' . ( !$span ? ' # If not in span.
- |
- # Indented code block
- (?: ^[ ]*\n | ^ | \n[ ]*\n )
- [ ]{' . ($indent + 4) . '}[^\n]* \n
- (?>
- (?: [ ]{' . ($indent + 4) . '}[^\n]* | [ ]* ) \n
- )*
- |
- # Fenced code block marker
- (?<= ^ | \n )
- [ ]{0,' . ($indent + 3) . '}(?:~{3,}|`{3,})
- [ ]*
- (?: \.?[-_:a-zA-Z0-9]+ )? # standalone class name
- [ ]*
- (?: ' . $this->id_class_attr_nocatch_re . ' )? # extra attributes
- [ ]*
- (?= \n )
- ' : '' ) . ' # End (if not is span).
- |
- # Code span marker
- # Note, this regex needs to go after backtick fenced
- # code blocks but it should also be kept outside of the
- # "if not in span" condition adding backticks to the parser
- `+
- )
- }xs';
-
-
- $depth = 0; // Current depth inside the tag tree.
- $parsed = ""; // Parsed text that will be returned.
-
- // Loop through every tag until we find the closing tag of the parent
- // or loop until reaching the end of text if no parent tag specified.
- do {
- // Split the text using the first $tag_match pattern found.
- // Text before pattern will be first in the array, text after
- // pattern will be at the end, and between will be any catches made
- // by the pattern.
- $parts = preg_split($block_tag_re, $text, 2,
- PREG_SPLIT_DELIM_CAPTURE);
-
- // If in Markdown span mode, add a empty-string span-level hash
- // after each newline to prevent triggering any block element.
- if ($span) {
- $void = $this->hashPart("", ':');
- $newline = "\n$void";
- $parts[0] = $void . str_replace("\n", $newline, $parts[0]) . $void;
- }
-
- $parsed .= $parts[0]; // Text before current tag.
-
- // If end of $text has been reached. Stop loop.
- if (count($parts) < 3) {
- $text = "";
- break;
- }
-
- $tag = $parts[1]; // Tag to handle.
- $text = $parts[2]; // Remaining text after current tag.
-
- // Check for: Fenced code block marker.
- // Note: need to recheck the whole tag to disambiguate backtick
- // fences from code spans
- if (preg_match('{^\n?([ ]{0,' . ($indent + 3) . '})(~{3,}|`{3,})[ ]*(?:\.?[-_:a-zA-Z0-9]+)?[ ]*(?:' . $this->id_class_attr_nocatch_re . ')?[ ]*\n?$}', $tag, $capture)) {
- // Fenced code block marker: find matching end marker.
- $fence_indent = strlen($capture[1]); // use captured indent in re
- $fence_re = $capture[2]; // use captured fence in re
- if (preg_match('{^(?>.*\n)*?[ ]{' . ($fence_indent) . '}' . $fence_re . '[ ]*(?:\n|$)}', $text,
- $matches))
- {
- // End marker found: pass text unchanged until marker.
- $parsed .= $tag . $matches[0];
- $text = substr($text, strlen($matches[0]));
- }
- else {
- // No end marker: just skip it.
- $parsed .= $tag;
- }
- }
- // Check for: Indented code block.
- else if ($tag[0] === "\n" || $tag[0] === " ") {
- // Indented code block: pass it unchanged, will be handled
- // later.
- $parsed .= $tag;
- }
- // Check for: Code span marker
- // Note: need to check this after backtick fenced code blocks
- else if ($tag[0] === "`") {
- // Find corresponding end marker.
- $tag_re = preg_quote($tag);
- if (preg_match('{^(?>.+?|\n(?!\n))*?(?block_tags_re . ')\b}', $tag) ||
- ( preg_match('{^<(?:' . $this->context_block_tags_re . ')\b}', $tag) &&
- preg_match($newline_before_re, $parsed) &&
- preg_match($newline_after_re, $text) )
- )
- {
- // Need to parse tag and following text using the HTML parser.
- list($block_text, $text) =
- $this->_hashHTMLBlocks_inHTML($tag . $text, "hashBlock", true);
-
- // Make sure it stays outside of any paragraph by adding newlines.
- $parsed .= "\n\n$block_text\n\n";
- }
- // Check for: Clean tag (like script, math)
- // HTML Comments, processing instructions.
- else if (preg_match('{^<(?:' . $this->clean_tags_re . ')\b}', $tag) ||
- $tag[1] === '!' || $tag[1] === '?')
- {
- // Need to parse tag and following text using the HTML parser.
- // (don't check for markdown attribute)
- list($block_text, $text) =
- $this->_hashHTMLBlocks_inHTML($tag . $text, "hashClean", false);
-
- $parsed .= $block_text;
- }
- // Check for: Tag with same name as enclosing tag.
- else if ($enclosing_tag_re !== '' &&
- // Same name as enclosing tag.
- preg_match('{^?(?:' . $enclosing_tag_re . ')\b}', $tag))
- {
- // Increase/decrease nested tag count.
- if ($tag[1] === '/') {
- $depth--;
- } else if ($tag[strlen($tag)-2] !== '/') {
- $depth++;
- }
-
- if ($depth < 0) {
- // Going out of parent element. Clean up and break so we
- // return to the calling function.
- $text = $tag . $text;
- break;
- }
-
- $parsed .= $tag;
- }
- else {
- $parsed .= $tag;
- }
- } while ($depth >= 0);
-
- return array($parsed, $text);
- }
-
- /**
- * Parse HTML, calling _HashHTMLBlocks_InMarkdown for block tags.
- *
- * * Calls $hash_method to convert any blocks.
- * * Stops when the first opening tag closes.
- * * $md_attr indicate if the use of the `markdown="1"` attribute is allowed.
- * (it is not inside clean tags)
- *
- * Returns an array of that form: ( processed text , remaining text )
- * @param string $text
- * @param string $hash_method
- * @param bool $md_attr Handle `markdown="1"` attribute
- * @return array
- */
- protected function _hashHTMLBlocks_inHTML($text, $hash_method, $md_attr) {
- if ($text === '') return array('', '');
-
- // Regex to match `markdown` attribute inside of a tag.
- $markdown_attr_re = '
- {
- \s* # Eat whitespace before the `markdown` attribute
- markdown
- \s*=\s*
- (?>
- (["\']) # $1: quote delimiter
- (.*?) # $2: attribute value
- \1 # matching delimiter
- |
- ([^\s>]*) # $3: unquoted attribute value
- )
- () # $4: make $3 always defined (avoid warnings)
- }xs';
-
- // Regex to match any tag.
- $tag_re = '{
- ( # $2: Capture whole tag.
- ? # Any opening or closing tag.
- [\w:$]+ # Tag name.
- (?:
- (?=[\s"\'/a-zA-Z0-9]) # Allowed characters after tag name.
- (?>
- ".*?" | # Double quotes (can contain `>`)
- \'.*?\' | # Single quotes (can contain `>`)
- .+? # Anything but quotes and `>`.
- )*?
- )?
- > # End of tag.
- |
- # HTML Comment
- |
- <\?.*?\?> | <%.*?%> # Processing instruction
- |
- # CData Block
- )
- }xs';
-
- $original_text = $text; // Save original text in case of faliure.
-
- $depth = 0; // Current depth inside the tag tree.
- $block_text = ""; // Temporary text holder for current text.
- $parsed = ""; // Parsed text that will be returned.
- $base_tag_name_re = '';
-
- // Get the name of the starting tag.
- // (This pattern makes $base_tag_name_re safe without quoting.)
- if (preg_match('/^<([\w:$]*)\b/', $text, $matches))
- $base_tag_name_re = $matches[1];
-
- // Loop through every tag until we find the corresponding closing tag.
- do {
- // Split the text using the first $tag_match pattern found.
- // Text before pattern will be first in the array, text after
- // pattern will be at the end, and between will be any catches made
- // by the pattern.
- $parts = preg_split($tag_re, $text, 2, PREG_SPLIT_DELIM_CAPTURE);
-
- if (count($parts) < 3) {
- // End of $text reached with unbalenced tag(s).
- // In that case, we return original text unchanged and pass the
- // first character as filtered to prevent an infinite loop in the
- // parent function.
- return array($original_text[0], substr($original_text, 1));
- }
-
- $block_text .= $parts[0]; // Text before current tag.
- $tag = $parts[1]; // Tag to handle.
- $text = $parts[2]; // Remaining text after current tag.
-
- // Check for: Auto-close tag (like
)
- // Comments and Processing Instructions.
- if (preg_match('{^?(?:' . $this->auto_close_tags_re . ')\b}', $tag) ||
- $tag[1] === '!' || $tag[1] === '?')
- {
- // Just add the tag to the block as if it was text.
- $block_text .= $tag;
- }
- else {
- // Increase/decrease nested tag count. Only do so if
- // the tag's name match base tag's.
- if (preg_match('{^?' . $base_tag_name_re . '\b}', $tag)) {
- if ($tag[1] === '/') {
- $depth--;
- } else if ($tag[strlen($tag)-2] !== '/') {
- $depth++;
- }
- }
-
- // Check for `markdown="1"` attribute and handle it.
- if ($md_attr &&
- preg_match($markdown_attr_re, $tag, $attr_m) &&
- preg_match('/^1|block|span$/', $attr_m[2] . $attr_m[3]))
- {
- // Remove `markdown` attribute from opening tag.
- $tag = preg_replace($markdown_attr_re, '', $tag);
-
- // Check if text inside this tag must be parsed in span mode.
- $mode = $attr_m[2] . $attr_m[3];
- $span_mode = $mode === 'span' || ($mode !== 'block' &&
- preg_match('{^<(?:' . $this->contain_span_tags_re . ')\b}', $tag));
-
- // Calculate indent before tag.
- if (preg_match('/(?:^|\n)( *?)(?! ).*?$/', $block_text, $matches)) {
- $strlen = $this->utf8_strlen;
- $indent = $strlen($matches[1], 'UTF-8');
- } else {
- $indent = 0;
- }
-
- // End preceding block with this tag.
- $block_text .= $tag;
- $parsed .= $this->$hash_method($block_text);
-
- // Get enclosing tag name for the ParseMarkdown function.
- // (This pattern makes $tag_name_re safe without quoting.)
- preg_match('/^<([\w:$]*)\b/', $tag, $matches);
- $tag_name_re = $matches[1];
-
- // Parse the content using the HTML-in-Markdown parser.
- list ($block_text, $text)
- = $this->_hashHTMLBlocks_inMarkdown($text, $indent,
- $tag_name_re, $span_mode);
-
- // Outdent markdown text.
- if ($indent > 0) {
- $block_text = preg_replace("/^[ ]{1,$indent}/m", "",
- $block_text);
- }
-
- // Append tag content to parsed text.
- if (!$span_mode) {
- $parsed .= "\n\n$block_text\n\n";
- } else {
- $parsed .= (string) $block_text;
- }
-
- // Start over with a new block.
- $block_text = "";
- }
- else $block_text .= $tag;
- }
-
- } while ($depth > 0);
-
- // Hash last block text that wasn't processed inside the loop.
- $parsed .= $this->$hash_method($block_text);
-
- return array($parsed, $text);
- }
-
- /**
- * Called whenever a tag must be hashed when a function inserts a "clean" tag
- * in $text, it passes through this function and is automaticaly escaped,
- * blocking invalid nested overlap.
- * @param string $text
- * @return string
- */
- protected function hashClean($text) {
- return $this->hashPart($text, 'C');
- }
-
- /**
- * Turn Markdown link shortcuts into XHTML tags.
- * @param string $text
- * @return string
- */
- protected function doAnchors($text) {
- if ($this->in_anchor) {
- return $text;
- }
- $this->in_anchor = true;
-
- // First, handle reference-style links: [link text] [id]
- $text = preg_replace_callback('{
- ( # wrap whole match in $1
- \[
- (' . $this->nested_brackets_re . ') # link text = $2
- \]
-
- [ ]? # one optional space
- (?:\n[ ]*)? # one optional newline followed by spaces
-
- \[
- (.*?) # id = $3
- \]
- )
- }xs',
- array($this, '_doAnchors_reference_callback'), $text);
-
- // Next, inline-style links: [link text](url "optional title")
- $text = preg_replace_callback('{
- ( # wrap whole match in $1
- \[
- (' . $this->nested_brackets_re . ') # link text = $2
- \]
- \( # literal paren
- [ \n]*
- (?:
- <(.+?)> # href = $3
- |
- (' . $this->nested_url_parenthesis_re . ') # href = $4
- )
- [ \n]*
- ( # $5
- ([\'"]) # quote char = $6
- (.*?) # Title = $7
- \6 # matching quote
- [ \n]* # ignore any spaces/tabs between closing quote and )
- )? # title is optional
- \)
- (?:[ ]? ' . $this->id_class_attr_catch_re . ' )? # $8 = id/class attributes
- )
- }xs',
- array($this, '_doAnchors_inline_callback'), $text);
-
- // Last, handle reference-style shortcuts: [link text]
- // These must come last in case you've also got [link text][1]
- // or [link text](/foo)
- $text = preg_replace_callback('{
- ( # wrap whole match in $1
- \[
- ([^\[\]]+) # link text = $2; can\'t contain [ or ]
- \]
- )
- }xs',
- array($this, '_doAnchors_reference_callback'), $text);
-
- $this->in_anchor = false;
- return $text;
- }
-
- /**
- * Callback for reference anchors
- * @param array $matches
- * @return string
- */
- protected function _doAnchors_reference_callback($matches) {
- $whole_match = $matches[1];
- $link_text = $matches[2];
- $link_id =& $matches[3];
-
- if ($link_id == "") {
- // for shortcut links like [this][] or [this].
- $link_id = $link_text;
- }
-
- // lower-case and turn embedded newlines into spaces
- $link_id = strtolower($link_id);
- $link_id = preg_replace('{[ ]?\n}', ' ', $link_id);
-
- if (isset($this->urls[$link_id])) {
- $url = $this->urls[$link_id];
- $url = $this->encodeURLAttribute($url);
-
- $result = "titles[$link_id] ) ) {
- $title = $this->titles[$link_id];
- $title = $this->encodeAttribute($title);
- $result .= " title=\"$title\"";
- }
- if (isset($this->ref_attr[$link_id]))
- $result .= $this->ref_attr[$link_id];
-
- $link_text = $this->runSpanGamut($link_text);
- $result .= ">$link_text";
- $result = $this->hashPart($result);
- }
- else {
- $result = $whole_match;
- }
- return $result;
- }
-
- /**
- * Callback for inline anchors
- * @param array $matches
- * @return string
- */
- protected function _doAnchors_inline_callback($matches) {
- $link_text = $this->runSpanGamut($matches[2]);
- $url = $matches[3] === '' ? $matches[4] : $matches[3];
- $title =& $matches[7];
- $attr = $this->doExtraAttributes("a", $dummy =& $matches[8]);
-
- // if the URL was of the form it got caught by the HTML
- // tag parser and hashed. Need to reverse the process before using the URL.
- $unhashed = $this->unhash($url);
- if ($unhashed !== $url)
- $url = preg_replace('/^<(.*)>$/', '\1', $unhashed);
-
- $url = $this->encodeURLAttribute($url);
-
- $result = "encodeAttribute($title);
- $result .= " title=\"$title\"";
- }
- $result .= $attr;
-
- $link_text = $this->runSpanGamut($link_text);
- $result .= ">$link_text";
-
- return $this->hashPart($result);
- }
-
- /**
- * Turn Markdown image shortcuts into
tags.
- * @param string $text
- * @return string
- */
- protected function doImages($text) {
- // First, handle reference-style labeled images: ![alt text][id]
- $text = preg_replace_callback('{
- ( # wrap whole match in $1
- !\[
- (' . $this->nested_brackets_re . ') # alt text = $2
- \]
-
- [ ]? # one optional space
- (?:\n[ ]*)? # one optional newline followed by spaces
-
- \[
- (.*?) # id = $3
- \]
-
- )
- }xs',
- array($this, '_doImages_reference_callback'), $text);
-
- // Next, handle inline images: 
- // Don't forget: encode * and _
- $text = preg_replace_callback('{
- ( # wrap whole match in $1
- !\[
- (' . $this->nested_brackets_re . ') # alt text = $2
- \]
- \s? # One optional whitespace character
- \( # literal paren
- [ \n]*
- (?:
- <(\S*)> # src url = $3
- |
- (' . $this->nested_url_parenthesis_re . ') # src url = $4
- )
- [ \n]*
- ( # $5
- ([\'"]) # quote char = $6
- (.*?) # title = $7
- \6 # matching quote
- [ \n]*
- )? # title is optional
- \)
- (?:[ ]? ' . $this->id_class_attr_catch_re . ' )? # $8 = id/class attributes
- )
- }xs',
- array($this, '_doImages_inline_callback'), $text);
-
- return $text;
- }
-
- /**
- * Callback for referenced images
- * @param array $matches
- * @return string
- */
- protected function _doImages_reference_callback($matches) {
- $whole_match = $matches[1];
- $alt_text = $matches[2];
- $link_id = strtolower($matches[3]);
-
- if ($link_id === "") {
- $link_id = strtolower($alt_text); // for shortcut links like ![this][].
- }
-
- $alt_text = $this->encodeAttribute($alt_text);
- if (isset($this->urls[$link_id])) {
- $url = $this->encodeURLAttribute($this->urls[$link_id]);
- $result = "
titles[$link_id])) {
- $title = $this->titles[$link_id];
- $title = $this->encodeAttribute($title);
- $result .= " title=\"$title\"";
- }
- if (isset($this->ref_attr[$link_id])) {
- $result .= $this->ref_attr[$link_id];
- }
- $result .= $this->empty_element_suffix;
- $result = $this->hashPart($result);
- }
- else {
- // If there's no such link ID, leave intact:
- $result = $whole_match;
- }
-
- return $result;
- }
-
- /**
- * Callback for inline images
- * @param array $matches
- * @return string
- */
- protected function _doImages_inline_callback($matches) {
- $alt_text = $matches[2];
- $url = $matches[3] === '' ? $matches[4] : $matches[3];
- $title =& $matches[7];
- $attr = $this->doExtraAttributes("img", $dummy =& $matches[8]);
-
- $alt_text = $this->encodeAttribute($alt_text);
- $url = $this->encodeURLAttribute($url);
- $result = "
encodeAttribute($title);
- $result .= " title=\"$title\""; // $title already quoted
- }
- $result .= $attr;
- $result .= $this->empty_element_suffix;
-
- return $this->hashPart($result);
- }
-
- /**
- * Process markdown headers. Redefined to add ID and class attribute support.
- * @param string $text
- * @return string
- */
- protected function doHeaders($text) {
- // Setext-style headers:
- // Header 1 {#header1}
- // ========
- //
- // Header 2 {#header2 .class1 .class2}
- // --------
- //
- $text = preg_replace_callback(
- '{
- (^.+?) # $1: Header text
- (?:[ ]+ ' . $this->id_class_attr_catch_re . ' )? # $3 = id/class attributes
- [ ]*\n(=+|-+)[ ]*\n+ # $3: Header footer
- }mx',
- array($this, '_doHeaders_callback_setext'), $text);
-
- // atx-style headers:
- // # Header 1 {#header1}
- // ## Header 2 {#header2}
- // ## Header 2 with closing hashes ## {#header3.class1.class2}
- // ...
- // ###### Header 6 {.class2}
- //
- $text = preg_replace_callback('{
- ^(\#{1,6}) # $1 = string of #\'s
- [ ]'.($this->hashtag_protection ? '+' : '*').'
- (.+?) # $2 = Header text
- [ ]*
- \#* # optional closing #\'s (not counted)
- (?:[ ]+ ' . $this->id_class_attr_catch_re . ' )? # $3 = id/class attributes
- [ ]*
- \n+
- }xm',
- array($this, '_doHeaders_callback_atx'), $text);
-
- return $text;
- }
-
- /**
- * Callback for setext headers
- * @param array $matches
- * @return string
- */
- protected function _doHeaders_callback_setext($matches) {
- if ($matches[3] === '-' && preg_match('{^- }', $matches[1])) {
- return $matches[0];
- }
-
- $level = $matches[3][0] === '=' ? 1 : 2;
-
- $defaultId = is_callable($this->header_id_func) ? call_user_func($this->header_id_func, $matches[1]) : null;
-
- $attr = $this->doExtraAttributes("h$level", $dummy =& $matches[2], $defaultId);
- $block = "" . $this->runSpanGamut($matches[1]) . " ";
- return "\n" . $this->hashBlock($block) . "\n\n";
- }
-
- /**
- * Callback for atx headers
- * @param array $matches
- * @return string
- */
- protected function _doHeaders_callback_atx($matches) {
- $level = strlen($matches[1]);
-
- $defaultId = is_callable($this->header_id_func) ? call_user_func($this->header_id_func, $matches[2]) : null;
- $attr = $this->doExtraAttributes("h$level", $dummy =& $matches[3], $defaultId);
- $block = "" . $this->runSpanGamut($matches[2]) . " ";
- return "\n" . $this->hashBlock($block) . "\n\n";
- }
-
- /**
- * Form HTML tables.
- * @param string $text
- * @return string
- */
- protected function doTables($text) {
- $less_than_tab = $this->tab_width - 1;
- // Find tables with leading pipe.
- //
- // | Header 1 | Header 2
- // | -------- | --------
- // | Cell 1 | Cell 2
- // | Cell 3 | Cell 4
- $text = preg_replace_callback('
- {
- ^ # Start of a line
- [ ]{0,' . $less_than_tab . '} # Allowed whitespace.
- [|] # Optional leading pipe (present)
- (.+) \n # $1: Header row (at least one pipe)
-
- [ ]{0,' . $less_than_tab . '} # Allowed whitespace.
- [|] ([ ]*[-:]+[-| :]*) \n # $2: Header underline
-
- ( # $3: Cells
- (?>
- [ ]* # Allowed whitespace.
- [|] .* \n # Row content.
- )*
- )
- (?=\n|\Z) # Stop at final double newline.
- }xm',
- array($this, '_doTable_leadingPipe_callback'), $text);
-
- // Find tables without leading pipe.
- //
- // Header 1 | Header 2
- // -------- | --------
- // Cell 1 | Cell 2
- // Cell 3 | Cell 4
- $text = preg_replace_callback('
- {
- ^ # Start of a line
- [ ]{0,' . $less_than_tab . '} # Allowed whitespace.
- (\S.*[|].*) \n # $1: Header row (at least one pipe)
-
- [ ]{0,' . $less_than_tab . '} # Allowed whitespace.
- ([-:]+[ ]*[|][-| :]*) \n # $2: Header underline
-
- ( # $3: Cells
- (?>
- .* [|] .* \n # Row content
- )*
- )
- (?=\n|\Z) # Stop at final double newline.
- }xm',
- array($this, '_DoTable_callback'), $text);
-
- return $text;
- }
-
- /**
- * Callback for removing the leading pipe for each row
- * @param array $matches
- * @return string
- */
- protected function _doTable_leadingPipe_callback($matches) {
- $head = $matches[1];
- $underline = $matches[2];
- $content = $matches[3];
-
- $content = preg_replace('/^ *[|]/m', '', $content);
-
- return $this->_doTable_callback(array($matches[0], $head, $underline, $content));
- }
-
- /**
- * Make the align attribute in a table
- * @param string $alignname
- * @return string
- */
- protected function _doTable_makeAlignAttr($alignname) {
- if (empty($this->table_align_class_tmpl)) {
- return " align=\"$alignname\"";
- }
-
- $classname = str_replace('%%', $alignname, $this->table_align_class_tmpl);
- return " class=\"$classname\"";
- }
-
- /**
- * Calback for processing tables
- * @param array $matches
- * @return string
- */
- protected function _doTable_callback($matches) {
- $head = $matches[1];
- $underline = $matches[2];
- $content = $matches[3];
-
- // Remove any tailing pipes for each line.
- $head = preg_replace('/[|] *$/m', '', $head);
- $underline = preg_replace('/[|] *$/m', '', $underline);
- $content = preg_replace('/[|] *$/m', '', $content);
-
- // Reading alignement from header underline.
- $separators = preg_split('/ *[|] */', $underline);
- foreach ($separators as $n => $s) {
- if (preg_match('/^ *-+: *$/', $s))
- $attr[$n] = $this->_doTable_makeAlignAttr('right');
- else if (preg_match('/^ *:-+: *$/', $s))
- $attr[$n] = $this->_doTable_makeAlignAttr('center');
- else if (preg_match('/^ *:-+ *$/', $s))
- $attr[$n] = $this->_doTable_makeAlignAttr('left');
- else
- $attr[$n] = '';
- }
-
- // Parsing span elements, including code spans, character escapes,
- // and inline HTML tags, so that pipes inside those gets ignored.
- $head = $this->parseSpan($head);
- $headers = preg_split('/ *[|] */', $head);
- $col_count = count($headers);
- $attr = array_pad($attr, $col_count, '');
-
- // Write column headers.
- $text = "\n";
- $text .= "\n";
- $text .= "\n";
- foreach ($headers as $n => $header) {
- $text .= " " . $this->runSpanGamut(trim($header)) . " \n";
- }
- $text .= " \n";
- $text .= "\n";
-
- // Split content by row.
- $rows = explode("\n", trim($content, "\n"));
-
- $text .= "\n";
- foreach ($rows as $row) {
- // Parsing span elements, including code spans, character escapes,
- // and inline HTML tags, so that pipes inside those gets ignored.
- $row = $this->parseSpan($row);
-
- // Split row by cell.
- $row_cells = preg_split('/ *[|] */', $row, $col_count);
- $row_cells = array_pad($row_cells, $col_count, '');
-
- $text .= "\n";
- foreach ($row_cells as $n => $cell) {
- $text .= " " . $this->runSpanGamut(trim($cell)) . " \n";
- }
- $text .= " \n";
- }
- $text .= "\n";
- $text .= "
";
-
- return $this->hashBlock($text) . "\n";
- }
-
- /**
- * Form HTML definition lists.
- * @param string $text
- * @return string
- */
- protected function doDefLists($text) {
- $less_than_tab = $this->tab_width - 1;
-
- // Re-usable pattern to match any entire dl list:
- $whole_list_re = '(?>
- ( # $1 = whole list
- ( # $2
- [ ]{0,' . $less_than_tab . '}
- ((?>.*\S.*\n)+) # $3 = defined term
- \n?
- [ ]{0,' . $less_than_tab . '}:[ ]+ # colon starting definition
- )
- (?s:.+?)
- ( # $4
- \z
- |
- \n{2,}
- (?=\S)
- (?! # Negative lookahead for another term
- [ ]{0,' . $less_than_tab . '}
- (?: \S.*\n )+? # defined term
- \n?
- [ ]{0,' . $less_than_tab . '}:[ ]+ # colon starting definition
- )
- (?! # Negative lookahead for another definition
- [ ]{0,' . $less_than_tab . '}:[ ]+ # colon starting definition
- )
- )
- )
- )'; // mx
-
- $text = preg_replace_callback('{
- (?>\A\n?|(?<=\n\n))
- ' . $whole_list_re . '
- }mx',
- array($this, '_doDefLists_callback'), $text);
-
- return $text;
- }
-
- /**
- * Callback for processing definition lists
- * @param array $matches
- * @return string
- */
- protected function _doDefLists_callback($matches) {
- // Re-usable patterns to match list item bullets and number markers:
- $list = $matches[1];
-
- // Turn double returns into triple returns, so that we can make a
- // paragraph for the last item in a list, if necessary:
- $result = trim($this->processDefListItems($list));
- $result = "\n" . $result . "\n
";
- return $this->hashBlock($result) . "\n\n";
- }
-
- /**
- * Process the contents of a single definition list, splitting it
- * into individual term and definition list items.
- * @param string $list_str
- * @return string
- */
- protected function processDefListItems($list_str) {
-
- $less_than_tab = $this->tab_width - 1;
-
- // Trim trailing blank lines:
- $list_str = preg_replace("/\n{2,}\\z/", "\n", $list_str);
-
- // Process definition terms.
- $list_str = preg_replace_callback('{
- (?>\A\n?|\n\n+) # leading line
- ( # definition terms = $1
- [ ]{0,' . $less_than_tab . '} # leading whitespace
- (?!\:[ ]|[ ]) # negative lookahead for a definition
- # mark (colon) or more whitespace.
- (?> \S.* \n)+? # actual term (not whitespace).
- )
- (?=\n?[ ]{0,3}:[ ]) # lookahead for following line feed
- # with a definition mark.
- }xm',
- array($this, '_processDefListItems_callback_dt'), $list_str);
-
- // Process actual definitions.
- $list_str = preg_replace_callback('{
- \n(\n+)? # leading line = $1
- ( # marker space = $2
- [ ]{0,' . $less_than_tab . '} # whitespace before colon
- \:[ ]+ # definition mark (colon)
- )
- ((?s:.+?)) # definition text = $3
- (?= \n+ # stop at next definition mark,
- (?: # next term or end of text
- [ ]{0,' . $less_than_tab . '} \:[ ] |
- | \z
- )
- )
- }xm',
- array($this, '_processDefListItems_callback_dd'), $list_str);
-
- return $list_str;
- }
-
- /**
- * Callback for elements in definition lists
- * @param array $matches
- * @return string
- */
- protected function _processDefListItems_callback_dt($matches) {
- $terms = explode("\n", trim($matches[1]));
- $text = '';
- foreach ($terms as $term) {
- $term = $this->runSpanGamut(trim($term));
- $text .= "\n" . $term . " ";
- }
- return $text . "\n";
- }
-
- /**
- * Callback for elements in definition lists
- * @param array $matches
- * @return string
- */
- protected function _processDefListItems_callback_dd($matches) {
- $leading_line = $matches[1];
- $marker_space = $matches[2];
- $def = $matches[3];
-
- if ($leading_line || preg_match('/\n{2,}/', $def)) {
- // Replace marker with the appropriate whitespace indentation
- $def = str_repeat(' ', strlen($marker_space)) . $def;
- $def = $this->runBlockGamut($this->outdent($def . "\n\n"));
- $def = "\n". $def ."\n";
- }
- else {
- $def = rtrim($def);
- $def = $this->runSpanGamut($this->outdent($def));
- }
-
- return "\n" . $def . " \n";
- }
-
- /**
- * Adding the fenced code block syntax to regular Markdown:
- *
- * ~~~
- * Code block
- * ~~~
- *
- * @param string $text
- * @return string
- */
- protected function doFencedCodeBlocks($text) {
-
- $text = preg_replace_callback('{
- (?:\n|\A)
- # 1: Opening marker
- (
- (?:~{3,}|`{3,}) # 3 or more tildes/backticks.
- )
- [ ]*
- (?:
- \.?([-_:a-zA-Z0-9]+) # 2: standalone class name
- )?
- [ ]*
- (?:
- ' . $this->id_class_attr_catch_re . ' # 3: Extra attributes
- )?
- [ ]* \n # Whitespace and newline following marker.
-
- # 4: Content
- (
- (?>
- (?!\1 [ ]* \n) # Not a closing marker.
- .*\n+
- )+
- )
-
- # Closing marker.
- \1 [ ]* (?= \n )
- }xm',
- array($this, '_doFencedCodeBlocks_callback'), $text);
-
- return $text;
- }
-
- /**
- * Callback to process fenced code blocks
- * @param array $matches
- * @return string
- */
- protected function _doFencedCodeBlocks_callback($matches) {
- $classname =& $matches[2];
- $attrs =& $matches[3];
- $codeblock = $matches[4];
-
- if ($this->code_block_content_func) {
- $codeblock = call_user_func($this->code_block_content_func, $codeblock, $classname);
- } else {
- $codeblock = htmlspecialchars($codeblock, ENT_NOQUOTES);
- }
-
- $codeblock = preg_replace_callback('/^\n+/',
- array($this, '_doFencedCodeBlocks_newlines'), $codeblock);
-
- $classes = array();
- if ($classname !== "") {
- if ($classname[0] === '.') {
- $classname = substr($classname, 1);
- }
- $classes[] = $this->code_class_prefix . $classname;
- }
- $attr_str = $this->doExtraAttributes($this->code_attr_on_pre ? "pre" : "code", $attrs, null, $classes);
- $pre_attr_str = $this->code_attr_on_pre ? $attr_str : '';
- $code_attr_str = $this->code_attr_on_pre ? '' : $attr_str;
- $codeblock = "$codeblock
";
-
- return "\n\n".$this->hashBlock($codeblock)."\n\n";
- }
-
- /**
- * Replace new lines in fenced code blocks
- * @param array $matches
- * @return string
- */
- protected function _doFencedCodeBlocks_newlines($matches) {
- return str_repeat("
empty_element_suffix",
- strlen($matches[0]));
- }
-
- /**
- * Redefining emphasis markers so that emphasis by underscore does not
- * work in the middle of a word.
- * @var array
- */
- protected $em_relist = array(
- '' => '(?:(? '(? '(? '(?:(? '(? '(? '(?:(? '(? '(? tags
- * @return string HTML output
- */
- protected function formParagraphs($text, $wrap_in_p = true) {
- // Strip leading and trailing lines:
- $text = preg_replace('/\A\n+|\n+\z/', '', $text);
-
- $grafs = preg_split('/\n{2,}/', $text, -1, PREG_SPLIT_NO_EMPTY);
-
- // Wrap tags and unhashify HTML blocks
- foreach ($grafs as $key => $value) {
- $value = trim($this->runSpanGamut($value));
-
- // Check if this should be enclosed in a paragraph.
- // Clean tag hashes & block tag hashes are left alone.
- $is_p = $wrap_in_p && !preg_match('/^B\x1A[0-9]+B|^C\x1A[0-9]+C$/', $value);
-
- if ($is_p) {
- $value = "
$value
";
- }
- $grafs[$key] = $value;
- }
-
- // Join grafs in one text, then unhash HTML tags.
- $text = implode("\n\n", $grafs);
-
- // Finish by removing any tag hashes still present in $text.
- $text = $this->unhash($text);
-
- return $text;
- }
-
-
- /**
- * Footnotes - Strips link definitions from text, stores the URLs and
- * titles in hash references.
- * @param string $text
- * @return string
- */
- protected function stripFootnotes($text) {
- $less_than_tab = $this->tab_width - 1;
-
- // Link defs are in the form: [^id]: url "optional title"
- $text = preg_replace_callback('{
- ^[ ]{0,' . $less_than_tab . '}\[\^(.+?)\][ ]?: # note_id = $1
- [ ]*
- \n? # maybe *one* newline
- ( # text = $2 (no blank lines allowed)
- (?:
- .+ # actual text
- |
- \n # newlines but
- (?!\[.+?\][ ]?:\s)# negative lookahead for footnote or link definition marker.
- (?!\n+[ ]{0,3}\S)# ensure line is not blank and followed
- # by non-indented content
- )*
- )
- }xm',
- array($this, '_stripFootnotes_callback'),
- $text);
- return $text;
- }
-
- /**
- * Callback for stripping footnotes
- * @param array $matches
- * @return string
- */
- protected function _stripFootnotes_callback($matches) {
- $note_id = $this->fn_id_prefix . $matches[1];
- $this->footnotes[$note_id] = $this->outdent($matches[2]);
- return ''; // String that will replace the block
- }
-
- /**
- * Replace footnote references in $text [^id] with a special text-token
- * which will be replaced by the actual footnote marker in appendFootnotes.
- * @param string $text
- * @return string
- */
- protected function doFootnotes($text) {
- if (!$this->in_anchor) {
- $text = preg_replace('{\[\^(.+?)\]}', "F\x1Afn:\\1\x1A:", $text);
- }
- return $text;
- }
-
- /**
- * Append footnote list to text
- * @param string $text
- * @return string
- */
- protected function appendFootnotes($text) {
- $text = preg_replace_callback('{F\x1Afn:(.*?)\x1A:}',
- array($this, '_appendFootnotes_callback'), $text);
-
- if ( ! empty( $this->footnotes_ordered ) ) {
- $this->_doFootnotes();
- if ( ! $this->omit_footnotes ) {
- $text .= "\n\n";
- $text .= "\n";
- $text .= "
empty_element_suffix . "\n";
- $text .= $this->footnotes_assembled;
- $text .= "";
- }
- }
- return $text;
- }
-
-
- /**
- * Generates the HTML for footnotes. Called by appendFootnotes, even if
- * footnotes are not being appended.
- * @return void
- */
- protected function _doFootnotes() {
- $attr = array();
- if ($this->fn_backlink_class !== "") {
- $class = $this->fn_backlink_class;
- $class = $this->encodeAttribute($class);
- $attr['class'] = " class=\"$class\"";
- }
- $attr['role'] = " role=\"doc-backlink\"";
- $num = 0;
-
- $text = "\n\n";
- while (!empty($this->footnotes_ordered)) {
- $footnote = reset($this->footnotes_ordered);
- $note_id = key($this->footnotes_ordered);
- unset($this->footnotes_ordered[$note_id]);
- $ref_count = $this->footnotes_ref_count[$note_id];
- unset($this->footnotes_ref_count[$note_id]);
- unset($this->footnotes[$note_id]);
-
- $footnote .= "\n"; // Need to append newline before parsing.
- $footnote = $this->runBlockGamut("$footnote\n");
- $footnote = preg_replace_callback('{F\x1Afn:(.*?)\x1A:}',
- array($this, '_appendFootnotes_callback'), $footnote);
-
- $num++;
- $note_id = $this->encodeAttribute($note_id);
-
- // Prepare backlink, multiple backlinks if multiple references
- // Do not create empty backlinks if the html is blank
- $backlink = "";
- if (!empty($this->fn_backlink_html)) {
- for ($ref_num = 1; $ref_num <= $ref_count; ++$ref_num) {
- if (!empty($this->fn_backlink_title)) {
- $attr['title'] = ' title="' . $this->encodeAttribute($this->fn_backlink_title) . '"';
- }
- if (!empty($this->fn_backlink_label)) {
- $attr['label'] = ' aria-label="' . $this->encodeAttribute($this->fn_backlink_label) . '"';
- }
- $parsed_attr = $this->parseFootnotePlaceholders(
- implode('', $attr),
- $num,
- $ref_num
- );
- $backlink_text = $this->parseFootnotePlaceholders(
- $this->fn_backlink_html,
- $num,
- $ref_num
- );
- $ref_count_mark = $ref_num > 1 ? $ref_num : '';
- $backlink .= " $backlink_text";
- }
- $backlink = trim($backlink);
- }
-
- // Add backlink to last paragraph; create new paragraph if needed.
- if (!empty($backlink)) {
- if (preg_match('{$}', $footnote)) {
- $footnote = substr($footnote, 0, -4) . " $backlink";
- } else {
- $footnote .= "\n\n$backlink
";
- }
- }
-
- $text .= "- \n";
- $text .= $footnote . "\n";
- $text .= "
\n\n";
- }
- $text .= "
\n";
-
- $this->footnotes_assembled = $text;
- }
-
- /**
- * Callback for appending footnotes
- * @param array $matches
- * @return string
- */
- protected function _appendFootnotes_callback($matches) {
- $node_id = $this->fn_id_prefix . $matches[1];
-
- // Create footnote marker only if it has a corresponding footnote *and*
- // the footnote hasn't been used by another marker.
- if (isset($this->footnotes[$node_id])) {
- $num =& $this->footnotes_numbers[$node_id];
- if (!isset($num)) {
- // Transfer footnote content to the ordered list and give it its
- // number
- $this->footnotes_ordered[$node_id] = $this->footnotes[$node_id];
- $this->footnotes_ref_count[$node_id] = 1;
- $num = $this->footnote_counter++;
- $ref_count_mark = '';
- } else {
- $ref_count_mark = $this->footnotes_ref_count[$node_id] += 1;
- }
-
- $attr = "";
- if ($this->fn_link_class !== "") {
- $class = $this->fn_link_class;
- $class = $this->encodeAttribute($class);
- $attr .= " class=\"$class\"";
- }
- if ($this->fn_link_title !== "") {
- $title = $this->fn_link_title;
- $title = $this->encodeAttribute($title);
- $attr .= " title=\"$title\"";
- }
- $attr .= " role=\"doc-noteref\"";
-
- $attr = str_replace("%%", $num, $attr);
- $node_id = $this->encodeAttribute($node_id);
-
- return
- "".
- "$num".
- "";
- }
-
- return "[^" . $matches[1] . "]";
- }
-
- /**
- * Build footnote label by evaluating any placeholders.
- * - ^^ footnote number
- * - %% footnote reference number (Nth reference to footnote number)
- * @param string $label
- * @param int $footnote_number
- * @param int $reference_number
- * @return string
- */
- protected function parseFootnotePlaceholders($label, $footnote_number, $reference_number) {
- return str_replace(
- array('^^', '%%'),
- array($footnote_number, $reference_number),
- $label
- );
- }
-
-
- /**
- * Abbreviations - strips abbreviations from text, stores titles in hash
- * references.
- * @param string $text
- * @return string
- */
- protected function stripAbbreviations($text) {
- $less_than_tab = $this->tab_width - 1;
-
- // Link defs are in the form: [id]*: url "optional title"
- $text = preg_replace_callback('{
- ^[ ]{0,' . $less_than_tab . '}\*\[(.+?)\][ ]?: # abbr_id = $1
- (.*) # text = $2 (no blank lines allowed)
- }xm',
- array($this, '_stripAbbreviations_callback'),
- $text);
- return $text;
- }
-
- /**
- * Callback for stripping abbreviations
- * @param array $matches
- * @return string
- */
- protected function _stripAbbreviations_callback($matches) {
- $abbr_word = $matches[1];
- $abbr_desc = $matches[2];
- if ($this->abbr_word_re) {
- $this->abbr_word_re .= '|';
- }
- $this->abbr_word_re .= preg_quote($abbr_word);
- $this->abbr_desciptions[$abbr_word] = trim($abbr_desc);
- return ''; // String that will replace the block
- }
-
- /**
- * Find defined abbreviations in text and wrap them in elements.
- * @param string $text
- * @return string
- */
- protected function doAbbreviations($text) {
- if ($this->abbr_word_re) {
- // cannot use the /x modifier because abbr_word_re may
- // contain significant spaces:
- $text = preg_replace_callback('{' .
- '(?abbr_word_re . ')' .
- '(?![\w\x1A])' .
- '}',
- array($this, '_doAbbreviations_callback'), $text);
- }
- return $text;
- }
-
- /**
- * Callback for processing abbreviations
- * @param array $matches
- * @return string
- */
- protected function _doAbbreviations_callback($matches) {
- $abbr = $matches[0];
- if (isset($this->abbr_desciptions[$abbr])) {
- $desc = $this->abbr_desciptions[$abbr];
- if (empty($desc)) {
- return $this->hashPart("$abbr");
- }
- $desc = $this->encodeAttribute($desc);
- return $this->hashPart("$abbr");
- }
- return $matches[0];
- }
-}
diff --git a/vendor/michelf/php-markdown/Michelf/MarkdownInterface.inc.php b/vendor/michelf/php-markdown/Michelf/MarkdownInterface.inc.php
deleted file mode 100644
index c4e9ac7f..00000000
--- a/vendor/michelf/php-markdown/Michelf/MarkdownInterface.inc.php
+++ /dev/null
@@ -1,9 +0,0 @@
-
- * @copyright 2004-2019 Michel Fortin
- * @copyright (Original Markdown) 2004-2006 John Gruber
- */
-
-namespace Michelf;
-
-/**
- * Markdown Parser Interface
- */
-interface MarkdownInterface {
- /**
- * Initialize the parser and return the result of its transform method.
- * This will work fine for derived classes too.
- *
- * @api
- *
- * @param string $text
- * @return string
- */
- public static function defaultTransform($text);
-
- /**
- * Main function. Performs some preprocessing on the input text
- * and pass it through the document gamut.
- *
- * @api
- *
- * @param string $text
- * @return string
- */
- public function transform($text);
-}
diff --git a/vendor/michelf/php-markdown/Readme.md b/vendor/michelf/php-markdown/Readme.md
deleted file mode 100644
index e1eb3066..00000000
--- a/vendor/michelf/php-markdown/Readme.md
+++ /dev/null
@@ -1,437 +0,0 @@
-PHP Markdown
-============
-
-PHP Markdown Lib 1.9.0 - 1 Dec 2019
-
-by Michel Fortin
-
-
-based on Markdown by John Gruber
-
-
-
-Introduction
-------------
-
-This is a library package that includes the PHP Markdown parser and its
-sibling PHP Markdown Extra with additional features.
-
-Markdown is a text-to-HTML conversion tool for web writers. Markdown
-allows you to write using an easy-to-read, easy-to-write plain text
-format, then convert it to structurally valid XHTML (or HTML).
-
-"Markdown" is actually two things: a plain text markup syntax, and a
-software tool, originally written in Perl, that converts the plain text
-markup to HTML. PHP Markdown is a port to PHP of the original Markdown
-program by John Gruber.
-
-* [Full documentation of the Markdown syntax]( )
- — Daring Fireball (John Gruber)
-* [Markdown Extra syntax additions]( )
- — Michel Fortin
-
-
-Requirement
------------
-
-This library package requires PHP 5.3 or later.
-
-Note: The older plugin/library hybrid package for PHP Markdown and
-PHP Markdown Extra is no longer maintained but will work with PHP 4.0.5 and
-later.
-
-Before PHP 5.3.7, pcre.backtrack_limit defaults to 100 000, which is too small
-in many situations. You might need to set it to higher values. Later PHP
-releases defaults to 1 000 000, which is usually fine.
-
-
-Usage
------
-
-To use this library with Composer, first install it with:
-
- $ composer require michelf/php-markdown
-
-Then include Composer's generated vendor/autoload.php to [enable autoloading]:
-
- require 'vendor/autoload.php';
-
-Without Composer, for autoloading to work, your project needs an autoloader
-compatible with PSR-4 or PSR-0. See the included Readme.php file for a minimal
-autoloader setup. (If you cannot use autoloading, see below.)
-
-With class autoloading in place:
-
- use Michelf\Markdown;
- $my_html = Markdown::defaultTransform($my_text);
-
-Markdown Extra syntax is also available the same way:
-
- use Michelf\MarkdownExtra;
- $my_html = MarkdownExtra::defaultTransform($my_text);
-
-If you wish to use PHP Markdown with another text filter function
-built to parse HTML, you should filter the text *after* the `transform`
-function call. This is an example with [PHP SmartyPants]:
-
- use Michelf\Markdown, Michelf\SmartyPants;
- $my_html = Markdown::defaultTransform($my_text);
- $my_html = SmartyPants::defaultTransform($my_html);
-
-All these examples are using the static `defaultTransform` static function
-found inside the parser class. If you want to customize the parser
-configuration, you can also instantiate it directly and change some
-configuration variables:
-
- use Michelf\MarkdownExtra;
- $parser = new MarkdownExtra;
- $parser->fn_id_prefix = "post22-";
- $my_html = $parser->transform($my_text);
-
-To learn more, see the full list of [configuration variables].
-
- [enable autoloading]: https://getcomposer.org/doc/01-basic-usage.md#autoloading
- [PHP SmartyPants]: https://michelf.ca/projects/php-smartypants/
- [configuration variables]: https://michelf.ca/projects/php-markdown/configuration/
-
-
-### Usage without an autoloader
-
-If you cannot use class autoloading, you can still use `include` or `require`
-to access the parser. To load the `Michelf\Markdown` parser, do it this way:
-
- require_once 'Michelf/Markdown.inc.php';
-
-Or, if you need the `Michelf\MarkdownExtra` parser:
-
- require_once 'Michelf/MarkdownExtra.inc.php';
-
-While the plain `.php` files depend on autoloading to work correctly, using the
-`.inc.php` files instead will eagerly load the dependencies that would be
-loaded on demand if you were using autoloading.
-
-
-Public API and Versioning Policy
----------------------------------
-
-Version numbers are of the form *major*.*minor*.*patch*.
-
-The public API of PHP Markdown consist of the two parser classes `Markdown`
-and `MarkdownExtra`, their constructors, the `transform` and `defaultTransform`
-functions and their configuration variables. The public API is stable for
-a given major version number. It might get additions when the minor version
-number increments.
-
-**Protected members are not considered public API.** This is unconventional
-and deserves an explanation. Incrementing the major version number every time
-the underlying implementation of something changes is going to give
-nonessential version numbers for the vast majority of people who just use the
-parser. Protected members are meant to create parser subclasses that behave in
-different ways. Very few people create parser subclasses. I don't want to
-discourage it by making everything private, but at the same time I can't
-guarantee any stable hook between versions if you use protected members.
-
-**Syntax changes** will increment the minor number for new features, and the
-patch number for small corrections. A *new feature* is something that needs a
-change in the syntax documentation. Note that since PHP Markdown Lib includes
-two parsers, a syntax change for either of them will increment the minor
-number. Also note that there is nothing perfectly backward-compatible with the
-Markdown syntax: all inputs are always valid, so new features always replace
-something that was previously legal, although generally nonsensical to do.
-
-
-Bugs
-----
-
-To file bug reports please send email to:
-
-
-Please include with your report: (1) the example input; (2) the output you
-expected; (3) the output PHP Markdown actually produced.
-
-If you have a problem where Markdown gives you an empty result, first check
-that the backtrack limit is not too low by running `php --info | grep pcre`.
-See Installation and Requirement above for details.
-
-
-Development and Testing
------------------------
-
-Pull requests for fixing bugs are welcome. Proposed new features are
-going to be meticulously reviewed -- taking into account backward compatibility,
-potential side effects, and future extensibility -- before deciding on
-acceptance or rejection.
-
-If you make a pull request that includes changes to the parser please add
-tests for what is being changed to the `test/` directory. This can be as
-simple as adding a `.text` (input) file with a corresponding `.xhtml`
-(output) file to proper category under `./test/resources/`.
-
-Traditionally tests were in a separate repository, [MDTest](https://github.com/michelf/mdtest)
-but they are now located here, alongside the source code.
-
-
-Donations
----------
-
-If you wish to make a donation that will help me devote more time to
-PHP Markdown, please visit [michelf.ca/donate].
-
- [michelf.ca/donate]: https://michelf.ca/donate/#!Thanks%20for%20PHP%20Markdown
-
-
-Version History
----------------
-
-PHP Markdown Lib 1.9.0 (1 Dec 2019)
-
-* Added `fn_backlink_label` configuration variable to put some text in the
- `aria-label` attribute.
- (Thanks to Sunny Walker for the implementation.)
-
-* Occurances of "`^^`" in `fn_backlink_html`, `fn_backlink_class`,
- `fn_backlink_title`, and `fn_backlink_label` will be replaced by the
- corresponding footnote number in the HTML output. Occurances of "`%%`" will be
- replaced by a number for the reference (footnotes can have multiple references).
- (Thanks to Sunny Walker for the implementation.)
-
-* Added configuration variable `omit_footnotes`. When `true` footnotes are not
- appended at the end of the generated HTML and the `footnotes_assembled`
- variable will contain the HTML for the footnote list, allowing footnotes to be
- moved somewhere else on the page.
- (Thanks to James K. for the implementation.)
-
- Note: when placing the content of `footnotes_assembled` on the page, consider
- adding the attribute `role="doc-endnotes"` to the `` or `` that will
- enclose the list of footnotes so they are reachable to accessibility tools the
- same way they would be with the default HTML output.
-
-* Fixed deprecation warnings from PHP about usage of curly braces to access
- characters in text strings.
- (Thanks to Remi Collet and Frans-Willem Post.)
-
-
-PHP Markdown Lib 1.8.0 (14 Jan 2018)
-
-* Autoloading with Composer now uses PSR-4.
-
-* HTML output for Markdown Extra footnotes now include `role` attributes
- with values from [WAI-ARIA](https://www.w3.org/TR/dpub-aria/) to
- make them more accessible.
- (Thanks to Tobias Bengfort)
-
-* In Markdown Extra, added the `hashtag_protection` configuration variable.
- When set to `true` it prevents ATX-style headers with no space after the initial
- hash from being interpreted as headers. This way your precious hashtags
- are preserved.
- (Thanks to Jaussoin Timothée for the implementation.)
-
-
-PHP Markdown Lib 1.7.0 (29 Oct 2016)
-
-* Added a `hard_wrap` configuration variable to make all newline characters
- in the text become `
` tags in the HTML output. By default, according
- to the standard Markdown syntax these newlines are ignored unless they a
- preceded by two spaces. Thanks to Jonathan Cohlmeyer for the implementation.
-
-* Improved the parsing of list items to fix problematic cases that came to
- light with the addition of `hard_wrap`. This should have no effect on the
- output except span-level list items that ended with two spaces (and thus
- ended with a line break).
-
-* Added a `code_span_content_func` configuration variable which takes a
- function that will convert the content of the code span to HTML. This can
- be useful to implement syntax highlighting. Although contrary to its
- code block equivalent, there is no syntax for specifying a language.
- Credits to styxit for the implementation.
-
-* Fixed a Markdown Extra issue where two-space-at-end-of-line hard breaks
- wouldn't work inside of HTML block elements such as ``
- where the element expects only span-level content.
-
-* In the parser code, switched to PHPDoc comment format. Thanks to
- Robbie Averill for the help.
-
-
-PHP Markdown Lib 1.6.0 (23 Dec 2015)
-
-Note: this version was incorrectly released as 1.5.1 on Dec 22, a number
-that contradicted the versioning policy.
-
-* For fenced code blocks in Markdown Extra, can now set a class name for the
- code block's language before the special attribute block. Previously, this
- class name was only allowed in the absence of the special attribute block.
-
-* Added a `code_block_content_func` configuration variable which takes a
- function that will convert the content of the code block to HTML. This is
- most useful for syntax highlighting. For fenced code blocks in Markdown
- Extra, the function has access to the language class name (the one outside
- of the special attribute block). Credits to Mario Konrad for providing the
- implementation.
-
-* The curled arrow character for the backlink in footnotes is now followed
- by a Unicode variant selector to prevent it from being displayed in emoji
- form on iOS.
-
- Note that in older browsers the variant selector is often interpreted as a
- separate character, making it visible after the arrow. So there is now a
- also a `fn_backlink_html` configuration variable that can be used to set
- the link text to something else. Credits to Dana for providing the
- implementation.
-
-* Fixed an issue in MarkdownExtra where long header lines followed by a
- special attribute block would hit the backtrack limit an cause an empty
- string to be returned.
-
-
-PHP Markdown Lib 1.5.0 (1 Mar 2015)
-
-* Added the ability start ordered lists with a number different from 1 and
- and have that reflected in the HTML output. This can be enabled with
- the `enhanced_ordered_lists` configuration variable for the Markdown
- parser; it is enabled by default for Markdown Extra.
- Credits to Matt Gorle for providing the implementation.
-
-* Added the ability to insert custom HTML attributes with simple values
- everywhere an extra attribute block is allowed (links, images, headers).
- The value must be unquoted, cannot contains spaces and is limited to
- alphanumeric ASCII characters.
- Credits to Peter Droogmans for providing the implementation.
-
-* Added a `header_id_func` configuration variable which takes a function
- that can generate an `id` attribute value from the header text.
- Credits to Evert Pot for providing the implementation.
-
-* Added a `url_filter_func` configuration variable which takes a function
- that can rewrite any link or image URL to something different.
-
-
-PHP Markdown Lib 1.4.1 (4 May 2014)
-
-* The HTML block parser will now treat `` as a block-level element
- (as it should) and no longer wrap it in `` or parse it's content with
- the as Markdown syntax (although with Extra you can use `markdown="1"`
- if you wish to use the Markdown syntax inside it).
-
-* The content of `",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.2",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML=" ",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b)}(this,document);
\ No newline at end of file
diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/jquery.min.js b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/jquery.min.js
deleted file mode 100644
index 0f60b7bd..00000000
--- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/jquery.min.js
+++ /dev/null
@@ -1,5 +0,0 @@
-/*! jQuery v1.11.3 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */
-!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.3",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b="length"in a&&a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;
-
-return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML="
a",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function aa(){return!0}function ba(){return!1}function ca(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h ]","i"),ha=/^\s+/,ia=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ja=/<([\w:]+)/,ka=/\s*$/g,ra={option:[1,""],legend:[1,""],area:[1,""],param:[1,""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:k.htmlSerialize?[0,"",""]:[1,"X",""]},sa=da(y),ta=sa.appendChild(y.createElement("div"));ra.optgroup=ra.option,ra.tbody=ra.tfoot=ra.colgroup=ra.caption=ra.thead,ra.th=ra.td;function ua(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ua(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function va(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wa(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xa(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function ya(a){var b=pa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function za(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Aa(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Ba(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xa(b).text=a.text,ya(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!ga.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ta.innerHTML=a.outerHTML,ta.removeChild(f=ta.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ua(f),h=ua(a),g=0;null!=(e=h[g]);++g)d[g]&&Ba(e,d[g]);if(b)if(c)for(h=h||ua(a),d=d||ua(f),g=0;null!=(e=h[g]);g++)Aa(e,d[g]);else Aa(a,f);return d=ua(f,"script"),d.length>0&&za(d,!i&&ua(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=da(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(la.test(f)){h=h||o.appendChild(b.createElement("div")),i=(ja.exec(f)||["",""])[1].toLowerCase(),l=ra[i]||ra._default,h.innerHTML=l[1]+f.replace(ia,"<$1>$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&ha.test(f)&&p.push(b.createTextNode(ha.exec(f)[0])),!k.tbody){f="table"!==i||ka.test(f)?""!==l[1]||ka.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ua(p,"input"),va),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ua(o.appendChild(f),"script"),g&&za(h),c)){e=0;while(f=h[e++])oa.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ua(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&za(ua(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ua(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fa,""):void 0;if(!("string"!=typeof a||ma.test(a)||!k.htmlSerialize&&ga.test(a)||!k.leadingWhitespace&&ha.test(a)||ra[(ja.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ia,"<$1>$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ua(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ua(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&na.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ua(i,"script"),xa),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ua(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,ya),j=0;f>j;j++)d=g[j],oa.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qa,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Ca,Da={};function Ea(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fa(a){var b=y,c=Da[a];return c||(c=Ea(a,b),"none"!==c&&c||(Ca=(Ca||m("")).appendTo(b.documentElement),b=(Ca[0].contentWindow||Ca[0].contentDocument).document,b.write(),b.close(),c=Ea(a,b),Ca.detach()),Da[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Ga=/^margin/,Ha=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ia,Ja,Ka=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ia=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)},Ja=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ia(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Ha.test(g)&&Ga.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ia=function(a){return a.currentStyle},Ja=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ia(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ha.test(g)&&!Ka.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function La(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML="
a",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight),b.removeChild(i)),b.innerHTML="t
",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Ma=/alpha\([^)]*\)/i,Na=/opacity\s*=\s*([^)]*)/,Oa=/^(none|table(?!-c[ea]).+)/,Pa=new RegExp("^("+S+")(.*)$","i"),Qa=new RegExp("^([+-])=("+S+")","i"),Ra={position:"absolute",visibility:"hidden",display:"block"},Sa={letterSpacing:"0",fontWeight:"400"},Ta=["Webkit","O","Moz","ms"];function Ua(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ta.length;while(e--)if(b=Ta[e]+c,b in a)return b;return d}function Va(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fa(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wa(a,b,c){var d=Pa.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xa(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Ya(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ia(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Ja(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ha.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xa(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Ja(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ua(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qa.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ua(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Ja(a,b,d)),"normal"===f&&b in Sa&&(f=Sa[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Oa.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Ra,function(){return Ya(a,b,d)}):Ya(a,b,d):void 0},set:function(a,c,d){var e=d&&Ia(a);return Wa(a,c,d?Xa(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Na.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Ma,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Ma.test(f)?f.replace(Ma,e):f+" "+e)}}),m.cssHooks.marginRight=La(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Ja,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Ga.test(a)||(m.cssHooks[a+b].set=Wa)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ia(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Va(this,!0)},hide:function(){return Va(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Za(a,b,c,d,e){
-return new Za.prototype.init(a,b,c,d,e)}m.Tween=Za,Za.prototype={constructor:Za,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")},cur:function(){var a=Za.propHooks[this.prop];return a&&a.get?a.get(this):Za.propHooks._default.get(this)},run:function(a){var b,c=Za.propHooks[this.prop];return this.options.duration?this.pos=b=m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Za.propHooks._default.set(this),this}},Za.prototype.init.prototype=Za.prototype,Za.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Za.propHooks.scrollTop=Za.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Za.prototype.init,m.fx.step={};var $a,_a,ab=/^(?:toggle|show|hide)$/,bb=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cb=/queueHooks$/,db=[ib],eb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bb.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bb.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fb(){return setTimeout(function(){$a=void 0}),$a=m.now()}function gb(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hb(a,b,c){for(var d,e=(eb[b]||[]).concat(eb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ib(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fa(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fa(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ab.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fa(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hb(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jb(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kb(a,b,c){var d,e,f=0,g=db.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$a||fb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$a||fb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jb(k,j.opts.specialEasing);g>f;f++)if(d=db[f].call(j,a,k,j.opts))return d;return m.map(k,hb,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kb,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],eb[c]=eb[c]||[],eb[c].unshift(b)},prefilter:function(a,b){b?db.unshift(a):db.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kb(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gb(b,!0),a,d,e)}}),m.each({slideDown:gb("show"),slideUp:gb("hide"),slideToggle:gb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($a=m.now();c
a",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lb=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lb,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mb,nb,ob=m.expr.attrHandle,pb=/^(?:checked|selected)$/i,qb=k.getSetAttribute,rb=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nb:mb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rb&&qb||!pb.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qb?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nb={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rb&&qb||!pb.test(c)?a.setAttribute(!qb&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=ob[b]||m.find.attr;ob[b]=rb&&qb||!pb.test(b)?function(a,b,d){var e,f;return d||(f=ob[b],ob[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,ob[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rb&&qb||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mb&&mb.set(a,b,c)}}),qb||(mb={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},ob.id=ob.name=ob.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mb.set},m.attrHooks.contenteditable={set:function(a,b,c){mb.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sb=/^(?:input|select|textarea|button|object)$/i,tb=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sb.test(a.nodeName)||tb.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var ub=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ub," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ub," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ub," ").indexOf(b)>=0)return!0;return!1}}),m.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vb=m.now(),wb=/\?/,xb=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xb,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yb,zb,Ab=/#.*$/,Bb=/([?&])_=[^&]*/,Cb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Db=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Eb=/^(?:GET|HEAD)$/,Fb=/^\/\//,Gb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hb={},Ib={},Jb="*/".concat("*");try{zb=location.href}catch(Kb){zb=y.createElement("a"),zb.href="",zb=zb.href}yb=Gb.exec(zb.toLowerCase())||[];function Lb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mb(a,b,c,d){var e={},f=a===Ib;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nb(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Ob(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zb,type:"GET",isLocal:Db.test(yb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nb(Nb(a,m.ajaxSettings),b):Nb(m.ajaxSettings,a)},ajaxPrefilter:Lb(Hb),ajaxTransport:Lb(Ib),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cb.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zb)+"").replace(Ab,"").replace(Fb,yb[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gb.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yb[1]&&c[2]===yb[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yb[3]||("http:"===yb[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mb(Hb,k,b,v),2===t)return v;h=m.event&&k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Eb.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wb.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bb.test(e)?e.replace(Bb,"$1_="+vb++):e+(wb.test(e)?"&":"?")+"_="+vb++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jb+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mb(Ib,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Ob(k,v,c)),u=Pb(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qb=/%20/g,Rb=/\[\]$/,Sb=/\r?\n/g,Tb=/^(?:submit|button|image|reset|file)$/i,Ub=/^(?:input|select|textarea|keygen)/i;function Vb(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rb.test(a)?d(a,e):Vb(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vb(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vb(c,a[c],b,e);return d.join("&").replace(Qb,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Ub.test(this.nodeName)&&!Tb.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sb,"\r\n")}}):{name:b.name,value:c.replace(Sb,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zb()||$b()}:Zb;var Wb=0,Xb={},Yb=m.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Xb)Xb[a](void 0,!0)}),k.cors=!!Yb&&"withCredentials"in Yb,Yb=k.ajax=!!Yb,Yb&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wb;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xb[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xb[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zb(){try{return new a.XMLHttpRequest}catch(b){}}function $b(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _b=[],ac=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_b.pop()||m.expando+"_"+vb++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ac.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ac.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ac,"$1"+e):b.jsonp!==!1&&(b.url+=(wb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_b.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bc=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bc)return bc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cc=a.document.documentElement;function dc(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dc(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cc;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cc})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dc(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=La(k.pixelPosition,function(a,c){return c?(c=Ja(a,b),Ha.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ec=a.jQuery,fc=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fc),b&&a.jQuery===m&&(a.jQuery=ec),m},typeof b===K&&(a.jQuery=a.$=m),m});
diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/nv.d3.min.js b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/nv.d3.min.js
deleted file mode 100644
index 61d35d34..00000000
--- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/nv.d3.min.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/* nvd3 version 1.8.1 (https://github.com/novus/nvd3) 2015-06-17 */
-!function(){var a={};a.dev=!1,a.tooltip=a.tooltip||{},a.utils=a.utils||{},a.models=a.models||{},a.charts={},a.logs={},a.dom={},a.dispatch=d3.dispatch("render_start","render_end"),Function.prototype.bind||(Function.prototype.bind=function(a){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var b=Array.prototype.slice.call(arguments,1),c=this,d=function(){},e=function(){return c.apply(this instanceof d&&a?this:a,b.concat(Array.prototype.slice.call(arguments)))};return d.prototype=this.prototype,e.prototype=new d,e}),a.dev&&(a.dispatch.on("render_start",function(){a.logs.startTime=+new Date}),a.dispatch.on("render_end",function(){a.logs.endTime=+new Date,a.logs.totalTime=a.logs.endTime-a.logs.startTime,a.log("total",a.logs.totalTime)})),a.log=function(){if(a.dev&&window.console&&console.log&&console.log.apply)console.log.apply(console,arguments);else if(a.dev&&window.console&&"function"==typeof console.log&&Function.prototype.bind){var b=Function.prototype.bind.call(console.log,console);b.apply(console,arguments)}return arguments[arguments.length-1]},a.deprecated=function(a,b){console&&console.warn&&console.warn("nvd3 warning: `"+a+"` has been deprecated. ",b||"")},a.render=function(b){b=b||1,a.render.active=!0,a.dispatch.render_start();var c=function(){for(var d,e,f=0;b>f&&(e=a.render.queue[f]);f++)d=e.generate(),typeof e.callback==typeof Function&&e.callback(d);a.render.queue.splice(0,f),a.render.queue.length?setTimeout(c):(a.dispatch.render_end(),a.render.active=!1)};setTimeout(c)},a.render.active=!1,a.render.queue=[],a.addGraph=function(b){typeof arguments[0]==typeof Function&&(b={generate:arguments[0],callback:arguments[1]}),a.render.queue.push(b),a.render.active||a.render()},"undefined"!=typeof module&&"undefined"!=typeof exports&&(module.exports=a),"undefined"!=typeof window&&(window.nv=a),a.dom.write=function(a){return void 0!==window.fastdom?fastdom.write(a):a()},a.dom.read=function(a){return void 0!==window.fastdom?fastdom.read(a):a()},a.interactiveGuideline=function(){"use strict";function b(l){l.each(function(l){function m(){var a=d3.mouse(this),d=a[0],e=a[1],i=!0,j=!1;if(k&&(d=d3.event.offsetX,e=d3.event.offsetY,"svg"!==d3.event.target.tagName&&(i=!1),d3.event.target.className.baseVal.match("nv-legend")&&(j=!0)),i&&(d-=f.left,e-=f.top),0>d||0>e||d>o||e>p||d3.event.relatedTarget&&void 0===d3.event.relatedTarget.ownerSVGElement||j){if(k&&d3.event.relatedTarget&&void 0===d3.event.relatedTarget.ownerSVGElement&&(void 0===d3.event.relatedTarget.className||d3.event.relatedTarget.className.match(c.nvPointerEventsClass)))return;return h.elementMouseout({mouseX:d,mouseY:e}),b.renderGuideLine(null),void c.hidden(!0)}c.hidden(!1);var l=g.invert(d);h.elementMousemove({mouseX:d,mouseY:e,pointXValue:l}),"dblclick"===d3.event.type&&h.elementDblclick({mouseX:d,mouseY:e,pointXValue:l}),"click"===d3.event.type&&h.elementClick({mouseX:d,mouseY:e,pointXValue:l})}var n=d3.select(this),o=d||960,p=e||400,q=n.selectAll("g.nv-wrap.nv-interactiveLineLayer").data([l]),r=q.enter().append("g").attr("class"," nv-wrap nv-interactiveLineLayer");r.append("g").attr("class","nv-interactiveGuideLine"),j&&(j.on("touchmove",m).on("mousemove",m,!0).on("mouseout",m,!0).on("dblclick",m).on("click",m),b.guideLine=null,b.renderGuideLine=function(c){i&&(b.guideLine&&b.guideLine.attr("x1")===c||a.dom.write(function(){var b=q.select(".nv-interactiveGuideLine").selectAll("line").data(null!=c?[a.utils.NaNtoZero(c)]:[],String);b.enter().append("line").attr("class","nv-guideline").attr("x1",function(a){return a}).attr("x2",function(a){return a}).attr("y1",p).attr("y2",0),b.exit().remove()}))})})}var c=a.models.tooltip();c.duration(0).hideDelay(0)._isInteractiveLayer(!0).hidden(!1);var d=null,e=null,f={left:0,top:0},g=d3.scale.linear(),h=d3.dispatch("elementMousemove","elementMouseout","elementClick","elementDblclick"),i=!0,j=null,k="ActiveXObject"in window;return b.dispatch=h,b.tooltip=c,b.margin=function(a){return arguments.length?(f.top="undefined"!=typeof a.top?a.top:f.top,f.left="undefined"!=typeof a.left?a.left:f.left,b):f},b.width=function(a){return arguments.length?(d=a,b):d},b.height=function(a){return arguments.length?(e=a,b):e},b.xScale=function(a){return arguments.length?(g=a,b):g},b.showGuideLine=function(a){return arguments.length?(i=a,b):i},b.svgContainer=function(a){return arguments.length?(j=a,b):j},b},a.interactiveBisect=function(a,b,c){"use strict";if(!(a instanceof Array))return null;var d;d="function"!=typeof c?function(a){return a.x}:c;var e=function(a,b){return d(a)-b},f=d3.bisector(e).left,g=d3.max([0,f(a,b)-1]),h=d(a[g]);if("undefined"==typeof h&&(h=g),h===b)return g;var i=d3.min([g+1,a.length-1]),j=d(a[i]);return"undefined"==typeof j&&(j=i),Math.abs(j-b)>=Math.abs(h-b)?g:i},a.nearestValueIndex=function(a,b,c){"use strict";var d=1/0,e=null;return a.forEach(function(a,f){var g=Math.abs(b-a);null!=a&&d>=g&&c>g&&(d=g,e=f)}),e},function(){"use strict";a.models.tooltip=function(){function b(){if(k){var a=d3.select(k);"svg"!==a.node().tagName&&(a=a.select("svg"));var b=a.node()?a.attr("viewBox"):null;if(b){b=b.split(" ");var c=parseInt(a.style("width"),10)/b[2];p.left=p.left*c,p.top=p.top*c}}}function c(){if(!n){var a;a=k?k:document.body,n=d3.select(a).append("div").attr("class","nvtooltip "+(j?j:"xy-tooltip")).attr("id",v),n.style("top",0).style("left",0),n.style("opacity",0),n.selectAll("div, table, td, tr").classed(w,!0),n.classed(w,!0),o=n.node()}}function d(){if(r&&B(e)){b();var f=p.left,g=null!==i?i:p.top;return a.dom.write(function(){c();var b=A(e);b&&(o.innerHTML=b),k&&u?a.dom.read(function(){var a=k.getElementsByTagName("svg")[0],b={left:0,top:0};if(a){var c=a.getBoundingClientRect(),d=k.getBoundingClientRect(),e=c.top;if(0>e){var i=k.getBoundingClientRect();e=Math.abs(e)>i.height?0:e}b.top=Math.abs(e-d.top),b.left=Math.abs(c.left-d.left)}f+=k.offsetLeft+b.left-2*k.scrollLeft,g+=k.offsetTop+b.top-2*k.scrollTop,h&&h>0&&(g=Math.floor(g/h)*h),C([f,g])}):C([f,g])}),d}}var e=null,f="w",g=25,h=0,i=null,j=null,k=null,l=!0,m=400,n=null,o=null,p={left:null,top:null},q={left:0,top:0},r=!0,s=100,t=!0,u=!1,v="nvtooltip-"+Math.floor(1e5*Math.random()),w="nv-pointer-events-none",x=function(a){return a},y=function(a){return a},z=function(a){return a},A=function(a){if(null===a)return"";var b=d3.select(document.createElement("table"));if(t){var c=b.selectAll("thead").data([a]).enter().append("thead");c.append("tr").append("td").attr("colspan",3).append("strong").classed("x-value",!0).html(y(a.value))}var d=b.selectAll("tbody").data([a]).enter().append("tbody"),e=d.selectAll("tr").data(function(a){return a.series}).enter().append("tr").classed("highlight",function(a){return a.highlight});e.append("td").classed("legend-color-guide",!0).append("div").style("background-color",function(a){return a.color}),e.append("td").classed("key",!0).html(function(a,b){return z(a.key,b)}),e.append("td").classed("value",!0).html(function(a,b){return x(a.value,b)}),e.selectAll("td").each(function(a){if(a.highlight){var b=d3.scale.linear().domain([0,1]).range(["#fff",a.color]),c=.6;d3.select(this).style("border-bottom-color",b(c)).style("border-top-color",b(c))}});var f=b.node().outerHTML;return void 0!==a.footer&&(f+=""),f},B=function(a){if(a&&a.series){if(a.series instanceof Array)return!!a.series.length;if(a.series instanceof Object)return a.series=[a.series],!0}return!1},C=function(b){o&&a.dom.read(function(){var c,d,e=parseInt(o.offsetHeight,10),h=parseInt(o.offsetWidth,10),i=a.utils.windowSize().width,j=a.utils.windowSize().height,k=window.pageYOffset,p=window.pageXOffset;j=window.innerWidth>=document.body.scrollWidth?j:j-16,i=window.innerHeight>=document.body.scrollHeight?i:i-16;var r,t,u=function(a){var b=d;do isNaN(a.offsetTop)||(b+=a.offsetTop),a=a.offsetParent;while(a);return b},v=function(a){var b=c;do isNaN(a.offsetLeft)||(b+=a.offsetLeft),a=a.offsetParent;while(a);return b};switch(f){case"e":c=b[0]-h-g,d=b[1]-e/2,r=v(o),t=u(o),p>r&&(c=b[0]+g>p?b[0]+g:p-r+c),k>t&&(d=k-t+d),t+e>k+j&&(d=k+j-t+d-e);break;case"w":c=b[0]+g,d=b[1]-e/2,r=v(o),t=u(o),r+h>i&&(c=b[0]-h-g),k>t&&(d=k+5),t+e>k+j&&(d=k+j-t+d-e);break;case"n":c=b[0]-h/2-5,d=b[1]+g,r=v(o),t=u(o),p>r&&(c=p+5),r+h>i&&(c=c-h/2+5),t+e>k+j&&(d=k+j-t+d-e);break;case"s":c=b[0]-h/2,d=b[1]-e-g,r=v(o),t=u(o),p>r&&(c=p+5),r+h>i&&(c=c-h/2+5),k>t&&(d=k);break;case"none":c=b[0],d=b[1]-g,r=v(o),t=u(o)}c-=q.left,d-=q.top;var w=o.getBoundingClientRect(),k=window.pageYOffset||document.documentElement.scrollTop,p=window.pageXOffset||document.documentElement.scrollLeft,x="translate("+(w.left+p)+"px, "+(w.top+k)+"px)",y="translate("+c+"px, "+d+"px)",z=d3.interpolateString(x,y),A=n.style("opacity")<.1;l?n.transition().delay(m).duration(0).style("opacity",0):n.interrupt().transition().duration(A?0:s).styleTween("transform",function(){return z},"important").style("-webkit-transform",y).style("opacity",1)})};return d.nvPointerEventsClass=w,d.options=a.utils.optionsFunc.bind(d),d._options=Object.create({},{duration:{get:function(){return s},set:function(a){s=a}},gravity:{get:function(){return f},set:function(a){f=a}},distance:{get:function(){return g},set:function(a){g=a}},snapDistance:{get:function(){return h},set:function(a){h=a}},classes:{get:function(){return j},set:function(a){j=a}},chartContainer:{get:function(){return k},set:function(a){k=a}},fixedTop:{get:function(){return i},set:function(a){i=a}},enabled:{get:function(){return r},set:function(a){r=a}},hideDelay:{get:function(){return m},set:function(a){m=a}},contentGenerator:{get:function(){return A},set:function(a){A=a}},valueFormatter:{get:function(){return x},set:function(a){x=a}},headerFormatter:{get:function(){return y},set:function(a){y=a}},keyFormatter:{get:function(){return z},set:function(a){z=a}},headerEnabled:{get:function(){return t},set:function(a){t=a}},_isInteractiveLayer:{get:function(){return u},set:function(a){u=!!a}},position:{get:function(){return p},set:function(a){p.left=void 0!==a.left?a.left:p.left,p.top=void 0!==a.top?a.top:p.top}},offset:{get:function(){return q},set:function(a){q.left=void 0!==a.left?a.left:q.left,q.top=void 0!==a.top?a.top:q.top}},hidden:{get:function(){return l},set:function(a){l!=a&&(l=!!a,d())}},data:{get:function(){return e},set:function(a){a.point&&(a.value=a.point.x,a.series=a.series||{},a.series.value=a.point.y,a.series.color=a.point.color||a.series.color),e=a}},tooltipElem:{get:function(){return o},set:function(){}},id:{get:function(){return v},set:function(){}}}),a.utils.initOptions(d),d}}(),a.utils.windowSize=function(){var a={width:640,height:480};return window.innerWidth&&window.innerHeight?(a.width=window.innerWidth,a.height=window.innerHeight,a):"CSS1Compat"==document.compatMode&&document.documentElement&&document.documentElement.offsetWidth?(a.width=document.documentElement.offsetWidth,a.height=document.documentElement.offsetHeight,a):document.body&&document.body.offsetWidth?(a.width=document.body.offsetWidth,a.height=document.body.offsetHeight,a):a},a.utils.windowResize=function(b){return window.addEventListener?window.addEventListener("resize",b):a.log("ERROR: Failed to bind to window.resize with: ",b),{callback:b,clear:function(){window.removeEventListener("resize",b)}}},a.utils.getColor=function(b){if(void 0===b)return a.utils.defaultColor();if(Array.isArray(b)){var c=d3.scale.ordinal().range(b);return function(a,b){var d=void 0===b?a:b;return a.color||c(d)}}return b},a.utils.defaultColor=function(){return a.utils.getColor(d3.scale.category20().range())},a.utils.customTheme=function(a,b,c){b=b||function(a){return a.key},c=c||d3.scale.category20().range();var d=c.length;return function(e){var f=b(e);return"function"==typeof a[f]?a[f]():void 0!==a[f]?a[f]:(d||(d=c.length),d-=1,c[d])}},a.utils.pjax=function(b,c){var d=function(d){d3.html(d,function(d){var e=d3.select(c).node();e.parentNode.replaceChild(d3.select(d).select(c).node(),e),a.utils.pjax(b,c)})};d3.selectAll(b).on("click",function(){history.pushState(this.href,this.textContent,this.href),d(this.href),d3.event.preventDefault()}),d3.select(window).on("popstate",function(){d3.event.state&&d(d3.event.state)})},a.utils.calcApproxTextWidth=function(a){if("function"==typeof a.style&&"function"==typeof a.text){var b=parseInt(a.style("font-size").replace("px",""),10),c=a.text().length;return c*b*.5}return 0},a.utils.NaNtoZero=function(a){return"number"!=typeof a||isNaN(a)||null===a||1/0===a||a===-1/0?0:a},d3.selection.prototype.watchTransition=function(a){var b=[this].concat([].slice.call(arguments,1));return a.transition.apply(a,b)},a.utils.renderWatch=function(b,c){if(!(this instanceof a.utils.renderWatch))return new a.utils.renderWatch(b,c);var d=void 0!==c?c:250,e=[],f=this;this.models=function(a){return a=[].slice.call(arguments,0),a.forEach(function(a){a.__rendered=!1,function(a){a.dispatch.on("renderEnd",function(){a.__rendered=!0,f.renderEnd("model")})}(a),e.indexOf(a)<0&&e.push(a)}),this},this.reset=function(a){void 0!==a&&(d=a),e=[]},this.transition=function(a,b,c){if(b=arguments.length>1?[].slice.call(arguments,1):[],c=b.length>1?b.pop():void 0!==d?d:250,a.__rendered=!1,e.indexOf(a)<0&&e.push(a),0===c)return a.__rendered=!0,a.delay=function(){return this},a.duration=function(){return this},a;a.__rendered=0===a.length?!0:a.every(function(a){return!a.length})?!0:!1;var g=0;return a.transition().duration(c).each(function(){++g}).each("end",function(){0===--g&&(a.__rendered=!0,f.renderEnd.apply(this,b))})},this.renderEnd=function(){e.every(function(a){return a.__rendered})&&(e.forEach(function(a){a.__rendered=!1}),b.renderEnd.apply(this,arguments))}},a.utils.deepExtend=function(b){var c=arguments.length>1?[].slice.call(arguments,1):[];c.forEach(function(c){for(var d in c){var e=b[d]instanceof Array,f="object"==typeof b[d],g="object"==typeof c[d];f&&!e&&g?a.utils.deepExtend(b[d],c[d]):b[d]=c[d]}})},a.utils.state=function(){if(!(this instanceof a.utils.state))return new a.utils.state;var b={},c=function(){},d=function(){return{}},e=null,f=null;this.dispatch=d3.dispatch("change","set"),this.dispatch.on("set",function(a){c(a,!0)}),this.getter=function(a){return d=a,this},this.setter=function(a,b){return b||(b=function(){}),c=function(c,d){a(c),d&&b()},this},this.init=function(b){e=e||{},a.utils.deepExtend(e,b)};var g=function(){var a=d();if(JSON.stringify(a)===JSON.stringify(b))return!1;for(var c in a)void 0===b[c]&&(b[c]={}),b[c]=a[c],f=!0;return!0};this.update=function(){e&&(c(e,!1),e=null),g.call(this)&&this.dispatch.change(b)}},a.utils.optionsFunc=function(a){return a&&d3.map(a).forEach(function(a,b){"function"==typeof this[a]&&this[a](b)}.bind(this)),this},a.utils.calcTicksX=function(b,c){var d=1,e=0;for(e;ed?f:d}return a.log("Requested number of ticks: ",b),a.log("Calculated max values to be: ",d),b=b>d?b=d-1:b,b=1>b?1:b,b=Math.floor(b),a.log("Calculating tick count as: ",b),b},a.utils.calcTicksY=function(b,c){return a.utils.calcTicksX(b,c)},a.utils.initOption=function(a,b){a._calls&&a._calls[b]?a[b]=a._calls[b]:(a[b]=function(c){return arguments.length?(a._overrides[b]=!0,a._options[b]=c,a):a._options[b]},a["_"+b]=function(c){return arguments.length?(a._overrides[b]||(a._options[b]=c),a):a._options[b]})},a.utils.initOptions=function(b){b._overrides=b._overrides||{};var c=Object.getOwnPropertyNames(b._options||{}),d=Object.getOwnPropertyNames(b._calls||{});c=c.concat(d);for(var e in c)a.utils.initOption(b,c[e])},a.utils.inheritOptionsD3=function(a,b,c){a._d3options=c.concat(a._d3options||[]),c.unshift(b),c.unshift(a),d3.rebind.apply(this,c)},a.utils.arrayUnique=function(a){return a.sort().filter(function(b,c){return!c||b!=a[c-1]})},a.utils.symbolMap=d3.map(),a.utils.symbol=function(){function b(b,e){var f=c.call(this,b,e),g=d.call(this,b,e);return-1!==d3.svg.symbolTypes.indexOf(f)?d3.svg.symbol().type(f).size(g)():a.utils.symbolMap.get(f)(g)}var c,d=64;return b.type=function(a){return arguments.length?(c=d3.functor(a),b):c},b.size=function(a){return arguments.length?(d=d3.functor(a),b):d},b},a.utils.inheritOptions=function(b,c){var d=Object.getOwnPropertyNames(c._options||{}),e=Object.getOwnPropertyNames(c._calls||{}),f=c._inherited||[],g=c._d3options||[],h=d.concat(e).concat(f).concat(g);h.unshift(c),h.unshift(b),d3.rebind.apply(this,h),b._inherited=a.utils.arrayUnique(d.concat(e).concat(f).concat(d).concat(b._inherited||[])),b._d3options=a.utils.arrayUnique(g.concat(b._d3options||[]))},a.utils.initSVG=function(a){a.classed({"nvd3-svg":!0})},a.utils.sanitizeHeight=function(a,b){return a||parseInt(b.style("height"),10)||400},a.utils.sanitizeWidth=function(a,b){return a||parseInt(b.style("width"),10)||960},a.utils.availableHeight=function(b,c,d){return a.utils.sanitizeHeight(b,c)-d.top-d.bottom},a.utils.availableWidth=function(b,c,d){return a.utils.sanitizeWidth(b,c)-d.left-d.right},a.utils.noData=function(b,c){var d=b.options(),e=d.margin(),f=d.noData(),g=null==f?["No Data Available."]:[f],h=a.utils.availableHeight(d.height(),c,e),i=a.utils.availableWidth(d.width(),c,e),j=e.left+i/2,k=e.top+h/2;c.selectAll("g").remove();var l=c.selectAll(".nv-noData").data(g);l.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),l.attr("x",j).attr("y",k).text(function(a){return a})},a.models.axis=function(){"use strict";function b(g){return s.reset(),g.each(function(b){var g=d3.select(this);a.utils.initSVG(g);var p=g.selectAll("g.nv-wrap.nv-axis").data([b]),q=p.enter().append("g").attr("class","nvd3 nv-wrap nv-axis"),t=(q.append("g"),p.select("g"));null!==n?c.ticks(n):("top"==c.orient()||"bottom"==c.orient())&&c.ticks(Math.abs(d.range()[1]-d.range()[0])/100),t.watchTransition(s,"axis").call(c),r=r||c.scale();var u=c.tickFormat();null==u&&(u=r.tickFormat());var v=t.selectAll("text.nv-axislabel").data([h||null]);v.exit().remove();var w,x,y;switch(c.orient()){case"top":v.enter().append("text").attr("class","nv-axislabel"),y=d.range().length<2?0:2===d.range().length?d.range()[1]:d.range()[d.range().length-1]+(d.range()[1]-d.range()[0]),v.attr("text-anchor","middle").attr("y",0).attr("x",y/2),i&&(x=p.selectAll("g.nv-axisMaxMin").data(d.domain()),x.enter().append("g").attr("class",function(a,b){return["nv-axisMaxMin","nv-axisMaxMin-x",0==b?"nv-axisMin-x":"nv-axisMax-x"].join(" ")}).append("text"),x.exit().remove(),x.attr("transform",function(b){return"translate("+a.utils.NaNtoZero(d(b))+",0)"}).select("text").attr("dy","-0.5em").attr("y",-c.tickPadding()).attr("text-anchor","middle").text(function(a){var b=u(a);return(""+b).match("NaN")?"":b}),x.watchTransition(s,"min-max top").attr("transform",function(b,c){return"translate("+a.utils.NaNtoZero(d.range()[c])+",0)"}));break;case"bottom":w=o+36;var z=30,A=0,B=t.selectAll("g").select("text"),C="";if(j%360){B.each(function(){var a=this.getBoundingClientRect(),b=a.width;A=a.height,b>z&&(z=b)}),C="rotate("+j+" 0,"+(A/2+c.tickPadding())+")";var D=Math.abs(Math.sin(j*Math.PI/180));w=(D?D*z:z)+30,B.attr("transform",C).style("text-anchor",j%360>0?"start":"end")}v.enter().append("text").attr("class","nv-axislabel"),y=d.range().length<2?0:2===d.range().length?d.range()[1]:d.range()[d.range().length-1]+(d.range()[1]-d.range()[0]),v.attr("text-anchor","middle").attr("y",w).attr("x",y/2),i&&(x=p.selectAll("g.nv-axisMaxMin").data([d.domain()[0],d.domain()[d.domain().length-1]]),x.enter().append("g").attr("class",function(a,b){return["nv-axisMaxMin","nv-axisMaxMin-x",0==b?"nv-axisMin-x":"nv-axisMax-x"].join(" ")}).append("text"),x.exit().remove(),x.attr("transform",function(b){return"translate("+a.utils.NaNtoZero(d(b)+(m?d.rangeBand()/2:0))+",0)"}).select("text").attr("dy",".71em").attr("y",c.tickPadding()).attr("transform",C).style("text-anchor",j?j%360>0?"start":"end":"middle").text(function(a){var b=u(a);return(""+b).match("NaN")?"":b}),x.watchTransition(s,"min-max bottom").attr("transform",function(b){return"translate("+a.utils.NaNtoZero(d(b)+(m?d.rangeBand()/2:0))+",0)"})),l&&B.attr("transform",function(a,b){return"translate(0,"+(b%2==0?"0":"12")+")"});break;case"right":v.enter().append("text").attr("class","nv-axislabel"),v.style("text-anchor",k?"middle":"begin").attr("transform",k?"rotate(90)":"").attr("y",k?-Math.max(e.right,f)+12:-10).attr("x",k?d3.max(d.range())/2:c.tickPadding()),i&&(x=p.selectAll("g.nv-axisMaxMin").data(d.domain()),x.enter().append("g").attr("class",function(a,b){return["nv-axisMaxMin","nv-axisMaxMin-y",0==b?"nv-axisMin-y":"nv-axisMax-y"].join(" ")}).append("text").style("opacity",0),x.exit().remove(),x.attr("transform",function(b){return"translate(0,"+a.utils.NaNtoZero(d(b))+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",c.tickPadding()).style("text-anchor","start").text(function(a){var b=u(a);return(""+b).match("NaN")?"":b}),x.watchTransition(s,"min-max right").attr("transform",function(b,c){return"translate(0,"+a.utils.NaNtoZero(d.range()[c])+")"}).select("text").style("opacity",1));break;case"left":v.enter().append("text").attr("class","nv-axislabel"),v.style("text-anchor",k?"middle":"end").attr("transform",k?"rotate(-90)":"").attr("y",k?-Math.max(e.left,f)+25-(o||0):-10).attr("x",k?-d3.max(d.range())/2:-c.tickPadding()),i&&(x=p.selectAll("g.nv-axisMaxMin").data(d.domain()),x.enter().append("g").attr("class",function(a,b){return["nv-axisMaxMin","nv-axisMaxMin-y",0==b?"nv-axisMin-y":"nv-axisMax-y"].join(" ")}).append("text").style("opacity",0),x.exit().remove(),x.attr("transform",function(b){return"translate(0,"+a.utils.NaNtoZero(r(b))+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",-c.tickPadding()).attr("text-anchor","end").text(function(a){var b=u(a);return(""+b).match("NaN")?"":b}),x.watchTransition(s,"min-max right").attr("transform",function(b,c){return"translate(0,"+a.utils.NaNtoZero(d.range()[c])+")"}).select("text").style("opacity",1))}if(v.text(function(a){return a}),!i||"left"!==c.orient()&&"right"!==c.orient()||(t.selectAll("g").each(function(a){d3.select(this).select("text").attr("opacity",1),(d(a)d.range()[0]-10)&&((a>1e-10||-1e-10>a)&&d3.select(this).attr("opacity",0),d3.select(this).select("text").attr("opacity",0))}),d.domain()[0]==d.domain()[1]&&0==d.domain()[0]&&p.selectAll("g.nv-axisMaxMin").style("opacity",function(a,b){return b?0:1})),i&&("top"===c.orient()||"bottom"===c.orient())){var E=[];p.selectAll("g.nv-axisMaxMin").each(function(a,b){try{E.push(b?d(a)-this.getBoundingClientRect().width-4:d(a)+this.getBoundingClientRect().width+4)}catch(c){E.push(b?d(a)-4:d(a)+4)}}),t.selectAll("g").each(function(a){(d(a)E[1])&&(a>1e-10||-1e-10>a?d3.select(this).remove():d3.select(this).select("text").remove())})}t.selectAll(".tick").filter(function(a){return!parseFloat(Math.round(1e5*a)/1e6)&&void 0!==a}).classed("zero",!0),r=d.copy()}),s.renderEnd("axis immediate"),b}var c=d3.svg.axis(),d=d3.scale.linear(),e={top:0,right:0,bottom:0,left:0},f=75,g=60,h=null,i=!0,j=0,k=!0,l=!1,m=!1,n=null,o=0,p=250,q=d3.dispatch("renderEnd");c.scale(d).orient("bottom").tickFormat(function(a){return a});var r,s=a.utils.renderWatch(q,p);return b.axis=c,b.dispatch=q,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{axisLabelDistance:{get:function(){return o},set:function(a){o=a}},staggerLabels:{get:function(){return l},set:function(a){l=a}},rotateLabels:{get:function(){return j},set:function(a){j=a}},rotateYLabel:{get:function(){return k},set:function(a){k=a}},showMaxMin:{get:function(){return i},set:function(a){i=a}},axisLabel:{get:function(){return h},set:function(a){h=a}},height:{get:function(){return g},set:function(a){g=a}},ticks:{get:function(){return n},set:function(a){n=a}},width:{get:function(){return f},set:function(a){f=a}},margin:{get:function(){return e},set:function(a){e.top=void 0!==a.top?a.top:e.top,e.right=void 0!==a.right?a.right:e.right,e.bottom=void 0!==a.bottom?a.bottom:e.bottom,e.left=void 0!==a.left?a.left:e.left}},duration:{get:function(){return p},set:function(a){p=a,s.reset(p)}},scale:{get:function(){return d},set:function(e){d=e,c.scale(d),m="function"==typeof d.rangeBands,a.utils.inheritOptionsD3(b,d,["domain","range","rangeBand","rangeBands"])}}}),a.utils.initOptions(b),a.utils.inheritOptionsD3(b,c,["orient","tickValues","tickSubdivide","tickSize","tickPadding","tickFormat"]),a.utils.inheritOptionsD3(b,d,["domain","range","rangeBand","rangeBands"]),b},a.models.boxPlot=function(){"use strict";function b(l){return v.reset(),l.each(function(b){var l=j-i.left-i.right,p=k-i.top-i.bottom;r=d3.select(this),a.utils.initSVG(r),m.domain(c||b.map(function(a,b){return o(a,b)})).rangeBands(e||[0,l],.1);var w=[];if(!d){var x=d3.min(b.map(function(a){var b=[];return b.push(a.values.Q1),a.values.hasOwnProperty("whisker_low")&&null!==a.values.whisker_low&&b.push(a.values.whisker_low),a.values.hasOwnProperty("outliers")&&null!==a.values.outliers&&(b=b.concat(a.values.outliers)),d3.min(b)})),y=d3.max(b.map(function(a){var b=[];return b.push(a.values.Q3),a.values.hasOwnProperty("whisker_high")&&null!==a.values.whisker_high&&b.push(a.values.whisker_high),a.values.hasOwnProperty("outliers")&&null!==a.values.outliers&&(b=b.concat(a.values.outliers)),d3.max(b)}));w=[x,y]}n.domain(d||w),n.range(f||[p,0]),g=g||m,h=h||n.copy().range([n(0),n(0)]);{var z=r.selectAll("g.nv-wrap").data([b]);z.enter().append("g").attr("class","nvd3 nv-wrap")}z.attr("transform","translate("+i.left+","+i.top+")");var A=z.selectAll(".nv-boxplot").data(function(a){return a}),B=A.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);A.attr("class","nv-boxplot").attr("transform",function(a,b){return"translate("+(m(o(a,b))+.05*m.rangeBand())+", 0)"}).classed("hover",function(a){return a.hover}),A.watchTransition(v,"nv-boxplot: boxplots").style("stroke-opacity",1).style("fill-opacity",.75).delay(function(a,c){return c*t/b.length}).attr("transform",function(a,b){return"translate("+(m(o(a,b))+.05*m.rangeBand())+", 0)"}),A.exit().remove(),B.each(function(a,b){var c=d3.select(this);["low","high"].forEach(function(d){a.values.hasOwnProperty("whisker_"+d)&&null!==a.values["whisker_"+d]&&(c.append("line").style("stroke",a.color?a.color:q(a,b)).attr("class","nv-boxplot-whisker nv-boxplot-"+d),c.append("line").style("stroke",a.color?a.color:q(a,b)).attr("class","nv-boxplot-tick nv-boxplot-"+d))})});var C=A.selectAll(".nv-boxplot-outlier").data(function(a){return a.values.hasOwnProperty("outliers")&&null!==a.values.outliers?a.values.outliers:[]});C.enter().append("circle").style("fill",function(a,b,c){return q(a,c)}).style("stroke",function(a,b,c){return q(a,c)}).on("mouseover",function(a,b,c){d3.select(this).classed("hover",!0),s.elementMouseover({series:{key:a,color:q(a,c)},e:d3.event})}).on("mouseout",function(a,b,c){d3.select(this).classed("hover",!1),s.elementMouseout({series:{key:a,color:q(a,c)},e:d3.event})}).on("mousemove",function(){s.elementMousemove({e:d3.event})}),C.attr("class","nv-boxplot-outlier"),C.watchTransition(v,"nv-boxplot: nv-boxplot-outlier").attr("cx",.45*m.rangeBand()).attr("cy",function(a){return n(a)}).attr("r","3"),C.exit().remove();var D=function(){return null===u?.9*m.rangeBand():Math.min(75,.9*m.rangeBand())},E=function(){return.45*m.rangeBand()-D()/2},F=function(){return.45*m.rangeBand()+D()/2};["low","high"].forEach(function(a){var b="low"===a?"Q1":"Q3";A.select("line.nv-boxplot-whisker.nv-boxplot-"+a).watchTransition(v,"nv-boxplot: boxplots").attr("x1",.45*m.rangeBand()).attr("y1",function(b){return n(b.values["whisker_"+a])}).attr("x2",.45*m.rangeBand()).attr("y2",function(a){return n(a.values[b])}),A.select("line.nv-boxplot-tick.nv-boxplot-"+a).watchTransition(v,"nv-boxplot: boxplots").attr("x1",E).attr("y1",function(b){return n(b.values["whisker_"+a])}).attr("x2",F).attr("y2",function(b){return n(b.values["whisker_"+a])})}),["low","high"].forEach(function(a){B.selectAll(".nv-boxplot-"+a).on("mouseover",function(b,c,d){d3.select(this).classed("hover",!0),s.elementMouseover({series:{key:b.values["whisker_"+a],color:q(b,d)},e:d3.event})}).on("mouseout",function(b,c,d){d3.select(this).classed("hover",!1),s.elementMouseout({series:{key:b.values["whisker_"+a],color:q(b,d)},e:d3.event})}).on("mousemove",function(){s.elementMousemove({e:d3.event})})}),B.append("rect").attr("class","nv-boxplot-box").on("mouseover",function(a,b){d3.select(this).classed("hover",!0),s.elementMouseover({key:a.label,value:a.label,series:[{key:"Q3",value:a.values.Q3,color:a.color||q(a,b)},{key:"Q2",value:a.values.Q2,color:a.color||q(a,b)},{key:"Q1",value:a.values.Q1,color:a.color||q(a,b)}],data:a,index:b,e:d3.event})}).on("mouseout",function(a,b){d3.select(this).classed("hover",!1),s.elementMouseout({key:a.label,value:a.label,series:[{key:"Q3",value:a.values.Q3,color:a.color||q(a,b)},{key:"Q2",value:a.values.Q2,color:a.color||q(a,b)},{key:"Q1",value:a.values.Q1,color:a.color||q(a,b)}],data:a,index:b,e:d3.event})}).on("mousemove",function(){s.elementMousemove({e:d3.event})}),A.select("rect.nv-boxplot-box").watchTransition(v,"nv-boxplot: boxes").attr("y",function(a){return n(a.values.Q3)}).attr("width",D).attr("x",E).attr("height",function(a){return Math.abs(n(a.values.Q3)-n(a.values.Q1))||1}).style("fill",function(a,b){return a.color||q(a,b)}).style("stroke",function(a,b){return a.color||q(a,b)}),B.append("line").attr("class","nv-boxplot-median"),A.select("line.nv-boxplot-median").watchTransition(v,"nv-boxplot: boxplots line").attr("x1",E).attr("y1",function(a){return n(a.values.Q2)}).attr("x2",F).attr("y2",function(a){return n(a.values.Q2)}),g=m.copy(),h=n.copy()}),v.renderEnd("nv-boxplot immediate"),b}var c,d,e,f,g,h,i={top:0,right:0,bottom:0,left:0},j=960,k=500,l=Math.floor(1e4*Math.random()),m=d3.scale.ordinal(),n=d3.scale.linear(),o=function(a){return a.x},p=function(a){return a.y},q=a.utils.defaultColor(),r=null,s=d3.dispatch("elementMouseover","elementMouseout","elementMousemove","renderEnd"),t=250,u=null,v=a.utils.renderWatch(s,t);return b.dispatch=s,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return j},set:function(a){j=a}},height:{get:function(){return k},set:function(a){k=a}},maxBoxWidth:{get:function(){return u},set:function(a){u=a}},x:{get:function(){return o},set:function(a){o=a}},y:{get:function(){return p},set:function(a){p=a}},xScale:{get:function(){return m},set:function(a){m=a}},yScale:{get:function(){return n},set:function(a){n=a}},xDomain:{get:function(){return c},set:function(a){c=a}},yDomain:{get:function(){return d},set:function(a){d=a}},xRange:{get:function(){return e},set:function(a){e=a}},yRange:{get:function(){return f},set:function(a){f=a}},id:{get:function(){return l},set:function(a){l=a}},margin:{get:function(){return i},set:function(a){i.top=void 0!==a.top?a.top:i.top,i.right=void 0!==a.right?a.right:i.right,i.bottom=void 0!==a.bottom?a.bottom:i.bottom,i.left=void 0!==a.left?a.left:i.left}},color:{get:function(){return q},set:function(b){q=a.utils.getColor(b)}},duration:{get:function(){return t},set:function(a){t=a,v.reset(t)}}}),a.utils.initOptions(b),b},a.models.boxPlotChart=function(){"use strict";function b(k){return t.reset(),t.models(e),l&&t.models(f),m&&t.models(g),k.each(function(k){var p=d3.select(this);a.utils.initSVG(p);var t=(i||parseInt(p.style("width"))||960)-h.left-h.right,u=(j||parseInt(p.style("height"))||400)-h.top-h.bottom;if(b.update=function(){r.beforeUpdate(),p.transition().duration(s).call(b)},b.container=this,!(k&&k.length&&k.filter(function(a){return a.values.hasOwnProperty("Q1")&&a.values.hasOwnProperty("Q2")&&a.values.hasOwnProperty("Q3")}).length)){var v=p.selectAll(".nv-noData").data([q]);return v.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),v.attr("x",h.left+t/2).attr("y",h.top+u/2).text(function(a){return a}),b}p.selectAll(".nv-noData").remove(),c=e.xScale(),d=e.yScale().clamp(!0);var w=p.selectAll("g.nv-wrap.nv-boxPlotWithAxes").data([k]),x=w.enter().append("g").attr("class","nvd3 nv-wrap nv-boxPlotWithAxes").append("g"),y=x.append("defs"),z=w.select("g");
-x.append("g").attr("class","nv-x nv-axis"),x.append("g").attr("class","nv-y nv-axis").append("g").attr("class","nv-zeroLine").append("line"),x.append("g").attr("class","nv-barsWrap"),z.attr("transform","translate("+h.left+","+h.top+")"),n&&z.select(".nv-y.nv-axis").attr("transform","translate("+t+",0)"),e.width(t).height(u);var A=z.select(".nv-barsWrap").datum(k.filter(function(a){return!a.disabled}));if(A.transition().call(e),y.append("clipPath").attr("id","nv-x-label-clip-"+e.id()).append("rect"),z.select("#nv-x-label-clip-"+e.id()+" rect").attr("width",c.rangeBand()*(o?2:1)).attr("height",16).attr("x",-c.rangeBand()/(o?1:2)),l){f.scale(c).ticks(a.utils.calcTicksX(t/100,k)).tickSize(-u,0),z.select(".nv-x.nv-axis").attr("transform","translate(0,"+d.range()[0]+")"),z.select(".nv-x.nv-axis").call(f);var B=z.select(".nv-x.nv-axis").selectAll("g");o&&B.selectAll("text").attr("transform",function(a,b,c){return"translate(0,"+(c%2==0?"5":"17")+")"})}m&&(g.scale(d).ticks(Math.floor(u/36)).tickSize(-t,0),z.select(".nv-y.nv-axis").call(g)),z.select(".nv-zeroLine line").attr("x1",0).attr("x2",t).attr("y1",d(0)).attr("y2",d(0))}),t.renderEnd("nv-boxplot chart immediate"),b}var c,d,e=a.models.boxPlot(),f=a.models.axis(),g=a.models.axis(),h={top:15,right:10,bottom:50,left:60},i=null,j=null,k=a.utils.getColor(),l=!0,m=!0,n=!1,o=!1,p=a.models.tooltip(),q="No Data Available.",r=d3.dispatch("tooltipShow","tooltipHide","beforeUpdate","renderEnd"),s=250;f.orient("bottom").showMaxMin(!1).tickFormat(function(a){return a}),g.orient(n?"right":"left").tickFormat(d3.format(",.1f")),p.duration(0);var t=a.utils.renderWatch(r,s);return e.dispatch.on("elementMouseover.tooltip",function(a){p.data(a).hidden(!1)}),e.dispatch.on("elementMouseout.tooltip",function(a){p.data(a).hidden(!0)}),e.dispatch.on("elementMousemove.tooltip",function(){p.position({top:d3.event.pageY,left:d3.event.pageX})()}),b.dispatch=r,b.boxplot=e,b.xAxis=f,b.yAxis=g,b.tooltip=p,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return i},set:function(a){i=a}},height:{get:function(){return j},set:function(a){j=a}},staggerLabels:{get:function(){return o},set:function(a){o=a}},showXAxis:{get:function(){return l},set:function(a){l=a}},showYAxis:{get:function(){return m},set:function(a){m=a}},tooltips:{get:function(){return tooltips},set:function(a){tooltips=a}},tooltipContent:{get:function(){return p},set:function(a){p=a}},noData:{get:function(){return q},set:function(a){q=a}},margin:{get:function(){return h},set:function(a){h.top=void 0!==a.top?a.top:h.top,h.right=void 0!==a.right?a.right:h.right,h.bottom=void 0!==a.bottom?a.bottom:h.bottom,h.left=void 0!==a.left?a.left:h.left}},duration:{get:function(){return s},set:function(a){s=a,t.reset(s),e.duration(s),f.duration(s),g.duration(s)}},color:{get:function(){return k},set:function(b){k=a.utils.getColor(b),e.color(k)}},rightAlignYAxis:{get:function(){return n},set:function(a){n=a,g.orient(a?"right":"left")}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.bullet=function(){"use strict";function b(d){return d.each(function(b,d){var p=m-c.left-c.right,s=n-c.top-c.bottom;o=d3.select(this),a.utils.initSVG(o);{var t=f.call(this,b,d).slice().sort(d3.descending),u=g.call(this,b,d).slice().sort(d3.descending),v=h.call(this,b,d).slice().sort(d3.descending),w=i.call(this,b,d).slice(),x=j.call(this,b,d).slice(),y=k.call(this,b,d).slice(),z=d3.scale.linear().domain(d3.extent(d3.merge([l,t]))).range(e?[p,0]:[0,p]);this.__chart__||d3.scale.linear().domain([0,1/0]).range(z.range())}this.__chart__=z;var A=d3.min(t),B=d3.max(t),C=t[1],D=o.selectAll("g.nv-wrap.nv-bullet").data([b]),E=D.enter().append("g").attr("class","nvd3 nv-wrap nv-bullet"),F=E.append("g"),G=D.select("g");F.append("rect").attr("class","nv-range nv-rangeMax"),F.append("rect").attr("class","nv-range nv-rangeAvg"),F.append("rect").attr("class","nv-range nv-rangeMin"),F.append("rect").attr("class","nv-measure"),D.attr("transform","translate("+c.left+","+c.top+")");var H=function(a){return Math.abs(z(a)-z(0))},I=function(a){return z(0>a?a:0)};G.select("rect.nv-rangeMax").attr("height",s).attr("width",H(B>0?B:A)).attr("x",I(B>0?B:A)).datum(B>0?B:A),G.select("rect.nv-rangeAvg").attr("height",s).attr("width",H(C)).attr("x",I(C)).datum(C),G.select("rect.nv-rangeMin").attr("height",s).attr("width",H(B)).attr("x",I(B)).attr("width",H(B>0?A:B)).attr("x",I(B>0?A:B)).datum(B>0?A:B),G.select("rect.nv-measure").style("fill",q).attr("height",s/3).attr("y",s/3).attr("width",0>v?z(0)-z(v[0]):z(v[0])-z(0)).attr("x",I(v)).on("mouseover",function(){r.elementMouseover({value:v[0],label:y[0]||"Current",color:d3.select(this).style("fill")})}).on("mousemove",function(){r.elementMousemove({value:v[0],label:y[0]||"Current",color:d3.select(this).style("fill")})}).on("mouseout",function(){r.elementMouseout({value:v[0],label:y[0]||"Current",color:d3.select(this).style("fill")})});var J=s/6,K=u.map(function(a,b){return{value:a,label:x[b]}});F.selectAll("path.nv-markerTriangle").data(K).enter().append("path").attr("class","nv-markerTriangle").attr("transform",function(a){return"translate("+z(a.value)+","+s/2+")"}).attr("d","M0,"+J+"L"+J+","+-J+" "+-J+","+-J+"Z").on("mouseover",function(a){r.elementMouseover({value:a.value,label:a.label||"Previous",color:d3.select(this).style("fill"),pos:[z(a.value),s/2]})}).on("mousemove",function(a){r.elementMousemove({value:a.value,label:a.label||"Previous",color:d3.select(this).style("fill")})}).on("mouseout",function(a){r.elementMouseout({value:a.value,label:a.label||"Previous",color:d3.select(this).style("fill")})}),D.selectAll(".nv-range").on("mouseover",function(a,b){var c=w[b]||(b?1==b?"Mean":"Minimum":"Maximum");r.elementMouseover({value:a,label:c,color:d3.select(this).style("fill")})}).on("mousemove",function(){r.elementMousemove({value:v[0],label:y[0]||"Previous",color:d3.select(this).style("fill")})}).on("mouseout",function(a,b){var c=w[b]||(b?1==b?"Mean":"Minimum":"Maximum");r.elementMouseout({value:a,label:c,color:d3.select(this).style("fill")})})}),b}var c={top:0,right:0,bottom:0,left:0},d="left",e=!1,f=function(a){return a.ranges},g=function(a){return a.markers?a.markers:[0]},h=function(a){return a.measures},i=function(a){return a.rangeLabels?a.rangeLabels:[]},j=function(a){return a.markerLabels?a.markerLabels:[]},k=function(a){return a.measureLabels?a.measureLabels:[]},l=[0],m=380,n=30,o=null,p=null,q=a.utils.getColor(["#1f77b4"]),r=d3.dispatch("elementMouseover","elementMouseout","elementMousemove");return b.dispatch=r,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{ranges:{get:function(){return f},set:function(a){f=a}},markers:{get:function(){return g},set:function(a){g=a}},measures:{get:function(){return h},set:function(a){h=a}},forceX:{get:function(){return l},set:function(a){l=a}},width:{get:function(){return m},set:function(a){m=a}},height:{get:function(){return n},set:function(a){n=a}},tickFormat:{get:function(){return p},set:function(a){p=a}},margin:{get:function(){return c},set:function(a){c.top=void 0!==a.top?a.top:c.top,c.right=void 0!==a.right?a.right:c.right,c.bottom=void 0!==a.bottom?a.bottom:c.bottom,c.left=void 0!==a.left?a.left:c.left}},orient:{get:function(){return d},set:function(a){d=a,e="right"==d||"bottom"==d}},color:{get:function(){return q},set:function(b){q=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.bulletChart=function(){"use strict";function b(d){return d.each(function(e,o){var p=d3.select(this);a.utils.initSVG(p);var q=a.utils.availableWidth(k,p,g),r=l-g.top-g.bottom;if(b.update=function(){b(d)},b.container=this,!e||!h.call(this,e,o))return a.utils.noData(b,p),b;p.selectAll(".nv-noData").remove();var s=h.call(this,e,o).slice().sort(d3.descending),t=i.call(this,e,o).slice().sort(d3.descending),u=j.call(this,e,o).slice().sort(d3.descending),v=p.selectAll("g.nv-wrap.nv-bulletChart").data([e]),w=v.enter().append("g").attr("class","nvd3 nv-wrap nv-bulletChart"),x=w.append("g"),y=v.select("g");x.append("g").attr("class","nv-bulletWrap"),x.append("g").attr("class","nv-titles"),v.attr("transform","translate("+g.left+","+g.top+")");var z=d3.scale.linear().domain([0,Math.max(s[0],t[0],u[0])]).range(f?[q,0]:[0,q]),A=this.__chart__||d3.scale.linear().domain([0,1/0]).range(z.range());this.__chart__=z;var B=x.select(".nv-titles").append("g").attr("text-anchor","end").attr("transform","translate(-6,"+(l-g.top-g.bottom)/2+")");B.append("text").attr("class","nv-title").text(function(a){return a.title}),B.append("text").attr("class","nv-subtitle").attr("dy","1em").text(function(a){return a.subtitle}),c.width(q).height(r);var C=y.select(".nv-bulletWrap");d3.transition(C).call(c);var D=m||z.tickFormat(q/100),E=y.selectAll("g.nv-tick").data(z.ticks(n?n:q/50),function(a){return this.textContent||D(a)}),F=E.enter().append("g").attr("class","nv-tick").attr("transform",function(a){return"translate("+A(a)+",0)"}).style("opacity",1e-6);F.append("line").attr("y1",r).attr("y2",7*r/6),F.append("text").attr("text-anchor","middle").attr("dy","1em").attr("y",7*r/6).text(D);var G=d3.transition(E).attr("transform",function(a){return"translate("+z(a)+",0)"}).style("opacity",1);G.select("line").attr("y1",r).attr("y2",7*r/6),G.select("text").attr("y",7*r/6),d3.transition(E.exit()).attr("transform",function(a){return"translate("+z(a)+",0)"}).style("opacity",1e-6).remove()}),d3.timer.flush(),b}var c=a.models.bullet(),d=a.models.tooltip(),e="left",f=!1,g={top:5,right:40,bottom:20,left:120},h=function(a){return a.ranges},i=function(a){return a.markers?a.markers:[0]},j=function(a){return a.measures},k=null,l=55,m=null,n=null,o=null,p=d3.dispatch("tooltipShow","tooltipHide");return d.duration(0).headerEnabled(!1),c.dispatch.on("elementMouseover.tooltip",function(a){a.series={key:a.label,value:a.value,color:a.color},d.data(a).hidden(!1)}),c.dispatch.on("elementMouseout.tooltip",function(){d.hidden(!0)}),c.dispatch.on("elementMousemove.tooltip",function(){d.position({top:d3.event.pageY,left:d3.event.pageX})()}),b.bullet=c,b.dispatch=p,b.tooltip=d,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{ranges:{get:function(){return h},set:function(a){h=a}},markers:{get:function(){return i},set:function(a){i=a}},measures:{get:function(){return j},set:function(a){j=a}},width:{get:function(){return k},set:function(a){k=a}},height:{get:function(){return l},set:function(a){l=a}},tickFormat:{get:function(){return m},set:function(a){m=a}},ticks:{get:function(){return n},set:function(a){n=a}},noData:{get:function(){return o},set:function(a){o=a}},tooltips:{get:function(){return d.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),d.enabled(!!b)}},tooltipContent:{get:function(){return d.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),d.contentGenerator(b)}},margin:{get:function(){return g},set:function(a){g.top=void 0!==a.top?a.top:g.top,g.right=void 0!==a.right?a.right:g.right,g.bottom=void 0!==a.bottom?a.bottom:g.bottom,g.left=void 0!==a.left?a.left:g.left}},orient:{get:function(){return e},set:function(a){e=a,f="right"==e||"bottom"==e}}}),a.utils.inheritOptions(b,c),a.utils.initOptions(b),b},a.models.candlestickBar=function(){"use strict";function b(x){return x.each(function(b){c=d3.select(this);var x=a.utils.availableWidth(i,c,h),y=a.utils.availableHeight(j,c,h);a.utils.initSVG(c);var A=x/b[0].values.length*.45;l.domain(d||d3.extent(b[0].values.map(n).concat(t))),l.range(v?f||[.5*x/b[0].values.length,x*(b[0].values.length-.5)/b[0].values.length]:f||[5+A/2,x-A/2-5]),m.domain(e||[d3.min(b[0].values.map(s).concat(u)),d3.max(b[0].values.map(r).concat(u))]).range(g||[y,0]),l.domain()[0]===l.domain()[1]&&l.domain(l.domain()[0]?[l.domain()[0]-.01*l.domain()[0],l.domain()[1]+.01*l.domain()[1]]:[-1,1]),m.domain()[0]===m.domain()[1]&&m.domain(m.domain()[0]?[m.domain()[0]+.01*m.domain()[0],m.domain()[1]-.01*m.domain()[1]]:[-1,1]);var B=d3.select(this).selectAll("g.nv-wrap.nv-candlestickBar").data([b[0].values]),C=B.enter().append("g").attr("class","nvd3 nv-wrap nv-candlestickBar"),D=C.append("defs"),E=C.append("g"),F=B.select("g");E.append("g").attr("class","nv-ticks"),B.attr("transform","translate("+h.left+","+h.top+")"),c.on("click",function(a,b){z.chartClick({data:a,index:b,pos:d3.event,id:k})}),D.append("clipPath").attr("id","nv-chart-clip-path-"+k).append("rect"),B.select("#nv-chart-clip-path-"+k+" rect").attr("width",x).attr("height",y),F.attr("clip-path",w?"url(#nv-chart-clip-path-"+k+")":"");var G=B.select(".nv-ticks").selectAll(".nv-tick").data(function(a){return a});G.exit().remove();{var H=G.enter().append("g").attr("class",function(a,b,c){return(p(a,b)>q(a,b)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+c+"-"+b});H.append("line").attr("class","nv-candlestick-lines").attr("transform",function(a,b){return"translate("+l(n(a,b))+",0)"}).attr("x1",0).attr("y1",function(a,b){return m(r(a,b))}).attr("x2",0).attr("y2",function(a,b){return m(s(a,b))}),H.append("rect").attr("class","nv-candlestick-rects nv-bars").attr("transform",function(a,b){return"translate("+(l(n(a,b))-A/2)+","+(m(o(a,b))-(p(a,b)>q(a,b)?m(q(a,b))-m(p(a,b)):0))+")"}).attr("x",0).attr("y",0).attr("width",A).attr("height",function(a,b){var c=p(a,b),d=q(a,b);return c>d?m(d)-m(c):m(c)-m(d)})}c.selectAll(".nv-candlestick-lines").transition().attr("transform",function(a,b){return"translate("+l(n(a,b))+",0)"}).attr("x1",0).attr("y1",function(a,b){return m(r(a,b))}).attr("x2",0).attr("y2",function(a,b){return m(s(a,b))}),c.selectAll(".nv-candlestick-rects").transition().attr("transform",function(a,b){return"translate("+(l(n(a,b))-A/2)+","+(m(o(a,b))-(p(a,b)>q(a,b)?m(q(a,b))-m(p(a,b)):0))+")"}).attr("x",0).attr("y",0).attr("width",A).attr("height",function(a,b){var c=p(a,b),d=q(a,b);return c>d?m(d)-m(c):m(c)-m(d)})}),b}var c,d,e,f,g,h={top:0,right:0,bottom:0,left:0},i=null,j=null,k=Math.floor(1e4*Math.random()),l=d3.scale.linear(),m=d3.scale.linear(),n=function(a){return a.x},o=function(a){return a.y},p=function(a){return a.open},q=function(a){return a.close},r=function(a){return a.high},s=function(a){return a.low},t=[],u=[],v=!1,w=!0,x=a.utils.defaultColor(),y=!1,z=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState","renderEnd","chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove");return b.highlightPoint=function(a,d){b.clearHighlights(),c.select(".nv-candlestickBar .nv-tick-0-"+a).classed("hover",d)},b.clearHighlights=function(){c.select(".nv-candlestickBar .nv-tick.hover").classed("hover",!1)},b.dispatch=z,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return i},set:function(a){i=a}},height:{get:function(){return j},set:function(a){j=a}},xScale:{get:function(){return l},set:function(a){l=a}},yScale:{get:function(){return m},set:function(a){m=a}},xDomain:{get:function(){return d},set:function(a){d=a}},yDomain:{get:function(){return e},set:function(a){e=a}},xRange:{get:function(){return f},set:function(a){f=a}},yRange:{get:function(){return g},set:function(a){g=a}},forceX:{get:function(){return t},set:function(a){t=a}},forceY:{get:function(){return u},set:function(a){u=a}},padData:{get:function(){return v},set:function(a){v=a}},clipEdge:{get:function(){return w},set:function(a){w=a}},id:{get:function(){return k},set:function(a){k=a}},interactive:{get:function(){return y},set:function(a){y=a}},x:{get:function(){return n},set:function(a){n=a}},y:{get:function(){return o},set:function(a){o=a}},open:{get:function(){return p()},set:function(a){p=a}},close:{get:function(){return q()},set:function(a){q=a}},high:{get:function(){return r},set:function(a){r=a}},low:{get:function(){return s},set:function(a){s=a}},margin:{get:function(){return h},set:function(a){h.top=void 0!=a.top?a.top:h.top,h.right=void 0!=a.right?a.right:h.right,h.bottom=void 0!=a.bottom?a.bottom:h.bottom,h.left=void 0!=a.left?a.left:h.left}},color:{get:function(){return x},set:function(b){x=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.cumulativeLineChart=function(){"use strict";function b(l){return H.reset(),H.models(f),r&&H.models(g),s&&H.models(h),l.each(function(l){function A(){d3.select(b.container).style("cursor","ew-resize")}function E(){G.x=d3.event.x,G.i=Math.round(F.invert(G.x)),K()}function H(){d3.select(b.container).style("cursor","auto"),y.index=G.i,C.stateChange(y)}function K(){bb.data([G]);var a=b.duration();b.duration(0),b.update(),b.duration(a)}var L=d3.select(this);a.utils.initSVG(L),L.classed("nv-chart-"+x,!0);var M=this,N=a.utils.availableWidth(o,L,m),O=a.utils.availableHeight(p,L,m);if(b.update=function(){0===D?L.call(b):L.transition().duration(D).call(b)},b.container=this,y.setter(J(l),b.update).getter(I(l)).update(),y.disabled=l.map(function(a){return!!a.disabled}),!z){var P;z={};for(P in y)z[P]=y[P]instanceof Array?y[P].slice(0):y[P]}var Q=d3.behavior.drag().on("dragstart",A).on("drag",E).on("dragend",H);if(!(l&&l.length&&l.filter(function(a){return a.values.length}).length))return a.utils.noData(b,L),b;if(L.selectAll(".nv-noData").remove(),d=f.xScale(),e=f.yScale(),w)f.yDomain(null);else{var R=l.filter(function(a){return!a.disabled}).map(function(a){var b=d3.extent(a.values,f.y());return b[0]<-.95&&(b[0]=-.95),[(b[0]-b[1])/(1+b[1]),(b[1]-b[0])/(1+b[0])]}),S=[d3.min(R,function(a){return a[0]}),d3.max(R,function(a){return a[1]})];f.yDomain(S)}F.domain([0,l[0].values.length-1]).range([0,N]).clamp(!0);var l=c(G.i,l),T=v?"none":"all",U=L.selectAll("g.nv-wrap.nv-cumulativeLine").data([l]),V=U.enter().append("g").attr("class","nvd3 nv-wrap nv-cumulativeLine").append("g"),W=U.select("g");if(V.append("g").attr("class","nv-interactive"),V.append("g").attr("class","nv-x nv-axis").style("pointer-events","none"),V.append("g").attr("class","nv-y nv-axis"),V.append("g").attr("class","nv-background"),V.append("g").attr("class","nv-linesWrap").style("pointer-events",T),V.append("g").attr("class","nv-avgLinesWrap").style("pointer-events","none"),V.append("g").attr("class","nv-legendWrap"),V.append("g").attr("class","nv-controlsWrap"),q&&(i.width(N),W.select(".nv-legendWrap").datum(l).call(i),m.top!=i.height()&&(m.top=i.height(),O=a.utils.availableHeight(p,L,m)),W.select(".nv-legendWrap").attr("transform","translate(0,"+-m.top+")")),u){var X=[{key:"Re-scale y-axis",disabled:!w}];j.width(140).color(["#444","#444","#444"]).rightAlign(!1).margin({top:5,right:0,bottom:5,left:20}),W.select(".nv-controlsWrap").datum(X).attr("transform","translate(0,"+-m.top+")").call(j)}U.attr("transform","translate("+m.left+","+m.top+")"),t&&W.select(".nv-y.nv-axis").attr("transform","translate("+N+",0)");var Y=l.filter(function(a){return a.tempDisabled});U.select(".tempDisabled").remove(),Y.length&&U.append("text").attr("class","tempDisabled").attr("x",N/2).attr("y","-.71em").style("text-anchor","end").text(Y.map(function(a){return a.key}).join(", ")+" values cannot be calculated for this time period."),v&&(k.width(N).height(O).margin({left:m.left,top:m.top}).svgContainer(L).xScale(d),U.select(".nv-interactive").call(k)),V.select(".nv-background").append("rect"),W.select(".nv-background rect").attr("width",N).attr("height",O),f.y(function(a){return a.display.y}).width(N).height(O).color(l.map(function(a,b){return a.color||n(a,b)}).filter(function(a,b){return!l[b].disabled&&!l[b].tempDisabled}));var Z=W.select(".nv-linesWrap").datum(l.filter(function(a){return!a.disabled&&!a.tempDisabled}));Z.call(f),l.forEach(function(a,b){a.seriesIndex=b});var $=l.filter(function(a){return!a.disabled&&!!B(a)}),_=W.select(".nv-avgLinesWrap").selectAll("line").data($,function(a){return a.key}),ab=function(a){var b=e(B(a));return 0>b?0:b>O?O:b};_.enter().append("line").style("stroke-width",2).style("stroke-dasharray","10,10").style("stroke",function(a){return f.color()(a,a.seriesIndex)}).attr("x1",0).attr("x2",N).attr("y1",ab).attr("y2",ab),_.style("stroke-opacity",function(a){var b=e(B(a));return 0>b||b>O?0:1}).attr("x1",0).attr("x2",N).attr("y1",ab).attr("y2",ab),_.exit().remove();var bb=Z.selectAll(".nv-indexLine").data([G]);bb.enter().append("rect").attr("class","nv-indexLine").attr("width",3).attr("x",-2).attr("fill","red").attr("fill-opacity",.5).style("pointer-events","all").call(Q),bb.attr("transform",function(a){return"translate("+F(a.i)+",0)"}).attr("height",O),r&&(g.scale(d)._ticks(a.utils.calcTicksX(N/70,l)).tickSize(-O,0),W.select(".nv-x.nv-axis").attr("transform","translate(0,"+e.range()[0]+")"),W.select(".nv-x.nv-axis").call(g)),s&&(h.scale(e)._ticks(a.utils.calcTicksY(O/36,l)).tickSize(-N,0),W.select(".nv-y.nv-axis").call(h)),W.select(".nv-background rect").on("click",function(){G.x=d3.mouse(this)[0],G.i=Math.round(F.invert(G.x)),y.index=G.i,C.stateChange(y),K()}),f.dispatch.on("elementClick",function(a){G.i=a.pointIndex,G.x=F(G.i),y.index=G.i,C.stateChange(y),K()}),j.dispatch.on("legendClick",function(a){a.disabled=!a.disabled,w=!a.disabled,y.rescaleY=w,C.stateChange(y),b.update()}),i.dispatch.on("stateChange",function(a){for(var c in a)y[c]=a[c];C.stateChange(y),b.update()}),k.dispatch.on("elementMousemove",function(c){f.clearHighlights();var d,e,i,j=[];if(l.filter(function(a,b){return a.seriesIndex=b,!a.disabled}).forEach(function(g,h){e=a.interactiveBisect(g.values,c.pointXValue,b.x()),f.highlightPoint(h,e,!0);var k=g.values[e];"undefined"!=typeof k&&("undefined"==typeof d&&(d=k),"undefined"==typeof i&&(i=b.xScale()(b.x()(k,e))),j.push({key:g.key,value:b.y()(k,e),color:n(g,g.seriesIndex)}))}),j.length>2){var o=b.yScale().invert(c.mouseY),p=Math.abs(b.yScale().domain()[0]-b.yScale().domain()[1]),q=.03*p,r=a.nearestValueIndex(j.map(function(a){return a.value}),o,q);null!==r&&(j[r].highlight=!0)}var s=g.tickFormat()(b.x()(d,e),e);k.tooltip.position({left:i+m.left,top:c.mouseY+m.top}).chartContainer(M.parentNode).valueFormatter(function(a){return h.tickFormat()(a)}).data({value:s,series:j})(),k.renderGuideLine(i)}),k.dispatch.on("elementMouseout",function(){f.clearHighlights()}),C.on("changeState",function(a){"undefined"!=typeof a.disabled&&(l.forEach(function(b,c){b.disabled=a.disabled[c]}),y.disabled=a.disabled),"undefined"!=typeof a.index&&(G.i=a.index,G.x=F(G.i),y.index=a.index,bb.data([G])),"undefined"!=typeof a.rescaleY&&(w=a.rescaleY),b.update()})}),H.renderEnd("cumulativeLineChart immediate"),b}function c(a,b){return K||(K=f.y()),b.map(function(b){if(!b.values)return b;var c=b.values[a];if(null==c)return b;var d=K(c,a);return-.95>d&&!E?(b.tempDisabled=!0,b):(b.tempDisabled=!1,b.values=b.values.map(function(a,b){return a.display={y:(K(a,b)-d)/(1+d)},a}),b)})}var d,e,f=a.models.line(),g=a.models.axis(),h=a.models.axis(),i=a.models.legend(),j=a.models.legend(),k=a.interactiveGuideline(),l=a.models.tooltip(),m={top:30,right:30,bottom:50,left:60},n=a.utils.defaultColor(),o=null,p=null,q=!0,r=!0,s=!0,t=!1,u=!0,v=!1,w=!0,x=f.id(),y=a.utils.state(),z=null,A=null,B=function(a){return a.average},C=d3.dispatch("stateChange","changeState","renderEnd"),D=250,E=!1;y.index=0,y.rescaleY=w,g.orient("bottom").tickPadding(7),h.orient(t?"right":"left"),l.valueFormatter(function(a,b){return h.tickFormat()(a,b)}).headerFormatter(function(a,b){return g.tickFormat()(a,b)}),j.updateState(!1);var F=d3.scale.linear(),G={i:0,x:0},H=a.utils.renderWatch(C,D),I=function(a){return function(){return{active:a.map(function(a){return!a.disabled}),index:G.i,rescaleY:w}}},J=function(a){return function(b){void 0!==b.index&&(G.i=b.index),void 0!==b.rescaleY&&(w=b.rescaleY),void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};f.dispatch.on("elementMouseover.tooltip",function(a){var c={x:b.x()(a.point),y:b.y()(a.point),color:a.point.color};a.point=c,l.data(a).position(a.pos).hidden(!1)}),f.dispatch.on("elementMouseout.tooltip",function(){l.hidden(!0)});var K=null;return b.dispatch=C,b.lines=f,b.legend=i,b.controls=j,b.xAxis=g,b.yAxis=h,b.interactiveLayer=k,b.state=y,b.tooltip=l,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return o},set:function(a){o=a}},height:{get:function(){return p},set:function(a){p=a}},rescaleY:{get:function(){return w},set:function(a){w=a}},showControls:{get:function(){return u},set:function(a){u=a}},showLegend:{get:function(){return q},set:function(a){q=a}},average:{get:function(){return B},set:function(a){B=a}},defaultState:{get:function(){return z},set:function(a){z=a}},noData:{get:function(){return A},set:function(a){A=a}},showXAxis:{get:function(){return r},set:function(a){r=a}},showYAxis:{get:function(){return s},set:function(a){s=a}},noErrorCheck:{get:function(){return E},set:function(a){E=a}},tooltips:{get:function(){return l.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),l.enabled(!!b)}},tooltipContent:{get:function(){return l.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),l.contentGenerator(b)}},margin:{get:function(){return m},set:function(a){m.top=void 0!==a.top?a.top:m.top,m.right=void 0!==a.right?a.right:m.right,m.bottom=void 0!==a.bottom?a.bottom:m.bottom,m.left=void 0!==a.left?a.left:m.left}},color:{get:function(){return n},set:function(b){n=a.utils.getColor(b),i.color(n)}},useInteractiveGuideline:{get:function(){return v},set:function(a){v=a,a===!0&&(b.interactive(!1),b.useVoronoi(!1))}},rightAlignYAxis:{get:function(){return t},set:function(a){t=a,h.orient(a?"right":"left")}},duration:{get:function(){return D},set:function(a){D=a,f.duration(D),g.duration(D),h.duration(D),H.reset(D)}}}),a.utils.inheritOptions(b,f),a.utils.initOptions(b),b},a.models.discreteBar=function(){"use strict";function b(m){return y.reset(),m.each(function(b){var m=k-j.left-j.right,x=l-j.top-j.bottom;c=d3.select(this),a.utils.initSVG(c),b.forEach(function(a,b){a.values.forEach(function(a){a.series=b})});var z=d&&e?[]:b.map(function(a){return a.values.map(function(a,b){return{x:p(a,b),y:q(a,b),y0:a.y0}})});n.domain(d||d3.merge(z).map(function(a){return a.x})).rangeBands(f||[0,m],.1),o.domain(e||d3.extent(d3.merge(z).map(function(a){return a.y}).concat(r))),o.range(t?g||[x-(o.domain()[0]<0?12:0),o.domain()[1]>0?12:0]:g||[x,0]),h=h||n,i=i||o.copy().range([o(0),o(0)]);{var A=c.selectAll("g.nv-wrap.nv-discretebar").data([b]),B=A.enter().append("g").attr("class","nvd3 nv-wrap nv-discretebar"),C=B.append("g");A.select("g")}C.append("g").attr("class","nv-groups"),A.attr("transform","translate("+j.left+","+j.top+")");var D=A.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a){return a.key});D.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),D.exit().watchTransition(y,"discreteBar: exit groups").style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),D.attr("class",function(a,b){return"nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}),D.watchTransition(y,"discreteBar: groups").style("stroke-opacity",1).style("fill-opacity",.75);var E=D.selectAll("g.nv-bar").data(function(a){return a.values});E.exit().remove();var F=E.enter().append("g").attr("transform",function(a,b){return"translate("+(n(p(a,b))+.05*n.rangeBand())+", "+o(0)+")"}).on("mouseover",function(a,b){d3.select(this).classed("hover",!0),v.elementMouseover({data:a,index:b,color:d3.select(this).style("fill")})}).on("mouseout",function(a,b){d3.select(this).classed("hover",!1),v.elementMouseout({data:a,index:b,color:d3.select(this).style("fill")})}).on("mousemove",function(a,b){v.elementMousemove({data:a,index:b,color:d3.select(this).style("fill")})}).on("click",function(a,b){v.elementClick({data:a,index:b,color:d3.select(this).style("fill")}),d3.event.stopPropagation()}).on("dblclick",function(a,b){v.elementDblClick({data:a,index:b,color:d3.select(this).style("fill")}),d3.event.stopPropagation()});F.append("rect").attr("height",0).attr("width",.9*n.rangeBand()/b.length),t?(F.append("text").attr("text-anchor","middle"),E.select("text").text(function(a,b){return u(q(a,b))}).watchTransition(y,"discreteBar: bars text").attr("x",.9*n.rangeBand()/2).attr("y",function(a,b){return q(a,b)<0?o(q(a,b))-o(0)+12:-4})):E.selectAll("text").remove(),E.attr("class",function(a,b){return q(a,b)<0?"nv-bar negative":"nv-bar positive"}).style("fill",function(a,b){return a.color||s(a,b)}).style("stroke",function(a,b){return a.color||s(a,b)}).select("rect").attr("class",w).watchTransition(y,"discreteBar: bars rect").attr("width",.9*n.rangeBand()/b.length),E.watchTransition(y,"discreteBar: bars").attr("transform",function(a,b){var c=n(p(a,b))+.05*n.rangeBand(),d=q(a,b)<0?o(0):o(0)-o(q(a,b))<1?o(0)-1:o(q(a,b));return"translate("+c+", "+d+")"}).select("rect").attr("height",function(a,b){return Math.max(Math.abs(o(q(a,b))-o(e&&e[0]||0))||1)}),h=n.copy(),i=o.copy()}),y.renderEnd("discreteBar immediate"),b}var c,d,e,f,g,h,i,j={top:0,right:0,bottom:0,left:0},k=960,l=500,m=Math.floor(1e4*Math.random()),n=d3.scale.ordinal(),o=d3.scale.linear(),p=function(a){return a.x},q=function(a){return a.y},r=[0],s=a.utils.defaultColor(),t=!1,u=d3.format(",.2f"),v=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),w="discreteBar",x=250,y=a.utils.renderWatch(v,x);return b.dispatch=v,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return k},set:function(a){k=a}},height:{get:function(){return l},set:function(a){l=a}},forceY:{get:function(){return r},set:function(a){r=a}},showValues:{get:function(){return t},set:function(a){t=a}},x:{get:function(){return p},set:function(a){p=a}},y:{get:function(){return q},set:function(a){q=a}},xScale:{get:function(){return n},set:function(a){n=a}},yScale:{get:function(){return o},set:function(a){o=a}},xDomain:{get:function(){return d},set:function(a){d=a}},yDomain:{get:function(){return e},set:function(a){e=a}},xRange:{get:function(){return f},set:function(a){f=a}},yRange:{get:function(){return g},set:function(a){g=a}},valueFormat:{get:function(){return u},set:function(a){u=a}},id:{get:function(){return m},set:function(a){m=a}},rectClass:{get:function(){return w},set:function(a){w=a}},margin:{get:function(){return j},set:function(a){j.top=void 0!==a.top?a.top:j.top,j.right=void 0!==a.right?a.right:j.right,j.bottom=void 0!==a.bottom?a.bottom:j.bottom,j.left=void 0!==a.left?a.left:j.left}},color:{get:function(){return s},set:function(b){s=a.utils.getColor(b)}},duration:{get:function(){return x},set:function(a){x=a,y.reset(x)}}}),a.utils.initOptions(b),b},a.models.discreteBarChart=function(){"use strict";function b(h){return t.reset(),t.models(e),m&&t.models(f),n&&t.models(g),h.each(function(h){var l=d3.select(this);a.utils.initSVG(l);var q=a.utils.availableWidth(j,l,i),t=a.utils.availableHeight(k,l,i);if(b.update=function(){r.beforeUpdate(),l.transition().duration(s).call(b)},b.container=this,!(h&&h.length&&h.filter(function(a){return a.values.length}).length))return a.utils.noData(b,l),b;l.selectAll(".nv-noData").remove(),c=e.xScale(),d=e.yScale().clamp(!0);var u=l.selectAll("g.nv-wrap.nv-discreteBarWithAxes").data([h]),v=u.enter().append("g").attr("class","nvd3 nv-wrap nv-discreteBarWithAxes").append("g"),w=v.append("defs"),x=u.select("g");v.append("g").attr("class","nv-x nv-axis"),v.append("g").attr("class","nv-y nv-axis").append("g").attr("class","nv-zeroLine").append("line"),v.append("g").attr("class","nv-barsWrap"),x.attr("transform","translate("+i.left+","+i.top+")"),o&&x.select(".nv-y.nv-axis").attr("transform","translate("+q+",0)"),e.width(q).height(t);var y=x.select(".nv-barsWrap").datum(h.filter(function(a){return!a.disabled}));if(y.transition().call(e),w.append("clipPath").attr("id","nv-x-label-clip-"+e.id()).append("rect"),x.select("#nv-x-label-clip-"+e.id()+" rect").attr("width",c.rangeBand()*(p?2:1)).attr("height",16).attr("x",-c.rangeBand()/(p?1:2)),m){f.scale(c)._ticks(a.utils.calcTicksX(q/100,h)).tickSize(-t,0),x.select(".nv-x.nv-axis").attr("transform","translate(0,"+(d.range()[0]+(e.showValues()&&d.domain()[0]<0?16:0))+")"),x.select(".nv-x.nv-axis").call(f);
-var z=x.select(".nv-x.nv-axis").selectAll("g");p&&z.selectAll("text").attr("transform",function(a,b,c){return"translate(0,"+(c%2==0?"5":"17")+")"})}n&&(g.scale(d)._ticks(a.utils.calcTicksY(t/36,h)).tickSize(-q,0),x.select(".nv-y.nv-axis").call(g)),x.select(".nv-zeroLine line").attr("x1",0).attr("x2",q).attr("y1",d(0)).attr("y2",d(0))}),t.renderEnd("discreteBar chart immediate"),b}var c,d,e=a.models.discreteBar(),f=a.models.axis(),g=a.models.axis(),h=a.models.tooltip(),i={top:15,right:10,bottom:50,left:60},j=null,k=null,l=a.utils.getColor(),m=!0,n=!0,o=!1,p=!1,q=null,r=d3.dispatch("beforeUpdate","renderEnd"),s=250;f.orient("bottom").showMaxMin(!1).tickFormat(function(a){return a}),g.orient(o?"right":"left").tickFormat(d3.format(",.1f")),h.duration(0).headerEnabled(!1).valueFormatter(function(a,b){return g.tickFormat()(a,b)}).keyFormatter(function(a,b){return f.tickFormat()(a,b)});var t=a.utils.renderWatch(r,s);return e.dispatch.on("elementMouseover.tooltip",function(a){a.series={key:b.x()(a.data),value:b.y()(a.data),color:a.color},h.data(a).hidden(!1)}),e.dispatch.on("elementMouseout.tooltip",function(){h.hidden(!0)}),e.dispatch.on("elementMousemove.tooltip",function(){h.position({top:d3.event.pageY,left:d3.event.pageX})()}),b.dispatch=r,b.discretebar=e,b.xAxis=f,b.yAxis=g,b.tooltip=h,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return j},set:function(a){j=a}},height:{get:function(){return k},set:function(a){k=a}},staggerLabels:{get:function(){return p},set:function(a){p=a}},showXAxis:{get:function(){return m},set:function(a){m=a}},showYAxis:{get:function(){return n},set:function(a){n=a}},noData:{get:function(){return q},set:function(a){q=a}},tooltips:{get:function(){return h.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),h.enabled(!!b)}},tooltipContent:{get:function(){return h.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),h.contentGenerator(b)}},margin:{get:function(){return i},set:function(a){i.top=void 0!==a.top?a.top:i.top,i.right=void 0!==a.right?a.right:i.right,i.bottom=void 0!==a.bottom?a.bottom:i.bottom,i.left=void 0!==a.left?a.left:i.left}},duration:{get:function(){return s},set:function(a){s=a,t.reset(s),e.duration(s),f.duration(s),g.duration(s)}},color:{get:function(){return l},set:function(b){l=a.utils.getColor(b),e.color(l)}},rightAlignYAxis:{get:function(){return o},set:function(a){o=a,g.orient(a?"right":"left")}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.distribution=function(){"use strict";function b(k){return m.reset(),k.each(function(b){var k=(e-("x"===g?d.left+d.right:d.top+d.bottom),"x"==g?"y":"x"),l=d3.select(this);a.utils.initSVG(l),c=c||j;var n=l.selectAll("g.nv-distribution").data([b]),o=n.enter().append("g").attr("class","nvd3 nv-distribution"),p=(o.append("g"),n.select("g"));n.attr("transform","translate("+d.left+","+d.top+")");var q=p.selectAll("g.nv-dist").data(function(a){return a},function(a){return a.key});q.enter().append("g"),q.attr("class",function(a,b){return"nv-dist nv-series-"+b}).style("stroke",function(a,b){return i(a,b)});var r=q.selectAll("line.nv-dist"+g).data(function(a){return a.values});r.enter().append("line").attr(g+"1",function(a,b){return c(h(a,b))}).attr(g+"2",function(a,b){return c(h(a,b))}),m.transition(q.exit().selectAll("line.nv-dist"+g),"dist exit").attr(g+"1",function(a,b){return j(h(a,b))}).attr(g+"2",function(a,b){return j(h(a,b))}).style("stroke-opacity",0).remove(),r.attr("class",function(a,b){return"nv-dist"+g+" nv-dist"+g+"-"+b}).attr(k+"1",0).attr(k+"2",f),m.transition(r,"dist").attr(g+"1",function(a,b){return j(h(a,b))}).attr(g+"2",function(a,b){return j(h(a,b))}),c=j.copy()}),m.renderEnd("distribution immediate"),b}var c,d={top:0,right:0,bottom:0,left:0},e=400,f=8,g="x",h=function(a){return a[g]},i=a.utils.defaultColor(),j=d3.scale.linear(),k=250,l=d3.dispatch("renderEnd"),m=a.utils.renderWatch(l,k);return b.options=a.utils.optionsFunc.bind(b),b.dispatch=l,b.margin=function(a){return arguments.length?(d.top="undefined"!=typeof a.top?a.top:d.top,d.right="undefined"!=typeof a.right?a.right:d.right,d.bottom="undefined"!=typeof a.bottom?a.bottom:d.bottom,d.left="undefined"!=typeof a.left?a.left:d.left,b):d},b.width=function(a){return arguments.length?(e=a,b):e},b.axis=function(a){return arguments.length?(g=a,b):g},b.size=function(a){return arguments.length?(f=a,b):f},b.getData=function(a){return arguments.length?(h=d3.functor(a),b):h},b.scale=function(a){return arguments.length?(j=a,b):j},b.color=function(c){return arguments.length?(i=a.utils.getColor(c),b):i},b.duration=function(a){return arguments.length?(k=a,m.reset(k),b):k},b},a.models.furiousLegend=function(){"use strict";function b(p){function q(a,b){return"furious"!=o?"#000":m?a.disengaged?g(a,b):"#fff":m?void 0:a.disabled?g(a,b):"#fff"}function r(a,b){return m&&"furious"==o?a.disengaged?"#fff":g(a,b):a.disabled?"#fff":g(a,b)}return p.each(function(b){var p=d-c.left-c.right,s=d3.select(this);a.utils.initSVG(s);var t=s.selectAll("g.nv-legend").data([b]),u=(t.enter().append("g").attr("class","nvd3 nv-legend").append("g"),t.select("g"));t.attr("transform","translate("+c.left+","+c.top+")");var v,w=u.selectAll(".nv-series").data(function(a){return"furious"!=o?a:a.filter(function(a){return m?!0:!a.disengaged})}),x=w.enter().append("g").attr("class","nv-series");if("classic"==o)x.append("circle").style("stroke-width",2).attr("class","nv-legend-symbol").attr("r",5),v=w.select("circle");else if("furious"==o){x.append("rect").style("stroke-width",2).attr("class","nv-legend-symbol").attr("rx",3).attr("ry",3),v=w.select("rect"),x.append("g").attr("class","nv-check-box").property("innerHTML",' ').attr("transform","translate(-10,-8)scale(0.5)");var y=w.select(".nv-check-box");y.each(function(a,b){d3.select(this).selectAll("path").attr("stroke",q(a,b))})}x.append("text").attr("text-anchor","start").attr("class","nv-legend-text").attr("dy",".32em").attr("dx","8");var z=w.select("text.nv-legend-text");w.on("mouseover",function(a,b){n.legendMouseover(a,b)}).on("mouseout",function(a,b){n.legendMouseout(a,b)}).on("click",function(a,b){n.legendClick(a,b);var c=w.data();if(k){if("classic"==o)l?(c.forEach(function(a){a.disabled=!0}),a.disabled=!1):(a.disabled=!a.disabled,c.every(function(a){return a.disabled})&&c.forEach(function(a){a.disabled=!1}));else if("furious"==o)if(m)a.disengaged=!a.disengaged,a.userDisabled=void 0==a.userDisabled?!!a.disabled:a.userDisabled,a.disabled=a.disengaged||a.userDisabled;else if(!m){a.disabled=!a.disabled,a.userDisabled=a.disabled;var d=c.filter(function(a){return!a.disengaged});d.every(function(a){return a.userDisabled})&&c.forEach(function(a){a.disabled=a.userDisabled=!1})}n.stateChange({disabled:c.map(function(a){return!!a.disabled}),disengaged:c.map(function(a){return!!a.disengaged})})}}).on("dblclick",function(a,b){if(("furious"!=o||!m)&&(n.legendDblclick(a,b),k)){var c=w.data();c.forEach(function(a){a.disabled=!0,"furious"==o&&(a.userDisabled=a.disabled)}),a.disabled=!1,"furious"==o&&(a.userDisabled=a.disabled),n.stateChange({disabled:c.map(function(a){return!!a.disabled})})}}),w.classed("nv-disabled",function(a){return a.userDisabled}),w.exit().remove(),z.attr("fill",q).text(f);var A;switch(o){case"furious":A=23;break;case"classic":A=20}if(h){var B=[];w.each(function(){var b,c=d3.select(this).select("text");try{if(b=c.node().getComputedTextLength(),0>=b)throw Error()}catch(d){b=a.utils.calcApproxTextWidth(c)}B.push(b+i)});for(var C=0,D=0,E=[];p>D&&Cp&&C>1;){E=[],C--;for(var F=0;F(E[F%C]||0)&&(E[F%C]=B[F]);D=E.reduce(function(a,b){return a+b})}for(var G=[],H=0,I=0;C>H;H++)G[H]=I,I+=E[H];w.attr("transform",function(a,b){return"translate("+G[b%C]+","+(5+Math.floor(b/C)*A)+")"}),j?u.attr("transform","translate("+(d-c.right-D)+","+c.top+")"):u.attr("transform","translate(0,"+c.top+")"),e=c.top+c.bottom+Math.ceil(B.length/C)*A}else{var J,K=5,L=5,M=0;w.attr("transform",function(){var a=d3.select(this).select("text").node().getComputedTextLength()+i;return J=L,dM&&(M=L),"translate("+J+","+K+")"}),u.attr("transform","translate("+(d-c.right-M)+","+c.top+")"),e=c.top+c.bottom+K+15}"furious"==o&&v.attr("width",function(a,b){return z[0][b].getComputedTextLength()+27}).attr("height",18).attr("y",-9).attr("x",-15),v.style("fill",r).style("stroke",function(a,b){return a.color||g(a,b)})}),b}var c={top:5,right:0,bottom:5,left:0},d=400,e=20,f=function(a){return a.key},g=a.utils.getColor(),h=!0,i=28,j=!0,k=!0,l=!1,m=!1,n=d3.dispatch("legendClick","legendDblclick","legendMouseover","legendMouseout","stateChange"),o="classic";return b.dispatch=n,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return d},set:function(a){d=a}},height:{get:function(){return e},set:function(a){e=a}},key:{get:function(){return f},set:function(a){f=a}},align:{get:function(){return h},set:function(a){h=a}},rightAlign:{get:function(){return j},set:function(a){j=a}},padding:{get:function(){return i},set:function(a){i=a}},updateState:{get:function(){return k},set:function(a){k=a}},radioButtonMode:{get:function(){return l},set:function(a){l=a}},expanded:{get:function(){return m},set:function(a){m=a}},vers:{get:function(){return o},set:function(a){o=a}},margin:{get:function(){return c},set:function(a){c.top=void 0!==a.top?a.top:c.top,c.right=void 0!==a.right?a.right:c.right,c.bottom=void 0!==a.bottom?a.bottom:c.bottom,c.left=void 0!==a.left?a.left:c.left}},color:{get:function(){return g},set:function(b){g=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.historicalBar=function(){"use strict";function b(x){return x.each(function(b){w.reset(),k=d3.select(this);var x=a.utils.availableWidth(h,k,g),y=a.utils.availableHeight(i,k,g);a.utils.initSVG(k),l.domain(c||d3.extent(b[0].values.map(n).concat(p))),l.range(r?e||[.5*x/b[0].values.length,x*(b[0].values.length-.5)/b[0].values.length]:e||[0,x]),m.domain(d||d3.extent(b[0].values.map(o).concat(q))).range(f||[y,0]),l.domain()[0]===l.domain()[1]&&l.domain(l.domain()[0]?[l.domain()[0]-.01*l.domain()[0],l.domain()[1]+.01*l.domain()[1]]:[-1,1]),m.domain()[0]===m.domain()[1]&&m.domain(m.domain()[0]?[m.domain()[0]+.01*m.domain()[0],m.domain()[1]-.01*m.domain()[1]]:[-1,1]);var z=k.selectAll("g.nv-wrap.nv-historicalBar-"+j).data([b[0].values]),A=z.enter().append("g").attr("class","nvd3 nv-wrap nv-historicalBar-"+j),B=A.append("defs"),C=A.append("g"),D=z.select("g");C.append("g").attr("class","nv-bars"),z.attr("transform","translate("+g.left+","+g.top+")"),k.on("click",function(a,b){u.chartClick({data:a,index:b,pos:d3.event,id:j})}),B.append("clipPath").attr("id","nv-chart-clip-path-"+j).append("rect"),z.select("#nv-chart-clip-path-"+j+" rect").attr("width",x).attr("height",y),D.attr("clip-path",s?"url(#nv-chart-clip-path-"+j+")":"");var E=z.select(".nv-bars").selectAll(".nv-bar").data(function(a){return a},function(a,b){return n(a,b)});E.exit().remove(),E.enter().append("rect").attr("x",0).attr("y",function(b,c){return a.utils.NaNtoZero(m(Math.max(0,o(b,c))))}).attr("height",function(b,c){return a.utils.NaNtoZero(Math.abs(m(o(b,c))-m(0)))}).attr("transform",function(a,c){return"translate("+(l(n(a,c))-x/b[0].values.length*.45)+",0)"}).on("mouseover",function(a,b){v&&(d3.select(this).classed("hover",!0),u.elementMouseover({data:a,index:b,color:d3.select(this).style("fill")}))}).on("mouseout",function(a,b){v&&(d3.select(this).classed("hover",!1),u.elementMouseout({data:a,index:b,color:d3.select(this).style("fill")}))}).on("mousemove",function(a,b){v&&u.elementMousemove({data:a,index:b,color:d3.select(this).style("fill")})}).on("click",function(a,b){v&&(u.elementClick({data:a,index:b,color:d3.select(this).style("fill")}),d3.event.stopPropagation())}).on("dblclick",function(a,b){v&&(u.elementDblClick({data:a,index:b,color:d3.select(this).style("fill")}),d3.event.stopPropagation())}),E.attr("fill",function(a,b){return t(a,b)}).attr("class",function(a,b,c){return(o(a,b)<0?"nv-bar negative":"nv-bar positive")+" nv-bar-"+c+"-"+b}).watchTransition(w,"bars").attr("transform",function(a,c){return"translate("+(l(n(a,c))-x/b[0].values.length*.45)+",0)"}).attr("width",x/b[0].values.length*.9),E.watchTransition(w,"bars").attr("y",function(b,c){var d=o(b,c)<0?m(0):m(0)-m(o(b,c))<1?m(0)-1:m(o(b,c));return a.utils.NaNtoZero(d)}).attr("height",function(b,c){return a.utils.NaNtoZero(Math.max(Math.abs(m(o(b,c))-m(0)),1))})}),w.renderEnd("historicalBar immediate"),b}var c,d,e,f,g={top:0,right:0,bottom:0,left:0},h=null,i=null,j=Math.floor(1e4*Math.random()),k=null,l=d3.scale.linear(),m=d3.scale.linear(),n=function(a){return a.x},o=function(a){return a.y},p=[],q=[0],r=!1,s=!0,t=a.utils.defaultColor(),u=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),v=!0,w=a.utils.renderWatch(u,0);return b.highlightPoint=function(a,b){k.select(".nv-bars .nv-bar-0-"+a).classed("hover",b)},b.clearHighlights=function(){k.select(".nv-bars .nv-bar.hover").classed("hover",!1)},b.dispatch=u,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return h},set:function(a){h=a}},height:{get:function(){return i},set:function(a){i=a}},forceX:{get:function(){return p},set:function(a){p=a}},forceY:{get:function(){return q},set:function(a){q=a}},padData:{get:function(){return r},set:function(a){r=a}},x:{get:function(){return n},set:function(a){n=a}},y:{get:function(){return o},set:function(a){o=a}},xScale:{get:function(){return l},set:function(a){l=a}},yScale:{get:function(){return m},set:function(a){m=a}},xDomain:{get:function(){return c},set:function(a){c=a}},yDomain:{get:function(){return d},set:function(a){d=a}},xRange:{get:function(){return e},set:function(a){e=a}},yRange:{get:function(){return f},set:function(a){f=a}},clipEdge:{get:function(){return s},set:function(a){s=a}},id:{get:function(){return j},set:function(a){j=a}},interactive:{get:function(){return v},set:function(a){v=a}},margin:{get:function(){return g},set:function(a){g.top=void 0!==a.top?a.top:g.top,g.right=void 0!==a.right?a.right:g.right,g.bottom=void 0!==a.bottom?a.bottom:g.bottom,g.left=void 0!==a.left?a.left:g.left}},color:{get:function(){return t},set:function(b){t=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.historicalBarChart=function(b){"use strict";function c(b){return b.each(function(k){z.reset(),z.models(f),q&&z.models(g),r&&z.models(h);var w=d3.select(this),A=this;a.utils.initSVG(w);var B=a.utils.availableWidth(n,w,l),C=a.utils.availableHeight(o,w,l);if(c.update=function(){w.transition().duration(y).call(c)},c.container=this,u.disabled=k.map(function(a){return!!a.disabled}),!v){var D;v={};for(D in u)v[D]=u[D]instanceof Array?u[D].slice(0):u[D]}if(!(k&&k.length&&k.filter(function(a){return a.values.length}).length))return a.utils.noData(c,w),c;w.selectAll(".nv-noData").remove(),d=f.xScale(),e=f.yScale();var E=w.selectAll("g.nv-wrap.nv-historicalBarChart").data([k]),F=E.enter().append("g").attr("class","nvd3 nv-wrap nv-historicalBarChart").append("g"),G=E.select("g");F.append("g").attr("class","nv-x nv-axis"),F.append("g").attr("class","nv-y nv-axis"),F.append("g").attr("class","nv-barsWrap"),F.append("g").attr("class","nv-legendWrap"),F.append("g").attr("class","nv-interactive"),p&&(i.width(B),G.select(".nv-legendWrap").datum(k).call(i),l.top!=i.height()&&(l.top=i.height(),C=a.utils.availableHeight(o,w,l)),E.select(".nv-legendWrap").attr("transform","translate(0,"+-l.top+")")),E.attr("transform","translate("+l.left+","+l.top+")"),s&&G.select(".nv-y.nv-axis").attr("transform","translate("+B+",0)"),t&&(j.width(B).height(C).margin({left:l.left,top:l.top}).svgContainer(w).xScale(d),E.select(".nv-interactive").call(j)),f.width(B).height(C).color(k.map(function(a,b){return a.color||m(a,b)}).filter(function(a,b){return!k[b].disabled}));var H=G.select(".nv-barsWrap").datum(k.filter(function(a){return!a.disabled}));H.transition().call(f),q&&(g.scale(d)._ticks(a.utils.calcTicksX(B/100,k)).tickSize(-C,0),G.select(".nv-x.nv-axis").attr("transform","translate(0,"+e.range()[0]+")"),G.select(".nv-x.nv-axis").transition().call(g)),r&&(h.scale(e)._ticks(a.utils.calcTicksY(C/36,k)).tickSize(-B,0),G.select(".nv-y.nv-axis").transition().call(h)),j.dispatch.on("elementMousemove",function(b){f.clearHighlights();var d,e,i,n=[];k.filter(function(a,b){return a.seriesIndex=b,!a.disabled}).forEach(function(g){e=a.interactiveBisect(g.values,b.pointXValue,c.x()),f.highlightPoint(e,!0);var h=g.values[e];void 0!==h&&(void 0===d&&(d=h),void 0===i&&(i=c.xScale()(c.x()(h,e))),n.push({key:g.key,value:c.y()(h,e),color:m(g,g.seriesIndex),data:g.values[e]}))});var o=g.tickFormat()(c.x()(d,e));j.tooltip.position({left:i+l.left,top:b.mouseY+l.top}).chartContainer(A.parentNode).valueFormatter(function(a){return h.tickFormat()(a)}).data({value:o,index:e,series:n})(),j.renderGuideLine(i)}),j.dispatch.on("elementMouseout",function(){x.tooltipHide(),f.clearHighlights()}),i.dispatch.on("legendClick",function(a){a.disabled=!a.disabled,k.filter(function(a){return!a.disabled}).length||k.map(function(a){return a.disabled=!1,E.selectAll(".nv-series").classed("disabled",!1),a}),u.disabled=k.map(function(a){return!!a.disabled}),x.stateChange(u),b.transition().call(c)}),i.dispatch.on("legendDblclick",function(a){k.forEach(function(a){a.disabled=!0}),a.disabled=!1,u.disabled=k.map(function(a){return!!a.disabled}),x.stateChange(u),c.update()}),x.on("changeState",function(a){"undefined"!=typeof a.disabled&&(k.forEach(function(b,c){b.disabled=a.disabled[c]}),u.disabled=a.disabled),c.update()})}),z.renderEnd("historicalBarChart immediate"),c}var d,e,f=b||a.models.historicalBar(),g=a.models.axis(),h=a.models.axis(),i=a.models.legend(),j=a.interactiveGuideline(),k=a.models.tooltip(),l={top:30,right:90,bottom:50,left:90},m=a.utils.defaultColor(),n=null,o=null,p=!1,q=!0,r=!0,s=!1,t=!1,u={},v=null,w=null,x=d3.dispatch("tooltipHide","stateChange","changeState","renderEnd"),y=250;g.orient("bottom").tickPadding(7),h.orient(s?"right":"left"),k.duration(0).headerEnabled(!1).valueFormatter(function(a,b){return h.tickFormat()(a,b)}).headerFormatter(function(a,b){return g.tickFormat()(a,b)});var z=a.utils.renderWatch(x,0);return f.dispatch.on("elementMouseover.tooltip",function(a){a.series={key:c.x()(a.data),value:c.y()(a.data),color:a.color},k.data(a).hidden(!1)}),f.dispatch.on("elementMouseout.tooltip",function(){k.hidden(!0)}),f.dispatch.on("elementMousemove.tooltip",function(){k.position({top:d3.event.pageY,left:d3.event.pageX})()}),c.dispatch=x,c.bars=f,c.legend=i,c.xAxis=g,c.yAxis=h,c.interactiveLayer=j,c.tooltip=k,c.options=a.utils.optionsFunc.bind(c),c._options=Object.create({},{width:{get:function(){return n},set:function(a){n=a}},height:{get:function(){return o},set:function(a){o=a}},showLegend:{get:function(){return p},set:function(a){p=a}},showXAxis:{get:function(){return q},set:function(a){q=a}},showYAxis:{get:function(){return r},set:function(a){r=a}},defaultState:{get:function(){return v},set:function(a){v=a}},noData:{get:function(){return w},set:function(a){w=a}},tooltips:{get:function(){return k.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),k.enabled(!!b)}},tooltipContent:{get:function(){return k.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),k.contentGenerator(b)}},margin:{get:function(){return l},set:function(a){l.top=void 0!==a.top?a.top:l.top,l.right=void 0!==a.right?a.right:l.right,l.bottom=void 0!==a.bottom?a.bottom:l.bottom,l.left=void 0!==a.left?a.left:l.left}},color:{get:function(){return m},set:function(b){m=a.utils.getColor(b),i.color(m),f.color(m)}},duration:{get:function(){return y},set:function(a){y=a,z.reset(y),h.duration(y),g.duration(y)}},rightAlignYAxis:{get:function(){return s},set:function(a){s=a,h.orient(a?"right":"left")}},useInteractiveGuideline:{get:function(){return t},set:function(a){t=a,a===!0&&c.interactive(!1)}}}),a.utils.inheritOptions(c,f),a.utils.initOptions(c),c},a.models.ohlcBarChart=function(){var b=a.models.historicalBarChart(a.models.ohlcBar());return b.useInteractiveGuideline(!0),b.interactiveLayer.tooltip.contentGenerator(function(a){var c=a.series[0].data,d=c.open'+a.value+"open: "+b.yAxis.tickFormat()(c.open)+" close: "+b.yAxis.tickFormat()(c.close)+" high "+b.yAxis.tickFormat()(c.high)+" low: "+b.yAxis.tickFormat()(c.low)+"
"}),b},a.models.candlestickBarChart=function(){var b=a.models.historicalBarChart(a.models.candlestickBar());return b.useInteractiveGuideline(!0),b.interactiveLayer.tooltip.contentGenerator(function(a){var c=a.series[0].data,d=c.open'+a.value+"open: "+b.yAxis.tickFormat()(c.open)+" close: "+b.yAxis.tickFormat()(c.close)+" high "+b.yAxis.tickFormat()(c.high)+" low: "+b.yAxis.tickFormat()(c.low)+"
"}),b},a.models.legend=function(){"use strict";function b(p){function q(a,b){return"furious"!=o?"#000":m?a.disengaged?"#000":"#fff":m?void 0:(a.color||(a.color=g(a,b)),a.disabled?a.color:"#fff")}function r(a,b){return m&&"furious"==o&&a.disengaged?"#eee":a.color||g(a,b)}function s(a){return m&&"furious"==o?1:a.disabled?0:1}return p.each(function(b){var g=d-c.left-c.right,p=d3.select(this);a.utils.initSVG(p);var t=p.selectAll("g.nv-legend").data([b]),u=t.enter().append("g").attr("class","nvd3 nv-legend").append("g"),v=t.select("g");t.attr("transform","translate("+c.left+","+c.top+")");var w,x,y=v.selectAll(".nv-series").data(function(a){return"furious"!=o?a:a.filter(function(a){return m?!0:!a.disengaged})}),z=y.enter().append("g").attr("class","nv-series");switch(o){case"furious":x=23;break;case"classic":x=20}if("classic"==o)z.append("circle").style("stroke-width",2).attr("class","nv-legend-symbol").attr("r",5),w=y.select("circle");else if("furious"==o){z.append("rect").style("stroke-width",2).attr("class","nv-legend-symbol").attr("rx",3).attr("ry",3),w=y.select(".nv-legend-symbol"),z.append("g").attr("class","nv-check-box").property("innerHTML",' ').attr("transform","translate(-10,-8)scale(0.5)");var A=y.select(".nv-check-box");A.each(function(a,b){d3.select(this).selectAll("path").attr("stroke",q(a,b))})}z.append("text").attr("text-anchor","start").attr("class","nv-legend-text").attr("dy",".32em").attr("dx","8");var B=y.select("text.nv-legend-text");y.on("mouseover",function(a,b){n.legendMouseover(a,b)}).on("mouseout",function(a,b){n.legendMouseout(a,b)}).on("click",function(a,b){n.legendClick(a,b);var c=y.data();if(k){if("classic"==o)l?(c.forEach(function(a){a.disabled=!0}),a.disabled=!1):(a.disabled=!a.disabled,c.every(function(a){return a.disabled})&&c.forEach(function(a){a.disabled=!1}));else if("furious"==o)if(m)a.disengaged=!a.disengaged,a.userDisabled=void 0==a.userDisabled?!!a.disabled:a.userDisabled,a.disabled=a.disengaged||a.userDisabled;else if(!m){a.disabled=!a.disabled,a.userDisabled=a.disabled;var d=c.filter(function(a){return!a.disengaged});d.every(function(a){return a.userDisabled})&&c.forEach(function(a){a.disabled=a.userDisabled=!1})}n.stateChange({disabled:c.map(function(a){return!!a.disabled}),disengaged:c.map(function(a){return!!a.disengaged})})}}).on("dblclick",function(a,b){if(("furious"!=o||!m)&&(n.legendDblclick(a,b),k)){var c=y.data();c.forEach(function(a){a.disabled=!0,"furious"==o&&(a.userDisabled=a.disabled)}),a.disabled=!1,"furious"==o&&(a.userDisabled=a.disabled),n.stateChange({disabled:c.map(function(a){return!!a.disabled})})}}),y.classed("nv-disabled",function(a){return a.userDisabled}),y.exit().remove(),B.attr("fill",q).text(f);var C=0;if(h){var D=[];y.each(function(){var b,c=d3.select(this).select("text");try{if(b=c.node().getComputedTextLength(),0>=b)throw Error()}catch(d){b=a.utils.calcApproxTextWidth(c)}D.push(b+i)});var E=0,F=[];for(C=0;g>C&&Eg&&E>1;){F=[],E--;for(var G=0;G(F[G%E]||0)&&(F[G%E]=D[G]);C=F.reduce(function(a,b){return a+b})}for(var H=[],I=0,J=0;E>I;I++)H[I]=J,J+=F[I];y.attr("transform",function(a,b){return"translate("+H[b%E]+","+(5+Math.floor(b/E)*x)+")"}),j?v.attr("transform","translate("+(d-c.right-C)+","+c.top+")"):v.attr("transform","translate(0,"+c.top+")"),e=c.top+c.bottom+Math.ceil(D.length/E)*x}else{var K,L=5,M=5,N=0;y.attr("transform",function(){var a=d3.select(this).select("text").node().getComputedTextLength()+i;return K=M,dN&&(N=M),K+N>C&&(C=K+N),"translate("+K+","+L+")"}),v.attr("transform","translate("+(d-c.right-N)+","+c.top+")"),e=c.top+c.bottom+L+15}if("furious"==o){w.attr("width",function(a,b){return B[0][b].getComputedTextLength()+27}).attr("height",18).attr("y",-9).attr("x",-15),u.insert("rect",":first-child").attr("class","nv-legend-bg").attr("fill","#eee").attr("opacity",0);var O=v.select(".nv-legend-bg");O.transition().duration(300).attr("x",-x).attr("width",C+x-12).attr("height",e+10).attr("y",-c.top-10).attr("opacity",m?1:0)}w.style("fill",r).style("fill-opacity",s).style("stroke",r)}),b}var c={top:5,right:0,bottom:5,left:0},d=400,e=20,f=function(a){return a.key},g=a.utils.getColor(),h=!0,i=32,j=!0,k=!0,l=!1,m=!1,n=d3.dispatch("legendClick","legendDblclick","legendMouseover","legendMouseout","stateChange"),o="classic";return b.dispatch=n,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return d},set:function(a){d=a}},height:{get:function(){return e},set:function(a){e=a}},key:{get:function(){return f},set:function(a){f=a}},align:{get:function(){return h},set:function(a){h=a}},rightAlign:{get:function(){return j},set:function(a){j=a}},padding:{get:function(){return i},set:function(a){i=a}},updateState:{get:function(){return k},set:function(a){k=a}},radioButtonMode:{get:function(){return l},set:function(a){l=a}},expanded:{get:function(){return m},set:function(a){m=a}},vers:{get:function(){return o},set:function(a){o=a}},margin:{get:function(){return c},set:function(a){c.top=void 0!==a.top?a.top:c.top,c.right=void 0!==a.right?a.right:c.right,c.bottom=void 0!==a.bottom?a.bottom:c.bottom,c.left=void 0!==a.left?a.left:c.left}},color:{get:function(){return g},set:function(b){g=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.line=function(){"use strict";function b(r){return v.reset(),v.models(e),r.each(function(b){i=d3.select(this);var r=a.utils.availableWidth(g,i,f),s=a.utils.availableHeight(h,i,f);a.utils.initSVG(i),c=e.xScale(),d=e.yScale(),t=t||c,u=u||d;var w=i.selectAll("g.nv-wrap.nv-line").data([b]),x=w.enter().append("g").attr("class","nvd3 nv-wrap nv-line"),y=x.append("defs"),z=x.append("g"),A=w.select("g");z.append("g").attr("class","nv-groups"),z.append("g").attr("class","nv-scatterWrap"),w.attr("transform","translate("+f.left+","+f.top+")"),e.width(r).height(s);var B=w.select(".nv-scatterWrap");B.call(e),y.append("clipPath").attr("id","nv-edge-clip-"+e.id()).append("rect"),w.select("#nv-edge-clip-"+e.id()+" rect").attr("width",r).attr("height",s>0?s:0),A.attr("clip-path",p?"url(#nv-edge-clip-"+e.id()+")":""),B.attr("clip-path",p?"url(#nv-edge-clip-"+e.id()+")":"");var C=w.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a){return a.key});C.enter().append("g").style("stroke-opacity",1e-6).style("stroke-width",function(a){return a.strokeWidth||j}).style("fill-opacity",1e-6),C.exit().remove(),C.attr("class",function(a,b){return(a.classed||"")+" nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}).style("fill",function(a,b){return k(a,b)}).style("stroke",function(a,b){return k(a,b)}),C.watchTransition(v,"line: groups").style("stroke-opacity",1).style("fill-opacity",function(a){return a.fillOpacity||.5});var D=C.selectAll("path.nv-area").data(function(a){return o(a)?[a]:[]});D.enter().append("path").attr("class","nv-area").attr("d",function(b){return d3.svg.area().interpolate(q).defined(n).x(function(b,c){return a.utils.NaNtoZero(t(l(b,c)))}).y0(function(b,c){return a.utils.NaNtoZero(u(m(b,c)))}).y1(function(){return u(d.domain()[0]<=0?d.domain()[1]>=0?0:d.domain()[1]:d.domain()[0])}).apply(this,[b.values])}),C.exit().selectAll("path.nv-area").remove(),D.watchTransition(v,"line: areaPaths").attr("d",function(b){return d3.svg.area().interpolate(q).defined(n).x(function(b,d){return a.utils.NaNtoZero(c(l(b,d)))}).y0(function(b,c){return a.utils.NaNtoZero(d(m(b,c)))}).y1(function(){return d(d.domain()[0]<=0?d.domain()[1]>=0?0:d.domain()[1]:d.domain()[0])}).apply(this,[b.values])});var E=C.selectAll("path.nv-line").data(function(a){return[a.values]});E.enter().append("path").attr("class","nv-line").attr("d",d3.svg.line().interpolate(q).defined(n).x(function(b,c){return a.utils.NaNtoZero(t(l(b,c)))}).y(function(b,c){return a.utils.NaNtoZero(u(m(b,c)))})),E.watchTransition(v,"line: linePaths").attr("d",d3.svg.line().interpolate(q).defined(n).x(function(b,d){return a.utils.NaNtoZero(c(l(b,d)))}).y(function(b,c){return a.utils.NaNtoZero(d(m(b,c)))})),t=c.copy(),u=d.copy()}),v.renderEnd("line immediate"),b}var c,d,e=a.models.scatter(),f={top:0,right:0,bottom:0,left:0},g=960,h=500,i=null,j=1.5,k=a.utils.defaultColor(),l=function(a){return a.x},m=function(a){return a.y},n=function(a,b){return!isNaN(m(a,b))&&null!==m(a,b)},o=function(a){return a.area},p=!1,q="linear",r=250,s=d3.dispatch("elementClick","elementMouseover","elementMouseout","renderEnd");e.pointSize(16).pointDomain([16,256]);var t,u,v=a.utils.renderWatch(s,r);return b.dispatch=s,b.scatter=e,e.dispatch.on("elementClick",function(){s.elementClick.apply(this,arguments)}),e.dispatch.on("elementMouseover",function(){s.elementMouseover.apply(this,arguments)}),e.dispatch.on("elementMouseout",function(){s.elementMouseout.apply(this,arguments)}),b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return g},set:function(a){g=a}},height:{get:function(){return h},set:function(a){h=a}},defined:{get:function(){return n},set:function(a){n=a}},interpolate:{get:function(){return q},set:function(a){q=a}},clipEdge:{get:function(){return p},set:function(a){p=a}},margin:{get:function(){return f},set:function(a){f.top=void 0!==a.top?a.top:f.top,f.right=void 0!==a.right?a.right:f.right,f.bottom=void 0!==a.bottom?a.bottom:f.bottom,f.left=void 0!==a.left?a.left:f.left}},duration:{get:function(){return r},set:function(a){r=a,v.reset(r),e.duration(r)}},isArea:{get:function(){return o},set:function(a){o=d3.functor(a)}},x:{get:function(){return l},set:function(a){l=a,e.x(a)}},y:{get:function(){return m},set:function(a){m=a,e.y(a)}},color:{get:function(){return k},set:function(b){k=a.utils.getColor(b),e.color(k)}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.lineChart=function(){"use strict";function b(j){return y.reset(),y.models(e),p&&y.models(f),q&&y.models(g),j.each(function(j){var v=d3.select(this),y=this;a.utils.initSVG(v);var B=a.utils.availableWidth(m,v,k),C=a.utils.availableHeight(n,v,k);if(b.update=function(){0===x?v.call(b):v.transition().duration(x).call(b)},b.container=this,t.setter(A(j),b.update).getter(z(j)).update(),t.disabled=j.map(function(a){return!!a.disabled}),!u){var D;u={};for(D in t)u[D]=t[D]instanceof Array?t[D].slice(0):t[D]
-}if(!(j&&j.length&&j.filter(function(a){return a.values.length}).length))return a.utils.noData(b,v),b;v.selectAll(".nv-noData").remove(),c=e.xScale(),d=e.yScale();var E=v.selectAll("g.nv-wrap.nv-lineChart").data([j]),F=E.enter().append("g").attr("class","nvd3 nv-wrap nv-lineChart").append("g"),G=E.select("g");F.append("rect").style("opacity",0),F.append("g").attr("class","nv-x nv-axis"),F.append("g").attr("class","nv-y nv-axis"),F.append("g").attr("class","nv-linesWrap"),F.append("g").attr("class","nv-legendWrap"),F.append("g").attr("class","nv-interactive"),G.select("rect").attr("width",B).attr("height",C>0?C:0),o&&(h.width(B),G.select(".nv-legendWrap").datum(j).call(h),k.top!=h.height()&&(k.top=h.height(),C=a.utils.availableHeight(n,v,k)),E.select(".nv-legendWrap").attr("transform","translate(0,"+-k.top+")")),E.attr("transform","translate("+k.left+","+k.top+")"),r&&G.select(".nv-y.nv-axis").attr("transform","translate("+B+",0)"),s&&(i.width(B).height(C).margin({left:k.left,top:k.top}).svgContainer(v).xScale(c),E.select(".nv-interactive").call(i)),e.width(B).height(C).color(j.map(function(a,b){return a.color||l(a,b)}).filter(function(a,b){return!j[b].disabled}));var H=G.select(".nv-linesWrap").datum(j.filter(function(a){return!a.disabled}));H.call(e),p&&(f.scale(c)._ticks(a.utils.calcTicksX(B/100,j)).tickSize(-C,0),G.select(".nv-x.nv-axis").attr("transform","translate(0,"+d.range()[0]+")"),G.select(".nv-x.nv-axis").call(f)),q&&(g.scale(d)._ticks(a.utils.calcTicksY(C/36,j)).tickSize(-B,0),G.select(".nv-y.nv-axis").call(g)),h.dispatch.on("stateChange",function(a){for(var c in a)t[c]=a[c];w.stateChange(t),b.update()}),i.dispatch.on("elementMousemove",function(c){e.clearHighlights();var d,h,m,n=[];if(j.filter(function(a,b){return a.seriesIndex=b,!a.disabled}).forEach(function(f,g){h=a.interactiveBisect(f.values,c.pointXValue,b.x());var i=f.values[h],j=b.y()(i,h);null!=j&&e.highlightPoint(g,h,!0),void 0!==i&&(void 0===d&&(d=i),void 0===m&&(m=b.xScale()(b.x()(i,h))),n.push({key:f.key,value:j,color:l(f,f.seriesIndex)}))}),n.length>2){var o=b.yScale().invert(c.mouseY),p=Math.abs(b.yScale().domain()[0]-b.yScale().domain()[1]),q=.03*p,r=a.nearestValueIndex(n.map(function(a){return a.value}),o,q);null!==r&&(n[r].highlight=!0)}var s=f.tickFormat()(b.x()(d,h));i.tooltip.position({left:c.mouseX+k.left,top:c.mouseY+k.top}).chartContainer(y.parentNode).valueFormatter(function(a){return null==a?"N/A":g.tickFormat()(a)}).data({value:s,index:h,series:n})(),i.renderGuideLine(m)}),i.dispatch.on("elementClick",function(c){var d,f=[];j.filter(function(a,b){return a.seriesIndex=b,!a.disabled}).forEach(function(e){var g=a.interactiveBisect(e.values,c.pointXValue,b.x()),h=e.values[g];if("undefined"!=typeof h){"undefined"==typeof d&&(d=b.xScale()(b.x()(h,g)));var i=b.yScale()(b.y()(h,g));f.push({point:h,pointIndex:g,pos:[d,i],seriesIndex:e.seriesIndex,series:e})}}),e.dispatch.elementClick(f)}),i.dispatch.on("elementMouseout",function(){e.clearHighlights()}),w.on("changeState",function(a){"undefined"!=typeof a.disabled&&j.length===a.disabled.length&&(j.forEach(function(b,c){b.disabled=a.disabled[c]}),t.disabled=a.disabled),b.update()})}),y.renderEnd("lineChart immediate"),b}var c,d,e=a.models.line(),f=a.models.axis(),g=a.models.axis(),h=a.models.legend(),i=a.interactiveGuideline(),j=a.models.tooltip(),k={top:30,right:20,bottom:50,left:60},l=a.utils.defaultColor(),m=null,n=null,o=!0,p=!0,q=!0,r=!1,s=!1,t=a.utils.state(),u=null,v=null,w=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState","renderEnd"),x=250;f.orient("bottom").tickPadding(7),g.orient(r?"right":"left"),j.valueFormatter(function(a,b){return g.tickFormat()(a,b)}).headerFormatter(function(a,b){return f.tickFormat()(a,b)});var y=a.utils.renderWatch(w,x),z=function(a){return function(){return{active:a.map(function(a){return!a.disabled})}}},A=function(a){return function(b){void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};return e.dispatch.on("elementMouseover.tooltip",function(a){j.data(a).position(a.pos).hidden(!1)}),e.dispatch.on("elementMouseout.tooltip",function(){j.hidden(!0)}),b.dispatch=w,b.lines=e,b.legend=h,b.xAxis=f,b.yAxis=g,b.interactiveLayer=i,b.tooltip=j,b.dispatch=w,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return m},set:function(a){m=a}},height:{get:function(){return n},set:function(a){n=a}},showLegend:{get:function(){return o},set:function(a){o=a}},showXAxis:{get:function(){return p},set:function(a){p=a}},showYAxis:{get:function(){return q},set:function(a){q=a}},defaultState:{get:function(){return u},set:function(a){u=a}},noData:{get:function(){return v},set:function(a){v=a}},tooltips:{get:function(){return j.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),j.enabled(!!b)}},tooltipContent:{get:function(){return j.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),j.contentGenerator(b)}},margin:{get:function(){return k},set:function(a){k.top=void 0!==a.top?a.top:k.top,k.right=void 0!==a.right?a.right:k.right,k.bottom=void 0!==a.bottom?a.bottom:k.bottom,k.left=void 0!==a.left?a.left:k.left}},duration:{get:function(){return x},set:function(a){x=a,y.reset(x),e.duration(x),f.duration(x),g.duration(x)}},color:{get:function(){return l},set:function(b){l=a.utils.getColor(b),h.color(l),e.color(l)}},rightAlignYAxis:{get:function(){return r},set:function(a){r=a,g.orient(r?"right":"left")}},useInteractiveGuideline:{get:function(){return s},set:function(a){s=a,s&&(e.interactive(!1),e.useVoronoi(!1))}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.linePlusBarChart=function(){"use strict";function b(v){return v.each(function(v){function J(a){var b=+("e"==a),c=b?1:-1,d=X/3;return"M"+.5*c+","+d+"A6,6 0 0 "+b+" "+6.5*c+","+(d+6)+"V"+(2*d-6)+"A6,6 0 0 "+b+" "+.5*c+","+2*d+"ZM"+2.5*c+","+(d+8)+"V"+(2*d-8)+"M"+4.5*c+","+(d+8)+"V"+(2*d-8)}function S(){u.empty()||u.extent(I),kb.data([u.empty()?e.domain():I]).each(function(a){var b=e(a[0])-e.range()[0],c=e.range()[1]-e(a[1]);d3.select(this).select(".left").attr("width",0>b?0:b),d3.select(this).select(".right").attr("x",e(a[1])).attr("width",0>c?0:c)})}function T(){I=u.empty()?null:u.extent(),c=u.empty()?e.domain():u.extent(),K.brush({extent:c,brush:u}),S(),l.width(V).height(W).color(v.map(function(a,b){return a.color||C(a,b)}).filter(function(a,b){return!v[b].disabled&&v[b].bar})),j.width(V).height(W).color(v.map(function(a,b){return a.color||C(a,b)}).filter(function(a,b){return!v[b].disabled&&!v[b].bar}));var b=db.select(".nv-focus .nv-barsWrap").datum(Z.length?Z.map(function(a){return{key:a.key,values:a.values.filter(function(a,b){return l.x()(a,b)>=c[0]&&l.x()(a,b)<=c[1]})}}):[{values:[]}]),h=db.select(".nv-focus .nv-linesWrap").datum($[0].disabled?[{values:[]}]:$.map(function(a){return{area:a.area,fillOpacity:a.fillOpacity,key:a.key,values:a.values.filter(function(a,b){return j.x()(a,b)>=c[0]&&j.x()(a,b)<=c[1]})}}));d=Z.length?l.xScale():j.xScale(),n.scale(d)._ticks(a.utils.calcTicksX(V/100,v)).tickSize(-W,0),n.domain([Math.ceil(c[0]),Math.floor(c[1])]),db.select(".nv-x.nv-axis").transition().duration(L).call(n),b.transition().duration(L).call(l),h.transition().duration(L).call(j),db.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+f.range()[0]+")"),p.scale(f)._ticks(a.utils.calcTicksY(W/36,v)).tickSize(-V,0),q.scale(g)._ticks(a.utils.calcTicksY(W/36,v)).tickSize(Z.length?0:-V,0),db.select(".nv-focus .nv-y1.nv-axis").style("opacity",Z.length?1:0),db.select(".nv-focus .nv-y2.nv-axis").style("opacity",$.length&&!$[0].disabled?1:0).attr("transform","translate("+d.range()[1]+",0)"),db.select(".nv-focus .nv-y1.nv-axis").transition().duration(L).call(p),db.select(".nv-focus .nv-y2.nv-axis").transition().duration(L).call(q)}var U=d3.select(this);a.utils.initSVG(U);var V=a.utils.availableWidth(y,U,w),W=a.utils.availableHeight(z,U,w)-(E?H:0),X=H-x.top-x.bottom;if(b.update=function(){U.transition().duration(L).call(b)},b.container=this,M.setter(R(v),b.update).getter(Q(v)).update(),M.disabled=v.map(function(a){return!!a.disabled}),!N){var Y;N={};for(Y in M)N[Y]=M[Y]instanceof Array?M[Y].slice(0):M[Y]}if(!(v&&v.length&&v.filter(function(a){return a.values.length}).length))return a.utils.noData(b,U),b;U.selectAll(".nv-noData").remove();var Z=v.filter(function(a){return!a.disabled&&a.bar}),$=v.filter(function(a){return!a.bar});d=l.xScale(),e=o.scale(),f=l.yScale(),g=j.yScale(),h=m.yScale(),i=k.yScale();var _=v.filter(function(a){return!a.disabled&&a.bar}).map(function(a){return a.values.map(function(a,b){return{x:A(a,b),y:B(a,b)}})}),ab=v.filter(function(a){return!a.disabled&&!a.bar}).map(function(a){return a.values.map(function(a,b){return{x:A(a,b),y:B(a,b)}})});d.range([0,V]),e.domain(d3.extent(d3.merge(_.concat(ab)),function(a){return a.x})).range([0,V]);var bb=U.selectAll("g.nv-wrap.nv-linePlusBar").data([v]),cb=bb.enter().append("g").attr("class","nvd3 nv-wrap nv-linePlusBar").append("g"),db=bb.select("g");cb.append("g").attr("class","nv-legendWrap");var eb=cb.append("g").attr("class","nv-focus");eb.append("g").attr("class","nv-x nv-axis"),eb.append("g").attr("class","nv-y1 nv-axis"),eb.append("g").attr("class","nv-y2 nv-axis"),eb.append("g").attr("class","nv-barsWrap"),eb.append("g").attr("class","nv-linesWrap");var fb=cb.append("g").attr("class","nv-context");if(fb.append("g").attr("class","nv-x nv-axis"),fb.append("g").attr("class","nv-y1 nv-axis"),fb.append("g").attr("class","nv-y2 nv-axis"),fb.append("g").attr("class","nv-barsWrap"),fb.append("g").attr("class","nv-linesWrap"),fb.append("g").attr("class","nv-brushBackground"),fb.append("g").attr("class","nv-x nv-brush"),D){var gb=t.align()?V/2:V,hb=t.align()?gb:0;t.width(gb),db.select(".nv-legendWrap").datum(v.map(function(a){return a.originalKey=void 0===a.originalKey?a.key:a.originalKey,a.key=a.originalKey+(a.bar?O:P),a})).call(t),w.top!=t.height()&&(w.top=t.height(),W=a.utils.availableHeight(z,U,w)-H),db.select(".nv-legendWrap").attr("transform","translate("+hb+","+-w.top+")")}bb.attr("transform","translate("+w.left+","+w.top+")"),db.select(".nv-context").style("display",E?"initial":"none"),m.width(V).height(X).color(v.map(function(a,b){return a.color||C(a,b)}).filter(function(a,b){return!v[b].disabled&&v[b].bar})),k.width(V).height(X).color(v.map(function(a,b){return a.color||C(a,b)}).filter(function(a,b){return!v[b].disabled&&!v[b].bar}));var ib=db.select(".nv-context .nv-barsWrap").datum(Z.length?Z:[{values:[]}]),jb=db.select(".nv-context .nv-linesWrap").datum($[0].disabled?[{values:[]}]:$);db.select(".nv-context").attr("transform","translate(0,"+(W+w.bottom+x.top)+")"),ib.transition().call(m),jb.transition().call(k),G&&(o._ticks(a.utils.calcTicksX(V/100,v)).tickSize(-X,0),db.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+h.range()[0]+")"),db.select(".nv-context .nv-x.nv-axis").transition().call(o)),F&&(r.scale(h)._ticks(X/36).tickSize(-V,0),s.scale(i)._ticks(X/36).tickSize(Z.length?0:-V,0),db.select(".nv-context .nv-y3.nv-axis").style("opacity",Z.length?1:0).attr("transform","translate(0,"+e.range()[0]+")"),db.select(".nv-context .nv-y2.nv-axis").style("opacity",$.length?1:0).attr("transform","translate("+e.range()[1]+",0)"),db.select(".nv-context .nv-y1.nv-axis").transition().call(r),db.select(".nv-context .nv-y2.nv-axis").transition().call(s)),u.x(e).on("brush",T),I&&u.extent(I);var kb=db.select(".nv-brushBackground").selectAll("g").data([I||u.extent()]),lb=kb.enter().append("g");lb.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",X),lb.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",X);var mb=db.select(".nv-x.nv-brush").call(u);mb.selectAll("rect").attr("height",X),mb.selectAll(".resize").append("path").attr("d",J),t.dispatch.on("stateChange",function(a){for(var c in a)M[c]=a[c];K.stateChange(M),b.update()}),K.on("changeState",function(a){"undefined"!=typeof a.disabled&&(v.forEach(function(b,c){b.disabled=a.disabled[c]}),M.disabled=a.disabled),b.update()}),T()}),b}var c,d,e,f,g,h,i,j=a.models.line(),k=a.models.line(),l=a.models.historicalBar(),m=a.models.historicalBar(),n=a.models.axis(),o=a.models.axis(),p=a.models.axis(),q=a.models.axis(),r=a.models.axis(),s=a.models.axis(),t=a.models.legend(),u=d3.svg.brush(),v=a.models.tooltip(),w={top:30,right:30,bottom:30,left:60},x={top:0,right:30,bottom:20,left:60},y=null,z=null,A=function(a){return a.x},B=function(a){return a.y},C=a.utils.defaultColor(),D=!0,E=!0,F=!1,G=!0,H=50,I=null,J=null,K=d3.dispatch("brush","stateChange","changeState"),L=0,M=a.utils.state(),N=null,O=" (left axis)",P=" (right axis)";j.clipEdge(!0),k.interactive(!1),k.pointActive(function(){return!1}),n.orient("bottom").tickPadding(5),p.orient("left"),q.orient("right"),o.orient("bottom").tickPadding(5),r.orient("left"),s.orient("right"),v.headerEnabled(!0).headerFormatter(function(a,b){return n.tickFormat()(a,b)});var Q=function(a){return function(){return{active:a.map(function(a){return!a.disabled})}}},R=function(a){return function(b){void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};return j.dispatch.on("elementMouseover.tooltip",function(a){v.duration(100).valueFormatter(function(a,b){return q.tickFormat()(a,b)}).data(a).position(a.pos).hidden(!1)}),j.dispatch.on("elementMouseout.tooltip",function(){v.hidden(!0)}),l.dispatch.on("elementMouseover.tooltip",function(a){a.value=b.x()(a.data),a.series={value:b.y()(a.data),color:a.color},v.duration(0).valueFormatter(function(a,b){return p.tickFormat()(a,b)}).data(a).hidden(!1)}),l.dispatch.on("elementMouseout.tooltip",function(){v.hidden(!0)}),l.dispatch.on("elementMousemove.tooltip",function(){v.position({top:d3.event.pageY,left:d3.event.pageX})()}),b.dispatch=K,b.legend=t,b.lines=j,b.lines2=k,b.bars=l,b.bars2=m,b.xAxis=n,b.x2Axis=o,b.y1Axis=p,b.y2Axis=q,b.y3Axis=r,b.y4Axis=s,b.tooltip=v,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return y},set:function(a){y=a}},height:{get:function(){return z},set:function(a){z=a}},showLegend:{get:function(){return D},set:function(a){D=a}},brushExtent:{get:function(){return I},set:function(a){I=a}},noData:{get:function(){return J},set:function(a){J=a}},focusEnable:{get:function(){return E},set:function(a){E=a}},focusHeight:{get:function(){return H},set:function(a){H=a}},focusShowAxisX:{get:function(){return G},set:function(a){G=a}},focusShowAxisY:{get:function(){return F},set:function(a){F=a}},legendLeftAxisHint:{get:function(){return O},set:function(a){O=a}},legendRightAxisHint:{get:function(){return P},set:function(a){P=a}},tooltips:{get:function(){return v.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),v.enabled(!!b)}},tooltipContent:{get:function(){return v.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),v.contentGenerator(b)}},margin:{get:function(){return w},set:function(a){w.top=void 0!==a.top?a.top:w.top,w.right=void 0!==a.right?a.right:w.right,w.bottom=void 0!==a.bottom?a.bottom:w.bottom,w.left=void 0!==a.left?a.left:w.left}},focusMargin:{get:function(){return x},set:function(a){x.top=void 0!==a.top?a.top:x.top,x.right=void 0!==a.right?a.right:x.right,x.bottom=void 0!==a.bottom?a.bottom:x.bottom,x.left=void 0!==a.left?a.left:x.left}},duration:{get:function(){return L},set:function(a){L=a}},color:{get:function(){return C},set:function(b){C=a.utils.getColor(b),t.color(C)}},x:{get:function(){return A},set:function(a){A=a,j.x(a),k.x(a),l.x(a),m.x(a)}},y:{get:function(){return B},set:function(a){B=a,j.y(a),k.y(a),l.y(a),m.y(a)}}}),a.utils.inheritOptions(b,j),a.utils.initOptions(b),b},a.models.lineWithFocusChart=function(){"use strict";function b(o){return o.each(function(o){function z(a){var b=+("e"==a),c=b?1:-1,d=M/3;return"M"+.5*c+","+d+"A6,6 0 0 "+b+" "+6.5*c+","+(d+6)+"V"+(2*d-6)+"A6,6 0 0 "+b+" "+.5*c+","+2*d+"ZM"+2.5*c+","+(d+8)+"V"+(2*d-8)+"M"+4.5*c+","+(d+8)+"V"+(2*d-8)}function G(){n.empty()||n.extent(y),U.data([n.empty()?e.domain():y]).each(function(a){var b=e(a[0])-c.range()[0],d=K-e(a[1]);d3.select(this).select(".left").attr("width",0>b?0:b),d3.select(this).select(".right").attr("x",e(a[1])).attr("width",0>d?0:d)})}function H(){y=n.empty()?null:n.extent();var a=n.empty()?e.domain():n.extent();if(!(Math.abs(a[0]-a[1])<=1)){A.brush({extent:a,brush:n}),G();var b=Q.select(".nv-focus .nv-linesWrap").datum(o.filter(function(a){return!a.disabled}).map(function(b){return{key:b.key,area:b.area,values:b.values.filter(function(b,c){return g.x()(b,c)>=a[0]&&g.x()(b,c)<=a[1]})}}));b.transition().duration(B).call(g),Q.select(".nv-focus .nv-x.nv-axis").transition().duration(B).call(i),Q.select(".nv-focus .nv-y.nv-axis").transition().duration(B).call(j)}}var I=d3.select(this),J=this;a.utils.initSVG(I);var K=a.utils.availableWidth(t,I,q),L=a.utils.availableHeight(u,I,q)-v,M=v-r.top-r.bottom;if(b.update=function(){I.transition().duration(B).call(b)},b.container=this,C.setter(F(o),b.update).getter(E(o)).update(),C.disabled=o.map(function(a){return!!a.disabled}),!D){var N;D={};for(N in C)D[N]=C[N]instanceof Array?C[N].slice(0):C[N]}if(!(o&&o.length&&o.filter(function(a){return a.values.length}).length))return a.utils.noData(b,I),b;I.selectAll(".nv-noData").remove(),c=g.xScale(),d=g.yScale(),e=h.xScale(),f=h.yScale();var O=I.selectAll("g.nv-wrap.nv-lineWithFocusChart").data([o]),P=O.enter().append("g").attr("class","nvd3 nv-wrap nv-lineWithFocusChart").append("g"),Q=O.select("g");P.append("g").attr("class","nv-legendWrap");var R=P.append("g").attr("class","nv-focus");R.append("g").attr("class","nv-x nv-axis"),R.append("g").attr("class","nv-y nv-axis"),R.append("g").attr("class","nv-linesWrap"),R.append("g").attr("class","nv-interactive");var S=P.append("g").attr("class","nv-context");S.append("g").attr("class","nv-x nv-axis"),S.append("g").attr("class","nv-y nv-axis"),S.append("g").attr("class","nv-linesWrap"),S.append("g").attr("class","nv-brushBackground"),S.append("g").attr("class","nv-x nv-brush"),x&&(m.width(K),Q.select(".nv-legendWrap").datum(o).call(m),q.top!=m.height()&&(q.top=m.height(),L=a.utils.availableHeight(u,I,q)-v),Q.select(".nv-legendWrap").attr("transform","translate(0,"+-q.top+")")),O.attr("transform","translate("+q.left+","+q.top+")"),w&&(p.width(K).height(L).margin({left:q.left,top:q.top}).svgContainer(I).xScale(c),O.select(".nv-interactive").call(p)),g.width(K).height(L).color(o.map(function(a,b){return a.color||s(a,b)}).filter(function(a,b){return!o[b].disabled})),h.defined(g.defined()).width(K).height(M).color(o.map(function(a,b){return a.color||s(a,b)}).filter(function(a,b){return!o[b].disabled})),Q.select(".nv-context").attr("transform","translate(0,"+(L+q.bottom+r.top)+")");var T=Q.select(".nv-context .nv-linesWrap").datum(o.filter(function(a){return!a.disabled}));d3.transition(T).call(h),i.scale(c)._ticks(a.utils.calcTicksX(K/100,o)).tickSize(-L,0),j.scale(d)._ticks(a.utils.calcTicksY(L/36,o)).tickSize(-K,0),Q.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+L+")"),n.x(e).on("brush",function(){H()}),y&&n.extent(y);var U=Q.select(".nv-brushBackground").selectAll("g").data([y||n.extent()]),V=U.enter().append("g");V.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",M),V.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",M);var W=Q.select(".nv-x.nv-brush").call(n);W.selectAll("rect").attr("height",M),W.selectAll(".resize").append("path").attr("d",z),H(),k.scale(e)._ticks(a.utils.calcTicksX(K/100,o)).tickSize(-M,0),Q.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+f.range()[0]+")"),d3.transition(Q.select(".nv-context .nv-x.nv-axis")).call(k),l.scale(f)._ticks(a.utils.calcTicksY(M/36,o)).tickSize(-K,0),d3.transition(Q.select(".nv-context .nv-y.nv-axis")).call(l),Q.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+f.range()[0]+")"),m.dispatch.on("stateChange",function(a){for(var c in a)C[c]=a[c];A.stateChange(C),b.update()}),p.dispatch.on("elementMousemove",function(c){g.clearHighlights();var d,f,h,k=[];if(o.filter(function(a,b){return a.seriesIndex=b,!a.disabled}).forEach(function(i,j){var l=n.empty()?e.domain():n.extent(),m=i.values.filter(function(a,b){return g.x()(a,b)>=l[0]&&g.x()(a,b)<=l[1]});f=a.interactiveBisect(m,c.pointXValue,g.x());var o=m[f],p=b.y()(o,f);null!=p&&g.highlightPoint(j,f,!0),void 0!==o&&(void 0===d&&(d=o),void 0===h&&(h=b.xScale()(b.x()(o,f))),k.push({key:i.key,value:b.y()(o,f),color:s(i,i.seriesIndex)}))}),k.length>2){var l=b.yScale().invert(c.mouseY),m=Math.abs(b.yScale().domain()[0]-b.yScale().domain()[1]),r=.03*m,t=a.nearestValueIndex(k.map(function(a){return a.value}),l,r);null!==t&&(k[t].highlight=!0)}var u=i.tickFormat()(b.x()(d,f));p.tooltip.position({left:c.mouseX+q.left,top:c.mouseY+q.top}).chartContainer(J.parentNode).valueFormatter(function(a){return null==a?"N/A":j.tickFormat()(a)}).data({value:u,index:f,series:k})(),p.renderGuideLine(h)}),p.dispatch.on("elementMouseout",function(){g.clearHighlights()}),A.on("changeState",function(a){"undefined"!=typeof a.disabled&&o.forEach(function(b,c){b.disabled=a.disabled[c]}),b.update()})}),b}var c,d,e,f,g=a.models.line(),h=a.models.line(),i=a.models.axis(),j=a.models.axis(),k=a.models.axis(),l=a.models.axis(),m=a.models.legend(),n=d3.svg.brush(),o=a.models.tooltip(),p=a.interactiveGuideline(),q={top:30,right:30,bottom:30,left:60},r={top:0,right:30,bottom:20,left:60},s=a.utils.defaultColor(),t=null,u=null,v=50,w=!1,x=!0,y=null,z=null,A=d3.dispatch("brush","stateChange","changeState"),B=250,C=a.utils.state(),D=null;g.clipEdge(!0).duration(0),h.interactive(!1),h.pointActive(function(){return!1}),i.orient("bottom").tickPadding(5),j.orient("left"),k.orient("bottom").tickPadding(5),l.orient("left"),o.valueFormatter(function(a,b){return j.tickFormat()(a,b)}).headerFormatter(function(a,b){return i.tickFormat()(a,b)});var E=function(a){return function(){return{active:a.map(function(a){return!a.disabled})}}},F=function(a){return function(b){void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};return g.dispatch.on("elementMouseover.tooltip",function(a){o.data(a).position(a.pos).hidden(!1)}),g.dispatch.on("elementMouseout.tooltip",function(){o.hidden(!0)}),b.dispatch=A,b.legend=m,b.lines=g,b.lines2=h,b.xAxis=i,b.yAxis=j,b.x2Axis=k,b.y2Axis=l,b.interactiveLayer=p,b.tooltip=o,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return t},set:function(a){t=a}},height:{get:function(){return u},set:function(a){u=a}},focusHeight:{get:function(){return v},set:function(a){v=a}},showLegend:{get:function(){return x},set:function(a){x=a}},brushExtent:{get:function(){return y},set:function(a){y=a}},defaultState:{get:function(){return D},set:function(a){D=a}},noData:{get:function(){return z},set:function(a){z=a}},tooltips:{get:function(){return o.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),o.enabled(!!b)}},tooltipContent:{get:function(){return o.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),o.contentGenerator(b)}},margin:{get:function(){return q},set:function(a){q.top=void 0!==a.top?a.top:q.top,q.right=void 0!==a.right?a.right:q.right,q.bottom=void 0!==a.bottom?a.bottom:q.bottom,q.left=void 0!==a.left?a.left:q.left}},focusMargin:{get:function(){return r},set:function(a){r.top=void 0!==a.top?a.top:r.top,r.right=void 0!==a.right?a.right:r.right,r.bottom=void 0!==a.bottom?a.bottom:r.bottom,r.left=void 0!==a.left?a.left:r.left}},color:{get:function(){return s},set:function(b){s=a.utils.getColor(b),m.color(s)}},interpolate:{get:function(){return g.interpolate()},set:function(a){g.interpolate(a),h.interpolate(a)}},xTickFormat:{get:function(){return i.tickFormat()},set:function(a){i.tickFormat(a),k.tickFormat(a)}},yTickFormat:{get:function(){return j.tickFormat()},set:function(a){j.tickFormat(a),l.tickFormat(a)}},duration:{get:function(){return B},set:function(a){B=a,j.duration(B),l.duration(B),i.duration(B),k.duration(B)}},x:{get:function(){return g.x()},set:function(a){g.x(a),h.x(a)}},y:{get:function(){return g.y()},set:function(a){g.y(a),h.y(a)}},useInteractiveGuideline:{get:function(){return w},set:function(a){w=a,w&&(g.interactive(!1),g.useVoronoi(!1))}}}),a.utils.inheritOptions(b,g),a.utils.initOptions(b),b},a.models.multiBar=function(){"use strict";function b(G){return E.reset(),G.each(function(b){var G=k-j.left-j.right,H=l-j.top-j.bottom;p=d3.select(this),a.utils.initSVG(p);var I=0;if(z&&b.length&&(z=[{values:b[0].values.map(function(a){return{x:a.x,y:0,series:a.series,size:.01}})}]),v){var J=d3.layout.stack().offset(w).values(function(a){return a.values}).y(r)(!b.length&&z?z:b);J.forEach(function(a,c){a.nonStackable?(b[c].nonStackableSeries=I++,J[c]=b[c]):c>0&&J[c-1].nonStackable&&J[c].values.map(function(a,b){a.y0-=J[c-1].values[b].y,a.y1=a.y0+a.y})}),b=J}b.forEach(function(a,b){a.values.forEach(function(c){c.series=b,c.key=a.key})}),v&&b[0].values.map(function(a,c){var d=0,e=0;b.map(function(a,f){if(!b[f].nonStackable){var g=a.values[c];g.size=Math.abs(g.y),g.y<0?(g.y1=e,e-=g.size):(g.y1=g.size+d,d+=g.size)}})});var K=d&&e?[]:b.map(function(a,b){return a.values.map(function(a,c){return{x:q(a,c),y:r(a,c),y0:a.y0,y1:a.y1,idx:b,yErr:s(a,c)}})});m.domain(d||d3.merge(K).map(function(a){return a.x})).rangeBands(f||[0,G],C),n.domain(e||d3.extent(d3.merge(d3.merge(K).map(function(a){var c=a.y;v&&!b[a.idx].nonStackable&&(c=a.y>0?a.y1:a.y1+a.y);var d=a.yErr;return d?d.length?[c+d[0],c+d[1]]:(d=Math.abs(d),[c-d,c+d]):[c]})).concat(t))).range(g||[H,0]),m.domain()[0]===m.domain()[1]&&m.domain(m.domain()[0]?[m.domain()[0]-.01*m.domain()[0],m.domain()[1]+.01*m.domain()[1]]:[-1,1]),n.domain()[0]===n.domain()[1]&&n.domain(n.domain()[0]?[n.domain()[0]+.01*n.domain()[0],n.domain()[1]-.01*n.domain()[1]]:[-1,1]),h=h||m,i=i||n;var L=p.selectAll("g.nv-wrap.nv-multibar").data([b]),M=L.enter().append("g").attr("class","nvd3 nv-wrap nv-multibar"),N=M.append("defs"),O=M.append("g"),P=L.select("g");O.append("g").attr("class","nv-groups"),L.attr("transform","translate("+j.left+","+j.top+")"),N.append("clipPath").attr("id","nv-edge-clip-"+o).append("rect"),L.select("#nv-edge-clip-"+o+" rect").attr("width",G).attr("height",H),P.attr("clip-path",u?"url(#nv-edge-clip-"+o+")":"");var Q=L.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a,b){return b});Q.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);var R=E.transition(Q.exit().selectAll("g.nv-bar"),"multibarExit",Math.min(100,B)).attr("y",function(a){var c=i(0)||0;return v&&b[a.series]&&!b[a.series].nonStackable&&(c=i(a.y0)),c}).attr("height",0).remove();R.delay&&R.delay(function(a,b){var c=b*(B/(F+1))-b;return c}),Q.attr("class",function(a,b){return"nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}).style("fill",function(a,b){return x(a,b)}).style("stroke",function(a,b){return x(a,b)}),Q.style("stroke-opacity",1).style("fill-opacity",.75);var S=Q.selectAll("g.nv-bar").data(function(a){return z&&!b.length?z.values:a.values});S.exit().remove();var T=S.enter().append("g").attr("class",function(a,b){return r(a,b)<0?"nv-bar negative":"nv-bar positive"}).attr("transform",function(a,c,d){var e=v&&!b[d].nonStackable?0:d*m.rangeBand()/b.length,f=i(v&&!b[d].nonStackable?a.y0:0)||0;return"translate("+e+","+f+")"});T.append("rect").attr("height",0).attr("width",function(a,c,d){return m.rangeBand()/(v&&!b[d].nonStackable?1:b.length)}).style("fill",function(a,b,c){return x(a,c,b)}).style("stroke",function(a,b,c){return x(a,c,b)}),S.on("mouseover",function(a,b){d3.select(this).classed("hover",!0),D.elementMouseover({data:a,index:b,color:d3.select(this).style("fill")})}).on("mouseout",function(a,b){d3.select(this).classed("hover",!1),D.elementMouseout({data:a,index:b,color:d3.select(this).style("fill")})}).on("mousemove",function(a,b){D.elementMousemove({data:a,index:b,color:d3.select(this).style("fill")})}).on("click",function(a,b){D.elementClick({data:a,index:b,color:d3.select(this).style("fill")}),d3.event.stopPropagation()}).on("dblclick",function(a,b){D.elementDblClick({data:a,index:b,color:d3.select(this).style("fill")}),d3.event.stopPropagation()}),s(b[0].values[0],0)&&(T.append("polyline"),S.select("polyline").attr("fill","none").attr("stroke",function(a,b,c){return y(a,c,b)}).attr("points",function(a,c){var d=s(a,c),e=.8*m.rangeBand()/(2*(v?1:b.length));d=d.length?d:[-Math.abs(d),Math.abs(d)],d=d.map(function(a){return n(a)-n(0)});var f=[[-e,d[0]],[e,d[0]],[0,d[0]],[0,d[1]],[-e,d[1]],[e,d[1]]];return f.map(function(a){return a.join(",")}).join(" ")}).attr("transform",function(a,c){var d=m.rangeBand()/(2*(v?1:b.length)),e=r(a,c)<0?n(r(a,c))-n(0):0;return"translate("+d+", "+e+")"})),S.attr("class",function(a,b){return r(a,b)<0?"nv-bar negative":"nv-bar positive"}),A&&(c||(c=b.map(function(){return!0})),S.select("rect").style("fill",function(a,b,d){return d3.rgb(A(a,b)).darker(c.map(function(a,b){return b}).filter(function(a,b){return!c[b]})[d]).toString()}).style("stroke",function(a,b,d){return d3.rgb(A(a,b)).darker(c.map(function(a,b){return b}).filter(function(a,b){return!c[b]})[d]).toString()}));var U=S.watchTransition(E,"multibar",Math.min(250,B)).delay(function(a,c){return c*B/b[0].values.length});v?U.attr("transform",function(a,c,d){var e=0;e=b[d].nonStackable?r(a,c)<0?n(0):n(0)-n(r(a,c))<-1?n(0)-1:n(r(a,c))||0:n(a.y1);var f=0;b[d].nonStackable&&(f=a.series*m.rangeBand()/b.length,b.length!==I&&(f=b[d].nonStackableSeries*m.rangeBand()/(2*I)));var g=f+m(q(a,c));return"translate("+g+","+e+")"}).select("rect").attr("height",function(a,c,d){return b[d].nonStackable?Math.max(Math.abs(n(r(a,c))-n(0)),1)||0:Math.max(Math.abs(n(a.y+a.y0)-n(a.y0)),1)}).attr("width",function(a,c,d){if(b[d].nonStackable){var e=m.rangeBand()/I;return b.length!==I&&(e=m.rangeBand()/(2*I)),e}return m.rangeBand()}):U.attr("transform",function(a,c){var d=a.series*m.rangeBand()/b.length+m(q(a,c)),e=r(a,c)<0?n(0):n(0)-n(r(a,c))<1?n(0)-1:n(r(a,c))||0;return"translate("+d+","+e+")"}).select("rect").attr("width",m.rangeBand()/b.length).attr("height",function(a,b){return Math.max(Math.abs(n(r(a,b))-n(0)),1)||0}),h=m.copy(),i=n.copy(),b[0]&&b[0].values&&(F=b[0].values.length)}),E.renderEnd("multibar immediate"),b}var c,d,e,f,g,h,i,j={top:0,right:0,bottom:0,left:0},k=960,l=500,m=d3.scale.ordinal(),n=d3.scale.linear(),o=Math.floor(1e4*Math.random()),p=null,q=function(a){return a.x},r=function(a){return a.y},s=function(a){return a.yErr},t=[0],u=!0,v=!1,w="zero",x=a.utils.defaultColor(),y=a.utils.defaultColor(),z=!1,A=null,B=500,C=.1,D=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),E=a.utils.renderWatch(D,B),F=0;return b.dispatch=D,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return k},set:function(a){k=a}},height:{get:function(){return l},set:function(a){l=a}},x:{get:function(){return q},set:function(a){q=a}},y:{get:function(){return r},set:function(a){r=a}},yErr:{get:function(){return s},set:function(a){s=a}},xScale:{get:function(){return m},set:function(a){m=a}},yScale:{get:function(){return n},set:function(a){n=a}},xDomain:{get:function(){return d},set:function(a){d=a}},yDomain:{get:function(){return e},set:function(a){e=a}},xRange:{get:function(){return f},set:function(a){f=a}},yRange:{get:function(){return g},set:function(a){g=a}},forceY:{get:function(){return t},set:function(a){t=a}},stacked:{get:function(){return v},set:function(a){v=a}},stackOffset:{get:function(){return w},set:function(a){w=a}},clipEdge:{get:function(){return u},set:function(a){u=a}},disabled:{get:function(){return c},set:function(a){c=a}},id:{get:function(){return o},set:function(a){o=a}},hideable:{get:function(){return z
-},set:function(a){z=a}},groupSpacing:{get:function(){return C},set:function(a){C=a}},margin:{get:function(){return j},set:function(a){j.top=void 0!==a.top?a.top:j.top,j.right=void 0!==a.right?a.right:j.right,j.bottom=void 0!==a.bottom?a.bottom:j.bottom,j.left=void 0!==a.left?a.left:j.left}},duration:{get:function(){return B},set:function(a){B=a,E.reset(B)}},color:{get:function(){return x},set:function(b){x=a.utils.getColor(b)}},barColor:{get:function(){return A},set:function(b){A=b?a.utils.getColor(b):null}},errorBarColor:{get:function(){return y},set:function(b){y=b?a.utils.getColor(b):null}}}),a.utils.initOptions(b),b},a.models.multiBarChart=function(){"use strict";function b(j){return D.reset(),D.models(e),r&&D.models(f),s&&D.models(g),j.each(function(j){var z=d3.select(this);a.utils.initSVG(z);var D=a.utils.availableWidth(l,z,k),H=a.utils.availableHeight(m,z,k);if(b.update=function(){0===C?z.call(b):z.transition().duration(C).call(b)},b.container=this,x.setter(G(j),b.update).getter(F(j)).update(),x.disabled=j.map(function(a){return!!a.disabled}),!y){var I;y={};for(I in x)y[I]=x[I]instanceof Array?x[I].slice(0):x[I]}if(!(j&&j.length&&j.filter(function(a){return a.values.length}).length))return a.utils.noData(b,z),b;z.selectAll(".nv-noData").remove(),c=e.xScale(),d=e.yScale();var J=z.selectAll("g.nv-wrap.nv-multiBarWithLegend").data([j]),K=J.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarWithLegend").append("g"),L=J.select("g");if(K.append("g").attr("class","nv-x nv-axis"),K.append("g").attr("class","nv-y nv-axis"),K.append("g").attr("class","nv-barsWrap"),K.append("g").attr("class","nv-legendWrap"),K.append("g").attr("class","nv-controlsWrap"),q&&(h.width(D-B()),L.select(".nv-legendWrap").datum(j).call(h),k.top!=h.height()&&(k.top=h.height(),H=a.utils.availableHeight(m,z,k)),L.select(".nv-legendWrap").attr("transform","translate("+B()+","+-k.top+")")),o){var M=[{key:p.grouped||"Grouped",disabled:e.stacked()},{key:p.stacked||"Stacked",disabled:!e.stacked()}];i.width(B()).color(["#444","#444","#444"]),L.select(".nv-controlsWrap").datum(M).attr("transform","translate(0,"+-k.top+")").call(i)}J.attr("transform","translate("+k.left+","+k.top+")"),t&&L.select(".nv-y.nv-axis").attr("transform","translate("+D+",0)"),e.disabled(j.map(function(a){return a.disabled})).width(D).height(H).color(j.map(function(a,b){return a.color||n(a,b)}).filter(function(a,b){return!j[b].disabled}));var N=L.select(".nv-barsWrap").datum(j.filter(function(a){return!a.disabled}));if(N.call(e),r){f.scale(c)._ticks(a.utils.calcTicksX(D/100,j)).tickSize(-H,0),L.select(".nv-x.nv-axis").attr("transform","translate(0,"+d.range()[0]+")"),L.select(".nv-x.nv-axis").call(f);var O=L.select(".nv-x.nv-axis > g").selectAll("g");if(O.selectAll("line, text").style("opacity",1),v){var P=function(a,b){return"translate("+a+","+b+")"},Q=5,R=17;O.selectAll("text").attr("transform",function(a,b,c){return P(0,c%2==0?Q:R)});var S=d3.selectAll(".nv-x.nv-axis .nv-wrap g g text")[0].length;L.selectAll(".nv-x.nv-axis .nv-axisMaxMin text").attr("transform",function(a,b){return P(0,0===b||S%2!==0?R:Q)})}u&&O.filter(function(a,b){return b%Math.ceil(j[0].values.length/(D/100))!==0}).selectAll("text, line").style("opacity",0),w&&O.selectAll(".tick text").attr("transform","rotate("+w+" 0,0)").style("text-anchor",w>0?"start":"end"),L.select(".nv-x.nv-axis").selectAll("g.nv-axisMaxMin text").style("opacity",1)}s&&(g.scale(d)._ticks(a.utils.calcTicksY(H/36,j)).tickSize(-D,0),L.select(".nv-y.nv-axis").call(g)),h.dispatch.on("stateChange",function(a){for(var c in a)x[c]=a[c];A.stateChange(x),b.update()}),i.dispatch.on("legendClick",function(a){if(a.disabled){switch(M=M.map(function(a){return a.disabled=!0,a}),a.disabled=!1,a.key){case"Grouped":case p.grouped:e.stacked(!1);break;case"Stacked":case p.stacked:e.stacked(!0)}x.stacked=e.stacked(),A.stateChange(x),b.update()}}),A.on("changeState",function(a){"undefined"!=typeof a.disabled&&(j.forEach(function(b,c){b.disabled=a.disabled[c]}),x.disabled=a.disabled),"undefined"!=typeof a.stacked&&(e.stacked(a.stacked),x.stacked=a.stacked,E=a.stacked),b.update()})}),D.renderEnd("multibarchart immediate"),b}var c,d,e=a.models.multiBar(),f=a.models.axis(),g=a.models.axis(),h=a.models.legend(),i=a.models.legend(),j=a.models.tooltip(),k={top:30,right:20,bottom:50,left:60},l=null,m=null,n=a.utils.defaultColor(),o=!0,p={},q=!0,r=!0,s=!0,t=!1,u=!0,v=!1,w=0,x=a.utils.state(),y=null,z=null,A=d3.dispatch("stateChange","changeState","renderEnd"),B=function(){return o?180:0},C=250;x.stacked=!1,e.stacked(!1),f.orient("bottom").tickPadding(7).showMaxMin(!1).tickFormat(function(a){return a}),g.orient(t?"right":"left").tickFormat(d3.format(",.1f")),j.duration(0).valueFormatter(function(a,b){return g.tickFormat()(a,b)}).headerFormatter(function(a,b){return f.tickFormat()(a,b)}),i.updateState(!1);var D=a.utils.renderWatch(A),E=!1,F=function(a){return function(){return{active:a.map(function(a){return!a.disabled}),stacked:E}}},G=function(a){return function(b){void 0!==b.stacked&&(E=b.stacked),void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};return e.dispatch.on("elementMouseover.tooltip",function(a){a.value=b.x()(a.data),a.series={key:a.data.key,value:b.y()(a.data),color:a.color},j.data(a).hidden(!1)}),e.dispatch.on("elementMouseout.tooltip",function(){j.hidden(!0)}),e.dispatch.on("elementMousemove.tooltip",function(){j.position({top:d3.event.pageY,left:d3.event.pageX})()}),b.dispatch=A,b.multibar=e,b.legend=h,b.controls=i,b.xAxis=f,b.yAxis=g,b.state=x,b.tooltip=j,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return l},set:function(a){l=a}},height:{get:function(){return m},set:function(a){m=a}},showLegend:{get:function(){return q},set:function(a){q=a}},showControls:{get:function(){return o},set:function(a){o=a}},controlLabels:{get:function(){return p},set:function(a){p=a}},showXAxis:{get:function(){return r},set:function(a){r=a}},showYAxis:{get:function(){return s},set:function(a){s=a}},defaultState:{get:function(){return y},set:function(a){y=a}},noData:{get:function(){return z},set:function(a){z=a}},reduceXTicks:{get:function(){return u},set:function(a){u=a}},rotateLabels:{get:function(){return w},set:function(a){w=a}},staggerLabels:{get:function(){return v},set:function(a){v=a}},tooltips:{get:function(){return j.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),j.enabled(!!b)}},tooltipContent:{get:function(){return j.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),j.contentGenerator(b)}},margin:{get:function(){return k},set:function(a){k.top=void 0!==a.top?a.top:k.top,k.right=void 0!==a.right?a.right:k.right,k.bottom=void 0!==a.bottom?a.bottom:k.bottom,k.left=void 0!==a.left?a.left:k.left}},duration:{get:function(){return C},set:function(a){C=a,e.duration(C),f.duration(C),g.duration(C),D.reset(C)}},color:{get:function(){return n},set:function(b){n=a.utils.getColor(b),h.color(n)}},rightAlignYAxis:{get:function(){return t},set:function(a){t=a,g.orient(t?"right":"left")}},barColor:{get:function(){return e.barColor},set:function(a){e.barColor(a),h.color(function(a,b){return d3.rgb("#ccc").darker(1.5*b).toString()})}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.multiBarHorizontal=function(){"use strict";function b(m){return F.reset(),m.each(function(b){var m=k-j.left-j.right,D=l-j.top-j.bottom;n=d3.select(this),a.utils.initSVG(n),x&&(b=d3.layout.stack().offset("zero").values(function(a){return a.values}).y(r)(b)),b.forEach(function(a,b){a.values.forEach(function(c){c.series=b,c.key=a.key})}),x&&b[0].values.map(function(a,c){var d=0,e=0;b.map(function(a){var b=a.values[c];b.size=Math.abs(b.y),b.y<0?(b.y1=e-b.size,e-=b.size):(b.y1=d,d+=b.size)})});var G=d&&e?[]:b.map(function(a){return a.values.map(function(a,b){return{x:q(a,b),y:r(a,b),y0:a.y0,y1:a.y1,yErr:s(a,b)}})});o.domain(d||d3.merge(G).map(function(a){return a.x})).rangeBands(f||[0,D],B),p.domain(e||d3.extent(d3.merge(d3.merge(G).map(function(a){var b=a.y;x&&(b=a.y>0?a.y1+a.y:a.y1);var c=a.yErr;return c?c.length?[b+c[0],b+c[1]]:(c=Math.abs(c),[b-c,b+c]):[b]})).concat(t))),p.range(y&&!x?g||[p.domain()[0]<0?A:0,m-(p.domain()[1]>0?A:0)]:g||[0,m]),h=h||o,i=i||d3.scale.linear().domain(p.domain()).range([p(0),p(0)]);{var H=d3.select(this).selectAll("g.nv-wrap.nv-multibarHorizontal").data([b]),I=H.enter().append("g").attr("class","nvd3 nv-wrap nv-multibarHorizontal"),J=(I.append("defs"),I.append("g"));H.select("g")}J.append("g").attr("class","nv-groups"),H.attr("transform","translate("+j.left+","+j.top+")");var K=H.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a,b){return b});K.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),K.exit().watchTransition(F,"multibarhorizontal: exit groups").style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),K.attr("class",function(a,b){return"nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}).style("fill",function(a,b){return u(a,b)}).style("stroke",function(a,b){return u(a,b)}),K.watchTransition(F,"multibarhorizontal: groups").style("stroke-opacity",1).style("fill-opacity",.75);var L=K.selectAll("g.nv-bar").data(function(a){return a.values});L.exit().remove();var M=L.enter().append("g").attr("transform",function(a,c,d){return"translate("+i(x?a.y0:0)+","+(x?0:d*o.rangeBand()/b.length+o(q(a,c)))+")"});M.append("rect").attr("width",0).attr("height",o.rangeBand()/(x?1:b.length)),L.on("mouseover",function(a,b){d3.select(this).classed("hover",!0),E.elementMouseover({data:a,index:b,color:d3.select(this).style("fill")})}).on("mouseout",function(a,b){d3.select(this).classed("hover",!1),E.elementMouseout({data:a,index:b,color:d3.select(this).style("fill")})}).on("mouseout",function(a,b){E.elementMouseout({data:a,index:b,color:d3.select(this).style("fill")})}).on("mousemove",function(a,b){E.elementMousemove({data:a,index:b,color:d3.select(this).style("fill")})}).on("click",function(a,b){E.elementClick({data:a,index:b,color:d3.select(this).style("fill")}),d3.event.stopPropagation()}).on("dblclick",function(a,b){E.elementDblClick({data:a,index:b,color:d3.select(this).style("fill")}),d3.event.stopPropagation()}),s(b[0].values[0],0)&&(M.append("polyline"),L.select("polyline").attr("fill","none").attr("stroke",function(a,b,c){return w(a,c,b)}).attr("points",function(a,c){var d=s(a,c),e=.8*o.rangeBand()/(2*(x?1:b.length));d=d.length?d:[-Math.abs(d),Math.abs(d)],d=d.map(function(a){return p(a)-p(0)});var f=[[d[0],-e],[d[0],e],[d[0],0],[d[1],0],[d[1],-e],[d[1],e]];return f.map(function(a){return a.join(",")}).join(" ")}).attr("transform",function(a,c){var d=o.rangeBand()/(2*(x?1:b.length));return"translate("+(r(a,c)<0?0:p(r(a,c))-p(0))+", "+d+")"})),M.append("text"),y&&!x?(L.select("text").attr("text-anchor",function(a,b){return r(a,b)<0?"end":"start"}).attr("y",o.rangeBand()/(2*b.length)).attr("dy",".32em").text(function(a,b){var c=C(r(a,b)),d=s(a,b);return void 0===d?c:d.length?c+"+"+C(Math.abs(d[1]))+"-"+C(Math.abs(d[0])):c+"±"+C(Math.abs(d))}),L.watchTransition(F,"multibarhorizontal: bars").select("text").attr("x",function(a,b){return r(a,b)<0?-4:p(r(a,b))-p(0)+4})):L.selectAll("text").text(""),z&&!x?(M.append("text").classed("nv-bar-label",!0),L.select("text.nv-bar-label").attr("text-anchor",function(a,b){return r(a,b)<0?"start":"end"}).attr("y",o.rangeBand()/(2*b.length)).attr("dy",".32em").text(function(a,b){return q(a,b)}),L.watchTransition(F,"multibarhorizontal: bars").select("text.nv-bar-label").attr("x",function(a,b){return r(a,b)<0?p(0)-p(r(a,b))+4:-4})):L.selectAll("text.nv-bar-label").text(""),L.attr("class",function(a,b){return r(a,b)<0?"nv-bar negative":"nv-bar positive"}),v&&(c||(c=b.map(function(){return!0})),L.style("fill",function(a,b,d){return d3.rgb(v(a,b)).darker(c.map(function(a,b){return b}).filter(function(a,b){return!c[b]})[d]).toString()}).style("stroke",function(a,b,d){return d3.rgb(v(a,b)).darker(c.map(function(a,b){return b}).filter(function(a,b){return!c[b]})[d]).toString()})),x?L.watchTransition(F,"multibarhorizontal: bars").attr("transform",function(a,b){return"translate("+p(a.y1)+","+o(q(a,b))+")"}).select("rect").attr("width",function(a,b){return Math.abs(p(r(a,b)+a.y0)-p(a.y0))}).attr("height",o.rangeBand()):L.watchTransition(F,"multibarhorizontal: bars").attr("transform",function(a,c){return"translate("+p(r(a,c)<0?r(a,c):0)+","+(a.series*o.rangeBand()/b.length+o(q(a,c)))+")"}).select("rect").attr("height",o.rangeBand()/b.length).attr("width",function(a,b){return Math.max(Math.abs(p(r(a,b))-p(0)),1)}),h=o.copy(),i=p.copy()}),F.renderEnd("multibarHorizontal immediate"),b}var c,d,e,f,g,h,i,j={top:0,right:0,bottom:0,left:0},k=960,l=500,m=Math.floor(1e4*Math.random()),n=null,o=d3.scale.ordinal(),p=d3.scale.linear(),q=function(a){return a.x},r=function(a){return a.y},s=function(a){return a.yErr},t=[0],u=a.utils.defaultColor(),v=null,w=a.utils.defaultColor(),x=!1,y=!1,z=!1,A=60,B=.1,C=d3.format(",.2f"),D=250,E=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),F=a.utils.renderWatch(E,D);return b.dispatch=E,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return k},set:function(a){k=a}},height:{get:function(){return l},set:function(a){l=a}},x:{get:function(){return q},set:function(a){q=a}},y:{get:function(){return r},set:function(a){r=a}},yErr:{get:function(){return s},set:function(a){s=a}},xScale:{get:function(){return o},set:function(a){o=a}},yScale:{get:function(){return p},set:function(a){p=a}},xDomain:{get:function(){return d},set:function(a){d=a}},yDomain:{get:function(){return e},set:function(a){e=a}},xRange:{get:function(){return f},set:function(a){f=a}},yRange:{get:function(){return g},set:function(a){g=a}},forceY:{get:function(){return t},set:function(a){t=a}},stacked:{get:function(){return x},set:function(a){x=a}},showValues:{get:function(){return y},set:function(a){y=a}},disabled:{get:function(){return c},set:function(a){c=a}},id:{get:function(){return m},set:function(a){m=a}},valueFormat:{get:function(){return C},set:function(a){C=a}},valuePadding:{get:function(){return A},set:function(a){A=a}},groupSpacing:{get:function(){return B},set:function(a){B=a}},margin:{get:function(){return j},set:function(a){j.top=void 0!==a.top?a.top:j.top,j.right=void 0!==a.right?a.right:j.right,j.bottom=void 0!==a.bottom?a.bottom:j.bottom,j.left=void 0!==a.left?a.left:j.left}},duration:{get:function(){return D},set:function(a){D=a,F.reset(D)}},color:{get:function(){return u},set:function(b){u=a.utils.getColor(b)}},barColor:{get:function(){return v},set:function(b){v=b?a.utils.getColor(b):null}},errorBarColor:{get:function(){return w},set:function(b){w=b?a.utils.getColor(b):null}}}),a.utils.initOptions(b),b},a.models.multiBarHorizontalChart=function(){"use strict";function b(j){return C.reset(),C.models(e),r&&C.models(f),s&&C.models(g),j.each(function(j){var w=d3.select(this);a.utils.initSVG(w);var C=a.utils.availableWidth(l,w,k),D=a.utils.availableHeight(m,w,k);if(b.update=function(){w.transition().duration(z).call(b)},b.container=this,t=e.stacked(),u.setter(B(j),b.update).getter(A(j)).update(),u.disabled=j.map(function(a){return!!a.disabled}),!v){var E;v={};for(E in u)v[E]=u[E]instanceof Array?u[E].slice(0):u[E]}if(!(j&&j.length&&j.filter(function(a){return a.values.length}).length))return a.utils.noData(b,w),b;w.selectAll(".nv-noData").remove(),c=e.xScale(),d=e.yScale();var F=w.selectAll("g.nv-wrap.nv-multiBarHorizontalChart").data([j]),G=F.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarHorizontalChart").append("g"),H=F.select("g");if(G.append("g").attr("class","nv-x nv-axis"),G.append("g").attr("class","nv-y nv-axis").append("g").attr("class","nv-zeroLine").append("line"),G.append("g").attr("class","nv-barsWrap"),G.append("g").attr("class","nv-legendWrap"),G.append("g").attr("class","nv-controlsWrap"),q&&(h.width(C-y()),H.select(".nv-legendWrap").datum(j).call(h),k.top!=h.height()&&(k.top=h.height(),D=a.utils.availableHeight(m,w,k)),H.select(".nv-legendWrap").attr("transform","translate("+y()+","+-k.top+")")),o){var I=[{key:p.grouped||"Grouped",disabled:e.stacked()},{key:p.stacked||"Stacked",disabled:!e.stacked()}];i.width(y()).color(["#444","#444","#444"]),H.select(".nv-controlsWrap").datum(I).attr("transform","translate(0,"+-k.top+")").call(i)}F.attr("transform","translate("+k.left+","+k.top+")"),e.disabled(j.map(function(a){return a.disabled})).width(C).height(D).color(j.map(function(a,b){return a.color||n(a,b)}).filter(function(a,b){return!j[b].disabled}));var J=H.select(".nv-barsWrap").datum(j.filter(function(a){return!a.disabled}));if(J.transition().call(e),r){f.scale(c)._ticks(a.utils.calcTicksY(D/24,j)).tickSize(-C,0),H.select(".nv-x.nv-axis").call(f);var K=H.select(".nv-x.nv-axis").selectAll("g");K.selectAll("line, text")}s&&(g.scale(d)._ticks(a.utils.calcTicksX(C/100,j)).tickSize(-D,0),H.select(".nv-y.nv-axis").attr("transform","translate(0,"+D+")"),H.select(".nv-y.nv-axis").call(g)),H.select(".nv-zeroLine line").attr("x1",d(0)).attr("x2",d(0)).attr("y1",0).attr("y2",-D),h.dispatch.on("stateChange",function(a){for(var c in a)u[c]=a[c];x.stateChange(u),b.update()}),i.dispatch.on("legendClick",function(a){if(a.disabled){switch(I=I.map(function(a){return a.disabled=!0,a}),a.disabled=!1,a.key){case"Grouped":e.stacked(!1);break;case"Stacked":e.stacked(!0)}u.stacked=e.stacked(),x.stateChange(u),t=e.stacked(),b.update()}}),x.on("changeState",function(a){"undefined"!=typeof a.disabled&&(j.forEach(function(b,c){b.disabled=a.disabled[c]}),u.disabled=a.disabled),"undefined"!=typeof a.stacked&&(e.stacked(a.stacked),u.stacked=a.stacked,t=a.stacked),b.update()})}),C.renderEnd("multibar horizontal chart immediate"),b}var c,d,e=a.models.multiBarHorizontal(),f=a.models.axis(),g=a.models.axis(),h=a.models.legend().height(30),i=a.models.legend().height(30),j=a.models.tooltip(),k={top:30,right:20,bottom:50,left:60},l=null,m=null,n=a.utils.defaultColor(),o=!0,p={},q=!0,r=!0,s=!0,t=!1,u=a.utils.state(),v=null,w=null,x=d3.dispatch("stateChange","changeState","renderEnd"),y=function(){return o?180:0},z=250;u.stacked=!1,e.stacked(t),f.orient("left").tickPadding(5).showMaxMin(!1).tickFormat(function(a){return a}),g.orient("bottom").tickFormat(d3.format(",.1f")),j.duration(0).valueFormatter(function(a,b){return g.tickFormat()(a,b)}).headerFormatter(function(a,b){return f.tickFormat()(a,b)}),i.updateState(!1);var A=function(a){return function(){return{active:a.map(function(a){return!a.disabled}),stacked:t}}},B=function(a){return function(b){void 0!==b.stacked&&(t=b.stacked),void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}},C=a.utils.renderWatch(x,z);return e.dispatch.on("elementMouseover.tooltip",function(a){a.value=b.x()(a.data),a.series={key:a.data.key,value:b.y()(a.data),color:a.color},j.data(a).hidden(!1)}),e.dispatch.on("elementMouseout.tooltip",function(){j.hidden(!0)}),e.dispatch.on("elementMousemove.tooltip",function(){j.position({top:d3.event.pageY,left:d3.event.pageX})()}),b.dispatch=x,b.multibar=e,b.legend=h,b.controls=i,b.xAxis=f,b.yAxis=g,b.state=u,b.tooltip=j,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return l},set:function(a){l=a}},height:{get:function(){return m},set:function(a){m=a}},showLegend:{get:function(){return q},set:function(a){q=a}},showControls:{get:function(){return o},set:function(a){o=a}},controlLabels:{get:function(){return p},set:function(a){p=a}},showXAxis:{get:function(){return r},set:function(a){r=a}},showYAxis:{get:function(){return s},set:function(a){s=a}},defaultState:{get:function(){return v},set:function(a){v=a}},noData:{get:function(){return w},set:function(a){w=a}},tooltips:{get:function(){return j.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),j.enabled(!!b)}},tooltipContent:{get:function(){return j.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),j.contentGenerator(b)}},margin:{get:function(){return k},set:function(a){k.top=void 0!==a.top?a.top:k.top,k.right=void 0!==a.right?a.right:k.right,k.bottom=void 0!==a.bottom?a.bottom:k.bottom,k.left=void 0!==a.left?a.left:k.left}},duration:{get:function(){return z},set:function(a){z=a,C.reset(z),e.duration(z),f.duration(z),g.duration(z)}},color:{get:function(){return n},set:function(b){n=a.utils.getColor(b),h.color(n)}},barColor:{get:function(){return e.barColor},set:function(a){e.barColor(a),h.color(function(a,b){return d3.rgb("#ccc").darker(1.5*b).toString()})}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.multiChart=function(){"use strict";function b(j){return j.each(function(j){function k(a){var b=2===j[a.seriesIndex].yAxis?B:A;a.value=a.point.x,a.series={value:a.point.y,color:a.point.color},D.duration(100).valueFormatter(function(a,c){return b.tickFormat()(a,c)}).data(a).position(a.pos).hidden(!1)}function l(a){var b=2===j[a.seriesIndex].yAxis?B:A;a.value=a.point.x,a.series={value:a.point.y,color:a.point.color},D.duration(100).valueFormatter(function(a,c){return b.tickFormat()(a,c)}).data(a).position(a.pos).hidden(!1)}function n(a){var b=2===j[a.seriesIndex].yAxis?B:A;a.point.x=x.x()(a.point),a.point.y=x.y()(a.point),D.duration(100).valueFormatter(function(a,c){return b.tickFormat()(a,c)}).data(a).position(a.pos).hidden(!1)}function E(a){var b=2===j[a.data.series].yAxis?B:A;a.value=v.x()(a.data),a.series={value:v.y()(a.data),color:a.color},D.duration(0).valueFormatter(function(a,c){return b.tickFormat()(a,c)}).data(a).hidden(!1)}var F=d3.select(this);a.utils.initSVG(F),b.update=function(){F.transition().call(b)},b.container=this;var G=a.utils.availableWidth(g,F,e),H=a.utils.availableHeight(h,F,e),I=j.filter(function(a){return"line"==a.type&&1==a.yAxis}),J=j.filter(function(a){return"line"==a.type&&2==a.yAxis}),K=j.filter(function(a){return"scatter"==a.type&&1==a.yAxis}),L=j.filter(function(a){return"scatter"==a.type&&2==a.yAxis}),M=j.filter(function(a){return"bar"==a.type&&1==a.yAxis}),N=j.filter(function(a){return"bar"==a.type&&2==a.yAxis}),O=j.filter(function(a){return"area"==a.type&&1==a.yAxis}),P=j.filter(function(a){return"area"==a.type&&2==a.yAxis});if(!(j&&j.length&&j.filter(function(a){return a.values.length}).length))return a.utils.noData(b,F),b;F.selectAll(".nv-noData").remove();var Q=j.filter(function(a){return!a.disabled&&1==a.yAxis}).map(function(a){return a.values.map(function(a){return{x:a.x,y:a.y}})}),R=j.filter(function(a){return!a.disabled&&2==a.yAxis}).map(function(a){return a.values.map(function(a){return{x:a.x,y:a.y}})});o.domain(d3.extent(d3.merge(Q.concat(R)),function(a){return a.x})).range([0,G]);var S=F.selectAll("g.wrap.multiChart").data([j]),T=S.enter().append("g").attr("class","wrap nvd3 multiChart").append("g");T.append("g").attr("class","nv-x nv-axis"),T.append("g").attr("class","nv-y1 nv-axis"),T.append("g").attr("class","nv-y2 nv-axis"),T.append("g").attr("class","lines1Wrap"),T.append("g").attr("class","lines2Wrap"),T.append("g").attr("class","scatters1Wrap"),T.append("g").attr("class","scatters2Wrap"),T.append("g").attr("class","bars1Wrap"),T.append("g").attr("class","bars2Wrap"),T.append("g").attr("class","stack1Wrap"),T.append("g").attr("class","stack2Wrap"),T.append("g").attr("class","legendWrap");var U=S.select("g"),V=j.map(function(a,b){return j[b].color||f(a,b)});if(i){var W=C.align()?G/2:G,X=C.align()?W:0;C.width(W),C.color(V),U.select(".legendWrap").datum(j.map(function(a){return a.originalKey=void 0===a.originalKey?a.key:a.originalKey,a.key=a.originalKey+(1==a.yAxis?"":" (right axis)"),a})).call(C),e.top!=C.height()&&(e.top=C.height(),H=a.utils.availableHeight(h,F,e)),U.select(".legendWrap").attr("transform","translate("+X+","+-e.top+")")}r.width(G).height(H).interpolate(m).color(V.filter(function(a,b){return!j[b].disabled&&1==j[b].yAxis&&"line"==j[b].type})),s.width(G).height(H).interpolate(m).color(V.filter(function(a,b){return!j[b].disabled&&2==j[b].yAxis&&"line"==j[b].type})),t.width(G).height(H).color(V.filter(function(a,b){return!j[b].disabled&&1==j[b].yAxis&&"scatter"==j[b].type})),u.width(G).height(H).color(V.filter(function(a,b){return!j[b].disabled&&2==j[b].yAxis&&"scatter"==j[b].type})),v.width(G).height(H).color(V.filter(function(a,b){return!j[b].disabled&&1==j[b].yAxis&&"bar"==j[b].type})),w.width(G).height(H).color(V.filter(function(a,b){return!j[b].disabled&&2==j[b].yAxis&&"bar"==j[b].type})),x.width(G).height(H).color(V.filter(function(a,b){return!j[b].disabled&&1==j[b].yAxis&&"area"==j[b].type})),y.width(G).height(H).color(V.filter(function(a,b){return!j[b].disabled&&2==j[b].yAxis&&"area"==j[b].type})),U.attr("transform","translate("+e.left+","+e.top+")");var Y=U.select(".lines1Wrap").datum(I.filter(function(a){return!a.disabled})),Z=U.select(".scatters1Wrap").datum(K.filter(function(a){return!a.disabled})),$=U.select(".bars1Wrap").datum(M.filter(function(a){return!a.disabled})),_=U.select(".stack1Wrap").datum(O.filter(function(a){return!a.disabled})),ab=U.select(".lines2Wrap").datum(J.filter(function(a){return!a.disabled})),bb=U.select(".scatters2Wrap").datum(L.filter(function(a){return!a.disabled})),cb=U.select(".bars2Wrap").datum(N.filter(function(a){return!a.disabled})),db=U.select(".stack2Wrap").datum(P.filter(function(a){return!a.disabled})),eb=O.length?O.map(function(a){return a.values}).reduce(function(a,b){return a.map(function(a,c){return{x:a.x,y:a.y+b[c].y}})}).concat([{x:0,y:0}]):[],fb=P.length?P.map(function(a){return a.values}).reduce(function(a,b){return a.map(function(a,c){return{x:a.x,y:a.y+b[c].y}})}).concat([{x:0,y:0}]):[];p.domain(c||d3.extent(d3.merge(Q).concat(eb),function(a){return a.y})).range([0,H]),q.domain(d||d3.extent(d3.merge(R).concat(fb),function(a){return a.y})).range([0,H]),r.yDomain(p.domain()),t.yDomain(p.domain()),v.yDomain(p.domain()),x.yDomain(p.domain()),s.yDomain(q.domain()),u.yDomain(q.domain()),w.yDomain(q.domain()),y.yDomain(q.domain()),O.length&&d3.transition(_).call(x),P.length&&d3.transition(db).call(y),M.length&&d3.transition($).call(v),N.length&&d3.transition(cb).call(w),I.length&&d3.transition(Y).call(r),J.length&&d3.transition(ab).call(s),K.length&&d3.transition(Z).call(t),L.length&&d3.transition(bb).call(u),z._ticks(a.utils.calcTicksX(G/100,j)).tickSize(-H,0),U.select(".nv-x.nv-axis").attr("transform","translate(0,"+H+")"),d3.transition(U.select(".nv-x.nv-axis")).call(z),A._ticks(a.utils.calcTicksY(H/36,j)).tickSize(-G,0),d3.transition(U.select(".nv-y1.nv-axis")).call(A),B._ticks(a.utils.calcTicksY(H/36,j)).tickSize(-G,0),d3.transition(U.select(".nv-y2.nv-axis")).call(B),U.select(".nv-y1.nv-axis").classed("nv-disabled",Q.length?!1:!0).attr("transform","translate("+o.range()[0]+",0)"),U.select(".nv-y2.nv-axis").classed("nv-disabled",R.length?!1:!0).attr("transform","translate("+o.range()[1]+",0)"),C.dispatch.on("stateChange",function(){b.update()}),r.dispatch.on("elementMouseover.tooltip",k),s.dispatch.on("elementMouseover.tooltip",k),r.dispatch.on("elementMouseout.tooltip",function(){D.hidden(!0)}),s.dispatch.on("elementMouseout.tooltip",function(){D.hidden(!0)}),t.dispatch.on("elementMouseover.tooltip",l),u.dispatch.on("elementMouseover.tooltip",l),t.dispatch.on("elementMouseout.tooltip",function(){D.hidden(!0)}),u.dispatch.on("elementMouseout.tooltip",function(){D.hidden(!0)}),x.dispatch.on("elementMouseover.tooltip",n),y.dispatch.on("elementMouseover.tooltip",n),x.dispatch.on("elementMouseout.tooltip",function(){D.hidden(!0)}),y.dispatch.on("elementMouseout.tooltip",function(){D.hidden(!0)}),v.dispatch.on("elementMouseover.tooltip",E),w.dispatch.on("elementMouseover.tooltip",E),v.dispatch.on("elementMouseout.tooltip",function(){D.hidden(!0)}),w.dispatch.on("elementMouseout.tooltip",function(){D.hidden(!0)}),v.dispatch.on("elementMousemove.tooltip",function(){D.position({top:d3.event.pageY,left:d3.event.pageX})()}),w.dispatch.on("elementMousemove.tooltip",function(){D.position({top:d3.event.pageY,left:d3.event.pageX})()})}),b}var c,d,e={top:30,right:20,bottom:50,left:60},f=a.utils.defaultColor(),g=null,h=null,i=!0,j=null,k=function(a){return a.x},l=function(a){return a.y},m="monotone",n=!0,o=d3.scale.linear(),p=d3.scale.linear(),q=d3.scale.linear(),r=a.models.line().yScale(p),s=a.models.line().yScale(q),t=a.models.scatter().yScale(p),u=a.models.scatter().yScale(q),v=a.models.multiBar().stacked(!1).yScale(p),w=a.models.multiBar().stacked(!1).yScale(q),x=a.models.stackedArea().yScale(p),y=a.models.stackedArea().yScale(q),z=a.models.axis().scale(o).orient("bottom").tickPadding(5),A=a.models.axis().scale(p).orient("left"),B=a.models.axis().scale(q).orient("right"),C=a.models.legend().height(30),D=a.models.tooltip(),E=d3.dispatch();return b.dispatch=E,b.lines1=r,b.lines2=s,b.scatters1=t,b.scatters2=u,b.bars1=v,b.bars2=w,b.stack1=x,b.stack2=y,b.xAxis=z,b.yAxis1=A,b.yAxis2=B,b.tooltip=D,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return g},set:function(a){g=a}},height:{get:function(){return h},set:function(a){h=a}},showLegend:{get:function(){return i},set:function(a){i=a}},yDomain1:{get:function(){return c},set:function(a){c=a}},yDomain2:{get:function(){return d},set:function(a){d=a}},noData:{get:function(){return j},set:function(a){j=a}},interpolate:{get:function(){return m},set:function(a){m=a}},tooltips:{get:function(){return D.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),D.enabled(!!b)}},tooltipContent:{get:function(){return D.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),D.contentGenerator(b)}},margin:{get:function(){return e},set:function(a){e.top=void 0!==a.top?a.top:e.top,e.right=void 0!==a.right?a.right:e.right,e.bottom=void 0!==a.bottom?a.bottom:e.bottom,e.left=void 0!==a.left?a.left:e.left}},color:{get:function(){return f},set:function(b){f=a.utils.getColor(b)}},x:{get:function(){return k},set:function(a){k=a,r.x(a),s.x(a),t.x(a),u.x(a),v.x(a),w.x(a),x.x(a),y.x(a)}},y:{get:function(){return l},set:function(a){l=a,r.y(a),s.y(a),t.y(a),u.y(a),x.y(a),y.y(a),v.y(a),w.y(a)}},useVoronoi:{get:function(){return n},set:function(a){n=a,r.useVoronoi(a),s.useVoronoi(a),x.useVoronoi(a),y.useVoronoi(a)}}}),a.utils.initOptions(b),b},a.models.ohlcBar=function(){"use strict";function b(y){return y.each(function(b){k=d3.select(this);var y=a.utils.availableWidth(h,k,g),A=a.utils.availableHeight(i,k,g);a.utils.initSVG(k);var B=y/b[0].values.length*.9;l.domain(c||d3.extent(b[0].values.map(n).concat(t))),l.range(v?e||[.5*y/b[0].values.length,y*(b[0].values.length-.5)/b[0].values.length]:e||[5+B/2,y-B/2-5]),m.domain(d||[d3.min(b[0].values.map(s).concat(u)),d3.max(b[0].values.map(r).concat(u))]).range(f||[A,0]),l.domain()[0]===l.domain()[1]&&l.domain(l.domain()[0]?[l.domain()[0]-.01*l.domain()[0],l.domain()[1]+.01*l.domain()[1]]:[-1,1]),m.domain()[0]===m.domain()[1]&&m.domain(m.domain()[0]?[m.domain()[0]+.01*m.domain()[0],m.domain()[1]-.01*m.domain()[1]]:[-1,1]);var C=d3.select(this).selectAll("g.nv-wrap.nv-ohlcBar").data([b[0].values]),D=C.enter().append("g").attr("class","nvd3 nv-wrap nv-ohlcBar"),E=D.append("defs"),F=D.append("g"),G=C.select("g");F.append("g").attr("class","nv-ticks"),C.attr("transform","translate("+g.left+","+g.top+")"),k.on("click",function(a,b){z.chartClick({data:a,index:b,pos:d3.event,id:j})}),E.append("clipPath").attr("id","nv-chart-clip-path-"+j).append("rect"),C.select("#nv-chart-clip-path-"+j+" rect").attr("width",y).attr("height",A),G.attr("clip-path",w?"url(#nv-chart-clip-path-"+j+")":"");var H=C.select(".nv-ticks").selectAll(".nv-tick").data(function(a){return a});H.exit().remove(),H.enter().append("path").attr("class",function(a,b,c){return(p(a,b)>q(a,b)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+c+"-"+b
-}).attr("d",function(a,b){return"m0,0l0,"+(m(p(a,b))-m(r(a,b)))+"l"+-B/2+",0l"+B/2+",0l0,"+(m(s(a,b))-m(p(a,b)))+"l0,"+(m(q(a,b))-m(s(a,b)))+"l"+B/2+",0l"+-B/2+",0z"}).attr("transform",function(a,b){return"translate("+l(n(a,b))+","+m(r(a,b))+")"}).attr("fill",function(){return x[0]}).attr("stroke",function(){return x[0]}).attr("x",0).attr("y",function(a,b){return m(Math.max(0,o(a,b)))}).attr("height",function(a,b){return Math.abs(m(o(a,b))-m(0))}),H.attr("class",function(a,b,c){return(p(a,b)>q(a,b)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+c+"-"+b}),d3.transition(H).attr("transform",function(a,b){return"translate("+l(n(a,b))+","+m(r(a,b))+")"}).attr("d",function(a,c){var d=y/b[0].values.length*.9;return"m0,0l0,"+(m(p(a,c))-m(r(a,c)))+"l"+-d/2+",0l"+d/2+",0l0,"+(m(s(a,c))-m(p(a,c)))+"l0,"+(m(q(a,c))-m(s(a,c)))+"l"+d/2+",0l"+-d/2+",0z"})}),b}var c,d,e,f,g={top:0,right:0,bottom:0,left:0},h=null,i=null,j=Math.floor(1e4*Math.random()),k=null,l=d3.scale.linear(),m=d3.scale.linear(),n=function(a){return a.x},o=function(a){return a.y},p=function(a){return a.open},q=function(a){return a.close},r=function(a){return a.high},s=function(a){return a.low},t=[],u=[],v=!1,w=!0,x=a.utils.defaultColor(),y=!1,z=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState","renderEnd","chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove");return b.highlightPoint=function(a,c){b.clearHighlights(),k.select(".nv-ohlcBar .nv-tick-0-"+a).classed("hover",c)},b.clearHighlights=function(){k.select(".nv-ohlcBar .nv-tick.hover").classed("hover",!1)},b.dispatch=z,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return h},set:function(a){h=a}},height:{get:function(){return i},set:function(a){i=a}},xScale:{get:function(){return l},set:function(a){l=a}},yScale:{get:function(){return m},set:function(a){m=a}},xDomain:{get:function(){return c},set:function(a){c=a}},yDomain:{get:function(){return d},set:function(a){d=a}},xRange:{get:function(){return e},set:function(a){e=a}},yRange:{get:function(){return f},set:function(a){f=a}},forceX:{get:function(){return t},set:function(a){t=a}},forceY:{get:function(){return u},set:function(a){u=a}},padData:{get:function(){return v},set:function(a){v=a}},clipEdge:{get:function(){return w},set:function(a){w=a}},id:{get:function(){return j},set:function(a){j=a}},interactive:{get:function(){return y},set:function(a){y=a}},x:{get:function(){return n},set:function(a){n=a}},y:{get:function(){return o},set:function(a){o=a}},open:{get:function(){return p()},set:function(a){p=a}},close:{get:function(){return q()},set:function(a){q=a}},high:{get:function(){return r},set:function(a){r=a}},low:{get:function(){return s},set:function(a){s=a}},margin:{get:function(){return g},set:function(a){g.top=void 0!=a.top?a.top:g.top,g.right=void 0!=a.right?a.right:g.right,g.bottom=void 0!=a.bottom?a.bottom:g.bottom,g.left=void 0!=a.left?a.left:g.left}},color:{get:function(){return x},set:function(b){x=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.parallelCoordinates=function(){"use strict";function b(p){return p.each(function(b){function p(a){return F(h.map(function(b){if(isNaN(a[b])||isNaN(parseFloat(a[b]))){var c=g[b].domain(),d=g[b].range(),e=c[0]-(c[1]-c[0])/9;if(J.indexOf(b)<0){var h=d3.scale.linear().domain([e,c[1]]).range([x-12,d[1]]);g[b].brush.y(h),J.push(b)}return[f(b),g[b](e)]}return J.length>0?(D.style("display","inline"),E.style("display","inline")):(D.style("display","none"),E.style("display","none")),[f(b),g[b](a[b])]}))}function q(){var a=h.filter(function(a){return!g[a].brush.empty()}),b=a.map(function(a){return g[a].brush.extent()});k=[],a.forEach(function(a,c){k[c]={dimension:a,extent:b[c]}}),l=[],M.style("display",function(c){var d=a.every(function(a,d){return isNaN(c[a])&&b[d][0]==g[a].brush.y().domain()[0]?!0:b[d][0]<=c[a]&&c[a]<=b[d][1]});return d&&l.push(c),d?null:"none"}),o.brush({filters:k,active:l})}function r(a){m[a]=this.parentNode.__origin__=f(a),L.attr("visibility","hidden")}function s(a){m[a]=Math.min(w,Math.max(0,this.parentNode.__origin__+=d3.event.x)),M.attr("d",p),h.sort(function(a,b){return u(a)-u(b)}),f.domain(h),N.attr("transform",function(a){return"translate("+u(a)+")"})}function t(a){delete this.parentNode.__origin__,delete m[a],d3.select(this.parentNode).attr("transform","translate("+f(a)+")"),M.attr("d",p),L.attr("d",p).attr("visibility",null)}function u(a){var b=m[a];return null==b?f(a):b}var v=d3.select(this),w=a.utils.availableWidth(d,v,c),x=a.utils.availableHeight(e,v,c);a.utils.initSVG(v),l=b,f.rangePoints([0,w],1).domain(h);var y={};h.forEach(function(a){var c=d3.extent(b,function(b){return+b[a]});return y[a]=!1,void 0===c[0]&&(y[a]=!0,c[0]=0,c[1]=0),c[0]===c[1]&&(c[0]=c[0]-1,c[1]=c[1]+1),g[a]=d3.scale.linear().domain(c).range([.9*(x-12),0]),g[a].brush=d3.svg.brush().y(g[a]).on("brush",q),"name"!=a});var z=v.selectAll("g.nv-wrap.nv-parallelCoordinates").data([b]),A=z.enter().append("g").attr("class","nvd3 nv-wrap nv-parallelCoordinates"),B=A.append("g"),C=z.select("g");B.append("g").attr("class","nv-parallelCoordinates background"),B.append("g").attr("class","nv-parallelCoordinates foreground"),B.append("g").attr("class","nv-parallelCoordinates missingValuesline"),z.attr("transform","translate("+c.left+","+c.top+")");var D,E,F=d3.svg.line().interpolate("cardinal").tension(n),G=d3.svg.axis().orient("left"),H=d3.behavior.drag().on("dragstart",r).on("drag",s).on("dragend",t),I=f.range()[1]-f.range()[0],J=[],K=[0+I/2,x-12,w-I/2,x-12];D=z.select(".missingValuesline").selectAll("line").data([K]),D.enter().append("line"),D.exit().remove(),D.attr("x1",function(a){return a[0]}).attr("y1",function(a){return a[1]}).attr("x2",function(a){return a[2]}).attr("y2",function(a){return a[3]}),E=z.select(".missingValuesline").selectAll("text").data(["undefined values"]),E.append("text").data(["undefined values"]),E.enter().append("text"),E.exit().remove(),E.attr("y",x).attr("x",w-92-I/2).text(function(a){return a});var L=z.select(".background").selectAll("path").data(b);L.enter().append("path"),L.exit().remove(),L.attr("d",p);var M=z.select(".foreground").selectAll("path").data(b);M.enter().append("path"),M.exit().remove(),M.attr("d",p).attr("stroke",j),M.on("mouseover",function(a,b){d3.select(this).classed("hover",!0),o.elementMouseover({label:a.name,data:a.data,index:b,pos:[d3.mouse(this.parentNode)[0],d3.mouse(this.parentNode)[1]]})}),M.on("mouseout",function(a,b){d3.select(this).classed("hover",!1),o.elementMouseout({label:a.name,data:a.data,index:b})});var N=C.selectAll(".dimension").data(h),O=N.enter().append("g").attr("class","nv-parallelCoordinates dimension");O.append("g").attr("class","nv-parallelCoordinates nv-axis"),O.append("g").attr("class","nv-parallelCoordinates-brush"),O.append("text").attr("class","nv-parallelCoordinates nv-label"),N.attr("transform",function(a){return"translate("+f(a)+",0)"}),N.exit().remove(),N.select(".nv-label").style("cursor","move").attr("dy","-1em").attr("text-anchor","middle").text(String).on("mouseover",function(a){o.elementMouseover({dim:a,pos:[d3.mouse(this.parentNode.parentNode)[0],d3.mouse(this.parentNode.parentNode)[1]]})}).on("mouseout",function(a){o.elementMouseout({dim:a})}).call(H),N.select(".nv-axis").each(function(a,b){d3.select(this).call(G.scale(g[a]).tickFormat(d3.format(i[b])))}),N.select(".nv-parallelCoordinates-brush").each(function(a){d3.select(this).call(g[a].brush)}).selectAll("rect").attr("x",-8).attr("width",16)}),b}var c={top:30,right:0,bottom:10,left:0},d=null,e=null,f=d3.scale.ordinal(),g={},h=[],i=[],j=a.utils.defaultColor(),k=[],l=[],m=[],n=1,o=d3.dispatch("brush","elementMouseover","elementMouseout");return b.dispatch=o,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return d},set:function(a){d=a}},height:{get:function(){return e},set:function(a){e=a}},dimensionNames:{get:function(){return h},set:function(a){h=a}},dimensionFormats:{get:function(){return i},set:function(a){i=a}},lineTension:{get:function(){return n},set:function(a){n=a}},dimensions:{get:function(){return h},set:function(b){a.deprecated("dimensions","use dimensionNames instead"),h=b}},margin:{get:function(){return c},set:function(a){c.top=void 0!==a.top?a.top:c.top,c.right=void 0!==a.right?a.right:c.right,c.bottom=void 0!==a.bottom?a.bottom:c.bottom,c.left=void 0!==a.left?a.left:c.left}},color:{get:function(){return j},set:function(b){j=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.pie=function(){"use strict";function b(E){return D.reset(),E.each(function(b){function E(a,b){a.endAngle=isNaN(a.endAngle)?0:a.endAngle,a.startAngle=isNaN(a.startAngle)?0:a.startAngle,p||(a.innerRadius=0);var c=d3.interpolate(this._current,a);return this._current=c(0),function(a){return B[b](c(a))}}var F=d-c.left-c.right,G=e-c.top-c.bottom,H=Math.min(F,G)/2,I=[],J=[];if(i=d3.select(this),0===z.length)for(var K=H-H/5,L=y*H,M=0;Mc)return"";if("function"==typeof n)d=n(a,b,{key:f(a.data),value:g(a.data),percent:k(c)});else switch(n){case"key":d=f(a.data);break;case"value":d=k(g(a.data));break;case"percent":d=d3.format("%")(c)}return d})}}),D.renderEnd("pie immediate"),b}var c={top:0,right:0,bottom:0,left:0},d=500,e=500,f=function(a){return a.x},g=function(a){return a.y},h=Math.floor(1e4*Math.random()),i=null,j=a.utils.defaultColor(),k=d3.format(",.2f"),l=!0,m=!1,n="key",o=.02,p=!1,q=!1,r=!0,s=0,t=!1,u=!1,v=!1,w=!1,x=0,y=.5,z=[],A=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),B=[],C=[],D=a.utils.renderWatch(A);return b.dispatch=A,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{arcsRadius:{get:function(){return z},set:function(a){z=a}},width:{get:function(){return d},set:function(a){d=a}},height:{get:function(){return e},set:function(a){e=a}},showLabels:{get:function(){return l},set:function(a){l=a}},title:{get:function(){return q},set:function(a){q=a}},titleOffset:{get:function(){return s},set:function(a){s=a}},labelThreshold:{get:function(){return o},set:function(a){o=a}},valueFormat:{get:function(){return k},set:function(a){k=a}},x:{get:function(){return f},set:function(a){f=a}},id:{get:function(){return h},set:function(a){h=a}},endAngle:{get:function(){return w},set:function(a){w=a}},startAngle:{get:function(){return u},set:function(a){u=a}},padAngle:{get:function(){return v},set:function(a){v=a}},cornerRadius:{get:function(){return x},set:function(a){x=a}},donutRatio:{get:function(){return y},set:function(a){y=a}},labelsOutside:{get:function(){return m},set:function(a){m=a}},labelSunbeamLayout:{get:function(){return t},set:function(a){t=a}},donut:{get:function(){return p},set:function(a){p=a}},growOnHover:{get:function(){return r},set:function(a){r=a}},pieLabelsOutside:{get:function(){return m},set:function(b){m=b,a.deprecated("pieLabelsOutside","use labelsOutside instead")}},donutLabelsOutside:{get:function(){return m},set:function(b){m=b,a.deprecated("donutLabelsOutside","use labelsOutside instead")}},labelFormat:{get:function(){return k},set:function(b){k=b,a.deprecated("labelFormat","use valueFormat instead")}},margin:{get:function(){return c},set:function(a){c.top="undefined"!=typeof a.top?a.top:c.top,c.right="undefined"!=typeof a.right?a.right:c.right,c.bottom="undefined"!=typeof a.bottom?a.bottom:c.bottom,c.left="undefined"!=typeof a.left?a.left:c.left}},y:{get:function(){return g},set:function(a){g=d3.functor(a)}},color:{get:function(){return j},set:function(b){j=a.utils.getColor(b)}},labelType:{get:function(){return n},set:function(a){n=a||"key"}}}),a.utils.initOptions(b),b},a.models.pieChart=function(){"use strict";function b(e){return q.reset(),q.models(c),e.each(function(e){var k=d3.select(this);a.utils.initSVG(k);var n=a.utils.availableWidth(g,k,f),o=a.utils.availableHeight(h,k,f);if(b.update=function(){k.transition().call(b)},b.container=this,l.setter(s(e),b.update).getter(r(e)).update(),l.disabled=e.map(function(a){return!!a.disabled}),!m){var q;m={};for(q in l)m[q]=l[q]instanceof Array?l[q].slice(0):l[q]}if(!e||!e.length)return a.utils.noData(b,k),b;k.selectAll(".nv-noData").remove();var t=k.selectAll("g.nv-wrap.nv-pieChart").data([e]),u=t.enter().append("g").attr("class","nvd3 nv-wrap nv-pieChart").append("g"),v=t.select("g");if(u.append("g").attr("class","nv-pieWrap"),u.append("g").attr("class","nv-legendWrap"),i)if("top"===j)d.width(n).key(c.x()),t.select(".nv-legendWrap").datum(e).call(d),f.top!=d.height()&&(f.top=d.height(),o=a.utils.availableHeight(h,k,f)),t.select(".nv-legendWrap").attr("transform","translate(0,"+-f.top+")");else if("right"===j){var w=a.models.legend().width();w>n/2&&(w=n/2),d.height(o).key(c.x()),d.width(w),n-=d.width(),t.select(".nv-legendWrap").datum(e).call(d).attr("transform","translate("+n+",0)")}t.attr("transform","translate("+f.left+","+f.top+")"),c.width(n).height(o);var x=v.select(".nv-pieWrap").datum([e]);d3.transition(x).call(c),d.dispatch.on("stateChange",function(a){for(var c in a)l[c]=a[c];p.stateChange(l),b.update()}),p.on("changeState",function(a){"undefined"!=typeof a.disabled&&(e.forEach(function(b,c){b.disabled=a.disabled[c]}),l.disabled=a.disabled),b.update()})}),q.renderEnd("pieChart immediate"),b}var c=a.models.pie(),d=a.models.legend(),e=a.models.tooltip(),f={top:30,right:20,bottom:20,left:20},g=null,h=null,i=!0,j="top",k=a.utils.defaultColor(),l=a.utils.state(),m=null,n=null,o=250,p=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState","renderEnd");e.headerEnabled(!1).duration(0).valueFormatter(function(a,b){return c.valueFormat()(a,b)});var q=a.utils.renderWatch(p),r=function(a){return function(){return{active:a.map(function(a){return!a.disabled})}}},s=function(a){return function(b){void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};return c.dispatch.on("elementMouseover.tooltip",function(a){a.series={key:b.x()(a.data),value:b.y()(a.data),color:a.color},e.data(a).hidden(!1)}),c.dispatch.on("elementMouseout.tooltip",function(){e.hidden(!0)}),c.dispatch.on("elementMousemove.tooltip",function(){e.position({top:d3.event.pageY,left:d3.event.pageX})()}),b.legend=d,b.dispatch=p,b.pie=c,b.tooltip=e,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{noData:{get:function(){return n},set:function(a){n=a}},showLegend:{get:function(){return i},set:function(a){i=a}},legendPosition:{get:function(){return j},set:function(a){j=a}},defaultState:{get:function(){return m},set:function(a){m=a}},tooltips:{get:function(){return e.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),e.enabled(!!b)}},tooltipContent:{get:function(){return e.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),e.contentGenerator(b)}},color:{get:function(){return k},set:function(a){k=a,d.color(k),c.color(k)}},duration:{get:function(){return o},set:function(a){o=a,q.reset(o)}},margin:{get:function(){return f},set:function(a){f.top=void 0!==a.top?a.top:f.top,f.right=void 0!==a.right?a.right:f.right,f.bottom=void 0!==a.bottom?a.bottom:f.bottom,f.left=void 0!==a.left?a.left:f.left}}}),a.utils.inheritOptions(b,c),a.utils.initOptions(b),b},a.models.scatter=function(){"use strict";function b(N){return P.reset(),N.each(function(b){function N(){if(O=!1,!w)return!1;if(M===!0){var a=d3.merge(b.map(function(a,b){return a.values.map(function(a,c){var d=p(a,c),e=q(a,c);return[m(d)+1e-4*Math.random(),n(e)+1e-4*Math.random(),b,c,a]}).filter(function(a,b){return x(a[4],b)})}));if(0==a.length)return!1;a.length<3&&(a.push([m.range()[0]-20,n.range()[0]-20,null,null]),a.push([m.range()[1]+20,n.range()[1]+20,null,null]),a.push([m.range()[0]-20,n.range()[0]+20,null,null]),a.push([m.range()[1]+20,n.range()[1]-20,null,null]));var c=d3.geom.polygon([[-10,-10],[-10,i+10],[h+10,i+10],[h+10,-10]]),d=d3.geom.voronoi(a).map(function(b,d){return{data:c.clip(b),series:a[d][2],point:a[d][3]}});U.select(".nv-point-paths").selectAll("path").remove();var e=U.select(".nv-point-paths").selectAll("path").data(d),f=e.enter().append("svg:path").attr("d",function(a){return a&&a.data&&0!==a.data.length?"M"+a.data.join(",")+"Z":"M 0 0"}).attr("id",function(a,b){return"nv-path-"+b}).attr("clip-path",function(a,b){return"url(#nv-clip-"+k+"-"+b+")"});C&&f.style("fill",d3.rgb(230,230,230)).style("fill-opacity",.4).style("stroke-opacity",1).style("stroke",d3.rgb(200,200,200)),B&&(U.select(".nv-point-clips").selectAll("clipPath").remove(),U.select(".nv-point-clips").selectAll("clipPath").data(a).enter().append("svg:clipPath").attr("id",function(a,b){return"nv-clip-"+k+"-"+b}).append("svg:circle").attr("cx",function(a){return a[0]}).attr("cy",function(a){return a[1]}).attr("r",D));var o=function(a,c){if(O)return 0;var d=b[a.series];if(void 0!==d){var e=d.values[a.point];e.color=j(d,a.series),e.x=p(e),e.y=q(e);var f=l.node().getBoundingClientRect(),h=window.pageYOffset||document.documentElement.scrollTop,i=window.pageXOffset||document.documentElement.scrollLeft,k={left:m(p(e,a.point))+f.left+i+g.left+10,top:n(q(e,a.point))+f.top+h+g.top+10};c({point:e,series:d,pos:k,seriesIndex:a.series,pointIndex:a.point})}};e.on("click",function(a){o(a,L.elementClick)}).on("dblclick",function(a){o(a,L.elementDblClick)}).on("mouseover",function(a){o(a,L.elementMouseover)}).on("mouseout",function(a){o(a,L.elementMouseout)})}else U.select(".nv-groups").selectAll(".nv-group").selectAll(".nv-point").on("click",function(a,c){if(O||!b[a.series])return 0;var d=b[a.series],e=d.values[c];L.elementClick({point:e,series:d,pos:[m(p(e,c))+g.left,n(q(e,c))+g.top],seriesIndex:a.series,pointIndex:c})}).on("dblclick",function(a,c){if(O||!b[a.series])return 0;var d=b[a.series],e=d.values[c];L.elementDblClick({point:e,series:d,pos:[m(p(e,c))+g.left,n(q(e,c))+g.top],seriesIndex:a.series,pointIndex:c})}).on("mouseover",function(a,c){if(O||!b[a.series])return 0;var d=b[a.series],e=d.values[c];L.elementMouseover({point:e,series:d,pos:[m(p(e,c))+g.left,n(q(e,c))+g.top],seriesIndex:a.series,pointIndex:c,color:j(a,c)})}).on("mouseout",function(a,c){if(O||!b[a.series])return 0;var d=b[a.series],e=d.values[c];L.elementMouseout({point:e,series:d,seriesIndex:a.series,pointIndex:c,color:j(a,c)})})}l=d3.select(this);var R=a.utils.availableWidth(h,l,g),S=a.utils.availableHeight(i,l,g);a.utils.initSVG(l),b.forEach(function(a,b){a.values.forEach(function(a){a.series=b})});var T=E&&F&&I?[]:d3.merge(b.map(function(a){return a.values.map(function(a,b){return{x:p(a,b),y:q(a,b),size:r(a,b)}})}));m.domain(E||d3.extent(T.map(function(a){return a.x}).concat(t))),m.range(y&&b[0]?G||[(R*z+R)/(2*b[0].values.length),R-R*(1+z)/(2*b[0].values.length)]:G||[0,R]),n.domain(F||d3.extent(T.map(function(a){return a.y}).concat(u))).range(H||[S,0]),o.domain(I||d3.extent(T.map(function(a){return a.size}).concat(v))).range(J||Q),K=m.domain()[0]===m.domain()[1]||n.domain()[0]===n.domain()[1],m.domain()[0]===m.domain()[1]&&m.domain(m.domain()[0]?[m.domain()[0]-.01*m.domain()[0],m.domain()[1]+.01*m.domain()[1]]:[-1,1]),n.domain()[0]===n.domain()[1]&&n.domain(n.domain()[0]?[n.domain()[0]-.01*n.domain()[0],n.domain()[1]+.01*n.domain()[1]]:[-1,1]),isNaN(m.domain()[0])&&m.domain([-1,1]),isNaN(n.domain()[0])&&n.domain([-1,1]),c=c||m,d=d||n,e=e||o;var U=l.selectAll("g.nv-wrap.nv-scatter").data([b]),V=U.enter().append("g").attr("class","nvd3 nv-wrap nv-scatter nv-chart-"+k),W=V.append("defs"),X=V.append("g"),Y=U.select("g");U.classed("nv-single-point",K),X.append("g").attr("class","nv-groups"),X.append("g").attr("class","nv-point-paths"),V.append("g").attr("class","nv-point-clips"),U.attr("transform","translate("+g.left+","+g.top+")"),W.append("clipPath").attr("id","nv-edge-clip-"+k).append("rect"),U.select("#nv-edge-clip-"+k+" rect").attr("width",R).attr("height",S>0?S:0),Y.attr("clip-path",A?"url(#nv-edge-clip-"+k+")":""),O=!0;var Z=U.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a){return a.key});Z.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),Z.exit().remove(),Z.attr("class",function(a,b){return"nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}),Z.watchTransition(P,"scatter: groups").style("fill",function(a,b){return j(a,b)}).style("stroke",function(a,b){return j(a,b)}).style("stroke-opacity",1).style("fill-opacity",.5);var $=Z.selectAll("path.nv-point").data(function(a){return a.values.map(function(a,b){return[a,b]}).filter(function(a,b){return x(a[0],b)})});$.enter().append("path").style("fill",function(a){return a.color}).style("stroke",function(a){return a.color}).attr("transform",function(a){return"translate("+c(p(a[0],a[1]))+","+d(q(a[0],a[1]))+")"}).attr("d",a.utils.symbol().type(function(a){return s(a[0])}).size(function(a){return o(r(a[0],a[1]))})),$.exit().remove(),Z.exit().selectAll("path.nv-point").watchTransition(P,"scatter exit").attr("transform",function(a){return"translate("+m(p(a[0],a[1]))+","+n(q(a[0],a[1]))+")"}).remove(),$.each(function(a){d3.select(this).classed("nv-point",!0).classed("nv-point-"+a[1],!0).classed("nv-noninteractive",!w).classed("hover",!1)}),$.watchTransition(P,"scatter points").attr("transform",function(a){return"translate("+m(p(a[0],a[1]))+","+n(q(a[0],a[1]))+")"}).attr("d",a.utils.symbol().type(function(a){return s(a[0])}).size(function(a){return o(r(a[0],a[1]))})),clearTimeout(f),f=setTimeout(N,300),c=m.copy(),d=n.copy(),e=o.copy()}),P.renderEnd("scatter immediate"),b}var c,d,e,f,g={top:0,right:0,bottom:0,left:0},h=null,i=null,j=a.utils.defaultColor(),k=Math.floor(1e5*Math.random()),l=null,m=d3.scale.linear(),n=d3.scale.linear(),o=d3.scale.linear(),p=function(a){return a.x},q=function(a){return a.y},r=function(a){return a.size||1},s=function(a){return a.shape||"circle"},t=[],u=[],v=[],w=!0,x=function(a){return!a.notActive},y=!1,z=.1,A=!1,B=!0,C=!1,D=function(){return 25},E=null,F=null,G=null,H=null,I=null,J=null,K=!1,L=d3.dispatch("elementClick","elementDblClick","elementMouseover","elementMouseout","renderEnd"),M=!0,N=250,O=!1,P=a.utils.renderWatch(L,N),Q=[16,256];return b.dispatch=L,b.options=a.utils.optionsFunc.bind(b),b._calls=new function(){this.clearHighlights=function(){return a.dom.write(function(){l.selectAll(".nv-point.hover").classed("hover",!1)}),null},this.highlightPoint=function(b,c,d){a.dom.write(function(){l.select(" .nv-series-"+b+" .nv-point-"+c).classed("hover",d)})}},L.on("elementMouseover.point",function(a){w&&b._calls.highlightPoint(a.seriesIndex,a.pointIndex,!0)}),L.on("elementMouseout.point",function(a){w&&b._calls.highlightPoint(a.seriesIndex,a.pointIndex,!1)}),b._options=Object.create({},{width:{get:function(){return h},set:function(a){h=a}},height:{get:function(){return i},set:function(a){i=a}},xScale:{get:function(){return m},set:function(a){m=a}},yScale:{get:function(){return n},set:function(a){n=a}},pointScale:{get:function(){return o},set:function(a){o=a}},xDomain:{get:function(){return E},set:function(a){E=a}},yDomain:{get:function(){return F},set:function(a){F=a}},pointDomain:{get:function(){return I},set:function(a){I=a}},xRange:{get:function(){return G},set:function(a){G=a}},yRange:{get:function(){return H},set:function(a){H=a}},pointRange:{get:function(){return J},set:function(a){J=a}},forceX:{get:function(){return t},set:function(a){t=a}},forceY:{get:function(){return u},set:function(a){u=a}},forcePoint:{get:function(){return v},set:function(a){v=a}},interactive:{get:function(){return w},set:function(a){w=a}},pointActive:{get:function(){return x},set:function(a){x=a}},padDataOuter:{get:function(){return z},set:function(a){z=a}},padData:{get:function(){return y},set:function(a){y=a}},clipEdge:{get:function(){return A},set:function(a){A=a}},clipVoronoi:{get:function(){return B},set:function(a){B=a}},clipRadius:{get:function(){return D},set:function(a){D=a}},showVoronoi:{get:function(){return C},set:function(a){C=a}},id:{get:function(){return k},set:function(a){k=a}},x:{get:function(){return p},set:function(a){p=d3.functor(a)}},y:{get:function(){return q},set:function(a){q=d3.functor(a)}},pointSize:{get:function(){return r},set:function(a){r=d3.functor(a)}},pointShape:{get:function(){return s},set:function(a){s=d3.functor(a)}},margin:{get:function(){return g},set:function(a){g.top=void 0!==a.top?a.top:g.top,g.right=void 0!==a.right?a.right:g.right,g.bottom=void 0!==a.bottom?a.bottom:g.bottom,g.left=void 0!==a.left?a.left:g.left}},duration:{get:function(){return N},set:function(a){N=a,P.reset(N)}},color:{get:function(){return j},set:function(b){j=a.utils.getColor(b)}},useVoronoi:{get:function(){return M},set:function(a){M=a,M===!1&&(B=!1)}}}),a.utils.initOptions(b),b},a.models.scatterChart=function(){"use strict";function b(z){return D.reset(),D.models(c),t&&D.models(d),u&&D.models(e),q&&D.models(g),r&&D.models(h),z.each(function(z){m=d3.select(this),a.utils.initSVG(m);var G=a.utils.availableWidth(k,m,j),H=a.utils.availableHeight(l,m,j);if(b.update=function(){0===A?m.call(b):m.transition().duration(A).call(b)},b.container=this,w.setter(F(z),b.update).getter(E(z)).update(),w.disabled=z.map(function(a){return!!a.disabled}),!x){var I;x={};for(I in w)x[I]=w[I]instanceof Array?w[I].slice(0):w[I]}if(!(z&&z.length&&z.filter(function(a){return a.values.length}).length))return a.utils.noData(b,m),D.renderEnd("scatter immediate"),b;m.selectAll(".nv-noData").remove(),o=c.xScale(),p=c.yScale();var J=m.selectAll("g.nv-wrap.nv-scatterChart").data([z]),K=J.enter().append("g").attr("class","nvd3 nv-wrap nv-scatterChart nv-chart-"+c.id()),L=K.append("g"),M=J.select("g");if(L.append("rect").attr("class","nvd3 nv-background").style("pointer-events","none"),L.append("g").attr("class","nv-x nv-axis"),L.append("g").attr("class","nv-y nv-axis"),L.append("g").attr("class","nv-scatterWrap"),L.append("g").attr("class","nv-regressionLinesWrap"),L.append("g").attr("class","nv-distWrap"),L.append("g").attr("class","nv-legendWrap"),v&&M.select(".nv-y.nv-axis").attr("transform","translate("+G+",0)"),s){var N=G;f.width(N),J.select(".nv-legendWrap").datum(z).call(f),j.top!=f.height()&&(j.top=f.height(),H=a.utils.availableHeight(l,m,j)),J.select(".nv-legendWrap").attr("transform","translate(0,"+-j.top+")")}J.attr("transform","translate("+j.left+","+j.top+")"),c.width(G).height(H).color(z.map(function(a,b){return a.color=a.color||n(a,b),a.color}).filter(function(a,b){return!z[b].disabled})),J.select(".nv-scatterWrap").datum(z.filter(function(a){return!a.disabled})).call(c),J.select(".nv-regressionLinesWrap").attr("clip-path","url(#nv-edge-clip-"+c.id()+")");var O=J.select(".nv-regressionLinesWrap").selectAll(".nv-regLines").data(function(a){return a});O.enter().append("g").attr("class","nv-regLines");var P=O.selectAll(".nv-regLine").data(function(a){return[a]});P.enter().append("line").attr("class","nv-regLine").style("stroke-opacity",0),P.filter(function(a){return a.intercept&&a.slope}).watchTransition(D,"scatterPlusLineChart: regline").attr("x1",o.range()[0]).attr("x2",o.range()[1]).attr("y1",function(a){return p(o.domain()[0]*a.slope+a.intercept)}).attr("y2",function(a){return p(o.domain()[1]*a.slope+a.intercept)}).style("stroke",function(a,b,c){return n(a,c)}).style("stroke-opacity",function(a){return a.disabled||"undefined"==typeof a.slope||"undefined"==typeof a.intercept?0:1}),t&&(d.scale(o)._ticks(a.utils.calcTicksX(G/100,z)).tickSize(-H,0),M.select(".nv-x.nv-axis").attr("transform","translate(0,"+p.range()[0]+")").call(d)),u&&(e.scale(p)._ticks(a.utils.calcTicksY(H/36,z)).tickSize(-G,0),M.select(".nv-y.nv-axis").call(e)),q&&(g.getData(c.x()).scale(o).width(G).color(z.map(function(a,b){return a.color||n(a,b)}).filter(function(a,b){return!z[b].disabled})),L.select(".nv-distWrap").append("g").attr("class","nv-distributionX"),M.select(".nv-distributionX").attr("transform","translate(0,"+p.range()[0]+")").datum(z.filter(function(a){return!a.disabled})).call(g)),r&&(h.getData(c.y()).scale(p).width(H).color(z.map(function(a,b){return a.color||n(a,b)
-}).filter(function(a,b){return!z[b].disabled})),L.select(".nv-distWrap").append("g").attr("class","nv-distributionY"),M.select(".nv-distributionY").attr("transform","translate("+(v?G:-h.size())+",0)").datum(z.filter(function(a){return!a.disabled})).call(h)),f.dispatch.on("stateChange",function(a){for(var c in a)w[c]=a[c];y.stateChange(w),b.update()}),y.on("changeState",function(a){"undefined"!=typeof a.disabled&&(z.forEach(function(b,c){b.disabled=a.disabled[c]}),w.disabled=a.disabled),b.update()}),c.dispatch.on("elementMouseout.tooltip",function(a){i.hidden(!0),m.select(".nv-chart-"+c.id()+" .nv-series-"+a.seriesIndex+" .nv-distx-"+a.pointIndex).attr("y1",0),m.select(".nv-chart-"+c.id()+" .nv-series-"+a.seriesIndex+" .nv-disty-"+a.pointIndex).attr("x2",h.size())}),c.dispatch.on("elementMouseover.tooltip",function(a){m.select(".nv-series-"+a.seriesIndex+" .nv-distx-"+a.pointIndex).attr("y1",a.pos.top-H-j.top),m.select(".nv-series-"+a.seriesIndex+" .nv-disty-"+a.pointIndex).attr("x2",a.pos.left+g.size()-j.left),i.position(a.pos).data(a).hidden(!1)}),B=o.copy(),C=p.copy()}),D.renderEnd("scatter with line immediate"),b}var c=a.models.scatter(),d=a.models.axis(),e=a.models.axis(),f=a.models.legend(),g=a.models.distribution(),h=a.models.distribution(),i=a.models.tooltip(),j={top:30,right:20,bottom:50,left:75},k=null,l=null,m=null,n=a.utils.defaultColor(),o=c.xScale(),p=c.yScale(),q=!1,r=!1,s=!0,t=!0,u=!0,v=!1,w=a.utils.state(),x=null,y=d3.dispatch("stateChange","changeState","renderEnd"),z=null,A=250;c.xScale(o).yScale(p),d.orient("bottom").tickPadding(10),e.orient(v?"right":"left").tickPadding(10),g.axis("x"),h.axis("y"),i.headerFormatter(function(a,b){return d.tickFormat()(a,b)}).valueFormatter(function(a,b){return e.tickFormat()(a,b)});var B,C,D=a.utils.renderWatch(y,A),E=function(a){return function(){return{active:a.map(function(a){return!a.disabled})}}},F=function(a){return function(b){void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};return b.dispatch=y,b.scatter=c,b.legend=f,b.xAxis=d,b.yAxis=e,b.distX=g,b.distY=h,b.tooltip=i,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return k},set:function(a){k=a}},height:{get:function(){return l},set:function(a){l=a}},container:{get:function(){return m},set:function(a){m=a}},showDistX:{get:function(){return q},set:function(a){q=a}},showDistY:{get:function(){return r},set:function(a){r=a}},showLegend:{get:function(){return s},set:function(a){s=a}},showXAxis:{get:function(){return t},set:function(a){t=a}},showYAxis:{get:function(){return u},set:function(a){u=a}},defaultState:{get:function(){return x},set:function(a){x=a}},noData:{get:function(){return z},set:function(a){z=a}},duration:{get:function(){return A},set:function(a){A=a}},tooltips:{get:function(){return i.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),i.enabled(!!b)}},tooltipContent:{get:function(){return i.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),i.contentGenerator(b)}},tooltipXContent:{get:function(){return i.contentGenerator()},set:function(){a.deprecated("tooltipContent","This option is removed, put values into main tooltip.")}},tooltipYContent:{get:function(){return i.contentGenerator()},set:function(){a.deprecated("tooltipContent","This option is removed, put values into main tooltip.")}},margin:{get:function(){return j},set:function(a){j.top=void 0!==a.top?a.top:j.top,j.right=void 0!==a.right?a.right:j.right,j.bottom=void 0!==a.bottom?a.bottom:j.bottom,j.left=void 0!==a.left?a.left:j.left}},rightAlignYAxis:{get:function(){return v},set:function(a){v=a,e.orient(a?"right":"left")}},color:{get:function(){return n},set:function(b){n=a.utils.getColor(b),f.color(n),g.color(n),h.color(n)}}}),a.utils.inheritOptions(b,c),a.utils.initOptions(b),b},a.models.sparkline=function(){"use strict";function b(k){return k.each(function(b){var k=h-g.left-g.right,q=i-g.top-g.bottom;j=d3.select(this),a.utils.initSVG(j),l.domain(c||d3.extent(b,n)).range(e||[0,k]),m.domain(d||d3.extent(b,o)).range(f||[q,0]);{var r=j.selectAll("g.nv-wrap.nv-sparkline").data([b]),s=r.enter().append("g").attr("class","nvd3 nv-wrap nv-sparkline");s.append("g"),r.select("g")}r.attr("transform","translate("+g.left+","+g.top+")");var t=r.selectAll("path").data(function(a){return[a]});t.enter().append("path"),t.exit().remove(),t.style("stroke",function(a,b){return a.color||p(a,b)}).attr("d",d3.svg.line().x(function(a,b){return l(n(a,b))}).y(function(a,b){return m(o(a,b))}));var u=r.selectAll("circle.nv-point").data(function(a){function b(b){if(-1!=b){var c=a[b];return c.pointIndex=b,c}return null}var c=a.map(function(a,b){return o(a,b)}),d=b(c.lastIndexOf(m.domain()[1])),e=b(c.indexOf(m.domain()[0])),f=b(c.length-1);return[e,d,f].filter(function(a){return null!=a})});u.enter().append("circle"),u.exit().remove(),u.attr("cx",function(a){return l(n(a,a.pointIndex))}).attr("cy",function(a){return m(o(a,a.pointIndex))}).attr("r",2).attr("class",function(a){return n(a,a.pointIndex)==l.domain()[1]?"nv-point nv-currentValue":o(a,a.pointIndex)==m.domain()[0]?"nv-point nv-minValue":"nv-point nv-maxValue"})}),b}var c,d,e,f,g={top:2,right:0,bottom:2,left:0},h=400,i=32,j=null,k=!0,l=d3.scale.linear(),m=d3.scale.linear(),n=function(a){return a.x},o=function(a){return a.y},p=a.utils.getColor(["#000"]);return b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return h},set:function(a){h=a}},height:{get:function(){return i},set:function(a){i=a}},xDomain:{get:function(){return c},set:function(a){c=a}},yDomain:{get:function(){return d},set:function(a){d=a}},xRange:{get:function(){return e},set:function(a){e=a}},yRange:{get:function(){return f},set:function(a){f=a}},xScale:{get:function(){return l},set:function(a){l=a}},yScale:{get:function(){return m},set:function(a){m=a}},animate:{get:function(){return k},set:function(a){k=a}},x:{get:function(){return n},set:function(a){n=d3.functor(a)}},y:{get:function(){return o},set:function(a){o=d3.functor(a)}},margin:{get:function(){return g},set:function(a){g.top=void 0!==a.top?a.top:g.top,g.right=void 0!==a.right?a.right:g.right,g.bottom=void 0!==a.bottom?a.bottom:g.bottom,g.left=void 0!==a.left?a.left:g.left}},color:{get:function(){return p},set:function(b){p=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.sparklinePlus=function(){"use strict";function b(p){return p.each(function(p){function q(){if(!j){var a=z.selectAll(".nv-hoverValue").data(i),b=a.enter().append("g").attr("class","nv-hoverValue").style("stroke-opacity",0).style("fill-opacity",0);a.exit().transition().duration(250).style("stroke-opacity",0).style("fill-opacity",0).remove(),a.attr("transform",function(a){return"translate("+c(e.x()(p[a],a))+",0)"}).transition().duration(250).style("stroke-opacity",1).style("fill-opacity",1),i.length&&(b.append("line").attr("x1",0).attr("y1",-f.top).attr("x2",0).attr("y2",u),b.append("text").attr("class","nv-xValue").attr("x",-6).attr("y",-f.top).attr("text-anchor","end").attr("dy",".9em"),z.select(".nv-hoverValue .nv-xValue").text(k(e.x()(p[i[0]],i[0]))),b.append("text").attr("class","nv-yValue").attr("x",6).attr("y",-f.top).attr("text-anchor","start").attr("dy",".9em"),z.select(".nv-hoverValue .nv-yValue").text(l(e.y()(p[i[0]],i[0]))))}}function r(){function a(a,b){for(var c=Math.abs(e.x()(a[0],0)-b),d=0,f=0;fc;++c){for(b=0,d=0;bb;b++)a[b][c][1]/=d;else for(b=0;e>b;b++)a[b][c][1]=0}for(c=0;f>c;++c)g[c]=0;return g}}),u.renderEnd("stackedArea immediate"),b}var c,d,e={top:0,right:0,bottom:0,left:0},f=960,g=500,h=a.utils.defaultColor(),i=Math.floor(1e5*Math.random()),j=null,k=function(a){return a.x},l=function(a){return a.y},m="stack",n="zero",o="default",p="linear",q=!1,r=a.models.scatter(),s=250,t=d3.dispatch("areaClick","areaMouseover","areaMouseout","renderEnd","elementClick","elementMouseover","elementMouseout");r.pointSize(2.2).pointDomain([2.2,2.2]);var u=a.utils.renderWatch(t,s);return b.dispatch=t,b.scatter=r,r.dispatch.on("elementClick",function(){t.elementClick.apply(this,arguments)}),r.dispatch.on("elementMouseover",function(){t.elementMouseover.apply(this,arguments)}),r.dispatch.on("elementMouseout",function(){t.elementMouseout.apply(this,arguments)}),b.interpolate=function(a){return arguments.length?(p=a,b):p},b.duration=function(a){return arguments.length?(s=a,u.reset(s),r.duration(s),b):s},b.dispatch=t,b.scatter=r,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return f},set:function(a){f=a}},height:{get:function(){return g},set:function(a){g=a}},clipEdge:{get:function(){return q},set:function(a){q=a}},offset:{get:function(){return n},set:function(a){n=a}},order:{get:function(){return o},set:function(a){o=a}},interpolate:{get:function(){return p},set:function(a){p=a}},x:{get:function(){return k},set:function(a){k=d3.functor(a)}},y:{get:function(){return l},set:function(a){l=d3.functor(a)}},margin:{get:function(){return e},set:function(a){e.top=void 0!==a.top?a.top:e.top,e.right=void 0!==a.right?a.right:e.right,e.bottom=void 0!==a.bottom?a.bottom:e.bottom,e.left=void 0!==a.left?a.left:e.left}},color:{get:function(){return h},set:function(b){h=a.utils.getColor(b)}},style:{get:function(){return m},set:function(a){switch(m=a){case"stack":b.offset("zero"),b.order("default");break;case"stream":b.offset("wiggle"),b.order("inside-out");break;case"stream-center":b.offset("silhouette"),b.order("inside-out");break;case"expand":b.offset("expand"),b.order("default");break;case"stack_percent":b.offset(b.d3_stackedOffset_stackPercent),b.order("default")}}},duration:{get:function(){return s},set:function(a){s=a,u.reset(s),r.duration(s)}}}),a.utils.inheritOptions(b,r),a.utils.initOptions(b),b},a.models.stackedAreaChart=function(){"use strict";function b(k){return F.reset(),F.models(e),r&&F.models(f),s&&F.models(g),k.each(function(k){var x=d3.select(this),F=this;a.utils.initSVG(x);var K=a.utils.availableWidth(m,x,l),L=a.utils.availableHeight(n,x,l);if(b.update=function(){x.transition().duration(C).call(b)},b.container=this,v.setter(I(k),b.update).getter(H(k)).update(),v.disabled=k.map(function(a){return!!a.disabled}),!w){var M;w={};for(M in v)w[M]=v[M]instanceof Array?v[M].slice(0):v[M]}if(!(k&&k.length&&k.filter(function(a){return a.values.length}).length))return a.utils.noData(b,x),b;x.selectAll(".nv-noData").remove(),c=e.xScale(),d=e.yScale();var N=x.selectAll("g.nv-wrap.nv-stackedAreaChart").data([k]),O=N.enter().append("g").attr("class","nvd3 nv-wrap nv-stackedAreaChart").append("g"),P=N.select("g");if(O.append("rect").style("opacity",0),O.append("g").attr("class","nv-x nv-axis"),O.append("g").attr("class","nv-y nv-axis"),O.append("g").attr("class","nv-stackedWrap"),O.append("g").attr("class","nv-legendWrap"),O.append("g").attr("class","nv-controlsWrap"),O.append("g").attr("class","nv-interactive"),P.select("rect").attr("width",K).attr("height",L),q){var Q=p?K-z:K;h.width(Q),P.select(".nv-legendWrap").datum(k).call(h),l.top!=h.height()&&(l.top=h.height(),L=a.utils.availableHeight(n,x,l)),P.select(".nv-legendWrap").attr("transform","translate("+(K-Q)+","+-l.top+")")}if(p){var R=[{key:B.stacked||"Stacked",metaKey:"Stacked",disabled:"stack"!=e.style(),style:"stack"},{key:B.stream||"Stream",metaKey:"Stream",disabled:"stream"!=e.style(),style:"stream"},{key:B.expanded||"Expanded",metaKey:"Expanded",disabled:"expand"!=e.style(),style:"expand"},{key:B.stack_percent||"Stack %",metaKey:"Stack_Percent",disabled:"stack_percent"!=e.style(),style:"stack_percent"}];z=A.length/3*260,R=R.filter(function(a){return-1!==A.indexOf(a.metaKey)}),i.width(z).color(["#444","#444","#444"]),P.select(".nv-controlsWrap").datum(R).call(i),l.top!=Math.max(i.height(),h.height())&&(l.top=Math.max(i.height(),h.height()),L=a.utils.availableHeight(n,x,l)),P.select(".nv-controlsWrap").attr("transform","translate(0,"+-l.top+")")}N.attr("transform","translate("+l.left+","+l.top+")"),t&&P.select(".nv-y.nv-axis").attr("transform","translate("+K+",0)"),u&&(j.width(K).height(L).margin({left:l.left,top:l.top}).svgContainer(x).xScale(c),N.select(".nv-interactive").call(j)),e.width(K).height(L);var S=P.select(".nv-stackedWrap").datum(k);if(S.transition().call(e),r&&(f.scale(c)._ticks(a.utils.calcTicksX(K/100,k)).tickSize(-L,0),P.select(".nv-x.nv-axis").attr("transform","translate(0,"+L+")"),P.select(".nv-x.nv-axis").transition().duration(0).call(f)),s){var T;if(T="wiggle"===e.offset()?0:a.utils.calcTicksY(L/36,k),g.scale(d)._ticks(T).tickSize(-K,0),"expand"===e.style()||"stack_percent"===e.style()){var U=g.tickFormat();D&&U===J||(D=U),g.tickFormat(J)}else D&&(g.tickFormat(D),D=null);P.select(".nv-y.nv-axis").transition().duration(0).call(g)}e.dispatch.on("areaClick.toggle",function(a){k.forEach(1===k.filter(function(a){return!a.disabled}).length?function(a){a.disabled=!1}:function(b,c){b.disabled=c!=a.seriesIndex}),v.disabled=k.map(function(a){return!!a.disabled}),y.stateChange(v),b.update()}),h.dispatch.on("stateChange",function(a){for(var c in a)v[c]=a[c];y.stateChange(v),b.update()}),i.dispatch.on("legendClick",function(a){a.disabled&&(R=R.map(function(a){return a.disabled=!0,a}),a.disabled=!1,e.style(a.style),v.style=e.style(),y.stateChange(v),b.update())}),j.dispatch.on("elementMousemove",function(c){e.clearHighlights();var d,g,h,i=[];if(k.filter(function(a,b){return a.seriesIndex=b,!a.disabled}).forEach(function(f,j){g=a.interactiveBisect(f.values,c.pointXValue,b.x());var k=f.values[g],l=b.y()(k,g);if(null!=l&&e.highlightPoint(j,g,!0),"undefined"!=typeof k){"undefined"==typeof d&&(d=k),"undefined"==typeof h&&(h=b.xScale()(b.x()(k,g)));var m="expand"==e.style()?k.display.y:b.y()(k,g);i.push({key:f.key,value:m,color:o(f,f.seriesIndex),stackedValue:k.display})}}),i.reverse(),i.length>2){var m=b.yScale().invert(c.mouseY),n=null;i.forEach(function(a,b){m=Math.abs(m);var c=Math.abs(a.stackedValue.y0),d=Math.abs(a.stackedValue.y);return m>=c&&d+c>=m?void(n=b):void 0}),null!=n&&(i[n].highlight=!0)}var p=f.tickFormat()(b.x()(d,g)),q=j.tooltip.valueFormatter();"expand"===e.style()||"stack_percent"===e.style()?(E||(E=q),q=d3.format(".1%")):E&&(q=E,E=null),j.tooltip.position({left:h+l.left,top:c.mouseY+l.top}).chartContainer(F.parentNode).valueFormatter(q).data({value:p,series:i})(),j.renderGuideLine(h)}),j.dispatch.on("elementMouseout",function(){e.clearHighlights()}),y.on("changeState",function(a){"undefined"!=typeof a.disabled&&k.length===a.disabled.length&&(k.forEach(function(b,c){b.disabled=a.disabled[c]}),v.disabled=a.disabled),"undefined"!=typeof a.style&&(e.style(a.style),G=a.style),b.update()})}),F.renderEnd("stacked Area chart immediate"),b}var c,d,e=a.models.stackedArea(),f=a.models.axis(),g=a.models.axis(),h=a.models.legend(),i=a.models.legend(),j=a.interactiveGuideline(),k=a.models.tooltip(),l={top:30,right:25,bottom:50,left:60},m=null,n=null,o=a.utils.defaultColor(),p=!0,q=!0,r=!0,s=!0,t=!1,u=!1,v=a.utils.state(),w=null,x=null,y=d3.dispatch("stateChange","changeState","renderEnd"),z=250,A=["Stacked","Stream","Expanded"],B={},C=250;v.style=e.style(),f.orient("bottom").tickPadding(7),g.orient(t?"right":"left"),k.headerFormatter(function(a,b){return f.tickFormat()(a,b)}).valueFormatter(function(a,b){return g.tickFormat()(a,b)}),j.tooltip.headerFormatter(function(a,b){return f.tickFormat()(a,b)}).valueFormatter(function(a,b){return g.tickFormat()(a,b)});var D=null,E=null;i.updateState(!1);var F=a.utils.renderWatch(y),G=e.style(),H=function(a){return function(){return{active:a.map(function(a){return!a.disabled}),style:e.style()}}},I=function(a){return function(b){void 0!==b.style&&(G=b.style),void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}},J=d3.format("%");return e.dispatch.on("elementMouseover.tooltip",function(a){a.point.x=e.x()(a.point),a.point.y=e.y()(a.point),k.data(a).position(a.pos).hidden(!1)}),e.dispatch.on("elementMouseout.tooltip",function(){k.hidden(!0)}),b.dispatch=y,b.stacked=e,b.legend=h,b.controls=i,b.xAxis=f,b.yAxis=g,b.interactiveLayer=j,b.tooltip=k,b.dispatch=y,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return m},set:function(a){m=a}},height:{get:function(){return n},set:function(a){n=a}},showLegend:{get:function(){return q},set:function(a){q=a}},showXAxis:{get:function(){return r},set:function(a){r=a}},showYAxis:{get:function(){return s},set:function(a){s=a}},defaultState:{get:function(){return w},set:function(a){w=a}},noData:{get:function(){return x},set:function(a){x=a}},showControls:{get:function(){return p},set:function(a){p=a}},controlLabels:{get:function(){return B},set:function(a){B=a}},controlOptions:{get:function(){return A},set:function(a){A=a}},tooltips:{get:function(){return k.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),k.enabled(!!b)}},tooltipContent:{get:function(){return k.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),k.contentGenerator(b)}},margin:{get:function(){return l},set:function(a){l.top=void 0!==a.top?a.top:l.top,l.right=void 0!==a.right?a.right:l.right,l.bottom=void 0!==a.bottom?a.bottom:l.bottom,l.left=void 0!==a.left?a.left:l.left}},duration:{get:function(){return C},set:function(a){C=a,F.reset(C),e.duration(C),f.duration(C),g.duration(C)}},color:{get:function(){return o},set:function(b){o=a.utils.getColor(b),h.color(o),e.color(o)}},rightAlignYAxis:{get:function(){return t},set:function(a){t=a,g.orient(t?"right":"left")}},useInteractiveGuideline:{get:function(){return u},set:function(a){u=!!a,b.interactive(!a),b.useVoronoi(!a),e.scatter.interactive(!a)}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.sunburst=function(){"use strict";function b(u){return t.reset(),u.each(function(b){function t(a){a.x0=a.x,a.dx0=a.dx}function u(a){var b=d3.interpolate(p.domain(),[a.x,a.x+a.dx]),c=d3.interpolate(q.domain(),[a.y,1]),d=d3.interpolate(q.range(),[a.y?20:0,y]);return function(a,e){return e?function(){return s(a)}:function(e){return p.domain(b(e)),q.domain(c(e)).range(d(e)),s(a)}}}l=d3.select(this);var v,w=a.utils.availableWidth(g,l,f),x=a.utils.availableHeight(h,l,f),y=Math.min(w,x)/2;a.utils.initSVG(l);var z=l.selectAll(".nv-wrap.nv-sunburst").data(b),A=z.enter().append("g").attr("class","nvd3 nv-wrap nv-sunburst nv-chart-"+k),B=A.selectAll("nv-sunburst");z.attr("transform","translate("+w/2+","+x/2+")"),l.on("click",function(a,b){o.chartClick({data:a,index:b,pos:d3.event,id:k})}),q.range([0,y]),c=c||b,e=b[0],r.value(j[i]||j.count),v=B.data(r.nodes).enter().append("path").attr("d",s).style("fill",function(a){return m((a.children?a:a.parent).name)}).style("stroke","#FFF").on("click",function(a){d!==c&&c!==a&&(d=c),c=a,v.transition().duration(n).attrTween("d",u(a))}).each(t).on("dblclick",function(a){d.parent==a&&v.transition().duration(n).attrTween("d",u(e))}).each(t).on("mouseover",function(a){d3.select(this).classed("hover",!0).style("opacity",.8),o.elementMouseover({data:a,color:d3.select(this).style("fill")})}).on("mouseout",function(a){d3.select(this).classed("hover",!1).style("opacity",1),o.elementMouseout({data:a})}).on("mousemove",function(a){o.elementMousemove({data:a})})}),t.renderEnd("sunburst immediate"),b}var c,d,e,f={top:0,right:0,bottom:0,left:0},g=null,h=null,i="count",j={count:function(){return 1},size:function(a){return a.size}},k=Math.floor(1e4*Math.random()),l=null,m=a.utils.defaultColor(),n=500,o=d3.dispatch("chartClick","elementClick","elementDblClick","elementMousemove","elementMouseover","elementMouseout","renderEnd"),p=d3.scale.linear().range([0,2*Math.PI]),q=d3.scale.sqrt(),r=d3.layout.partition().sort(null).value(function(){return 1}),s=d3.svg.arc().startAngle(function(a){return Math.max(0,Math.min(2*Math.PI,p(a.x)))}).endAngle(function(a){return Math.max(0,Math.min(2*Math.PI,p(a.x+a.dx)))}).innerRadius(function(a){return Math.max(0,q(a.y))}).outerRadius(function(a){return Math.max(0,q(a.y+a.dy))}),t=a.utils.renderWatch(o);return b.dispatch=o,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return g},set:function(a){g=a}},height:{get:function(){return h},set:function(a){h=a}},mode:{get:function(){return i},set:function(a){i=a}},id:{get:function(){return k},set:function(a){k=a}},duration:{get:function(){return n},set:function(a){n=a}},margin:{get:function(){return f},set:function(a){f.top=void 0!=a.top?a.top:f.top,f.right=void 0!=a.right?a.right:f.right,f.bottom=void 0!=a.bottom?a.bottom:f.bottom,f.left=void 0!=a.left?a.left:f.left}},color:{get:function(){return m},set:function(b){m=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.sunburstChart=function(){"use strict";function b(d){return m.reset(),m.models(c),d.each(function(d){var h=d3.select(this);a.utils.initSVG(h);var i=a.utils.availableWidth(f,h,e),j=a.utils.availableHeight(g,h,e);if(b.update=function(){0===k?h.call(b):h.transition().duration(k).call(b)},b.container=this,!d||!d.length)return a.utils.noData(b,h),b;h.selectAll(".nv-noData").remove();var l=h.selectAll("g.nv-wrap.nv-sunburstChart").data(d),m=l.enter().append("g").attr("class","nvd3 nv-wrap nv-sunburstChart").append("g"),n=l.select("g");m.append("g").attr("class","nv-sunburstWrap"),l.attr("transform","translate("+e.left+","+e.top+")"),c.width(i).height(j);var o=n.select(".nv-sunburstWrap").datum(d);d3.transition(o).call(c)}),m.renderEnd("sunburstChart immediate"),b}var c=a.models.sunburst(),d=a.models.tooltip(),e={top:30,right:20,bottom:20,left:20},f=null,g=null,h=a.utils.defaultColor(),i=(Math.round(1e5*Math.random()),null),j=null,k=250,l=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState","renderEnd"),m=a.utils.renderWatch(l);return d.headerEnabled(!1).duration(0).valueFormatter(function(a){return a}),c.dispatch.on("elementMouseover.tooltip",function(a){a.series={key:a.data.name,value:a.data.size,color:a.color},d.data(a).hidden(!1)}),c.dispatch.on("elementMouseout.tooltip",function(){d.hidden(!0)}),c.dispatch.on("elementMousemove.tooltip",function(){d.position({top:d3.event.pageY,left:d3.event.pageX})()}),b.dispatch=l,b.sunburst=c,b.tooltip=d,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{noData:{get:function(){return j},set:function(a){j=a}},defaultState:{get:function(){return i},set:function(a){i=a}},color:{get:function(){return h},set:function(a){h=a,c.color(h)}},duration:{get:function(){return k},set:function(a){k=a,m.reset(k),c.duration(k)}},margin:{get:function(){return e},set:function(a){e.top=void 0!==a.top?a.top:e.top,e.right=void 0!==a.right?a.right:e.right,e.bottom=void 0!==a.bottom?a.bottom:e.bottom,e.left=void 0!==a.left?a.left:e.left}}}),a.utils.inheritOptions(b,c),a.utils.initOptions(b),b},a.version="1.8.1"}();
\ No newline at end of file
diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/respond.min.js b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/respond.min.js
deleted file mode 100644
index 80a7b69d..00000000
--- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/respond.min.js
+++ /dev/null
@@ -1,5 +0,0 @@
-/*! Respond.js v1.4.2: min/max-width media query polyfill * Copyright 2013 Scott Jehl
- * Licensed under https://github.com/scottjehl/Respond/blob/master/LICENSE-MIT
- * */
-
-!function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){u(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))};if(c.ajax=f,c.queue=d,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,maxw:/\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var g,h,i,j=a.document,k=j.documentElement,l=[],m=[],n=[],o={},p=30,q=j.getElementsByTagName("head")[0]||k,r=j.getElementsByTagName("base")[0],s=q.getElementsByTagName("link"),t=function(){var a,b=j.createElement("div"),c=j.body,d=k.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=j.createElement("body"),c.style.background="none"),k.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&k.insertBefore(c,k.firstChild),a=b.offsetWidth,f?k.removeChild(c):c.removeChild(b),k.style.fontSize=d,e&&(c.style.fontSize=e),a=i=parseFloat(a)},u=function(b){var c="clientWidth",d=k[c],e="CSS1Compat"===j.compatMode&&d||j.body[c]||d,f={},o=s[s.length-1],r=(new Date).getTime();if(b&&g&&p>r-g)return a.clearTimeout(h),h=a.setTimeout(u,p),void 0;g=r;for(var v in l)if(l.hasOwnProperty(v)){var w=l[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?i||t():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?i||t():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(m[w.rules]))}for(var C in n)n.hasOwnProperty(C)&&n[C]&&n[C].parentNode===q&&q.removeChild(n[C]);n.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=j.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,q.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(j.createTextNode(F)),n.push(E)}},v=function(a,b,d){var e=a.replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var g=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},h=!f&&d;b.length&&(b+="/"),h&&(f=1);for(var i=0;f>i;i++){var j,k,n,o;h?(j=d,m.push(g(a))):(j=e[i].match(c.regex.findStyles)&&RegExp.$1,m.push(RegExp.$2&&g(RegExp.$2))),n=j.split(","),o=n.length;for(var p=0;o>p;p++)k=n[p],l.push({media:k.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:m.length-1,hasquery:k.indexOf("(")>-1,minw:k.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:k.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},w=function(){if(d.length){var b=d.shift();f(b.href,function(c){v(c,b.href,b.media),o[b.href]=!0,a.setTimeout(function(){w()},0)})}},x=function(){for(var b=0;b
- {{name}}
- {{methods_bar}}
- {{methods_tested_percent}}
- {{methods_number}}
- {{crap}}
- {{lines_bar}}
- {{lines_executed_percent}}
- {{lines_number}}
-
-
diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node.php
deleted file mode 100644
index c57f7442..00000000
--- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node.php
+++ /dev/null
@@ -1,339 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Base class for nodes in the code coverage information tree.
- *
- * @since Class available since Release 1.1.0
- */
-abstract class PHP_CodeCoverage_Report_Node implements Countable
-{
- /**
- * @var string
- */
- protected $name;
-
- /**
- * @var string
- */
- protected $path;
-
- /**
- * @var array
- */
- protected $pathArray;
-
- /**
- * @var PHP_CodeCoverage_Report_Node
- */
- protected $parent;
-
- /**
- * @var string
- */
- protected $id;
-
- /**
- * Constructor.
- *
- * @param string $name
- * @param PHP_CodeCoverage_Report_Node $parent
- */
- public function __construct($name, PHP_CodeCoverage_Report_Node $parent = null)
- {
- if (substr($name, -1) == '/') {
- $name = substr($name, 0, -1);
- }
-
- $this->name = $name;
- $this->parent = $parent;
- }
-
- /**
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * @return string
- */
- public function getId()
- {
- if ($this->id === null) {
- $parent = $this->getParent();
-
- if ($parent === null) {
- $this->id = 'index';
- } else {
- $parentId = $parent->getId();
-
- if ($parentId == 'index') {
- $this->id = str_replace(':', '_', $this->name);
- } else {
- $this->id = $parentId . '/' . $this->name;
- }
- }
- }
-
- return $this->id;
- }
-
- /**
- * @return string
- */
- public function getPath()
- {
- if ($this->path === null) {
- if ($this->parent === null || $this->parent->getPath() === null || $this->parent->getPath() === false) {
- $this->path = $this->name;
- } else {
- $this->path = $this->parent->getPath() . '/' . $this->name;
- }
- }
-
- return $this->path;
- }
-
- /**
- * @return array
- */
- public function getPathAsArray()
- {
- if ($this->pathArray === null) {
- if ($this->parent === null) {
- $this->pathArray = array();
- } else {
- $this->pathArray = $this->parent->getPathAsArray();
- }
-
- $this->pathArray[] = $this;
- }
-
- return $this->pathArray;
- }
-
- /**
- * @return PHP_CodeCoverage_Report_Node
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Returns the percentage of classes that has been tested.
- *
- * @param bool $asString
- * @return int
- */
- public function getTestedClassesPercent($asString = true)
- {
- return PHP_CodeCoverage_Util::percent(
- $this->getNumTestedClasses(),
- $this->getNumClasses(),
- $asString
- );
- }
-
- /**
- * Returns the percentage of traits that has been tested.
- *
- * @param bool $asString
- * @return int
- */
- public function getTestedTraitsPercent($asString = true)
- {
- return PHP_CodeCoverage_Util::percent(
- $this->getNumTestedTraits(),
- $this->getNumTraits(),
- $asString
- );
- }
-
- /**
- * Returns the percentage of traits that has been tested.
- *
- * @param bool $asString
- * @return int
- * @since Method available since Release 1.2.0
- */
- public function getTestedClassesAndTraitsPercent($asString = true)
- {
- return PHP_CodeCoverage_Util::percent(
- $this->getNumTestedClassesAndTraits(),
- $this->getNumClassesAndTraits(),
- $asString
- );
- }
-
- /**
- * Returns the percentage of methods that has been tested.
- *
- * @param bool $asString
- * @return int
- */
- public function getTestedMethodsPercent($asString = true)
- {
- return PHP_CodeCoverage_Util::percent(
- $this->getNumTestedMethods(),
- $this->getNumMethods(),
- $asString
- );
- }
-
- /**
- * Returns the percentage of executed lines.
- *
- * @param bool $asString
- * @return int
- */
- public function getLineExecutedPercent($asString = true)
- {
- return PHP_CodeCoverage_Util::percent(
- $this->getNumExecutedLines(),
- $this->getNumExecutableLines(),
- $asString
- );
- }
-
- /**
- * Returns the number of classes and traits.
- *
- * @return int
- * @since Method available since Release 1.2.0
- */
- public function getNumClassesAndTraits()
- {
- return $this->getNumClasses() + $this->getNumTraits();
- }
-
- /**
- * Returns the number of tested classes and traits.
- *
- * @return int
- * @since Method available since Release 1.2.0
- */
- public function getNumTestedClassesAndTraits()
- {
- return $this->getNumTestedClasses() + $this->getNumTestedTraits();
- }
-
- /**
- * Returns the classes and traits of this node.
- *
- * @return array
- * @since Method available since Release 1.2.0
- */
- public function getClassesAndTraits()
- {
- return array_merge($this->getClasses(), $this->getTraits());
- }
-
- /**
- * Returns the classes of this node.
- *
- * @return array
- */
- abstract public function getClasses();
-
- /**
- * Returns the traits of this node.
- *
- * @return array
- */
- abstract public function getTraits();
-
- /**
- * Returns the functions of this node.
- *
- * @return array
- */
- abstract public function getFunctions();
-
- /**
- * Returns the LOC/CLOC/NCLOC of this node.
- *
- * @return array
- */
- abstract public function getLinesOfCode();
-
- /**
- * Returns the number of executable lines.
- *
- * @return int
- */
- abstract public function getNumExecutableLines();
-
- /**
- * Returns the number of executed lines.
- *
- * @return int
- */
- abstract public function getNumExecutedLines();
-
- /**
- * Returns the number of classes.
- *
- * @return int
- */
- abstract public function getNumClasses();
-
- /**
- * Returns the number of tested classes.
- *
- * @return int
- */
- abstract public function getNumTestedClasses();
-
- /**
- * Returns the number of traits.
- *
- * @return int
- */
- abstract public function getNumTraits();
-
- /**
- * Returns the number of tested traits.
- *
- * @return int
- */
- abstract public function getNumTestedTraits();
-
- /**
- * Returns the number of methods.
- *
- * @return int
- */
- abstract public function getNumMethods();
-
- /**
- * Returns the number of tested methods.
- *
- * @return int
- */
- abstract public function getNumTestedMethods();
-
- /**
- * Returns the number of functions.
- *
- * @return int
- */
- abstract public function getNumFunctions();
-
- /**
- * Returns the number of tested functions.
- *
- * @return int
- */
- abstract public function getNumTestedFunctions();
-}
diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Directory.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Directory.php
deleted file mode 100644
index dd71ecb5..00000000
--- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Directory.php
+++ /dev/null
@@ -1,478 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Represents a directory in the code coverage information tree.
- *
- * @since Class available since Release 1.1.0
- */
-class PHP_CodeCoverage_Report_Node_Directory extends PHP_CodeCoverage_Report_Node implements IteratorAggregate
-{
- /**
- * @var PHP_CodeCoverage_Report_Node[]
- */
- protected $children = array();
-
- /**
- * @var PHP_CodeCoverage_Report_Node_Directory[]
- */
- protected $directories = array();
-
- /**
- * @var PHP_CodeCoverage_Report_Node_File[]
- */
- protected $files = array();
-
- /**
- * @var array
- */
- protected $classes;
-
- /**
- * @var array
- */
- protected $traits;
-
- /**
- * @var array
- */
- protected $functions;
-
- /**
- * @var array
- */
- protected $linesOfCode = null;
-
- /**
- * @var int
- */
- protected $numFiles = -1;
-
- /**
- * @var int
- */
- protected $numExecutableLines = -1;
-
- /**
- * @var int
- */
- protected $numExecutedLines = -1;
-
- /**
- * @var int
- */
- protected $numClasses = -1;
-
- /**
- * @var int
- */
- protected $numTestedClasses = -1;
-
- /**
- * @var int
- */
- protected $numTraits = -1;
-
- /**
- * @var int
- */
- protected $numTestedTraits = -1;
-
- /**
- * @var int
- */
- protected $numMethods = -1;
-
- /**
- * @var int
- */
- protected $numTestedMethods = -1;
-
- /**
- * @var int
- */
- protected $numFunctions = -1;
-
- /**
- * @var int
- */
- protected $numTestedFunctions = -1;
-
- /**
- * Returns the number of files in/under this node.
- *
- * @return int
- */
- public function count()
- {
- if ($this->numFiles == -1) {
- $this->numFiles = 0;
-
- foreach ($this->children as $child) {
- $this->numFiles += count($child);
- }
- }
-
- return $this->numFiles;
- }
-
- /**
- * Returns an iterator for this node.
- *
- * @return RecursiveIteratorIterator
- */
- public function getIterator()
- {
- return new RecursiveIteratorIterator(
- new PHP_CodeCoverage_Report_Node_Iterator($this),
- RecursiveIteratorIterator::SELF_FIRST
- );
- }
-
- /**
- * Adds a new directory.
- *
- * @param string $name
- * @return PHP_CodeCoverage_Report_Node_Directory
- */
- public function addDirectory($name)
- {
- $directory = new self($name, $this);
-
- $this->children[] = $directory;
- $this->directories[] = &$this->children[count($this->children) - 1];
-
- return $directory;
- }
-
- /**
- * Adds a new file.
- *
- * @param string $name
- * @param array $coverageData
- * @param array $testData
- * @param bool $cacheTokens
- * @return PHP_CodeCoverage_Report_Node_File
- * @throws PHP_CodeCoverage_Exception
- */
- public function addFile($name, array $coverageData, array $testData, $cacheTokens)
- {
- $file = new PHP_CodeCoverage_Report_Node_File(
- $name,
- $this,
- $coverageData,
- $testData,
- $cacheTokens
- );
-
- $this->children[] = $file;
- $this->files[] = &$this->children[count($this->children) - 1];
-
- $this->numExecutableLines = -1;
- $this->numExecutedLines = -1;
-
- return $file;
- }
-
- /**
- * Returns the directories in this directory.
- *
- * @return array
- */
- public function getDirectories()
- {
- return $this->directories;
- }
-
- /**
- * Returns the files in this directory.
- *
- * @return array
- */
- public function getFiles()
- {
- return $this->files;
- }
-
- /**
- * Returns the child nodes of this node.
- *
- * @return array
- */
- public function getChildNodes()
- {
- return $this->children;
- }
-
- /**
- * Returns the classes of this node.
- *
- * @return array
- */
- public function getClasses()
- {
- if ($this->classes === null) {
- $this->classes = array();
-
- foreach ($this->children as $child) {
- $this->classes = array_merge(
- $this->classes,
- $child->getClasses()
- );
- }
- }
-
- return $this->classes;
- }
-
- /**
- * Returns the traits of this node.
- *
- * @return array
- */
- public function getTraits()
- {
- if ($this->traits === null) {
- $this->traits = array();
-
- foreach ($this->children as $child) {
- $this->traits = array_merge(
- $this->traits,
- $child->getTraits()
- );
- }
- }
-
- return $this->traits;
- }
-
- /**
- * Returns the functions of this node.
- *
- * @return array
- */
- public function getFunctions()
- {
- if ($this->functions === null) {
- $this->functions = array();
-
- foreach ($this->children as $child) {
- $this->functions = array_merge(
- $this->functions,
- $child->getFunctions()
- );
- }
- }
-
- return $this->functions;
- }
-
- /**
- * Returns the LOC/CLOC/NCLOC of this node.
- *
- * @return array
- */
- public function getLinesOfCode()
- {
- if ($this->linesOfCode === null) {
- $this->linesOfCode = array('loc' => 0, 'cloc' => 0, 'ncloc' => 0);
-
- foreach ($this->children as $child) {
- $linesOfCode = $child->getLinesOfCode();
-
- $this->linesOfCode['loc'] += $linesOfCode['loc'];
- $this->linesOfCode['cloc'] += $linesOfCode['cloc'];
- $this->linesOfCode['ncloc'] += $linesOfCode['ncloc'];
- }
- }
-
- return $this->linesOfCode;
- }
-
- /**
- * Returns the number of executable lines.
- *
- * @return int
- */
- public function getNumExecutableLines()
- {
- if ($this->numExecutableLines == -1) {
- $this->numExecutableLines = 0;
-
- foreach ($this->children as $child) {
- $this->numExecutableLines += $child->getNumExecutableLines();
- }
- }
-
- return $this->numExecutableLines;
- }
-
- /**
- * Returns the number of executed lines.
- *
- * @return int
- */
- public function getNumExecutedLines()
- {
- if ($this->numExecutedLines == -1) {
- $this->numExecutedLines = 0;
-
- foreach ($this->children as $child) {
- $this->numExecutedLines += $child->getNumExecutedLines();
- }
- }
-
- return $this->numExecutedLines;
- }
-
- /**
- * Returns the number of classes.
- *
- * @return int
- */
- public function getNumClasses()
- {
- if ($this->numClasses == -1) {
- $this->numClasses = 0;
-
- foreach ($this->children as $child) {
- $this->numClasses += $child->getNumClasses();
- }
- }
-
- return $this->numClasses;
- }
-
- /**
- * Returns the number of tested classes.
- *
- * @return int
- */
- public function getNumTestedClasses()
- {
- if ($this->numTestedClasses == -1) {
- $this->numTestedClasses = 0;
-
- foreach ($this->children as $child) {
- $this->numTestedClasses += $child->getNumTestedClasses();
- }
- }
-
- return $this->numTestedClasses;
- }
-
- /**
- * Returns the number of traits.
- *
- * @return int
- */
- public function getNumTraits()
- {
- if ($this->numTraits == -1) {
- $this->numTraits = 0;
-
- foreach ($this->children as $child) {
- $this->numTraits += $child->getNumTraits();
- }
- }
-
- return $this->numTraits;
- }
-
- /**
- * Returns the number of tested traits.
- *
- * @return int
- */
- public function getNumTestedTraits()
- {
- if ($this->numTestedTraits == -1) {
- $this->numTestedTraits = 0;
-
- foreach ($this->children as $child) {
- $this->numTestedTraits += $child->getNumTestedTraits();
- }
- }
-
- return $this->numTestedTraits;
- }
-
- /**
- * Returns the number of methods.
- *
- * @return int
- */
- public function getNumMethods()
- {
- if ($this->numMethods == -1) {
- $this->numMethods = 0;
-
- foreach ($this->children as $child) {
- $this->numMethods += $child->getNumMethods();
- }
- }
-
- return $this->numMethods;
- }
-
- /**
- * Returns the number of tested methods.
- *
- * @return int
- */
- public function getNumTestedMethods()
- {
- if ($this->numTestedMethods == -1) {
- $this->numTestedMethods = 0;
-
- foreach ($this->children as $child) {
- $this->numTestedMethods += $child->getNumTestedMethods();
- }
- }
-
- return $this->numTestedMethods;
- }
-
- /**
- * Returns the number of functions.
- *
- * @return int
- */
- public function getNumFunctions()
- {
- if ($this->numFunctions == -1) {
- $this->numFunctions = 0;
-
- foreach ($this->children as $child) {
- $this->numFunctions += $child->getNumFunctions();
- }
- }
-
- return $this->numFunctions;
- }
-
- /**
- * Returns the number of tested functions.
- *
- * @return int
- */
- public function getNumTestedFunctions()
- {
- if ($this->numTestedFunctions == -1) {
- $this->numTestedFunctions = 0;
-
- foreach ($this->children as $child) {
- $this->numTestedFunctions += $child->getNumTestedFunctions();
- }
- }
-
- return $this->numTestedFunctions;
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/File.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/File.php
deleted file mode 100644
index 32e43a6e..00000000
--- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/File.php
+++ /dev/null
@@ -1,679 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Represents a file in the code coverage information tree.
- *
- * @since Class available since Release 1.1.0
- */
-class PHP_CodeCoverage_Report_Node_File extends PHP_CodeCoverage_Report_Node
-{
- /**
- * @var array
- */
- protected $coverageData;
-
- /**
- * @var array
- */
- protected $testData;
-
- /**
- * @var int
- */
- protected $numExecutableLines = 0;
-
- /**
- * @var int
- */
- protected $numExecutedLines = 0;
-
- /**
- * @var array
- */
- protected $classes = array();
-
- /**
- * @var array
- */
- protected $traits = array();
-
- /**
- * @var array
- */
- protected $functions = array();
-
- /**
- * @var array
- */
- protected $linesOfCode = array();
-
- /**
- * @var int
- */
- protected $numTestedTraits = 0;
-
- /**
- * @var int
- */
- protected $numTestedClasses = 0;
-
- /**
- * @var int
- */
- protected $numMethods = null;
-
- /**
- * @var int
- */
- protected $numTestedMethods = null;
-
- /**
- * @var int
- */
- protected $numTestedFunctions = null;
-
- /**
- * @var array
- */
- protected $startLines = array();
-
- /**
- * @var array
- */
- protected $endLines = array();
-
- /**
- * @var bool
- */
- protected $cacheTokens;
-
- /**
- * Constructor.
- *
- * @param string $name
- * @param PHP_CodeCoverage_Report_Node $parent
- * @param array $coverageData
- * @param array $testData
- * @param bool $cacheTokens
- * @throws PHP_CodeCoverage_Exception
- */
- public function __construct($name, PHP_CodeCoverage_Report_Node $parent, array $coverageData, array $testData, $cacheTokens)
- {
- if (!is_bool($cacheTokens)) {
- throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory(
- 1,
- 'boolean'
- );
- }
-
- parent::__construct($name, $parent);
-
- $this->coverageData = $coverageData;
- $this->testData = $testData;
- $this->cacheTokens = $cacheTokens;
-
- $this->calculateStatistics();
- }
-
- /**
- * Returns the number of files in/under this node.
- *
- * @return int
- */
- public function count()
- {
- return 1;
- }
-
- /**
- * Returns the code coverage data of this node.
- *
- * @return array
- */
- public function getCoverageData()
- {
- return $this->coverageData;
- }
-
- /**
- * Returns the test data of this node.
- *
- * @return array
- */
- public function getTestData()
- {
- return $this->testData;
- }
-
- /**
- * Returns the classes of this node.
- *
- * @return array
- */
- public function getClasses()
- {
- return $this->classes;
- }
-
- /**
- * Returns the traits of this node.
- *
- * @return array
- */
- public function getTraits()
- {
- return $this->traits;
- }
-
- /**
- * Returns the functions of this node.
- *
- * @return array
- */
- public function getFunctions()
- {
- return $this->functions;
- }
-
- /**
- * Returns the LOC/CLOC/NCLOC of this node.
- *
- * @return array
- */
- public function getLinesOfCode()
- {
- return $this->linesOfCode;
- }
-
- /**
- * Returns the number of executable lines.
- *
- * @return int
- */
- public function getNumExecutableLines()
- {
- return $this->numExecutableLines;
- }
-
- /**
- * Returns the number of executed lines.
- *
- * @return int
- */
- public function getNumExecutedLines()
- {
- return $this->numExecutedLines;
- }
-
- /**
- * Returns the number of classes.
- *
- * @return int
- */
- public function getNumClasses()
- {
- return count($this->classes);
- }
-
- /**
- * Returns the number of tested classes.
- *
- * @return int
- */
- public function getNumTestedClasses()
- {
- return $this->numTestedClasses;
- }
-
- /**
- * Returns the number of traits.
- *
- * @return int
- */
- public function getNumTraits()
- {
- return count($this->traits);
- }
-
- /**
- * Returns the number of tested traits.
- *
- * @return int
- */
- public function getNumTestedTraits()
- {
- return $this->numTestedTraits;
- }
-
- /**
- * Returns the number of methods.
- *
- * @return int
- */
- public function getNumMethods()
- {
- if ($this->numMethods === null) {
- $this->numMethods = 0;
-
- foreach ($this->classes as $class) {
- foreach ($class['methods'] as $method) {
- if ($method['executableLines'] > 0) {
- $this->numMethods++;
- }
- }
- }
-
- foreach ($this->traits as $trait) {
- foreach ($trait['methods'] as $method) {
- if ($method['executableLines'] > 0) {
- $this->numMethods++;
- }
- }
- }
- }
-
- return $this->numMethods;
- }
-
- /**
- * Returns the number of tested methods.
- *
- * @return int
- */
- public function getNumTestedMethods()
- {
- if ($this->numTestedMethods === null) {
- $this->numTestedMethods = 0;
-
- foreach ($this->classes as $class) {
- foreach ($class['methods'] as $method) {
- if ($method['executableLines'] > 0 &&
- $method['coverage'] == 100) {
- $this->numTestedMethods++;
- }
- }
- }
-
- foreach ($this->traits as $trait) {
- foreach ($trait['methods'] as $method) {
- if ($method['executableLines'] > 0 &&
- $method['coverage'] == 100) {
- $this->numTestedMethods++;
- }
- }
- }
- }
-
- return $this->numTestedMethods;
- }
-
- /**
- * Returns the number of functions.
- *
- * @return int
- */
- public function getNumFunctions()
- {
- return count($this->functions);
- }
-
- /**
- * Returns the number of tested functions.
- *
- * @return int
- */
- public function getNumTestedFunctions()
- {
- if ($this->numTestedFunctions === null) {
- $this->numTestedFunctions = 0;
-
- foreach ($this->functions as $function) {
- if ($function['executableLines'] > 0 &&
- $function['coverage'] == 100) {
- $this->numTestedFunctions++;
- }
- }
- }
-
- return $this->numTestedFunctions;
- }
-
- /**
- * Calculates coverage statistics for the file.
- */
- protected function calculateStatistics()
- {
- $classStack = $functionStack = array();
-
- if ($this->cacheTokens) {
- $tokens = PHP_Token_Stream_CachingFactory::get($this->getPath());
- } else {
- $tokens = new PHP_Token_Stream($this->getPath());
- }
-
- $this->processClasses($tokens);
- $this->processTraits($tokens);
- $this->processFunctions($tokens);
- $this->linesOfCode = $tokens->getLinesOfCode();
- unset($tokens);
-
- for ($lineNumber = 1; $lineNumber <= $this->linesOfCode['loc']; $lineNumber++) {
- if (isset($this->startLines[$lineNumber])) {
- // Start line of a class.
- if (isset($this->startLines[$lineNumber]['className'])) {
- if (isset($currentClass)) {
- $classStack[] = &$currentClass;
- }
-
- $currentClass = &$this->startLines[$lineNumber];
- } // Start line of a trait.
- elseif (isset($this->startLines[$lineNumber]['traitName'])) {
- $currentTrait = &$this->startLines[$lineNumber];
- } // Start line of a method.
- elseif (isset($this->startLines[$lineNumber]['methodName'])) {
- $currentMethod = &$this->startLines[$lineNumber];
- } // Start line of a function.
- elseif (isset($this->startLines[$lineNumber]['functionName'])) {
- if (isset($currentFunction)) {
- $functionStack[] = &$currentFunction;
- }
-
- $currentFunction = &$this->startLines[$lineNumber];
- }
- }
-
- if (isset($this->coverageData[$lineNumber])) {
- if (isset($currentClass)) {
- $currentClass['executableLines']++;
- }
-
- if (isset($currentTrait)) {
- $currentTrait['executableLines']++;
- }
-
- if (isset($currentMethod)) {
- $currentMethod['executableLines']++;
- }
-
- if (isset($currentFunction)) {
- $currentFunction['executableLines']++;
- }
-
- $this->numExecutableLines++;
-
- if (count($this->coverageData[$lineNumber]) > 0) {
- if (isset($currentClass)) {
- $currentClass['executedLines']++;
- }
-
- if (isset($currentTrait)) {
- $currentTrait['executedLines']++;
- }
-
- if (isset($currentMethod)) {
- $currentMethod['executedLines']++;
- }
-
- if (isset($currentFunction)) {
- $currentFunction['executedLines']++;
- }
-
- $this->numExecutedLines++;
- }
- }
-
- if (isset($this->endLines[$lineNumber])) {
- // End line of a class.
- if (isset($this->endLines[$lineNumber]['className'])) {
- unset($currentClass);
-
- if ($classStack) {
- end($classStack);
- $key = key($classStack);
- $currentClass = &$classStack[$key];
- unset($classStack[$key]);
- }
- } // End line of a trait.
- elseif (isset($this->endLines[$lineNumber]['traitName'])) {
- unset($currentTrait);
- } // End line of a method.
- elseif (isset($this->endLines[$lineNumber]['methodName'])) {
- unset($currentMethod);
- } // End line of a function.
- elseif (isset($this->endLines[$lineNumber]['functionName'])) {
- unset($currentFunction);
-
- if ($functionStack) {
- end($functionStack);
- $key = key($functionStack);
- $currentFunction = &$functionStack[$key];
- unset($functionStack[$key]);
- }
- }
- }
- }
-
- foreach ($this->traits as &$trait) {
- foreach ($trait['methods'] as &$method) {
- if ($method['executableLines'] > 0) {
- $method['coverage'] = ($method['executedLines'] /
- $method['executableLines']) * 100;
- } else {
- $method['coverage'] = 100;
- }
-
- $method['crap'] = $this->crap(
- $method['ccn'],
- $method['coverage']
- );
-
- $trait['ccn'] += $method['ccn'];
- }
-
- if ($trait['executableLines'] > 0) {
- $trait['coverage'] = ($trait['executedLines'] /
- $trait['executableLines']) * 100;
- } else {
- $trait['coverage'] = 100;
- }
-
- if ($trait['coverage'] == 100) {
- $this->numTestedClasses++;
- }
-
- $trait['crap'] = $this->crap(
- $trait['ccn'],
- $trait['coverage']
- );
- }
-
- foreach ($this->classes as &$class) {
- foreach ($class['methods'] as &$method) {
- if ($method['executableLines'] > 0) {
- $method['coverage'] = ($method['executedLines'] /
- $method['executableLines']) * 100;
- } else {
- $method['coverage'] = 100;
- }
-
- $method['crap'] = $this->crap(
- $method['ccn'],
- $method['coverage']
- );
-
- $class['ccn'] += $method['ccn'];
- }
-
- if ($class['executableLines'] > 0) {
- $class['coverage'] = ($class['executedLines'] /
- $class['executableLines']) * 100;
- } else {
- $class['coverage'] = 100;
- }
-
- if ($class['coverage'] == 100) {
- $this->numTestedClasses++;
- }
-
- $class['crap'] = $this->crap(
- $class['ccn'],
- $class['coverage']
- );
- }
- }
-
- /**
- * @param PHP_Token_Stream $tokens
- */
- protected function processClasses(PHP_Token_Stream $tokens)
- {
- $classes = $tokens->getClasses();
- unset($tokens);
-
- $link = $this->getId() . '.html#';
-
- foreach ($classes as $className => $class) {
- $this->classes[$className] = array(
- 'className' => $className,
- 'methods' => array(),
- 'startLine' => $class['startLine'],
- 'executableLines' => 0,
- 'executedLines' => 0,
- 'ccn' => 0,
- 'coverage' => 0,
- 'crap' => 0,
- 'package' => $class['package'],
- 'link' => $link . $class['startLine']
- );
-
- $this->startLines[$class['startLine']] = &$this->classes[$className];
- $this->endLines[$class['endLine']] = &$this->classes[$className];
-
- foreach ($class['methods'] as $methodName => $method) {
- $this->classes[$className]['methods'][$methodName] = array(
- 'methodName' => $methodName,
- 'signature' => $method['signature'],
- 'startLine' => $method['startLine'],
- 'endLine' => $method['endLine'],
- 'executableLines' => 0,
- 'executedLines' => 0,
- 'ccn' => $method['ccn'],
- 'coverage' => 0,
- 'crap' => 0,
- 'link' => $link . $method['startLine']
- );
-
- $this->startLines[$method['startLine']] = &$this->classes[$className]['methods'][$methodName];
- $this->endLines[$method['endLine']] = &$this->classes[$className]['methods'][$methodName];
- }
- }
- }
-
- /**
- * @param PHP_Token_Stream $tokens
- */
- protected function processTraits(PHP_Token_Stream $tokens)
- {
- $traits = $tokens->getTraits();
- unset($tokens);
-
- $link = $this->getId() . '.html#';
-
- foreach ($traits as $traitName => $trait) {
- $this->traits[$traitName] = array(
- 'traitName' => $traitName,
- 'methods' => array(),
- 'startLine' => $trait['startLine'],
- 'executableLines' => 0,
- 'executedLines' => 0,
- 'ccn' => 0,
- 'coverage' => 0,
- 'crap' => 0,
- 'package' => $trait['package'],
- 'link' => $link . $trait['startLine']
- );
-
- $this->startLines[$trait['startLine']] = &$this->traits[$traitName];
- $this->endLines[$trait['endLine']] = &$this->traits[$traitName];
-
- foreach ($trait['methods'] as $methodName => $method) {
- $this->traits[$traitName]['methods'][$methodName] = array(
- 'methodName' => $methodName,
- 'signature' => $method['signature'],
- 'startLine' => $method['startLine'],
- 'endLine' => $method['endLine'],
- 'executableLines' => 0,
- 'executedLines' => 0,
- 'ccn' => $method['ccn'],
- 'coverage' => 0,
- 'crap' => 0,
- 'link' => $link . $method['startLine']
- );
-
- $this->startLines[$method['startLine']] = &$this->traits[$traitName]['methods'][$methodName];
- $this->endLines[$method['endLine']] = &$this->traits[$traitName]['methods'][$methodName];
- }
- }
- }
-
- /**
- * @param PHP_Token_Stream $tokens
- */
- protected function processFunctions(PHP_Token_Stream $tokens)
- {
- $functions = $tokens->getFunctions();
- unset($tokens);
-
- $link = $this->getId() . '.html#';
-
- foreach ($functions as $functionName => $function) {
- $this->functions[$functionName] = array(
- 'functionName' => $functionName,
- 'signature' => $function['signature'],
- 'startLine' => $function['startLine'],
- 'executableLines' => 0,
- 'executedLines' => 0,
- 'ccn' => $function['ccn'],
- 'coverage' => 0,
- 'crap' => 0,
- 'link' => $link . $function['startLine']
- );
-
- $this->startLines[$function['startLine']] = &$this->functions[$functionName];
- $this->endLines[$function['endLine']] = &$this->functions[$functionName];
- }
- }
-
- /**
- * Calculates the Change Risk Anti-Patterns (CRAP) index for a unit of code
- * based on its cyclomatic complexity and percentage of code coverage.
- *
- * @param int $ccn
- * @param float $coverage
- * @return string
- * @since Method available since Release 1.2.0
- */
- protected function crap($ccn, $coverage)
- {
- if ($coverage == 0) {
- return (string) (pow($ccn, 2) + $ccn);
- }
-
- if ($coverage >= 95) {
- return (string) $ccn;
- }
-
- return sprintf(
- '%01.2F',
- pow($ccn, 2) * pow(1 - $coverage/100, 3) + $ccn
- );
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Iterator.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Iterator.php
deleted file mode 100644
index f468b6b8..00000000
--- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Iterator.php
+++ /dev/null
@@ -1,105 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Recursive iterator for PHP_CodeCoverage_Report_Node object graphs.
- *
- * @since Class available since Release 1.1.0
- */
-class PHP_CodeCoverage_Report_Node_Iterator implements RecursiveIterator
-{
- /**
- * @var int
- */
- protected $position;
-
- /**
- * @var PHP_CodeCoverage_Report_Node[]
- */
- protected $nodes;
-
- /**
- * Constructor.
- *
- * @param PHP_CodeCoverage_Report_Node_Directory $node
- */
- public function __construct(PHP_CodeCoverage_Report_Node_Directory $node)
- {
- $this->nodes = $node->getChildNodes();
- }
-
- /**
- * Rewinds the Iterator to the first element.
- */
- public function rewind()
- {
- $this->position = 0;
- }
-
- /**
- * Checks if there is a current element after calls to rewind() or next().
- *
- * @return bool
- */
- public function valid()
- {
- return $this->position < count($this->nodes);
- }
-
- /**
- * Returns the key of the current element.
- *
- * @return int
- */
- public function key()
- {
- return $this->position;
- }
-
- /**
- * Returns the current element.
- *
- * @return PHPUnit_Framework_Test
- */
- public function current()
- {
- return $this->valid() ? $this->nodes[$this->position] : null;
- }
-
- /**
- * Moves forward to next element.
- */
- public function next()
- {
- $this->position++;
- }
-
- /**
- * Returns the sub iterator for the current element.
- *
- * @return PHP_CodeCoverage_Report_Node_Iterator
- */
- public function getChildren()
- {
- return new self(
- $this->nodes[$this->position]
- );
- }
-
- /**
- * Checks whether the current element has children.
- *
- * @return bool
- */
- public function hasChildren()
- {
- return $this->nodes[$this->position] instanceof PHP_CodeCoverage_Report_Node_Directory;
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/PHP.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/PHP.php
deleted file mode 100644
index f4e5a0f9..00000000
--- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/PHP.php
+++ /dev/null
@@ -1,50 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Uses var_export() to write a PHP_CodeCoverage object to a file.
- *
- * @since Class available since Release 1.1.0
- */
-class PHP_CodeCoverage_Report_PHP
-{
- /**
- * @param PHP_CodeCoverage $coverage
- * @param string $target
- * @return string
- */
- public function process(PHP_CodeCoverage $coverage, $target = null)
- {
- $filter = $coverage->filter();
-
- $output = sprintf(
- 'setData(%s);
-$coverage->setTests(%s);
-
-$filter = $coverage->filter();
-$filter->setBlacklistedFiles(%s);
-$filter->setWhitelistedFiles(%s);
-
-return $coverage;',
- var_export($coverage->getData(true), 1),
- var_export($coverage->getTests(), 1),
- var_export($filter->getBlacklistedFiles(), 1),
- var_export($filter->getWhitelistedFiles(), 1)
- );
-
- if ($target !== null) {
- return file_put_contents($target, $output);
- } else {
- return $output;
- }
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Text.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Text.php
deleted file mode 100644
index 7dc25452..00000000
--- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Text.php
+++ /dev/null
@@ -1,246 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Generates human readable output from an PHP_CodeCoverage object.
- *
- * The output gets put into a text file our written to the CLI.
- *
- * @since Class available since Release 1.1.0
- */
-class PHP_CodeCoverage_Report_Text
-{
- protected $lowUpperBound;
- protected $highLowerBound;
- protected $showUncoveredFiles;
- protected $showOnlySummary;
-
- protected $colors = array(
- 'green' => "\x1b[30;42m",
- 'yellow' => "\x1b[30;43m",
- 'red' => "\x1b[37;41m",
- 'header' => "\x1b[1;37;40m",
- 'reset' => "\x1b[0m",
- 'eol' => "\x1b[2K",
- );
-
- public function __construct($lowUpperBound, $highLowerBound, $showUncoveredFiles, $showOnlySummary)
- {
- $this->lowUpperBound = $lowUpperBound;
- $this->highLowerBound = $highLowerBound;
- $this->showUncoveredFiles = $showUncoveredFiles;
- $this->showOnlySummary = $showOnlySummary;
- }
-
- /**
- * @param PHP_CodeCoverage $coverage
- * @param bool $showColors
- * @return string
- */
- public function process(PHP_CodeCoverage $coverage, $showColors = false)
- {
- $output = PHP_EOL . PHP_EOL;
- $report = $coverage->getReport();
- unset($coverage);
-
- $colors = array(
- 'header' => '',
- 'classes' => '',
- 'methods' => '',
- 'lines' => '',
- 'reset' => '',
- 'eol' => ''
- );
-
- if ($showColors) {
- $colors['classes'] = $this->getCoverageColor(
- $report->getNumTestedClassesAndTraits(),
- $report->getNumClassesAndTraits()
- );
- $colors['methods'] = $this->getCoverageColor(
- $report->getNumTestedMethods(),
- $report->getNumMethods()
- );
- $colors['lines'] = $this->getCoverageColor(
- $report->getNumExecutedLines(),
- $report->getNumExecutableLines()
- );
- $colors['reset'] = $this->colors['reset'];
- $colors['header'] = $this->colors['header'];
- $colors['eol'] = $this->colors['eol'];
- }
-
- $classes = sprintf(
- ' Classes: %6s (%d/%d)',
- PHP_CodeCoverage_Util::percent(
- $report->getNumTestedClassesAndTraits(),
- $report->getNumClassesAndTraits(),
- true
- ),
- $report->getNumTestedClassesAndTraits(),
- $report->getNumClassesAndTraits()
- );
-
- $methods = sprintf(
- ' Methods: %6s (%d/%d)',
- PHP_CodeCoverage_Util::percent(
- $report->getNumTestedMethods(),
- $report->getNumMethods(),
- true
- ),
- $report->getNumTestedMethods(),
- $report->getNumMethods()
- );
-
- $lines = sprintf(
- ' Lines: %6s (%d/%d)',
- PHP_CodeCoverage_Util::percent(
- $report->getNumExecutedLines(),
- $report->getNumExecutableLines(),
- true
- ),
- $report->getNumExecutedLines(),
- $report->getNumExecutableLines()
- );
-
- $padding = max(array_map('strlen', array($classes, $methods, $lines)));
-
- if ($this->showOnlySummary) {
- $title = 'Code Coverage Report Summary:';
- $padding = max($padding, strlen($title));
-
- $output .= $this->format($colors['header'], $padding, $title);
- } else {
- $date = date(' Y-m-d H:i:s', $_SERVER['REQUEST_TIME']);
- $title = 'Code Coverage Report:';
-
- $output .= $this->format($colors['header'], $padding, $title);
- $output .= $this->format($colors['header'], $padding, $date);
- $output .= $this->format($colors['header'], $padding, '');
- $output .= $this->format($colors['header'], $padding, ' Summary:');
- }
-
- $output .= $this->format($colors['classes'], $padding, $classes);
- $output .= $this->format($colors['methods'], $padding, $methods);
- $output .= $this->format($colors['lines'], $padding, $lines);
-
- if ($this->showOnlySummary) {
- return $output . PHP_EOL;
- }
-
- $classCoverage = array();
-
- foreach ($report as $item) {
- if (!$item instanceof PHP_CodeCoverage_Report_Node_File) {
- continue;
- }
-
- $classes = $item->getClassesAndTraits();
-
- foreach ($classes as $className => $class) {
- $classStatements = 0;
- $coveredClassStatements = 0;
- $coveredMethods = 0;
- $classMethods = 0;
-
- foreach ($class['methods'] as $method) {
- if ($method['executableLines'] == 0) {
- continue;
- }
-
- $classMethods++;
- $classStatements += $method['executableLines'];
- $coveredClassStatements += $method['executedLines'];
- if ($method['coverage'] == 100) {
- $coveredMethods++;
- }
- }
-
- if (!empty($class['package']['namespace'])) {
- $namespace = '\\' . $class['package']['namespace'] . '::';
- } elseif (!empty($class['package']['fullPackage'])) {
- $namespace = '@' . $class['package']['fullPackage'] . '::';
- } else {
- $namespace = '';
- }
-
- $classCoverage[$namespace . $className] = array(
- 'namespace' => $namespace,
- 'className ' => $className,
- 'methodsCovered' => $coveredMethods,
- 'methodCount' => $classMethods,
- 'statementsCovered' => $coveredClassStatements,
- 'statementCount' => $classStatements,
- );
- }
- }
-
- ksort($classCoverage);
-
- $methodColor = '';
- $linesColor = '';
- $resetColor = '';
-
- foreach ($classCoverage as $fullQualifiedPath => $classInfo) {
- if ($classInfo['statementsCovered'] != 0 ||
- $this->showUncoveredFiles) {
- if ($showColors) {
- $methodColor = $this->getCoverageColor($classInfo['methodsCovered'], $classInfo['methodCount']);
- $linesColor = $this->getCoverageColor($classInfo['statementsCovered'], $classInfo['statementCount']);
- $resetColor = $colors['reset'];
- }
-
- $output .= PHP_EOL . $fullQualifiedPath . PHP_EOL
- . ' ' . $methodColor . 'Methods: ' . $this->printCoverageCounts($classInfo['methodsCovered'], $classInfo['methodCount'], 2) . $resetColor . ' '
- . ' ' . $linesColor . 'Lines: ' . $this->printCoverageCounts($classInfo['statementsCovered'], $classInfo['statementCount'], 3) . $resetColor
- ;
- }
- }
-
- return $output . PHP_EOL;
- }
-
- protected function getCoverageColor($numberOfCoveredElements, $totalNumberOfElements)
- {
- $coverage = PHP_CodeCoverage_Util::percent(
- $numberOfCoveredElements,
- $totalNumberOfElements
- );
-
- if ($coverage >= $this->highLowerBound) {
- return $this->colors['green'];
- } elseif ($coverage > $this->lowUpperBound) {
- return $this->colors['yellow'];
- }
-
- return $this->colors['red'];
- }
-
- protected function printCoverageCounts($numberOfCoveredElements, $totalNumberOfElements, $presicion)
- {
- $format = '%' . $presicion . 's';
-
- return PHP_CodeCoverage_Util::percent(
- $numberOfCoveredElements,
- $totalNumberOfElements,
- true,
- true
- ) .
- ' (' . sprintf($format, $numberOfCoveredElements) . '/' .
- sprintf($format, $totalNumberOfElements) . ')';
- }
-
- private function format($color, $padding, $string)
- {
- $reset = $color ? $this->colors['reset'] : '';
-
- return $color . str_pad($string, $padding) . $reset . PHP_EOL;
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML.php
deleted file mode 100644
index 5177b2bd..00000000
--- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML.php
+++ /dev/null
@@ -1,234 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 2.0.0
- */
-class PHP_CodeCoverage_Report_XML
-{
- /**
- * @var string
- */
- private $target;
-
- /**
- * @var PHP_CodeCoverage_Report_XML_Project
- */
- private $project;
-
- public function process(PHP_CodeCoverage $coverage, $target)
- {
- if (substr($target, -1, 1) != DIRECTORY_SEPARATOR) {
- $target .= DIRECTORY_SEPARATOR;
- }
-
- $this->target = $target;
- $this->initTargetDirectory($target);
-
- $report = $coverage->getReport();
-
- $this->project = new PHP_CodeCoverage_Report_XML_Project(
- $coverage->getReport()->getName()
- );
-
- $this->processTests($coverage->getTests());
- $this->processDirectory($report, $this->project);
-
- $index = $this->project->asDom();
- $index->formatOutput = true;
- $index->preserveWhiteSpace = false;
- $index->save($target . '/index.xml');
- }
-
- private function initTargetDirectory($dir)
- {
- if (file_exists($dir)) {
- if (!is_dir($dir)) {
- throw new PHP_CodeCoverage_Exception(
- "'$dir' exists but is not a directory."
- );
- }
-
- if (!is_writable($dir)) {
- throw new PHP_CodeCoverage_Exception(
- "'$dir' exists but is not writable."
- );
- }
- } elseif (!@mkdir($dir, 0777, true)) {
- throw new PHP_CodeCoverage_Exception(
- "'$dir' could not be created."
- );
- }
- }
-
- private function processDirectory(PHP_CodeCoverage_Report_Node_Directory $directory, PHP_CodeCoverage_Report_XML_Node $context)
- {
- $dirObject = $context->addDirectory($directory->getName());
-
- $this->setTotals($directory, $dirObject->getTotals());
-
- foreach ($directory as $node) {
- if ($node instanceof PHP_CodeCoverage_Report_Node_Directory) {
- $this->processDirectory($node, $dirObject);
- continue;
- }
-
- if ($node instanceof PHP_CodeCoverage_Report_Node_File) {
- $this->processFile($node, $dirObject);
- continue;
- }
-
- throw new PHP_CodeCoverage_Exception(
- 'Unknown node type for XML report'
- );
- }
- }
-
- private function processFile(PHP_CodeCoverage_Report_Node_File $file, PHP_CodeCoverage_Report_XML_Directory $context)
- {
- $fileObject = $context->addFile(
- $file->getName(),
- $file->getId() . '.xml'
- );
-
- $this->setTotals($file, $fileObject->getTotals());
-
- $fileReport = new PHP_CodeCoverage_Report_XML_File_Report(
- $file->getName()
- );
-
- $this->setTotals($file, $fileReport->getTotals());
-
- foreach ($file->getClassesAndTraits() as $unit) {
- $this->processUnit($unit, $fileReport);
- }
-
- foreach ($file->getFunctions() as $function) {
- $this->processFunction($function, $fileReport);
- }
-
- foreach ($file->getCoverageData() as $line => $tests) {
- if (!is_array($tests) || count($tests) == 0) {
- continue;
- }
-
- $coverage = $fileReport->getLineCoverage($line);
-
- foreach ($tests as $test) {
- $coverage->addTest($test);
- }
-
- $coverage->finalize();
- }
-
- $this->initTargetDirectory(
- $this->target . dirname($file->getId()) . '/'
- );
-
- $fileDom = $fileReport->asDom();
- $fileDom->formatOutput = true;
- $fileDom->preserveWhiteSpace = false;
- $fileDom->save($this->target . $file->getId() . '.xml');
- }
-
- private function processUnit($unit, PHP_CodeCoverage_Report_XML_File_Report $report)
- {
- if (isset($unit['className'])) {
- $unitObject = $report->getClassObject($unit['className']);
- } else {
- $unitObject = $report->getTraitObject($unit['traitName']);
- }
-
- $unitObject->setLines(
- $unit['startLine'],
- $unit['executableLines'],
- $unit['executedLines']
- );
-
- $unitObject->setCrap($unit['crap']);
-
- $unitObject->setPackage(
- $unit['package']['fullPackage'],
- $unit['package']['package'],
- $unit['package']['subpackage'],
- $unit['package']['category']
- );
-
- $unitObject->setNamespace($unit['package']['namespace']);
-
- foreach ($unit['methods'] as $method) {
- $methodObject = $unitObject->addMethod($method['methodName']);
- $methodObject->setSignature($method['signature']);
- $methodObject->setLines($method['startLine'], $method['endLine']);
- $methodObject->setCrap($method['crap']);
- $methodObject->setTotals(
- $method['executableLines'],
- $method['executedLines'],
- $method['coverage']
- );
- }
- }
-
- private function processFunction($function, PHP_CodeCoverage_Report_XML_File_Report $report)
- {
- $functionObject = $report->getFunctionObject($function['functionName']);
-
- $functionObject->setSignature($function['signature']);
- $functionObject->setLines($function['startLine']);
- $functionObject->setCrap($function['crap']);
- $functionObject->setTotals($function['executableLines'], $function['executedLines'], $function['coverage']);
- }
-
- private function processTests(array $tests)
- {
- $testsObject = $this->project->getTests();
-
- foreach ($tests as $test => $result) {
- if ($test == 'UNCOVERED_FILES_FROM_WHITELIST') {
- continue;
- }
-
- $testsObject->addTest($test, $result);
- }
- }
-
- private function setTotals(PHP_CodeCoverage_Report_Node $node, PHP_CodeCoverage_Report_XML_Totals $totals)
- {
- $loc = $node->getLinesOfCode();
-
- $totals->setNumLines(
- $loc['loc'],
- $loc['cloc'],
- $loc['ncloc'],
- $node->getNumExecutableLines(),
- $node->getNumExecutedLines()
- );
-
- $totals->setNumClasses(
- $node->getNumClasses(),
- $node->getNumTestedClasses()
- );
-
- $totals->setNumTraits(
- $node->getNumTraits(),
- $node->getNumTestedTraits()
- );
-
- $totals->setNumMethods(
- $node->getNumMethods(),
- $node->getNumTestedMethods()
- );
-
- $totals->setNumFunctions(
- $node->getNumFunctions(),
- $node->getNumTestedFunctions()
- );
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Directory.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Directory.php
deleted file mode 100644
index 8e292b50..00000000
--- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Directory.php
+++ /dev/null
@@ -1,16 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 2.0.0
- */
-class PHP_CodeCoverage_Report_XML_Directory extends PHP_CodeCoverage_Report_XML_Node
-{
-}
diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File.php
deleted file mode 100644
index 3c72bab2..00000000
--- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File.php
+++ /dev/null
@@ -1,73 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 2.0.0
- */
-class PHP_CodeCoverage_Report_XML_File
-{
- /**
- * @var DOMDocument
- */
- protected $dom;
-
- /**
- * @var DOMElement
- */
- protected $contextNode;
-
- public function __construct(DOMElement $context)
- {
- $this->dom = $context->ownerDocument;
- $this->contextNode = $context;
- }
-
- public function getTotals()
- {
- $totalsContainer = $this->contextNode->firstChild;
-
- if (!$totalsContainer) {
- $totalsContainer = $this->contextNode->appendChild(
- $this->dom->createElementNS(
- 'http://schema.phpunit.de/coverage/1.0',
- 'totals'
- )
- );
- }
-
- return new PHP_CodeCoverage_Report_XML_Totals($totalsContainer);
- }
-
- public function getLineCoverage($line)
- {
- $coverage = $this->contextNode->getElementsByTagNameNS(
- 'http://schema.phpunit.de/coverage/1.0',
- 'coverage'
- )->item(0);
-
- if (!$coverage) {
- $coverage = $this->contextNode->appendChild(
- $this->dom->createElementNS(
- 'http://schema.phpunit.de/coverage/1.0',
- 'coverage'
- )
- );
- }
-
- $lineNode = $coverage->appendChild(
- $this->dom->createElementNS(
- 'http://schema.phpunit.de/coverage/1.0',
- 'line'
- )
- );
-
- return new PHP_CodeCoverage_Report_XML_File_Coverage($lineNode, $line);
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Coverage.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Coverage.php
deleted file mode 100644
index 29a4e2ba..00000000
--- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Coverage.php
+++ /dev/null
@@ -1,66 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 2.0.0
- */
-class PHP_CodeCoverage_Report_XML_File_Coverage
-{
- /**
- * @var XMLWriter
- */
- private $writer;
-
- /**
- * @var DOMElement
- */
- private $contextNode;
-
- /**
- * @var bool
- */
- private $finalized = false;
-
- public function __construct(DOMElement $context, $line)
- {
- $this->contextNode = $context;
-
- $this->writer = new XMLWriter();
- $this->writer->openMemory();
- $this->writer->startElementNs(null, $context->nodeName, 'http://schema.phpunit.de/coverage/1.0');
- $this->writer->writeAttribute('nr', $line);
- }
-
- public function addTest($test)
- {
- if ($this->finalized) {
- throw new PHP_CodeCoverage_Exception('Coverage Report already finalized');
- }
-
- $this->writer->startElement('covered');
- $this->writer->writeAttribute('by', $test);
- $this->writer->endElement();
- }
-
- public function finalize()
- {
- $this->writer->endElement();
-
- $fragment = $this->contextNode->ownerDocument->createDocumentFragment();
- $fragment->appendXML($this->writer->outputMemory());
-
- $this->contextNode->parentNode->replaceChild(
- $fragment,
- $this->contextNode
- );
-
- $this->finalized = true;
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Method.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Method.php
deleted file mode 100644
index 917628fd..00000000
--- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Method.php
+++ /dev/null
@@ -1,58 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 2.0.0
- */
-class PHP_CodeCoverage_Report_XML_File_Method
-{
- /**
- * @var DOMElement
- */
- private $contextNode;
-
- public function __construct(DOMElement $context, $name)
- {
- $this->contextNode = $context;
-
- $this->setName($name);
- }
-
- private function setName($name)
- {
- $this->contextNode->setAttribute('name', $name);
- }
-
- public function setSignature($signature)
- {
- $this->contextNode->setAttribute('signature', $signature);
- }
-
- public function setLines($start, $end = null)
- {
- $this->contextNode->setAttribute('start', $start);
-
- if ($end !== null) {
- $this->contextNode->setAttribute('end', $end);
- }
- }
-
- public function setTotals($executable, $executed, $coverage)
- {
- $this->contextNode->setAttribute('executable', $executable);
- $this->contextNode->setAttribute('executed', $executed);
- $this->contextNode->setAttribute('coverage', $coverage);
- }
-
- public function setCrap($crap)
- {
- $this->contextNode->setAttribute('crap', $crap);
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Report.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Report.php
deleted file mode 100644
index a6fe7ecf..00000000
--- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Report.php
+++ /dev/null
@@ -1,72 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 2.0.0
- */
-class PHP_CodeCoverage_Report_XML_File_Report extends PHP_CodeCoverage_Report_XML_File
-{
- public function __construct($name)
- {
- $this->dom = new DOMDocument;
- $this->dom->loadXML(' ');
-
- $this->contextNode = $this->dom->getElementsByTagNameNS(
- 'http://schema.phpunit.de/coverage/1.0',
- 'file'
- )->item(0);
-
- $this->setName($name);
- }
-
- private function setName($name)
- {
- $this->contextNode->setAttribute('name', $name);
- }
-
- public function asDom()
- {
- return $this->dom;
- }
-
- public function getFunctionObject($name)
- {
- $node = $this->contextNode->appendChild(
- $this->dom->createElementNS(
- 'http://schema.phpunit.de/coverage/1.0',
- 'function'
- )
- );
-
- return new PHP_CodeCoverage_Report_XML_File_Method($node, $name);
- }
-
- public function getClassObject($name)
- {
- return $this->getUnitObject('class', $name);
- }
-
- public function getTraitObject($name)
- {
- return $this->getUnitObject('trait', $name);
- }
-
- private function getUnitObject($tagName, $name)
- {
- $node = $this->contextNode->appendChild(
- $this->dom->createElementNS(
- 'http://schema.phpunit.de/coverage/1.0',
- $tagName
- )
- );
-
- return new PHP_CodeCoverage_Report_XML_File_Unit($node, $name);
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Unit.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Unit.php
deleted file mode 100644
index 769d9dab..00000000
--- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Unit.php
+++ /dev/null
@@ -1,97 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 2.0.0
- */
-class PHP_CodeCoverage_Report_XML_File_Unit
-{
- /**
- * @var DOMElement
- */
- private $contextNode;
-
- public function __construct(DOMElement $context, $name)
- {
- $this->contextNode = $context;
-
- $this->setName($name);
- }
-
- private function setName($name)
- {
- $this->contextNode->setAttribute('name', $name);
- }
-
- public function setLines($start, $executable, $executed)
- {
- $this->contextNode->setAttribute('start', $start);
- $this->contextNode->setAttribute('executable', $executable);
- $this->contextNode->setAttribute('executed', $executed);
- }
-
- public function setCrap($crap)
- {
- $this->contextNode->setAttribute('crap', $crap);
- }
-
- public function setPackage($full, $package, $sub, $category)
- {
- $node = $this->contextNode->getElementsByTagNameNS(
- 'http://schema.phpunit.de/coverage/1.0',
- 'package'
- )->item(0);
-
- if (!$node) {
- $node = $this->contextNode->appendChild(
- $this->contextNode->ownerDocument->createElementNS(
- 'http://schema.phpunit.de/coverage/1.0',
- 'package'
- )
- );
- }
-
- $node->setAttribute('full', $full);
- $node->setAttribute('name', $package);
- $node->setAttribute('sub', $sub);
- $node->setAttribute('category', $category);
- }
-
- public function setNamespace($namespace)
- {
- $node = $this->contextNode->getElementsByTagNameNS(
- 'http://schema.phpunit.de/coverage/1.0',
- 'namespace'
- )->item(0);
-
- if (!$node) {
- $node = $this->contextNode->appendChild(
- $this->contextNode->ownerDocument->createElementNS(
- 'http://schema.phpunit.de/coverage/1.0',
- 'namespace'
- )
- );
- }
-
- $node->setAttribute('name', $namespace);
- }
-
- public function addMethod($name)
- {
- $node = $this->contextNode->appendChild(
- $this->contextNode->ownerDocument->createElementNS(
- 'http://schema.phpunit.de/coverage/1.0',
- 'method'
- )
- );
-
- return new PHP_CodeCoverage_Report_XML_File_Method($node, $name);
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Node.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Node.php
deleted file mode 100644
index 43dda57c..00000000
--- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Node.php
+++ /dev/null
@@ -1,89 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 2.0.0
- */
-class PHP_CodeCoverage_Report_XML_Node
-{
- /**
- * @var DOMDocument
- */
- private $dom;
-
- /**
- * @var DOMElement
- */
- private $contextNode;
-
- public function __construct(DOMElement $context)
- {
- $this->setContextNode($context);
- }
-
- protected function setContextNode(DOMElement $context)
- {
- $this->dom = $context->ownerDocument;
- $this->contextNode = $context;
- }
-
- public function getDom()
- {
- return $this->dom;
- }
-
- protected function getContextNode()
- {
- return $this->contextNode;
- }
-
- public function getTotals()
- {
- $totalsContainer = $this->getContextNode()->firstChild;
-
- if (!$totalsContainer) {
- $totalsContainer = $this->getContextNode()->appendChild(
- $this->dom->createElementNS(
- 'http://schema.phpunit.de/coverage/1.0',
- 'totals'
- )
- );
- }
-
- return new PHP_CodeCoverage_Report_XML_Totals($totalsContainer);
- }
-
- public function addDirectory($name)
- {
- $dirNode = $this->getDom()->createElementNS(
- 'http://schema.phpunit.de/coverage/1.0',
- 'directory'
- );
-
- $dirNode->setAttribute('name', $name);
- $this->getContextNode()->appendChild($dirNode);
-
- return new PHP_CodeCoverage_Report_XML_Directory($dirNode);
- }
-
- public function addFile($name, $href)
- {
- $fileNode = $this->getDom()->createElementNS(
- 'http://schema.phpunit.de/coverage/1.0',
- 'file'
- );
-
- $fileNode->setAttribute('name', $name);
- $fileNode->setAttribute('href', $href);
- $this->getContextNode()->appendChild($fileNode);
-
- return new PHP_CodeCoverage_Report_XML_File($fileNode);
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Project.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Project.php
deleted file mode 100644
index b8dae04d..00000000
--- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Project.php
+++ /dev/null
@@ -1,63 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 2.0.0
- */
-class PHP_CodeCoverage_Report_XML_Project extends PHP_CodeCoverage_Report_XML_Node
-{
- public function __construct($name)
- {
- $this->init();
- $this->setProjectName($name);
- }
-
- private function init()
- {
- $dom = new DOMDocument;
- $dom->loadXML(' ');
-
- $this->setContextNode(
- $dom->getElementsByTagNameNS(
- 'http://schema.phpunit.de/coverage/1.0',
- 'project'
- )->item(0)
- );
- }
-
- private function setProjectName($name)
- {
- $this->getContextNode()->setAttribute('name', $name);
- }
-
- public function getTests()
- {
- $testsNode = $this->getContextNode()->getElementsByTagNameNS(
- 'http://schema.phpunit.de/coverage/1.0',
- 'tests'
- )->item(0);
-
- if (!$testsNode) {
- $testsNode = $this->getContextNode()->appendChild(
- $this->getDom()->createElementNS(
- 'http://schema.phpunit.de/coverage/1.0',
- 'tests'
- )
- );
- }
-
- return new PHP_CodeCoverage_Report_XML_Tests($testsNode);
- }
-
- public function asDom()
- {
- return $this->getDom();
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Tests.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Tests.php
deleted file mode 100644
index 46214679..00000000
--- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Tests.php
+++ /dev/null
@@ -1,45 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 2.0.0
- */
-class PHP_CodeCoverage_Report_XML_Tests
-{
- private $contextNode;
-
- private $codeMap = array(
- 0 => 'PASSED', // PHPUnit_Runner_BaseTestRunner::STATUS_PASSED
- 1 => 'SKIPPED', // PHPUnit_Runner_BaseTestRunner::STATUS_SKIPPED
- 2 => 'INCOMPLETE', // PHPUnit_Runner_BaseTestRunner::STATUS_INCOMPLETE
- 3 => 'FAILURE', // PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE
- 4 => 'ERROR', // PHPUnit_Runner_BaseTestRunner::STATUS_ERROR
- 5 => 'RISKY' // PHPUnit_Runner_BaseTestRunner::STATUS_RISKY
- );
-
- public function __construct(DOMElement $context)
- {
- $this->contextNode = $context;
- }
-
- public function addTest($test, array $result)
- {
- $node = $this->contextNode->appendChild(
- $this->contextNode->ownerDocument->createElementNS(
- 'http://schema.phpunit.de/coverage/1.0',
- 'test'
- )
- );
- $node->setAttribute('name', $test);
- $node->setAttribute('size', $result['size']);
- $node->setAttribute('result', (int) $result['status']);
- $node->setAttribute('status', $this->codeMap[(int) $result['status']]);
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Totals.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Totals.php
deleted file mode 100644
index d6073d95..00000000
--- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Totals.php
+++ /dev/null
@@ -1,140 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 2.0.0
- */
-class PHP_CodeCoverage_Report_XML_Totals
-{
- /**
- * @var DOMNode
- */
- private $container;
-
- /**
- * @var DOMElement
- */
- private $linesNode;
-
- /**
- * @var DOMElement
- */
- private $methodsNode;
-
- /**
- * @var DOMElement
- */
- private $functionsNode;
-
- /**
- * @var DOMElement
- */
- private $classesNode;
-
- /**
- * @var DOMElement
- */
- private $traitsNode;
-
- public function __construct(DOMElement $container)
- {
- $this->container = $container;
- $dom = $container->ownerDocument;
-
- $this->linesNode = $dom->createElementNS(
- 'http://schema.phpunit.de/coverage/1.0',
- 'lines'
- );
-
- $this->methodsNode = $dom->createElementNS(
- 'http://schema.phpunit.de/coverage/1.0',
- 'methods'
- );
-
- $this->functionsNode = $dom->createElementNS(
- 'http://schema.phpunit.de/coverage/1.0',
- 'functions'
- );
-
- $this->classesNode = $dom->createElementNS(
- 'http://schema.phpunit.de/coverage/1.0',
- 'classes'
- );
-
- $this->traitsNode = $dom->createElementNS(
- 'http://schema.phpunit.de/coverage/1.0',
- 'traits'
- );
-
- $container->appendChild($this->linesNode);
- $container->appendChild($this->methodsNode);
- $container->appendChild($this->functionsNode);
- $container->appendChild($this->classesNode);
- $container->appendChild($this->traitsNode);
- }
-
- public function getContainer()
- {
- return $this->container;
- }
-
- public function setNumLines($loc, $cloc, $ncloc, $executable, $executed)
- {
- $this->linesNode->setAttribute('total', $loc);
- $this->linesNode->setAttribute('comments', $cloc);
- $this->linesNode->setAttribute('code', $ncloc);
- $this->linesNode->setAttribute('executable', $executable);
- $this->linesNode->setAttribute('executed', $executed);
- $this->linesNode->setAttribute(
- 'percent',
- PHP_CodeCoverage_Util::percent($executed, $executable, true)
- );
- }
-
- public function setNumClasses($count, $tested)
- {
- $this->classesNode->setAttribute('count', $count);
- $this->classesNode->setAttribute('tested', $tested);
- $this->classesNode->setAttribute(
- 'percent',
- PHP_CodeCoverage_Util::percent($tested, $count, true)
- );
- }
-
- public function setNumTraits($count, $tested)
- {
- $this->traitsNode->setAttribute('count', $count);
- $this->traitsNode->setAttribute('tested', $tested);
- $this->traitsNode->setAttribute(
- 'percent',
- PHP_CodeCoverage_Util::percent($tested, $count, true)
- );
- }
-
- public function setNumMethods($count, $tested)
- {
- $this->methodsNode->setAttribute('count', $count);
- $this->methodsNode->setAttribute('tested', $tested);
- $this->methodsNode->setAttribute(
- 'percent',
- PHP_CodeCoverage_Util::percent($tested, $count, true)
- );
- }
-
- public function setNumFunctions($count, $tested)
- {
- $this->functionsNode->setAttribute('count', $count);
- $this->functionsNode->setAttribute('tested', $tested);
- $this->functionsNode->setAttribute(
- 'percent',
- PHP_CodeCoverage_Util::percent($tested, $count, true)
- );
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Util.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Util.php
deleted file mode 100644
index eadb3c92..00000000
--- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Util.php
+++ /dev/null
@@ -1,45 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Utility methods.
- *
- * @since Class available since Release 1.0.0
- */
-class PHP_CodeCoverage_Util
-{
- /**
- * @param float $a
- * @param float $b
- * @return float ($a / $b) * 100
- */
- public static function percent($a, $b, $asString = false, $fixedWidth = false)
- {
- if ($asString && $b == 0) {
- return '';
- }
-
- if ($b > 0) {
- $percent = ($a / $b) * 100;
- } else {
- $percent = 100;
- }
-
- if ($asString) {
- if ($fixedWidth) {
- return sprintf('%6.2F%%', $percent);
- }
-
- return sprintf('%01.2F%%', $percent);
- } else {
- return $percent;
- }
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Util/InvalidArgumentHelper.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Util/InvalidArgumentHelper.php
deleted file mode 100644
index d66e4992..00000000
--- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Util/InvalidArgumentHelper.php
+++ /dev/null
@@ -1,39 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Factory for PHP_CodeCoverage_Exception objects that are used to describe
- * invalid arguments passed to a function or method.
- *
- * @since Class available since Release 1.2.0
- */
-class PHP_CodeCoverage_Util_InvalidArgumentHelper
-{
- /**
- * @param int $argument
- * @param string $type
- * @param mixed $value
- */
- public static function factory($argument, $type, $value = null)
- {
- $stack = debug_backtrace(false);
-
- return new PHP_CodeCoverage_Exception(
- sprintf(
- 'Argument #%d%sof %s::%s() must be a %s',
- $argument,
- $value !== null ? ' (' . gettype($value) . '#' . $value . ')' : ' (No Value) ',
- $stack[1]['class'],
- $stack[1]['function'],
- $type
- )
- );
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/FilterTest.php b/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/FilterTest.php
deleted file mode 100644
index 66f8bb42..00000000
--- a/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/FilterTest.php
+++ /dev/null
@@ -1,281 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-if (!defined('TEST_FILES_PATH')) {
- define(
- 'TEST_FILES_PATH',
- dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR .
- '_files' . DIRECTORY_SEPARATOR
- );
-}
-
-/**
- * Tests for the PHP_CodeCoverage_Filter class.
- *
- * @since Class available since Release 1.0.0
- */
-class PHP_CodeCoverage_FilterTest extends PHPUnit_Framework_TestCase
-{
- protected $filter;
- protected $files;
-
- protected function setUp()
- {
- $this->filter = unserialize('O:23:"PHP_CodeCoverage_Filter":0:{}');
-
- $this->files = array(
- TEST_FILES_PATH . 'BankAccount.php',
- TEST_FILES_PATH . 'BankAccountTest.php',
- TEST_FILES_PATH . 'CoverageClassExtendedTest.php',
- TEST_FILES_PATH . 'CoverageClassTest.php',
- TEST_FILES_PATH . 'CoverageFunctionParenthesesTest.php',
- TEST_FILES_PATH . 'CoverageFunctionParenthesesWhitespaceTest.php',
- TEST_FILES_PATH . 'CoverageFunctionTest.php',
- TEST_FILES_PATH . 'CoverageMethodOneLineAnnotationTest.php',
- TEST_FILES_PATH . 'CoverageMethodParenthesesTest.php',
- TEST_FILES_PATH . 'CoverageMethodParenthesesWhitespaceTest.php',
- TEST_FILES_PATH . 'CoverageMethodTest.php',
- TEST_FILES_PATH . 'CoverageNoneTest.php',
- TEST_FILES_PATH . 'CoverageNotPrivateTest.php',
- TEST_FILES_PATH . 'CoverageNotProtectedTest.php',
- TEST_FILES_PATH . 'CoverageNotPublicTest.php',
- TEST_FILES_PATH . 'CoverageNothingTest.php',
- TEST_FILES_PATH . 'CoveragePrivateTest.php',
- TEST_FILES_PATH . 'CoverageProtectedTest.php',
- TEST_FILES_PATH . 'CoveragePublicTest.php',
- TEST_FILES_PATH . 'CoverageTwoDefaultClassAnnotations.php',
- TEST_FILES_PATH . 'CoveredClass.php',
- TEST_FILES_PATH . 'CoveredFunction.php',
- TEST_FILES_PATH . 'NamespaceCoverageClassExtendedTest.php',
- TEST_FILES_PATH . 'NamespaceCoverageClassTest.php',
- TEST_FILES_PATH . 'NamespaceCoverageCoversClassPublicTest.php',
- TEST_FILES_PATH . 'NamespaceCoverageCoversClassTest.php',
- TEST_FILES_PATH . 'NamespaceCoverageMethodTest.php',
- TEST_FILES_PATH . 'NamespaceCoverageNotPrivateTest.php',
- TEST_FILES_PATH . 'NamespaceCoverageNotProtectedTest.php',
- TEST_FILES_PATH . 'NamespaceCoverageNotPublicTest.php',
- TEST_FILES_PATH . 'NamespaceCoveragePrivateTest.php',
- TEST_FILES_PATH . 'NamespaceCoverageProtectedTest.php',
- TEST_FILES_PATH . 'NamespaceCoveragePublicTest.php',
- TEST_FILES_PATH . 'NamespaceCoveredClass.php',
- TEST_FILES_PATH . 'NotExistingCoveredElementTest.php',
- TEST_FILES_PATH . 'source_with_class_and_anonymous_function.php',
- TEST_FILES_PATH . 'source_with_ignore.php',
- TEST_FILES_PATH . 'source_with_namespace.php',
- TEST_FILES_PATH . 'source_with_oneline_annotations.php',
- TEST_FILES_PATH . 'source_without_ignore.php',
- TEST_FILES_PATH . 'source_without_namespace.php'
- );
- }
-
- /**
- * @covers PHP_CodeCoverage_Filter::addFileToBlacklist
- * @covers PHP_CodeCoverage_Filter::getBlacklist
- */
- public function testAddingAFileToTheBlacklistWorks()
- {
- $this->filter->addFileToBlacklist($this->files[0]);
-
- $this->assertEquals(
- array($this->files[0]),
- $this->filter->getBlacklist()
- );
- }
-
- /**
- * @covers PHP_CodeCoverage_Filter::removeFileFromBlacklist
- * @covers PHP_CodeCoverage_Filter::getBlacklist
- */
- public function testRemovingAFileFromTheBlacklistWorks()
- {
- $this->filter->addFileToBlacklist($this->files[0]);
- $this->filter->removeFileFromBlacklist($this->files[0]);
-
- $this->assertEquals(array(), $this->filter->getBlacklist());
- }
-
- /**
- * @covers PHP_CodeCoverage_Filter::addDirectoryToBlacklist
- * @covers PHP_CodeCoverage_Filter::getBlacklist
- * @depends testAddingAFileToTheBlacklistWorks
- */
- public function testAddingADirectoryToTheBlacklistWorks()
- {
- $this->filter->addDirectoryToBlacklist(TEST_FILES_PATH);
-
- $blacklist = $this->filter->getBlacklist();
- sort($blacklist);
-
- $this->assertEquals($this->files, $blacklist);
- }
-
- /**
- * @covers PHP_CodeCoverage_Filter::addFilesToBlacklist
- * @covers PHP_CodeCoverage_Filter::getBlacklist
- */
- public function testAddingFilesToTheBlacklistWorks()
- {
- $facade = new File_Iterator_Facade;
- $files = $facade->getFilesAsArray(
- TEST_FILES_PATH,
- $suffixes = '.php'
- );
-
- $this->filter->addFilesToBlacklist($files);
-
- $blacklist = $this->filter->getBlacklist();
- sort($blacklist);
-
- $this->assertEquals($this->files, $blacklist);
- }
-
- /**
- * @covers PHP_CodeCoverage_Filter::removeDirectoryFromBlacklist
- * @covers PHP_CodeCoverage_Filter::getBlacklist
- * @depends testAddingADirectoryToTheBlacklistWorks
- */
- public function testRemovingADirectoryFromTheBlacklistWorks()
- {
- $this->filter->addDirectoryToBlacklist(TEST_FILES_PATH);
- $this->filter->removeDirectoryFromBlacklist(TEST_FILES_PATH);
-
- $this->assertEquals(array(), $this->filter->getBlacklist());
- }
-
- /**
- * @covers PHP_CodeCoverage_Filter::addFileToWhitelist
- * @covers PHP_CodeCoverage_Filter::getWhitelist
- */
- public function testAddingAFileToTheWhitelistWorks()
- {
- $this->filter->addFileToWhitelist($this->files[0]);
-
- $this->assertEquals(
- array($this->files[0]),
- $this->filter->getWhitelist()
- );
- }
-
- /**
- * @covers PHP_CodeCoverage_Filter::removeFileFromWhitelist
- * @covers PHP_CodeCoverage_Filter::getWhitelist
- */
- public function testRemovingAFileFromTheWhitelistWorks()
- {
- $this->filter->addFileToWhitelist($this->files[0]);
- $this->filter->removeFileFromWhitelist($this->files[0]);
-
- $this->assertEquals(array(), $this->filter->getWhitelist());
- }
-
- /**
- * @covers PHP_CodeCoverage_Filter::addDirectoryToWhitelist
- * @covers PHP_CodeCoverage_Filter::getWhitelist
- * @depends testAddingAFileToTheWhitelistWorks
- */
- public function testAddingADirectoryToTheWhitelistWorks()
- {
- $this->filter->addDirectoryToWhitelist(TEST_FILES_PATH);
-
- $whitelist = $this->filter->getWhitelist();
- sort($whitelist);
-
- $this->assertEquals($this->files, $whitelist);
- }
-
- /**
- * @covers PHP_CodeCoverage_Filter::addFilesToWhitelist
- * @covers PHP_CodeCoverage_Filter::getBlacklist
- */
- public function testAddingFilesToTheWhitelistWorks()
- {
- $facade = new File_Iterator_Facade;
- $files = $facade->getFilesAsArray(
- TEST_FILES_PATH,
- $suffixes = '.php'
- );
-
- $this->filter->addFilesToWhitelist($files);
-
- $whitelist = $this->filter->getWhitelist();
- sort($whitelist);
-
- $this->assertEquals($this->files, $whitelist);
- }
-
- /**
- * @covers PHP_CodeCoverage_Filter::removeDirectoryFromWhitelist
- * @covers PHP_CodeCoverage_Filter::getWhitelist
- * @depends testAddingADirectoryToTheWhitelistWorks
- */
- public function testRemovingADirectoryFromTheWhitelistWorks()
- {
- $this->filter->addDirectoryToWhitelist(TEST_FILES_PATH);
- $this->filter->removeDirectoryFromWhitelist(TEST_FILES_PATH);
-
- $this->assertEquals(array(), $this->filter->getWhitelist());
- }
-
- /**
- * @covers PHP_CodeCoverage_Filter::isFile
- */
- public function testIsFile()
- {
- $this->assertFalse($this->filter->isFile('vfs://root/a/path'));
- $this->assertFalse($this->filter->isFile('xdebug://debug-eval'));
- $this->assertFalse($this->filter->isFile('eval()\'d code'));
- $this->assertFalse($this->filter->isFile('runtime-created function'));
- $this->assertFalse($this->filter->isFile('assert code'));
- $this->assertFalse($this->filter->isFile('regexp code'));
- $this->assertTrue($this->filter->isFile(__FILE__));
- }
-
- /**
- * @covers PHP_CodeCoverage_Filter::isFiltered
- */
- public function testBlacklistedFileIsFiltered()
- {
- $this->filter->addFileToBlacklist($this->files[0]);
- $this->assertTrue($this->filter->isFiltered($this->files[0]));
- }
-
- /**
- * @covers PHP_CodeCoverage_Filter::isFiltered
- */
- public function testWhitelistedFileIsNotFiltered()
- {
- $this->filter->addFileToWhitelist($this->files[0]);
- $this->assertFalse($this->filter->isFiltered($this->files[0]));
- }
-
- /**
- * @covers PHP_CodeCoverage_Filter::isFiltered
- */
- public function testNotWhitelistedFileIsFiltered()
- {
- $this->filter->addFileToWhitelist($this->files[0]);
- $this->assertTrue($this->filter->isFiltered($this->files[1]));
- }
-
- /**
- * @covers PHP_CodeCoverage_Filter::isFiltered
- * @covers PHP_CodeCoverage_Filter::isFile
- */
- public function testNonFilesAreFiltered()
- {
- $this->assertTrue($this->filter->isFiltered('vfs://root/a/path'));
- $this->assertTrue($this->filter->isFiltered('xdebug://debug-eval'));
- $this->assertTrue($this->filter->isFiltered('eval()\'d code'));
- $this->assertTrue($this->filter->isFiltered('runtime-created function'));
- $this->assertTrue($this->filter->isFiltered('assert code'));
- $this->assertTrue($this->filter->isFiltered('regexp code'));
- $this->assertFalse($this->filter->isFiltered(__FILE__));
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/Report/CloverTest.php b/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/Report/CloverTest.php
deleted file mode 100644
index 8d860bd2..00000000
--- a/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/Report/CloverTest.php
+++ /dev/null
@@ -1,66 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-if (!defined('TEST_FILES_PATH')) {
- define(
- 'TEST_FILES_PATH',
- dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR .
- '_files' . DIRECTORY_SEPARATOR
- );
-}
-
-require_once TEST_FILES_PATH . '../TestCase.php';
-
-/**
- * Tests for the PHP_CodeCoverage_Report_Clover class.
- *
- * @since Class available since Release 1.0.0
- */
-class PHP_CodeCoverage_Report_CloverTest extends PHP_CodeCoverage_TestCase
-{
- /**
- * @covers PHP_CodeCoverage_Report_Clover
- */
- public function testCloverForBankAccountTest()
- {
- $clover = new PHP_CodeCoverage_Report_Clover;
-
- $this->assertStringMatchesFormatFile(
- TEST_FILES_PATH . 'BankAccount-clover.xml',
- $clover->process($this->getCoverageForBankAccount(), null, 'BankAccount')
- );
- }
-
- /**
- * @covers PHP_CodeCoverage_Report_Clover
- */
- public function testCloverForFileWithIgnoredLines()
- {
- $clover = new PHP_CodeCoverage_Report_Clover;
-
- $this->assertStringMatchesFormatFile(
- TEST_FILES_PATH . 'ignored-lines-clover.xml',
- $clover->process($this->getCoverageForFileWithIgnoredLines())
- );
- }
-
- /**
- * @covers PHP_CodeCoverage_Report_Clover
- */
- public function testCloverForClassWithAnonymousFunction()
- {
- $clover = new PHP_CodeCoverage_Report_Clover;
-
- $this->assertStringMatchesFormatFile(
- TEST_FILES_PATH . 'class-with-anonymous-function-clover.xml',
- $clover->process($this->getCoverageForClassWithAnonymousFunction())
- );
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/Report/FactoryTest.php b/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/Report/FactoryTest.php
deleted file mode 100644
index 84f14aea..00000000
--- a/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/Report/FactoryTest.php
+++ /dev/null
@@ -1,222 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-if (!defined('TEST_FILES_PATH')) {
- define(
- 'TEST_FILES_PATH',
- dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR .
- '_files' . DIRECTORY_SEPARATOR
- );
-}
-
-require_once TEST_FILES_PATH . '../TestCase.php';
-
-/**
- * Tests for the PHP_CodeCoverage_Report_Factory class.
- *
- * @since Class available since Release 1.1.0
- */
-class PHP_CodeCoverage_Report_FactoryTest extends PHP_CodeCoverage_TestCase
-{
- protected $factory;
-
- protected function setUp()
- {
- $this->factory = new PHP_CodeCoverage_Report_Factory;
- }
-
- public function testSomething()
- {
- $root = $this->getCoverageForBankAccount()->getReport();
-
- $expectedPath = rtrim(TEST_FILES_PATH, DIRECTORY_SEPARATOR);
- $this->assertEquals($expectedPath, $root->getName());
- $this->assertEquals($expectedPath, $root->getPath());
- $this->assertEquals(10, $root->getNumExecutableLines());
- $this->assertEquals(5, $root->getNumExecutedLines());
- $this->assertEquals(1, $root->getNumClasses());
- $this->assertEquals(0, $root->getNumTestedClasses());
- $this->assertEquals(4, $root->getNumMethods());
- $this->assertEquals(3, $root->getNumTestedMethods());
- $this->assertEquals('0.00%', $root->getTestedClassesPercent());
- $this->assertEquals('75.00%', $root->getTestedMethodsPercent());
- $this->assertEquals('50.00%', $root->getLineExecutedPercent());
- $this->assertEquals(0, $root->getNumFunctions());
- $this->assertEquals(0, $root->getNumTestedFunctions());
- $this->assertNull($root->getParent());
- $this->assertEquals(array(), $root->getDirectories());
- #$this->assertEquals(array(), $root->getFiles());
- #$this->assertEquals(array(), $root->getChildNodes());
-
- $this->assertEquals(
- array(
- 'BankAccount' => array(
- 'methods' => array(
- 'getBalance' => array(
- 'signature' => 'getBalance()',
- 'startLine' => 6,
- 'endLine' => 9,
- 'executableLines' => 1,
- 'executedLines' => 1,
- 'ccn' => 1,
- 'coverage' => 100,
- 'crap' => '1',
- 'link' => 'BankAccount.php.html#6',
- 'methodName' => 'getBalance'
- ),
- 'setBalance' => array(
- 'signature' => 'setBalance($balance)',
- 'startLine' => 11,
- 'endLine' => 18,
- 'executableLines' => 5,
- 'executedLines' => 0,
- 'ccn' => 2,
- 'coverage' => 0,
- 'crap' => 6,
- 'link' => 'BankAccount.php.html#11',
- 'methodName' => 'setBalance'
- ),
- 'depositMoney' => array(
- 'signature' => 'depositMoney($balance)',
- 'startLine' => 20,
- 'endLine' => 25,
- 'executableLines' => 2,
- 'executedLines' => 2,
- 'ccn' => 1,
- 'coverage' => 100,
- 'crap' => '1',
- 'link' => 'BankAccount.php.html#20',
- 'methodName' => 'depositMoney'
- ),
- 'withdrawMoney' => array(
- 'signature' => 'withdrawMoney($balance)',
- 'startLine' => 27,
- 'endLine' => 32,
- 'executableLines' => 2,
- 'executedLines' => 2,
- 'ccn' => 1,
- 'coverage' => 100,
- 'crap' => '1',
- 'link' => 'BankAccount.php.html#27',
- 'methodName' => 'withdrawMoney'
- ),
- ),
- 'startLine' => 2,
- 'executableLines' => 10,
- 'executedLines' => 5,
- 'ccn' => 5,
- 'coverage' => 50,
- 'crap' => '8.12',
- 'package' => array(
- 'namespace' => '',
- 'fullPackage' => '',
- 'category' => '',
- 'package' => '',
- 'subpackage' => ''
- ),
- 'link' => 'BankAccount.php.html#2',
- 'className' => 'BankAccount'
- )
- ),
- $root->getClasses()
- );
-
- $this->assertEquals(array(), $root->getFunctions());
- }
-
- /**
- * @covers PHP_CodeCoverage_Report_Factory::buildDirectoryStructure
- */
- public function testBuildDirectoryStructure()
- {
- $method = new ReflectionMethod(
- 'PHP_CodeCoverage_Report_Factory',
- 'buildDirectoryStructure'
- );
-
- $method->setAccessible(true);
-
- $this->assertEquals(
- array(
- 'src' => array(
- 'Money.php/f' => array(),
- 'MoneyBag.php/f' => array()
- )
- ),
- $method->invoke(
- $this->factory,
- array('src/Money.php' => array(), 'src/MoneyBag.php' => array())
- )
- );
- }
-
- /**
- * @covers PHP_CodeCoverage_Report_Factory::reducePaths
- * @dataProvider reducePathsProvider
- */
- public function testReducePaths($reducedPaths, $commonPath, $paths)
- {
- $method = new ReflectionMethod(
- 'PHP_CodeCoverage_Report_Factory',
- 'reducePaths'
- );
-
- $method->setAccessible(true);
-
- $_commonPath = $method->invokeArgs($this->factory, array(&$paths));
-
- $this->assertEquals($reducedPaths, $paths);
- $this->assertEquals($commonPath, $_commonPath);
- }
-
- public function reducePathsProvider()
- {
- return array(
- array(
- array(
- 'Money.php' => array(),
- 'MoneyBag.php' => array()
- ),
- '/home/sb/Money',
- array(
- '/home/sb/Money/Money.php' => array(),
- '/home/sb/Money/MoneyBag.php' => array()
- )
- ),
- array(
- array(
- 'Money.php' => array()
- ),
- '/home/sb/Money/',
- array(
- '/home/sb/Money/Money.php' => array()
- )
- ),
- array(
- array(),
- '.',
- array()
- ),
- array(
- array(
- 'Money.php' => array(),
- 'MoneyBag.php' => array(),
- 'Cash.phar/Cash.php' => array(),
- ),
- '/home/sb/Money',
- array(
- '/home/sb/Money/Money.php' => array(),
- '/home/sb/Money/MoneyBag.php' => array(),
- 'phar:///home/sb/Money/Cash.phar/Cash.php' => array(),
- ),
- ),
- );
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/UtilTest.php b/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/UtilTest.php
deleted file mode 100644
index 0b4caea9..00000000
--- a/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/UtilTest.php
+++ /dev/null
@@ -1,30 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Tests for the PHP_CodeCoverage_Util class.
- *
- * @since Class available since Release 1.0.0
- */
-class PHP_CodeCoverage_UtilTest extends PHPUnit_Framework_TestCase
-{
- /**
- * @covers PHP_CodeCoverage_Util::percent
- */
- public function testPercent()
- {
- $this->assertEquals(100, PHP_CodeCoverage_Util::percent(100, 0));
- $this->assertEquals(100, PHP_CodeCoverage_Util::percent(100, 100));
- $this->assertEquals(
- '100.00%',
- PHP_CodeCoverage_Util::percent(100, 100, true)
- );
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverageTest.php b/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverageTest.php
deleted file mode 100644
index a755b881..00000000
--- a/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverageTest.php
+++ /dev/null
@@ -1,487 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-if (!defined('TEST_FILES_PATH')) {
- define(
- 'TEST_FILES_PATH',
- dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR .
- '_files' . DIRECTORY_SEPARATOR
- );
-}
-
-require_once TEST_FILES_PATH . '../TestCase.php';
-require_once TEST_FILES_PATH . 'BankAccount.php';
-require_once TEST_FILES_PATH . 'BankAccountTest.php';
-
-/**
- * Tests for the PHP_CodeCoverage class.
- *
- * @since Class available since Release 1.0.0
- */
-class PHP_CodeCoverageTest extends PHP_CodeCoverage_TestCase
-{
- /**
- * @var PHP_CodeCoverage
- */
- private $coverage;
-
- protected function setUp()
- {
- $this->coverage = new PHP_CodeCoverage;
- }
-
- /**
- * @covers PHP_CodeCoverage::__construct
- * @covers PHP_CodeCoverage::filter
- */
- public function testConstructor()
- {
- $this->assertAttributeInstanceOf(
- 'PHP_CodeCoverage_Driver_Xdebug',
- 'driver',
- $this->coverage
- );
-
- $this->assertAttributeInstanceOf(
- 'PHP_CodeCoverage_Filter',
- 'filter',
- $this->coverage
- );
- }
-
- /**
- * @covers PHP_CodeCoverage::__construct
- * @covers PHP_CodeCoverage::filter
- */
- public function testConstructor2()
- {
- $filter = new PHP_CodeCoverage_Filter;
- $coverage = new PHP_CodeCoverage(null, $filter);
-
- $this->assertAttributeInstanceOf(
- 'PHP_CodeCoverage_Driver_Xdebug',
- 'driver',
- $coverage
- );
-
- $this->assertSame($filter, $coverage->filter());
- }
-
- /**
- * @covers PHP_CodeCoverage::start
- * @expectedException PHP_CodeCoverage_Exception
- */
- public function testStartThrowsExceptionForInvalidArgument()
- {
- $this->coverage->start(null, array(), null);
- }
-
- /**
- * @covers PHP_CodeCoverage::stop
- * @expectedException PHP_CodeCoverage_Exception
- */
- public function testStopThrowsExceptionForInvalidArgument()
- {
- $this->coverage->stop(null);
- }
-
- /**
- * @covers PHP_CodeCoverage::stop
- * @expectedException PHP_CodeCoverage_Exception
- */
- public function testStopThrowsExceptionForInvalidArgument2()
- {
- $this->coverage->stop(true, null);
- }
-
- /**
- * @covers PHP_CodeCoverage::append
- * @expectedException PHP_CodeCoverage_Exception
- */
- public function testAppendThrowsExceptionForInvalidArgument()
- {
- $this->coverage->append(array(), null);
- }
-
- /**
- * @covers PHP_CodeCoverage::setCacheTokens
- * @expectedException PHP_CodeCoverage_Exception
- */
- public function testSetCacheTokensThrowsExceptionForInvalidArgument()
- {
- $this->coverage->setCacheTokens(null);
- }
-
- /**
- * @covers PHP_CodeCoverage::setCacheTokens
- */
- public function testSetCacheTokens()
- {
- $this->coverage->setCacheTokens(true);
- $this->assertAttributeEquals(true, 'cacheTokens', $this->coverage);
- }
-
- /**
- * @covers PHP_CodeCoverage::setCheckForUnintentionallyCoveredCode
- * @expectedException PHP_CodeCoverage_Exception
- */
- public function testSetCheckForUnintentionallyCoveredCodeThrowsExceptionForInvalidArgument()
- {
- $this->coverage->setCheckForUnintentionallyCoveredCode(null);
- }
-
- /**
- * @covers PHP_CodeCoverage::setCheckForUnintentionallyCoveredCode
- */
- public function testSetCheckForUnintentionallyCoveredCode()
- {
- $this->coverage->setCheckForUnintentionallyCoveredCode(true);
- $this->assertAttributeEquals(
- true,
- 'checkForUnintentionallyCoveredCode',
- $this->coverage
- );
- }
-
- /**
- * @covers PHP_CodeCoverage::setForceCoversAnnotation
- * @expectedException PHP_CodeCoverage_Exception
- */
- public function testSetForceCoversAnnotationThrowsExceptionForInvalidArgument()
- {
- $this->coverage->setForceCoversAnnotation(null);
- }
-
- /**
- * @covers PHP_CodeCoverage::setForceCoversAnnotation
- */
- public function testSetForceCoversAnnotation()
- {
- $this->coverage->setForceCoversAnnotation(true);
- $this->assertAttributeEquals(
- true,
- 'forceCoversAnnotation',
- $this->coverage
- );
- }
-
- /**
- * @covers PHP_CodeCoverage::setAddUncoveredFilesFromWhitelist
- * @expectedException PHP_CodeCoverage_Exception
- */
- public function testSetAddUncoveredFilesFromWhitelistThrowsExceptionForInvalidArgument()
- {
- $this->coverage->setAddUncoveredFilesFromWhitelist(null);
- }
-
- /**
- * @covers PHP_CodeCoverage::setAddUncoveredFilesFromWhitelist
- */
- public function testSetAddUncoveredFilesFromWhitelist()
- {
- $this->coverage->setAddUncoveredFilesFromWhitelist(true);
- $this->assertAttributeEquals(
- true,
- 'addUncoveredFilesFromWhitelist',
- $this->coverage
- );
- }
-
- /**
- * @covers PHP_CodeCoverage::setProcessUncoveredFilesFromWhitelist
- * @expectedException PHP_CodeCoverage_Exception
- */
- public function testSetProcessUncoveredFilesFromWhitelistThrowsExceptionForInvalidArgument()
- {
- $this->coverage->setProcessUncoveredFilesFromWhitelist(null);
- }
-
- /**
- * @covers PHP_CodeCoverage::setProcessUncoveredFilesFromWhitelist
- */
- public function testSetProcessUncoveredFilesFromWhitelist()
- {
- $this->coverage->setProcessUncoveredFilesFromWhitelist(true);
- $this->assertAttributeEquals(
- true,
- 'processUncoveredFilesFromWhitelist',
- $this->coverage
- );
- }
-
- /**
- * @covers PHP_CodeCoverage::setMapTestClassNameToCoveredClassName
- */
- public function testSetMapTestClassNameToCoveredClassName()
- {
- $this->coverage->setMapTestClassNameToCoveredClassName(true);
- $this->assertAttributeEquals(
- true,
- 'mapTestClassNameToCoveredClassName',
- $this->coverage
- );
- }
-
- /**
- * @covers PHP_CodeCoverage::setMapTestClassNameToCoveredClassName
- * @expectedException PHP_CodeCoverage_Exception
- */
- public function testSetMapTestClassNameToCoveredClassNameThrowsExceptionForInvalidArgument()
- {
- $this->coverage->setMapTestClassNameToCoveredClassName(null);
- }
-
- /**
- * @covers PHP_CodeCoverage::clear
- */
- public function testClear()
- {
- $this->coverage->clear();
-
- $this->assertAttributeEquals(null, 'currentId', $this->coverage);
- $this->assertAttributeEquals(array(), 'data', $this->coverage);
- $this->assertAttributeEquals(array(), 'tests', $this->coverage);
- }
-
- /**
- * @covers PHP_CodeCoverage::start
- * @covers PHP_CodeCoverage::stop
- * @covers PHP_CodeCoverage::append
- * @covers PHP_CodeCoverage::applyListsFilter
- * @covers PHP_CodeCoverage::initializeFilesThatAreSeenTheFirstTime
- * @covers PHP_CodeCoverage::applyCoversAnnotationFilter
- * @covers PHP_CodeCoverage::getTests
- */
- public function testCollect()
- {
- $coverage = $this->getCoverageForBankAccount();
-
- $this->assertEquals(
- $this->getExpectedDataArrayForBankAccount(),
- $coverage->getData()
- );
-
- if (version_compare(PHPUnit_Runner_Version::id(), '4.7', '>=')) {
- $size = 'unknown';
- } else {
- $size = 'small';
- }
-
- $this->assertEquals(
- array(
- 'BankAccountTest::testBalanceIsInitiallyZero' => array('size' => $size, 'status' => null),
- 'BankAccountTest::testBalanceCannotBecomeNegative' => array('size' => $size, 'status' => null),
- 'BankAccountTest::testBalanceCannotBecomeNegative2' => array('size' => $size, 'status' => null),
- 'BankAccountTest::testDepositWithdrawMoney' => array('size' => $size, 'status' => null)
- ),
- $coverage->getTests()
- );
- }
-
- /**
- * @covers PHP_CodeCoverage::getData
- * @covers PHP_CodeCoverage::merge
- */
- public function testMerge()
- {
- $coverage = $this->getCoverageForBankAccountForFirstTwoTests();
- $coverage->merge($this->getCoverageForBankAccountForLastTwoTests());
-
- $this->assertEquals(
- $this->getExpectedDataArrayForBankAccount(),
- $coverage->getData()
- );
- }
-
- /**
- * @covers PHP_CodeCoverage::getData
- * @covers PHP_CodeCoverage::merge
- */
- public function testMerge2()
- {
- $coverage = new PHP_CodeCoverage(
- $this->getMock('PHP_CodeCoverage_Driver_Xdebug'),
- new PHP_CodeCoverage_Filter
- );
-
- $coverage->merge($this->getCoverageForBankAccount());
-
- $this->assertEquals(
- $this->getExpectedDataArrayForBankAccount(),
- $coverage->getData()
- );
- }
-
- /**
- * @covers PHP_CodeCoverage::getLinesToBeIgnored
- */
- public function testGetLinesToBeIgnored()
- {
- $this->assertEquals(
- array(
- 1,
- 3,
- 4,
- 5,
- 7,
- 8,
- 9,
- 10,
- 11,
- 12,
- 13,
- 14,
- 15,
- 16,
- 17,
- 18,
- 19,
- 20,
- 21,
- 22,
- 23,
- 24,
- 25,
- 26,
- 27,
- 28,
- 30,
- 32,
- 33,
- 34,
- 35,
- 36,
- 37,
- 38
- ),
- $this->getLinesToBeIgnored()->invoke(
- $this->coverage,
- TEST_FILES_PATH . 'source_with_ignore.php'
- )
- );
- }
-
- /**
- * @covers PHP_CodeCoverage::getLinesToBeIgnored
- */
- public function testGetLinesToBeIgnored2()
- {
- $this->assertEquals(
- array(1, 5),
- $this->getLinesToBeIgnored()->invoke(
- $this->coverage,
- TEST_FILES_PATH . 'source_without_ignore.php'
- )
- );
- }
-
- /**
- * @covers PHP_CodeCoverage::getLinesToBeIgnored
- */
- public function testGetLinesToBeIgnored3()
- {
- $this->assertEquals(
- array(
- 1,
- 2,
- 3,
- 4,
- 5,
- 8,
- 11,
- 15,
- 16,
- 19,
- 20
- ),
- $this->getLinesToBeIgnored()->invoke(
- $this->coverage,
- TEST_FILES_PATH . 'source_with_class_and_anonymous_function.php'
- )
- );
- }
-
- /**
- * @covers PHP_CodeCoverage::getLinesToBeIgnored
- */
- public function testGetLinesToBeIgnoredOneLineAnnotations()
- {
- $this->assertEquals(
- array(
- 1,
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9,
- 10,
- 11,
- 12,
- 13,
- 14,
- 15,
- 16,
- 18,
- 20,
- 21,
- 23,
- 24,
- 25,
- 27,
- 28,
- 29,
- 30,
- 31,
- 32,
- 33,
- 34,
- 37
- ),
- $this->getLinesToBeIgnored()->invoke(
- $this->coverage,
- TEST_FILES_PATH . 'source_with_oneline_annotations.php'
- )
- );
- }
-
- /**
- * @return ReflectionMethod
- */
- private function getLinesToBeIgnored()
- {
- $getLinesToBeIgnored = new ReflectionMethod(
- 'PHP_CodeCoverage',
- 'getLinesToBeIgnored'
- );
-
- $getLinesToBeIgnored->setAccessible(true);
-
- return $getLinesToBeIgnored;
- }
-
- /**
- * @covers PHP_CodeCoverage::getLinesToBeIgnored
- */
- public function testGetLinesToBeIgnoredWhenIgnoreIsDisabled()
- {
- $this->coverage->setDisableIgnoredLines(true);
-
- $this->assertEquals(
- array(),
- $this->getLinesToBeIgnored()->invoke(
- $this->coverage,
- TEST_FILES_PATH . 'source_with_ignore.php'
- )
- );
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/TestCase.php b/vendor/phpunit/php-code-coverage/tests/TestCase.php
deleted file mode 100644
index f9824282..00000000
--- a/vendor/phpunit/php-code-coverage/tests/TestCase.php
+++ /dev/null
@@ -1,311 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Abstract base class for test case classes.
- *
- * @since Class available since Release 1.0.0
- */
-abstract class PHP_CodeCoverage_TestCase extends PHPUnit_Framework_TestCase
-{
- protected function getXdebugDataForBankAccount()
- {
- return array(
- array(
- TEST_FILES_PATH . 'BankAccount.php' => array(
- 8 => 1,
- 9 => -2,
- 13 => -1,
- 14 => -1,
- 15 => -1,
- 16 => -1,
- 18 => -1,
- 22 => -1,
- 24 => -1,
- 25 => -2,
- 29 => -1,
- 31 => -1,
- 32 => -2
- )
- ),
- array(
- TEST_FILES_PATH . 'BankAccount.php' => array(
- 8 => 1,
- 13 => 1,
- 16 => 1,
- 29 => 1,
- )
- ),
- array(
- TEST_FILES_PATH . 'BankAccount.php' => array(
- 8 => 1,
- 13 => 1,
- 16 => 1,
- 22 => 1,
- )
- ),
- array(
- TEST_FILES_PATH . 'BankAccount.php' => array(
- 8 => 1,
- 13 => 1,
- 14 => 1,
- 15 => 1,
- 18 => 1,
- 22 => 1,
- 24 => 1,
- 29 => 1,
- 31 => 1,
- )
- )
- );
- }
-
- protected function getCoverageForBankAccount()
- {
- $data = $this->getXdebugDataForBankAccount();
-
- $stub = $this->getMock('PHP_CodeCoverage_Driver_Xdebug');
- $stub->expects($this->any())
- ->method('stop')
- ->will($this->onConsecutiveCalls(
- $data[0],
- $data[1],
- $data[2],
- $data[3]
- ));
-
- $coverage = new PHP_CodeCoverage($stub, new PHP_CodeCoverage_Filter);
-
- $coverage->start(
- new BankAccountTest('testBalanceIsInitiallyZero'),
- true
- );
-
- $coverage->stop(
- true,
- array(TEST_FILES_PATH . 'BankAccount.php' => range(6, 9))
- );
-
- $coverage->start(
- new BankAccountTest('testBalanceCannotBecomeNegative')
- );
-
- $coverage->stop(
- true,
- array(TEST_FILES_PATH . 'BankAccount.php' => range(27, 32))
- );
-
- $coverage->start(
- new BankAccountTest('testBalanceCannotBecomeNegative2')
- );
-
- $coverage->stop(
- true,
- array(TEST_FILES_PATH . 'BankAccount.php' => range(20, 25))
- );
-
- $coverage->start(
- new BankAccountTest('testDepositWithdrawMoney')
- );
-
- $coverage->stop(
- true,
- array(
- TEST_FILES_PATH . 'BankAccount.php' => array_merge(
- range(6, 9),
- range(20, 25),
- range(27, 32)
- )
- )
- );
-
- return $coverage;
- }
-
- protected function getCoverageForBankAccountForFirstTwoTests()
- {
- $data = $this->getXdebugDataForBankAccount();
-
- $stub = $this->getMock('PHP_CodeCoverage_Driver_Xdebug');
- $stub->expects($this->any())
- ->method('stop')
- ->will($this->onConsecutiveCalls(
- $data[0],
- $data[1]
- ));
-
- $coverage = new PHP_CodeCoverage($stub, new PHP_CodeCoverage_Filter);
-
- $coverage->start(
- new BankAccountTest('testBalanceIsInitiallyZero'),
- true
- );
-
- $coverage->stop(
- true,
- array(TEST_FILES_PATH . 'BankAccount.php' => range(6, 9))
- );
-
- $coverage->start(
- new BankAccountTest('testBalanceCannotBecomeNegative')
- );
-
- $coverage->stop(
- true,
- array(TEST_FILES_PATH . 'BankAccount.php' => range(27, 32))
- );
-
- return $coverage;
- }
-
- protected function getCoverageForBankAccountForLastTwoTests()
- {
- $data = $this->getXdebugDataForBankAccount();
-
- $stub = $this->getMock('PHP_CodeCoverage_Driver_Xdebug');
- $stub->expects($this->any())
- ->method('stop')
- ->will($this->onConsecutiveCalls(
- $data[2],
- $data[3]
- ));
-
- $coverage = new PHP_CodeCoverage($stub, new PHP_CodeCoverage_Filter);
-
- $coverage->start(
- new BankAccountTest('testBalanceCannotBecomeNegative2')
- );
-
- $coverage->stop(
- true,
- array(TEST_FILES_PATH . 'BankAccount.php' => range(20, 25))
- );
-
- $coverage->start(
- new BankAccountTest('testDepositWithdrawMoney')
- );
-
- $coverage->stop(
- true,
- array(
- TEST_FILES_PATH . 'BankAccount.php' => array_merge(
- range(6, 9),
- range(20, 25),
- range(27, 32)
- )
- )
- );
-
- return $coverage;
- }
-
- protected function getExpectedDataArrayForBankAccount()
- {
- return array(
- TEST_FILES_PATH . 'BankAccount.php' => array(
- 8 => array(
- 0 => 'BankAccountTest::testBalanceIsInitiallyZero',
- 1 => 'BankAccountTest::testDepositWithdrawMoney'
- ),
- 9 => null,
- 13 => array(),
- 14 => array(),
- 15 => array(),
- 16 => array(),
- 18 => array(),
- 22 => array(
- 0 => 'BankAccountTest::testBalanceCannotBecomeNegative2',
- 1 => 'BankAccountTest::testDepositWithdrawMoney'
- ),
- 24 => array(
- 0 => 'BankAccountTest::testDepositWithdrawMoney',
- ),
- 25 => null,
- 29 => array(
- 0 => 'BankAccountTest::testBalanceCannotBecomeNegative',
- 1 => 'BankAccountTest::testDepositWithdrawMoney'
- ),
- 31 => array(
- 0 => 'BankAccountTest::testDepositWithdrawMoney'
- ),
- 32 => null
- )
- );
- }
-
- protected function getCoverageForFileWithIgnoredLines()
- {
- $coverage = new PHP_CodeCoverage(
- $this->setUpXdebugStubForFileWithIgnoredLines(),
- new PHP_CodeCoverage_Filter
- );
-
- $coverage->start('FileWithIgnoredLines', true);
- $coverage->stop();
-
- return $coverage;
- }
-
- protected function setUpXdebugStubForFileWithIgnoredLines()
- {
- $stub = $this->getMock('PHP_CodeCoverage_Driver_Xdebug');
- $stub->expects($this->any())
- ->method('stop')
- ->will($this->returnValue(
- array(
- TEST_FILES_PATH . 'source_with_ignore.php' => array(
- 2 => 1,
- 4 => -1,
- 6 => -1,
- 7 => 1
- )
- )
- ));
-
- return $stub;
- }
-
- protected function getCoverageForClassWithAnonymousFunction()
- {
- $coverage = new PHP_CodeCoverage(
- $this->setUpXdebugStubForClassWithAnonymousFunction(),
- new PHP_CodeCoverage_Filter
- );
-
- $coverage->start('ClassWithAnonymousFunction', true);
- $coverage->stop();
-
- return $coverage;
- }
-
- protected function setUpXdebugStubForClassWithAnonymousFunction()
- {
- $stub = $this->getMock('PHP_CodeCoverage_Driver_Xdebug');
- $stub->expects($this->any())
- ->method('stop')
- ->will($this->returnValue(
- array(
- TEST_FILES_PATH . 'source_with_class_and_anonymous_function.php' => array(
- 7 => 1,
- 9 => 1,
- 10 => -1,
- 11 => 1,
- 12 => 1,
- 13 => 1,
- 14 => 1,
- 17 => 1,
- 18 => 1
- )
- )
- ));
-
- return $stub;
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/BankAccount-clover.xml b/vendor/phpunit/php-code-coverage/tests/_files/BankAccount-clover.xml
deleted file mode 100644
index 578a7ccc..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/BankAccount-clover.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/BankAccount.php b/vendor/phpunit/php-code-coverage/tests/_files/BankAccount.php
deleted file mode 100644
index 4238c155..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/BankAccount.php
+++ /dev/null
@@ -1,33 +0,0 @@
-balance;
- }
-
- protected function setBalance($balance)
- {
- if ($balance >= 0) {
- $this->balance = $balance;
- } else {
- throw new RuntimeException;
- }
- }
-
- public function depositMoney($balance)
- {
- $this->setBalance($this->getBalance() + $balance);
-
- return $this->getBalance();
- }
-
- public function withdrawMoney($balance)
- {
- $this->setBalance($this->getBalance() - $balance);
-
- return $this->getBalance();
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/BankAccountTest.php b/vendor/phpunit/php-code-coverage/tests/_files/BankAccountTest.php
deleted file mode 100644
index 3a6277ba..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/BankAccountTest.php
+++ /dev/null
@@ -1,66 +0,0 @@
-ba = new BankAccount;
- }
-
- /**
- * @covers BankAccount::getBalance
- */
- public function testBalanceIsInitiallyZero()
- {
- $this->assertEquals(0, $this->ba->getBalance());
- }
-
- /**
- * @covers BankAccount::withdrawMoney
- */
- public function testBalanceCannotBecomeNegative()
- {
- try {
- $this->ba->withdrawMoney(1);
- } catch (RuntimeException $e) {
- $this->assertEquals(0, $this->ba->getBalance());
-
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers BankAccount::depositMoney
- */
- public function testBalanceCannotBecomeNegative2()
- {
- try {
- $this->ba->depositMoney(-1);
- } catch (RuntimeException $e) {
- $this->assertEquals(0, $this->ba->getBalance());
-
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers BankAccount::getBalance
- * @covers BankAccount::depositMoney
- * @covers BankAccount::withdrawMoney
- */
- public function testDepositWithdrawMoney()
- {
- $this->assertEquals(0, $this->ba->getBalance());
- $this->ba->depositMoney(1);
- $this->assertEquals(1, $this->ba->getBalance());
- $this->ba->withdrawMoney(1);
- $this->assertEquals(0, $this->ba->getBalance());
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoverageClassExtendedTest.php b/vendor/phpunit/php-code-coverage/tests/_files/CoverageClassExtendedTest.php
deleted file mode 100644
index df12d347..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/CoverageClassExtendedTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
- */
- public function testSomething()
- {
- $o = new CoveredClass;
- $o->publicMethod();
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoverageClassTest.php b/vendor/phpunit/php-code-coverage/tests/_files/CoverageClassTest.php
deleted file mode 100644
index 7f569ae6..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/CoverageClassTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-publicMethod();
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoverageFunctionParenthesesTest.php b/vendor/phpunit/php-code-coverage/tests/_files/CoverageFunctionParenthesesTest.php
deleted file mode 100644
index 33b5fe3d..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/CoverageFunctionParenthesesTest.php
+++ /dev/null
@@ -1,11 +0,0 @@
-publicMethod();
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoverageMethodParenthesesTest.php b/vendor/phpunit/php-code-coverage/tests/_files/CoverageMethodParenthesesTest.php
deleted file mode 100644
index 42230045..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/CoverageMethodParenthesesTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-publicMethod();
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoverageMethodParenthesesWhitespaceTest.php b/vendor/phpunit/php-code-coverage/tests/_files/CoverageMethodParenthesesWhitespaceTest.php
deleted file mode 100644
index d1be1c6c..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/CoverageMethodParenthesesWhitespaceTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-publicMethod();
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoverageMethodTest.php b/vendor/phpunit/php-code-coverage/tests/_files/CoverageMethodTest.php
deleted file mode 100644
index 167b3db4..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/CoverageMethodTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-publicMethod();
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoverageNoneTest.php b/vendor/phpunit/php-code-coverage/tests/_files/CoverageNoneTest.php
deleted file mode 100644
index 0b414c2e..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/CoverageNoneTest.php
+++ /dev/null
@@ -1,9 +0,0 @@
-publicMethod();
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoverageNotPrivateTest.php b/vendor/phpunit/php-code-coverage/tests/_files/CoverageNotPrivateTest.php
deleted file mode 100644
index 12b56e80..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/CoverageNotPrivateTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
- */
- public function testSomething()
- {
- $o = new CoveredClass;
- $o->publicMethod();
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoverageNotProtectedTest.php b/vendor/phpunit/php-code-coverage/tests/_files/CoverageNotProtectedTest.php
deleted file mode 100644
index c69d261d..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/CoverageNotProtectedTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
- */
- public function testSomething()
- {
- $o = new CoveredClass;
- $o->publicMethod();
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoverageNotPublicTest.php b/vendor/phpunit/php-code-coverage/tests/_files/CoverageNotPublicTest.php
deleted file mode 100644
index aebfe4bd..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/CoverageNotPublicTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
- */
- public function testSomething()
- {
- $o = new CoveredClass;
- $o->publicMethod();
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoverageNothingTest.php b/vendor/phpunit/php-code-coverage/tests/_files/CoverageNothingTest.php
deleted file mode 100644
index 5d5680d9..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/CoverageNothingTest.php
+++ /dev/null
@@ -1,13 +0,0 @@
-publicMethod();
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoveragePrivateTest.php b/vendor/phpunit/php-code-coverage/tests/_files/CoveragePrivateTest.php
deleted file mode 100644
index f09560d3..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/CoveragePrivateTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
- */
- public function testSomething()
- {
- $o = new CoveredClass;
- $o->publicMethod();
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoverageProtectedTest.php b/vendor/phpunit/php-code-coverage/tests/_files/CoverageProtectedTest.php
deleted file mode 100644
index 9b3acbf6..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/CoverageProtectedTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
- */
- public function testSomething()
- {
- $o = new CoveredClass;
- $o->publicMethod();
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoveragePublicTest.php b/vendor/phpunit/php-code-coverage/tests/_files/CoveragePublicTest.php
deleted file mode 100644
index 480a522b..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/CoveragePublicTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
- */
- public function testSomething()
- {
- $o = new CoveredClass;
- $o->publicMethod();
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoverageTwoDefaultClassAnnotations.php b/vendor/phpunit/php-code-coverage/tests/_files/CoverageTwoDefaultClassAnnotations.php
deleted file mode 100644
index 7ffc5c99..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/CoverageTwoDefaultClassAnnotations.php
+++ /dev/null
@@ -1,18 +0,0 @@
-
- */
- public function testSomething()
- {
- $o = new Foo\CoveredClass;
- $o->publicMethod();
- }
-
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoveredClass.php b/vendor/phpunit/php-code-coverage/tests/_files/CoveredClass.php
deleted file mode 100644
index f382ce99..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/CoveredClass.php
+++ /dev/null
@@ -1,36 +0,0 @@
-privateMethod();
- }
-
- public function publicMethod()
- {
- $this->protectedMethod();
- }
-}
-
-class CoveredClass extends CoveredParentClass
-{
- private function privateMethod()
- {
- }
-
- protected function protectedMethod()
- {
- parent::protectedMethod();
- $this->privateMethod();
- }
-
- public function publicMethod()
- {
- parent::publicMethod();
- $this->protectedMethod();
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoveredFunction.php b/vendor/phpunit/php-code-coverage/tests/_files/CoveredFunction.php
deleted file mode 100644
index 9989eb02..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/CoveredFunction.php
+++ /dev/null
@@ -1,4 +0,0 @@
-
- */
- public function testSomething()
- {
- $o = new Foo\CoveredClass;
- $o->publicMethod();
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageClassTest.php b/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageClassTest.php
deleted file mode 100644
index 63912c08..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageClassTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-publicMethod();
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageCoversClassPublicTest.php b/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageCoversClassPublicTest.php
deleted file mode 100644
index 45f583b7..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageCoversClassPublicTest.php
+++ /dev/null
@@ -1,15 +0,0 @@
-publicMethod();
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageCoversClassTest.php b/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageCoversClassTest.php
deleted file mode 100644
index b3367454..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageCoversClassTest.php
+++ /dev/null
@@ -1,20 +0,0 @@
-publicMethod();
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageMethodTest.php b/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageMethodTest.php
deleted file mode 100644
index 35dfb8b1..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageMethodTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-publicMethod();
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageNotPrivateTest.php b/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageNotPrivateTest.php
deleted file mode 100644
index 552c9ec5..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageNotPrivateTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
- */
- public function testSomething()
- {
- $o = new Foo\CoveredClass;
- $o->publicMethod();
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageNotProtectedTest.php b/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageNotProtectedTest.php
deleted file mode 100644
index 33fc8c72..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageNotProtectedTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
- */
- public function testSomething()
- {
- $o = new Foo\CoveredClass;
- $o->publicMethod();
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageNotPublicTest.php b/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageNotPublicTest.php
deleted file mode 100644
index ccbc5009..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageNotPublicTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
- */
- public function testSomething()
- {
- $o = new Foo\CoveredClass;
- $o->publicMethod();
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoveragePrivateTest.php b/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoveragePrivateTest.php
deleted file mode 100644
index cce7ba9d..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoveragePrivateTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
- */
- public function testSomething()
- {
- $o = new Foo\CoveredClass;
- $o->publicMethod();
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageProtectedTest.php b/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageProtectedTest.php
deleted file mode 100644
index dbbcc1c3..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageProtectedTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
- */
- public function testSomething()
- {
- $o = new Foo\CoveredClass;
- $o->publicMethod();
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoveragePublicTest.php b/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoveragePublicTest.php
deleted file mode 100644
index bf1bff8c..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoveragePublicTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
- */
- public function testSomething()
- {
- $o = new Foo\CoveredClass;
- $o->publicMethod();
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoveredClass.php b/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoveredClass.php
deleted file mode 100644
index 5bd0ddfb..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoveredClass.php
+++ /dev/null
@@ -1,38 +0,0 @@
-privateMethod();
- }
-
- public function publicMethod()
- {
- $this->protectedMethod();
- }
-}
-
-class CoveredClass extends CoveredParentClass
-{
- private function privateMethod()
- {
- }
-
- protected function protectedMethod()
- {
- parent::protectedMethod();
- $this->privateMethod();
- }
-
- public function publicMethod()
- {
- parent::publicMethod();
- $this->protectedMethod();
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/NotExistingCoveredElementTest.php b/vendor/phpunit/php-code-coverage/tests/_files/NotExistingCoveredElementTest.php
deleted file mode 100644
index be07ef45..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/NotExistingCoveredElementTest.php
+++ /dev/null
@@ -1,24 +0,0 @@
-
- */
- public function testThree()
- {
- }
-}
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/class-with-anonymous-function-clover.xml b/vendor/phpunit/php-code-coverage/tests/_files/class-with-anonymous-function-clover.xml
deleted file mode 100644
index ac43b806..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/class-with-anonymous-function-clover.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/ignored-lines-clover.xml b/vendor/phpunit/php-code-coverage/tests/_files/ignored-lines-clover.xml
deleted file mode 100644
index cda929cd..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/ignored-lines-clover.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/vendor/phpunit/php-code-coverage/tests/_files/source_with_class_and_anonymous_function.php b/vendor/phpunit/php-code-coverage/tests/_files/source_with_class_and_anonymous_function.php
deleted file mode 100644
index eaba387d..00000000
--- a/vendor/phpunit/php-code-coverage/tests/_files/source_with_class_and_anonymous_function.php
+++ /dev/null
@@ -1,19 +0,0 @@
-.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- * Neither the name of Sebastian Bergmann nor the names of his
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/phpunit/php-file-iterator/README.md b/vendor/phpunit/php-file-iterator/README.md
deleted file mode 100644
index 8f2caf2a..00000000
--- a/vendor/phpunit/php-file-iterator/README.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# File_Iterator
-
-## Installation
-
-You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/):
-
- composer require phpunit/php-file-iterator
-
-If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:
-
- composer require --dev phpunit/php-file-iterator
-
diff --git a/vendor/phpunit/php-file-iterator/composer.json b/vendor/phpunit/php-file-iterator/composer.json
deleted file mode 100644
index c6527943..00000000
--- a/vendor/phpunit/php-file-iterator/composer.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- "name": "phpunit/php-file-iterator",
- "description": "FilterIterator implementation that filters files based on a list of suffixes.",
- "type": "library",
- "keywords": [
- "iterator",
- "filesystem"
- ],
- "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
- "license": "BSD-3-Clause",
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
- "role": "lead"
- }
- ],
- "support": {
- "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
- "irc": "irc://irc.freenode.net/phpunit"
- },
- "require": {
- "php": ">=5.3.3"
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "extra": {
- "branch-alias": {
- "dev-master": "1.4.x-dev"
- }
- }
-}
-
diff --git a/vendor/phpunit/php-file-iterator/src/Facade.php b/vendor/phpunit/php-file-iterator/src/Facade.php
deleted file mode 100644
index 902a0af9..00000000
--- a/vendor/phpunit/php-file-iterator/src/Facade.php
+++ /dev/null
@@ -1,123 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Façade implementation that uses File_Iterator_Factory to create a
- * File_Iterator that operates on an AppendIterator that contains an
- * RecursiveDirectoryIterator for each given path. The list of unique
- * files is returned as an array.
- *
- * @since Class available since Release 1.3.0
- */
-class File_Iterator_Facade
-{
- /**
- * @param array|string $paths
- * @param array|string $suffixes
- * @param array|string $prefixes
- * @param array $exclude
- * @param bool $commonPath
- * @return array
- */
- public function getFilesAsArray($paths, $suffixes = '', $prefixes = '', array $exclude = array(), $commonPath = FALSE)
- {
- if (is_string($paths)) {
- $paths = array($paths);
- }
-
- $factory = new File_Iterator_Factory;
- $iterator = $factory->getFileIterator(
- $paths, $suffixes, $prefixes, $exclude
- );
-
- $files = array();
-
- foreach ($iterator as $file) {
- $file = $file->getRealPath();
-
- if ($file) {
- $files[] = $file;
- }
- }
-
- foreach ($paths as $path) {
- if (is_file($path)) {
- $files[] = realpath($path);
- }
- }
-
- $files = array_unique($files);
- sort($files);
-
- if ($commonPath) {
- return array(
- 'commonPath' => $this->getCommonPath($files),
- 'files' => $files
- );
- } else {
- return $files;
- }
- }
-
- /**
- * Returns the common path of a set of files.
- *
- * @param array $files
- * @return string
- */
- protected function getCommonPath(array $files)
- {
- $count = count($files);
-
- if ($count == 0) {
- return '';
- }
-
- if ($count == 1) {
- return dirname($files[0]) . DIRECTORY_SEPARATOR;
- }
-
- $_files = array();
-
- foreach ($files as $file) {
- $_files[] = $_fileParts = explode(DIRECTORY_SEPARATOR, $file);
-
- if (empty($_fileParts[0])) {
- $_fileParts[0] = DIRECTORY_SEPARATOR;
- }
- }
-
- $common = '';
- $done = FALSE;
- $j = 0;
- $count--;
-
- while (!$done) {
- for ($i = 0; $i < $count; $i++) {
- if ($_files[$i][$j] != $_files[$i+1][$j]) {
- $done = TRUE;
- break;
- }
- }
-
- if (!$done) {
- $common .= $_files[0][$j];
-
- if ($j > 0) {
- $common .= DIRECTORY_SEPARATOR;
- }
- }
-
- $j++;
- }
-
- return DIRECTORY_SEPARATOR . $common;
- }
-}
diff --git a/vendor/phpunit/php-file-iterator/src/Factory.php b/vendor/phpunit/php-file-iterator/src/Factory.php
deleted file mode 100644
index 9cc3fb7b..00000000
--- a/vendor/phpunit/php-file-iterator/src/Factory.php
+++ /dev/null
@@ -1,91 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Factory Method implementation that creates a File_Iterator that operates on
- * an AppendIterator that contains an RecursiveDirectoryIterator for each given
- * path.
- *
- * @since Class available since Release 1.1.0
- */
-class File_Iterator_Factory
-{
- /**
- * @param array|string $paths
- * @param array|string $suffixes
- * @param array|string $prefixes
- * @param array $exclude
- * @return AppendIterator
- */
- public function getFileIterator($paths, $suffixes = '', $prefixes = '', array $exclude = array())
- {
- if (is_string($paths)) {
- $paths = array($paths);
- }
-
- $paths = $this->getPathsAfterResolvingWildcards($paths);
- $exclude = $this->getPathsAfterResolvingWildcards($exclude);
-
- if (is_string($prefixes)) {
- if ($prefixes != '') {
- $prefixes = array($prefixes);
- } else {
- $prefixes = array();
- }
- }
-
- if (is_string($suffixes)) {
- if ($suffixes != '') {
- $suffixes = array($suffixes);
- } else {
- $suffixes = array();
- }
- }
-
- $iterator = new AppendIterator;
-
- foreach ($paths as $path) {
- if (is_dir($path)) {
- $iterator->append(
- new File_Iterator(
- new RecursiveIteratorIterator(
- new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::FOLLOW_SYMLINKS)
- ),
- $suffixes,
- $prefixes,
- $exclude,
- $path
- )
- );
- }
- }
-
- return $iterator;
- }
-
- /**
- * @param array $paths
- * @return array
- */
- protected function getPathsAfterResolvingWildcards(array $paths)
- {
- $_paths = array();
-
- foreach ($paths as $path) {
- if ($locals = glob($path, GLOB_ONLYDIR)) {
- $_paths = array_merge($_paths, array_map('realpath', $locals));
- } else {
- $_paths[] = realpath($path);
- }
- }
-
- return $_paths;
- }
-}
diff --git a/vendor/phpunit/php-file-iterator/src/Iterator.php b/vendor/phpunit/php-file-iterator/src/Iterator.php
deleted file mode 100644
index c8f20a79..00000000
--- a/vendor/phpunit/php-file-iterator/src/Iterator.php
+++ /dev/null
@@ -1,158 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * FilterIterator implementation that filters files based on prefix(es) and/or
- * suffix(es). Hidden files and files from hidden directories are also filtered.
- *
- * @since Class available since Release 1.0.0
- */
-class File_Iterator extends FilterIterator
-{
- const PREFIX = 0;
- const SUFFIX = 1;
-
- /**
- * @var array
- */
- protected $suffixes = array();
-
- /**
- * @var array
- */
- protected $prefixes = array();
-
- /**
- * @var array
- */
- protected $exclude = array();
-
- /**
- * @var string
- */
- protected $basepath;
-
- /**
- * @param Iterator $iterator
- * @param array $suffixes
- * @param array $prefixes
- * @param array $exclude
- * @param string $basepath
- */
- public function __construct(Iterator $iterator, array $suffixes = array(), array $prefixes = array(), array $exclude = array(), $basepath = NULL)
- {
- $exclude = array_filter(array_map('realpath', $exclude));
-
- if ($basepath !== NULL) {
- $basepath = realpath($basepath);
- }
-
- if ($basepath === FALSE) {
- $basepath = NULL;
- } else {
- foreach ($exclude as &$_exclude) {
- $_exclude = str_replace($basepath, '', $_exclude);
- }
- }
-
- $this->prefixes = $prefixes;
- $this->suffixes = $suffixes;
- $this->exclude = $exclude;
- $this->basepath = $basepath;
-
- parent::__construct($iterator);
- }
-
- /**
- * @return bool
- */
- public function accept()
- {
- $current = $this->getInnerIterator()->current();
- $filename = $current->getFilename();
- $realpath = $current->getRealPath();
-
- if ($this->basepath !== NULL) {
- $realpath = str_replace($this->basepath, '', $realpath);
- }
-
- // Filter files in hidden directories.
- if (preg_match('=/\.[^/]*/=', $realpath)) {
- return FALSE;
- }
-
- return $this->acceptPath($realpath) &&
- $this->acceptPrefix($filename) &&
- $this->acceptSuffix($filename);
- }
-
- /**
- * @param string $path
- * @return bool
- * @since Method available since Release 1.1.0
- */
- protected function acceptPath($path)
- {
- foreach ($this->exclude as $exclude) {
- if (strpos($path, $exclude) === 0) {
- return FALSE;
- }
- }
-
- return TRUE;
- }
-
- /**
- * @param string $filename
- * @return bool
- * @since Method available since Release 1.1.0
- */
- protected function acceptPrefix($filename)
- {
- return $this->acceptSubString($filename, $this->prefixes, self::PREFIX);
- }
-
- /**
- * @param string $filename
- * @return bool
- * @since Method available since Release 1.1.0
- */
- protected function acceptSuffix($filename)
- {
- return $this->acceptSubString($filename, $this->suffixes, self::SUFFIX);
- }
-
- /**
- * @param string $filename
- * @param array $subStrings
- * @param int $type
- * @return bool
- * @since Method available since Release 1.1.0
- */
- protected function acceptSubString($filename, array $subStrings, $type)
- {
- if (empty($subStrings)) {
- return TRUE;
- }
-
- $matched = FALSE;
-
- foreach ($subStrings as $string) {
- if (($type == self::PREFIX && strpos($filename, $string) === 0) ||
- ($type == self::SUFFIX &&
- substr($filename, -1 * strlen($string)) == $string)) {
- $matched = TRUE;
- break;
- }
- }
-
- return $matched;
- }
-}
diff --git a/vendor/phpunit/php-text-template/.gitattributes b/vendor/phpunit/php-text-template/.gitattributes
deleted file mode 100644
index 461090b7..00000000
--- a/vendor/phpunit/php-text-template/.gitattributes
+++ /dev/null
@@ -1 +0,0 @@
-*.php diff=php
diff --git a/vendor/phpunit/php-text-template/.gitignore b/vendor/phpunit/php-text-template/.gitignore
deleted file mode 100644
index c5992124..00000000
--- a/vendor/phpunit/php-text-template/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-/composer.lock
-/composer.phar
-/.idea
-/vendor
-
diff --git a/vendor/phpunit/php-text-template/LICENSE b/vendor/phpunit/php-text-template/LICENSE
deleted file mode 100644
index 9f9a32d9..00000000
--- a/vendor/phpunit/php-text-template/LICENSE
+++ /dev/null
@@ -1,33 +0,0 @@
-Text_Template
-
-Copyright (c) 2009-2015, Sebastian Bergmann .
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- * Neither the name of Sebastian Bergmann nor the names of his
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/phpunit/php-text-template/README.md b/vendor/phpunit/php-text-template/README.md
deleted file mode 100644
index ec8f5936..00000000
--- a/vendor/phpunit/php-text-template/README.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# Text_Template
-
-## Installation
-
-## Installation
-
-To add this package as a local, per-project dependency to your project, simply add a dependency on `phpunit/php-text-template` to your project's `composer.json` file. Here is a minimal example of a `composer.json` file that just defines a dependency on Text_Template:
-
- {
- "require": {
- "phpunit/php-text-template": "~1.2"
- }
- }
-
diff --git a/vendor/phpunit/php-text-template/composer.json b/vendor/phpunit/php-text-template/composer.json
deleted file mode 100644
index a5779c83..00000000
--- a/vendor/phpunit/php-text-template/composer.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "name": "phpunit/php-text-template",
- "description": "Simple template engine.",
- "type": "library",
- "keywords": [
- "template"
- ],
- "homepage": "https://github.com/sebastianbergmann/php-text-template/",
- "license": "BSD-3-Clause",
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- }
- ],
- "support": {
- "issues": "https://github.com/sebastianbergmann/php-text-template/issues"
- },
- "require": {
- "php": ">=5.3.3"
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- }
-}
-
diff --git a/vendor/phpunit/php-text-template/src/Template.php b/vendor/phpunit/php-text-template/src/Template.php
deleted file mode 100644
index 9eb39ad5..00000000
--- a/vendor/phpunit/php-text-template/src/Template.php
+++ /dev/null
@@ -1,135 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * A simple template engine.
- *
- * @since Class available since Release 1.0.0
- */
-class Text_Template
-{
- /**
- * @var string
- */
- protected $template = '';
-
- /**
- * @var string
- */
- protected $openDelimiter = '{';
-
- /**
- * @var string
- */
- protected $closeDelimiter = '}';
-
- /**
- * @var array
- */
- protected $values = array();
-
- /**
- * Constructor.
- *
- * @param string $file
- * @throws InvalidArgumentException
- */
- public function __construct($file = '', $openDelimiter = '{', $closeDelimiter = '}')
- {
- $this->setFile($file);
- $this->openDelimiter = $openDelimiter;
- $this->closeDelimiter = $closeDelimiter;
- }
-
- /**
- * Sets the template file.
- *
- * @param string $file
- * @throws InvalidArgumentException
- */
- public function setFile($file)
- {
- $distFile = $file . '.dist';
-
- if (file_exists($file)) {
- $this->template = file_get_contents($file);
- }
-
- else if (file_exists($distFile)) {
- $this->template = file_get_contents($distFile);
- }
-
- else {
- throw new InvalidArgumentException(
- 'Template file could not be loaded.'
- );
- }
- }
-
- /**
- * Sets one or more template variables.
- *
- * @param array $values
- * @param bool $merge
- */
- public function setVar(array $values, $merge = TRUE)
- {
- if (!$merge || empty($this->values)) {
- $this->values = $values;
- } else {
- $this->values = array_merge($this->values, $values);
- }
- }
-
- /**
- * Renders the template and returns the result.
- *
- * @return string
- */
- public function render()
- {
- $keys = array();
-
- foreach ($this->values as $key => $value) {
- $keys[] = $this->openDelimiter . $key . $this->closeDelimiter;
- }
-
- return str_replace($keys, $this->values, $this->template);
- }
-
- /**
- * Renders the template and writes the result to a file.
- *
- * @param string $target
- */
- public function renderTo($target)
- {
- $fp = @fopen($target, 'wt');
-
- if ($fp) {
- fwrite($fp, $this->render());
- fclose($fp);
- } else {
- $error = error_get_last();
-
- throw new RuntimeException(
- sprintf(
- 'Could not write to %s: %s',
- $target,
- substr(
- $error['message'],
- strpos($error['message'], ':') + 2
- )
- )
- );
- }
- }
-}
-
diff --git a/vendor/phpunit/php-timer/.gitattributes b/vendor/phpunit/php-timer/.gitattributes
deleted file mode 100644
index 461090b7..00000000
--- a/vendor/phpunit/php-timer/.gitattributes
+++ /dev/null
@@ -1 +0,0 @@
-*.php diff=php
diff --git a/vendor/phpunit/php-timer/.gitignore b/vendor/phpunit/php-timer/.gitignore
deleted file mode 100644
index c03c89b2..00000000
--- a/vendor/phpunit/php-timer/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-/.idea
-/vendor
-/composer.lock
-
diff --git a/vendor/phpunit/php-timer/.travis.yml b/vendor/phpunit/php-timer/.travis.yml
deleted file mode 100644
index 7fc89961..00000000
--- a/vendor/phpunit/php-timer/.travis.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-language: php
-
-php:
- - 5.3
- - 5.4
- - 5.5
- - 5.6
- - 7.0
- - 7.0snapshot
- - 7.1
- - 7.1snapshot
- - master
-
-sudo: false
-
-before_install:
- - composer self-update
- - composer clear-cache
-
-install:
- - travis_retry composer update --no-interaction --no-ansi --no-progress --no-suggest --optimize-autoloader --prefer-stable
-
-script:
- - ./vendor/bin/phpunit
-
-notifications:
- email: false
diff --git a/vendor/phpunit/php-timer/LICENSE b/vendor/phpunit/php-timer/LICENSE
deleted file mode 100644
index 16c45991..00000000
--- a/vendor/phpunit/php-timer/LICENSE
+++ /dev/null
@@ -1,33 +0,0 @@
-PHP_Timer
-
-Copyright (c) 2010-2015, Sebastian Bergmann .
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- * Neither the name of Sebastian Bergmann nor the names of his
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/phpunit/php-timer/README.md b/vendor/phpunit/php-timer/README.md
deleted file mode 100644
index 47abb57f..00000000
--- a/vendor/phpunit/php-timer/README.md
+++ /dev/null
@@ -1,45 +0,0 @@
-[](https://travis-ci.org/sebastianbergmann/php-timer)
-
-# PHP_Timer
-
-Utility class for timing things, factored out of PHPUnit into a stand-alone component.
-
-## Installation
-
-You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/):
-
- composer require phpunit/php-timer
-
-If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:
-
- composer require --dev phpunit/php-timer
-
-## Usage
-
-### Basic Timing
-
-```php
-PHP_Timer::start();
-
-// ...
-
-$time = PHP_Timer::stop();
-var_dump($time);
-
-print PHP_Timer::secondsToTimeString($time);
-```
-
-The code above yields the output below:
-
- double(1.0967254638672E-5)
- 0 ms
-
-### Resource Consumption Since PHP Startup
-
-```php
-print PHP_Timer::resourceUsage();
-```
-
-The code above yields the output below:
-
- Time: 0 ms, Memory: 0.50MB
diff --git a/vendor/phpunit/php-timer/composer.json b/vendor/phpunit/php-timer/composer.json
deleted file mode 100644
index 0f16164a..00000000
--- a/vendor/phpunit/php-timer/composer.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "name": "phpunit/php-timer",
- "description": "Utility class for timing",
- "type": "library",
- "keywords": [
- "timer"
- ],
- "homepage": "https://github.com/sebastianbergmann/php-timer/",
- "license": "BSD-3-Clause",
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
- "role": "lead"
- }
- ],
- "support": {
- "issues": "https://github.com/sebastianbergmann/php-timer/issues"
- },
- "require": {
- "php": "^5.3.3 || ^7.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "extra": {
- "branch-alias": {
- "dev-master": "1.0-dev"
- }
- }
-}
-
diff --git a/vendor/phpunit/php-timer/src/Timer.php b/vendor/phpunit/php-timer/src/Timer.php
deleted file mode 100644
index 7b5c4325..00000000
--- a/vendor/phpunit/php-timer/src/Timer.php
+++ /dev/null
@@ -1,105 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Utility class for timing.
- */
-class PHP_Timer
-{
- /**
- * @var array
- */
- private static $times = array(
- 'hour' => 3600000,
- 'minute' => 60000,
- 'second' => 1000
- );
-
- /**
- * @var array
- */
- private static $startTimes = array();
-
- /**
- * @var float
- */
- public static $requestTime;
-
- /**
- * Starts the timer.
- */
- public static function start()
- {
- array_push(self::$startTimes, microtime(true));
- }
-
- /**
- * Stops the timer and returns the elapsed time.
- *
- * @return float
- */
- public static function stop()
- {
- return microtime(true) - array_pop(self::$startTimes);
- }
-
- /**
- * Formats the elapsed time as a string.
- *
- * @param float $time
- * @return string
- */
- public static function secondsToTimeString($time)
- {
- $ms = round($time * 1000);
-
- foreach (self::$times as $unit => $value) {
- if ($ms >= $value) {
- $time = floor($ms / $value * 100.0) / 100.0;
-
- return $time . ' ' . ($time == 1 ? $unit : $unit . 's');
- }
- }
-
- return $ms . ' ms';
- }
-
- /**
- * Formats the elapsed time since the start of the request as a string.
- *
- * @return string
- */
- public static function timeSinceStartOfRequest()
- {
- return self::secondsToTimeString(microtime(true) - self::$requestTime);
- }
-
- /**
- * Returns the resources (time, memory) of the request as a string.
- *
- * @return string
- */
- public static function resourceUsage()
- {
- return sprintf(
- 'Time: %s, Memory: %4.2fMB',
- self::timeSinceStartOfRequest(),
- memory_get_peak_usage(true) / 1048576
- );
- }
-}
-
-if (isset($_SERVER['REQUEST_TIME_FLOAT'])) {
- PHP_Timer::$requestTime = $_SERVER['REQUEST_TIME_FLOAT'];
-} elseif (isset($_SERVER['REQUEST_TIME'])) {
- PHP_Timer::$requestTime = $_SERVER['REQUEST_TIME'];
-} else {
- PHP_Timer::$requestTime = microtime(true);
-}
diff --git a/vendor/phpunit/php-timer/tests/TimerTest.php b/vendor/phpunit/php-timer/tests/TimerTest.php
deleted file mode 100644
index 34ebc500..00000000
--- a/vendor/phpunit/php-timer/tests/TimerTest.php
+++ /dev/null
@@ -1,98 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-use PHPUnit\Framework\TestCase;
-
-class PHP_TimerTest extends TestCase
-{
- /**
- * @covers PHP_Timer::start
- * @covers PHP_Timer::stop
- */
- public function testStartStop()
- {
- $this->assertInternalType('float', PHP_Timer::stop());
- }
-
- /**
- * @covers PHP_Timer::secondsToTimeString
- * @dataProvider secondsProvider
- */
- public function testSecondsToTimeString($string, $seconds)
- {
- $this->assertEquals(
- $string,
- PHP_Timer::secondsToTimeString($seconds)
- );
- }
-
- /**
- * @covers PHP_Timer::timeSinceStartOfRequest
- */
- public function testTimeSinceStartOfRequest()
- {
- $this->assertStringMatchesFormat(
- '%f %s',
- PHP_Timer::timeSinceStartOfRequest()
- );
- }
-
-
- /**
- * @covers PHP_Timer::resourceUsage
- */
- public function testResourceUsage()
- {
- $this->assertStringMatchesFormat(
- 'Time: %s, Memory: %fMB',
- PHP_Timer::resourceUsage()
- );
- }
-
- public function secondsProvider()
- {
- return array(
- array('0 ms', 0),
- array('1 ms', .001),
- array('10 ms', .01),
- array('100 ms', .1),
- array('999 ms', .999),
- array('1 second', .9999),
- array('1 second', 1),
- array('2 seconds', 2),
- array('59.9 seconds', 59.9),
- array('59.99 seconds', 59.99),
- array('59.99 seconds', 59.999),
- array('1 minute', 59.9999),
- array('59 seconds', 59.001),
- array('59.01 seconds', 59.01),
- array('1 minute', 60),
- array('1.01 minutes', 61),
- array('2 minutes', 120),
- array('2.01 minutes', 121),
- array('59.99 minutes', 3599.9),
- array('59.99 minutes', 3599.99),
- array('59.99 minutes', 3599.999),
- array('1 hour', 3599.9999),
- array('59.98 minutes', 3599.001),
- array('59.98 minutes', 3599.01),
- array('1 hour', 3600),
- array('1 hour', 3601),
- array('1 hour', 3601.9),
- array('1 hour', 3601.99),
- array('1 hour', 3601.999),
- array('1 hour', 3601.9999),
- array('1.01 hours', 3659.9999),
- array('1.01 hours', 3659.001),
- array('1.01 hours', 3659.01),
- array('2 hours', 7199.9999),
- );
- }
-}
diff --git a/vendor/phpunit/php-token-stream/.gitattributes b/vendor/phpunit/php-token-stream/.gitattributes
deleted file mode 100644
index 461090b7..00000000
--- a/vendor/phpunit/php-token-stream/.gitattributes
+++ /dev/null
@@ -1 +0,0 @@
-*.php diff=php
diff --git a/vendor/phpunit/php-token-stream/.gitignore b/vendor/phpunit/php-token-stream/.gitignore
deleted file mode 100644
index 103eecf8..00000000
--- a/vendor/phpunit/php-token-stream/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-/.idea
-/composer.lock
-/composer.phar
-/vendor
diff --git a/vendor/phpunit/php-token-stream/.travis.yml b/vendor/phpunit/php-token-stream/.travis.yml
deleted file mode 100644
index c7cefe73..00000000
--- a/vendor/phpunit/php-token-stream/.travis.yml
+++ /dev/null
@@ -1,31 +0,0 @@
-language: php
-
-php:
- - 5.3
- - 5.4
- - 5.5
- - 5.6
- - 7.0
- - 7.0snapshot
- - 7.1
- - 7.1snapshot
- - master
-
-sudo: false
-
-before_install:
- - composer self-update
- - composer clear-cache
-
-install:
- - travis_retry composer update --no-interaction --no-ansi --no-progress --no-suggest --optimize-autoloader --prefer-stable
-
-script:
- - ./vendor/bin/phpunit --configuration ./build/phpunit.xml --coverage-clover=coverage.xml
-
-after_success:
- - bash <(curl -s https://codecov.io/bash)
-
-notifications:
- email: false
-
diff --git a/vendor/phpunit/php-token-stream/LICENSE b/vendor/phpunit/php-token-stream/LICENSE
deleted file mode 100644
index 6a176fa0..00000000
--- a/vendor/phpunit/php-token-stream/LICENSE
+++ /dev/null
@@ -1,33 +0,0 @@
-PHP_TokenStream
-
-Copyright (c) 2009-2015, Sebastian Bergmann .
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- * Neither the name of Sebastian Bergmann nor the names of his
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/phpunit/php-token-stream/README.md b/vendor/phpunit/php-token-stream/README.md
deleted file mode 100644
index 1cee0487..00000000
--- a/vendor/phpunit/php-token-stream/README.md
+++ /dev/null
@@ -1,14 +0,0 @@
-[](https://travis-ci.org/sebastianbergmann/php-token-stream)
-
-# PHP_TokenStream
-
-## Installation
-
-You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/):
-
- composer require phpunit/php-token-stream
-
-If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:
-
- composer require --dev phpunit/php-token-stream
-
diff --git a/vendor/phpunit/php-token-stream/build.xml b/vendor/phpunit/php-token-stream/build.xml
deleted file mode 100644
index f02f4b5c..00000000
--- a/vendor/phpunit/php-token-stream/build.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/vendor/phpunit/php-token-stream/composer.json b/vendor/phpunit/php-token-stream/composer.json
deleted file mode 100644
index dfde7299..00000000
--- a/vendor/phpunit/php-token-stream/composer.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "name": "phpunit/php-token-stream",
- "description": "Wrapper around PHP's tokenizer extension.",
- "type": "library",
- "keywords": ["tokenizer"],
- "homepage": "https://github.com/sebastianbergmann/php-token-stream/",
- "license": "BSD-3-Clause",
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- }
- ],
- "support": {
- "issues": "https://github.com/sebastianbergmann/php-token-stream/issues"
- },
- "require": {
- "php": ">=5.3.3",
- "ext-tokenizer": "*"
- },
- "require-dev": {
- "phpunit/phpunit": "~4.2"
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "extra": {
- "branch-alias": {
- "dev-master": "1.4-dev"
- }
- }
-}
diff --git a/vendor/phpunit/php-token-stream/src/Token.php b/vendor/phpunit/php-token-stream/src/Token.php
deleted file mode 100644
index 2452e1c1..00000000
--- a/vendor/phpunit/php-token-stream/src/Token.php
+++ /dev/null
@@ -1,849 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * A PHP token.
- *
- * @author Sebastian Bergmann
- * @copyright Sebastian Bergmann
- * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
- * @link http://github.com/sebastianbergmann/php-token-stream/tree
- * @since Class available since Release 1.0.0
- */
-abstract class PHP_Token
-{
- /**
- * @var string
- */
- protected $text;
-
- /**
- * @var integer
- */
- protected $line;
-
- /**
- * @var PHP_Token_Stream
- */
- protected $tokenStream;
-
- /**
- * @var integer
- */
- protected $id;
-
- /**
- * Constructor.
- *
- * @param string $text
- * @param integer $line
- * @param PHP_Token_Stream $tokenStream
- * @param integer $id
- */
- public function __construct($text, $line, PHP_Token_Stream $tokenStream, $id)
- {
- $this->text = $text;
- $this->line = $line;
- $this->tokenStream = $tokenStream;
- $this->id = $id;
- }
-
- /**
- * @return string
- */
- public function __toString()
- {
- return $this->text;
- }
-
- /**
- * @return integer
- */
- public function getLine()
- {
- return $this->line;
- }
-}
-
-abstract class PHP_TokenWithScope extends PHP_Token
-{
- /**
- * @var integer
- */
- protected $endTokenId;
-
- /**
- * Get the docblock for this token
- *
- * This method will fetch the docblock belonging to the current token. The
- * docblock must be placed on the line directly above the token to be
- * recognized.
- *
- * @return string|null Returns the docblock as a string if found
- */
- public function getDocblock()
- {
- $tokens = $this->tokenStream->tokens();
- $currentLineNumber = $tokens[$this->id]->getLine();
- $prevLineNumber = $currentLineNumber - 1;
-
- for ($i = $this->id - 1; $i; $i--) {
- if (!isset($tokens[$i])) {
- return;
- }
-
- if ($tokens[$i] instanceof PHP_Token_FUNCTION ||
- $tokens[$i] instanceof PHP_Token_CLASS ||
- $tokens[$i] instanceof PHP_Token_TRAIT) {
- // Some other trait, class or function, no docblock can be
- // used for the current token
- break;
- }
-
- $line = $tokens[$i]->getLine();
-
- if ($line == $currentLineNumber ||
- ($line == $prevLineNumber &&
- $tokens[$i] instanceof PHP_Token_WHITESPACE)) {
- continue;
- }
-
- if ($line < $currentLineNumber &&
- !$tokens[$i] instanceof PHP_Token_DOC_COMMENT) {
- break;
- }
-
- return (string)$tokens[$i];
- }
- }
-
- /**
- * @return integer
- */
- public function getEndTokenId()
- {
- $block = 0;
- $i = $this->id;
- $tokens = $this->tokenStream->tokens();
-
- while ($this->endTokenId === null && isset($tokens[$i])) {
- if ($tokens[$i] instanceof PHP_Token_OPEN_CURLY ||
- $tokens[$i] instanceof PHP_Token_CURLY_OPEN) {
- $block++;
- } elseif ($tokens[$i] instanceof PHP_Token_CLOSE_CURLY) {
- $block--;
-
- if ($block === 0) {
- $this->endTokenId = $i;
- }
- } elseif (($this instanceof PHP_Token_FUNCTION ||
- $this instanceof PHP_Token_NAMESPACE) &&
- $tokens[$i] instanceof PHP_Token_SEMICOLON) {
- if ($block === 0) {
- $this->endTokenId = $i;
- }
- }
-
- $i++;
- }
-
- if ($this->endTokenId === null) {
- $this->endTokenId = $this->id;
- }
-
- return $this->endTokenId;
- }
-
- /**
- * @return integer
- */
- public function getEndLine()
- {
- return $this->tokenStream[$this->getEndTokenId()]->getLine();
- }
-}
-
-abstract class PHP_TokenWithScopeAndVisibility extends PHP_TokenWithScope
-{
- /**
- * @return string
- */
- public function getVisibility()
- {
- $tokens = $this->tokenStream->tokens();
-
- for ($i = $this->id - 2; $i > $this->id - 7; $i -= 2) {
- if (isset($tokens[$i]) &&
- ($tokens[$i] instanceof PHP_Token_PRIVATE ||
- $tokens[$i] instanceof PHP_Token_PROTECTED ||
- $tokens[$i] instanceof PHP_Token_PUBLIC)) {
- return strtolower(
- str_replace('PHP_Token_', '', get_class($tokens[$i]))
- );
- }
- if (isset($tokens[$i]) &&
- !($tokens[$i] instanceof PHP_Token_STATIC ||
- $tokens[$i] instanceof PHP_Token_FINAL ||
- $tokens[$i] instanceof PHP_Token_ABSTRACT)) {
- // no keywords; stop visibility search
- break;
- }
- }
- }
-
- /**
- * @return string
- */
- public function getKeywords()
- {
- $keywords = array();
- $tokens = $this->tokenStream->tokens();
-
- for ($i = $this->id - 2; $i > $this->id - 7; $i -= 2) {
- if (isset($tokens[$i]) &&
- ($tokens[$i] instanceof PHP_Token_PRIVATE ||
- $tokens[$i] instanceof PHP_Token_PROTECTED ||
- $tokens[$i] instanceof PHP_Token_PUBLIC)) {
- continue;
- }
-
- if (isset($tokens[$i]) &&
- ($tokens[$i] instanceof PHP_Token_STATIC ||
- $tokens[$i] instanceof PHP_Token_FINAL ||
- $tokens[$i] instanceof PHP_Token_ABSTRACT)) {
- $keywords[] = strtolower(
- str_replace('PHP_Token_', '', get_class($tokens[$i]))
- );
- }
- }
-
- return implode(',', $keywords);
- }
-}
-
-abstract class PHP_Token_Includes extends PHP_Token
-{
- /**
- * @var string
- */
- protected $name;
-
- /**
- * @var string
- */
- protected $type;
-
- /**
- * @return string
- */
- public function getName()
- {
- if ($this->name === null) {
- $this->process();
- }
-
- return $this->name;
- }
-
- /**
- * @return string
- */
- public function getType()
- {
- if ($this->type === null) {
- $this->process();
- }
-
- return $this->type;
- }
-
- private function process()
- {
- $tokens = $this->tokenStream->tokens();
-
- if ($tokens[$this->id+2] instanceof PHP_Token_CONSTANT_ENCAPSED_STRING) {
- $this->name = trim($tokens[$this->id+2], "'\"");
- $this->type = strtolower(
- str_replace('PHP_Token_', '', get_class($tokens[$this->id]))
- );
- }
- }
-}
-
-
-class PHP_Token_FUNCTION extends PHP_TokenWithScopeAndVisibility
-{
- /**
- * @var array
- */
- protected $arguments;
-
- /**
- * @var integer
- */
- protected $ccn;
-
- /**
- * @var string
- */
- protected $name;
-
- /**
- * @var string
- */
- protected $signature;
-
- /**
- * @return array
- */
- public function getArguments()
- {
- if ($this->arguments !== null) {
- return $this->arguments;
- }
-
- $this->arguments = array();
- $tokens = $this->tokenStream->tokens();
- $typeDeclaration = null;
-
- // Search for first token inside brackets
- $i = $this->id + 2;
-
- while (!$tokens[$i-1] instanceof PHP_Token_OPEN_BRACKET) {
- $i++;
- }
-
- while (!$tokens[$i] instanceof PHP_Token_CLOSE_BRACKET) {
- if ($tokens[$i] instanceof PHP_Token_STRING) {
- $typeDeclaration = (string)$tokens[$i];
- } elseif ($tokens[$i] instanceof PHP_Token_VARIABLE) {
- $this->arguments[(string)$tokens[$i]] = $typeDeclaration;
- $typeDeclaration = null;
- }
-
- $i++;
- }
-
- return $this->arguments;
- }
-
- /**
- * @return string
- */
- public function getName()
- {
- if ($this->name !== null) {
- return $this->name;
- }
-
- $tokens = $this->tokenStream->tokens();
-
- for ($i = $this->id + 1; $i < count($tokens); $i++) {
- if ($tokens[$i] instanceof PHP_Token_STRING) {
- $this->name = (string)$tokens[$i];
- break;
- } elseif ($tokens[$i] instanceof PHP_Token_AMPERSAND &&
- $tokens[$i+1] instanceof PHP_Token_STRING) {
- $this->name = (string)$tokens[$i+1];
- break;
- } elseif ($tokens[$i] instanceof PHP_Token_OPEN_BRACKET) {
- $this->name = 'anonymous function';
- break;
- }
- }
-
- if ($this->name != 'anonymous function') {
- for ($i = $this->id; $i; --$i) {
- if ($tokens[$i] instanceof PHP_Token_NAMESPACE) {
- $this->name = $tokens[$i]->getName() . '\\' . $this->name;
- break;
- }
-
- if ($tokens[$i] instanceof PHP_Token_INTERFACE) {
- break;
- }
- }
- }
-
- return $this->name;
- }
-
- /**
- * @return integer
- */
- public function getCCN()
- {
- if ($this->ccn !== null) {
- return $this->ccn;
- }
-
- $this->ccn = 1;
- $end = $this->getEndTokenId();
- $tokens = $this->tokenStream->tokens();
-
- for ($i = $this->id; $i <= $end; $i++) {
- switch (get_class($tokens[$i])) {
- case 'PHP_Token_IF':
- case 'PHP_Token_ELSEIF':
- case 'PHP_Token_FOR':
- case 'PHP_Token_FOREACH':
- case 'PHP_Token_WHILE':
- case 'PHP_Token_CASE':
- case 'PHP_Token_CATCH':
- case 'PHP_Token_BOOLEAN_AND':
- case 'PHP_Token_LOGICAL_AND':
- case 'PHP_Token_BOOLEAN_OR':
- case 'PHP_Token_LOGICAL_OR':
- case 'PHP_Token_QUESTION_MARK':
- $this->ccn++;
- break;
- }
- }
-
- return $this->ccn;
- }
-
- /**
- * @return string
- */
- public function getSignature()
- {
- if ($this->signature !== null) {
- return $this->signature;
- }
-
- if ($this->getName() == 'anonymous function') {
- $this->signature = 'anonymous function';
- $i = $this->id + 1;
- } else {
- $this->signature = '';
- $i = $this->id + 2;
- }
-
- $tokens = $this->tokenStream->tokens();
-
- while (isset($tokens[$i]) &&
- !$tokens[$i] instanceof PHP_Token_OPEN_CURLY &&
- !$tokens[$i] instanceof PHP_Token_SEMICOLON) {
- $this->signature .= $tokens[$i++];
- }
-
- $this->signature = trim($this->signature);
-
- return $this->signature;
- }
-}
-
-class PHP_Token_INTERFACE extends PHP_TokenWithScopeAndVisibility
-{
- /**
- * @var array
- */
- protected $interfaces;
-
- /**
- * @return string
- */
- public function getName()
- {
- return (string)$this->tokenStream[$this->id + 2];
- }
-
- /**
- * @return boolean
- */
- public function hasParent()
- {
- return $this->tokenStream[$this->id + 4] instanceof PHP_Token_EXTENDS;
- }
-
- /**
- * @return array
- */
- public function getPackage()
- {
- $className = $this->getName();
- $docComment = $this->getDocblock();
-
- $result = array(
- 'namespace' => '',
- 'fullPackage' => '',
- 'category' => '',
- 'package' => '',
- 'subpackage' => ''
- );
-
- for ($i = $this->id; $i; --$i) {
- if ($this->tokenStream[$i] instanceof PHP_Token_NAMESPACE) {
- $result['namespace'] = $this->tokenStream[$i]->getName();
- break;
- }
- }
-
- if (preg_match('/@category[\s]+([\.\w]+)/', $docComment, $matches)) {
- $result['category'] = $matches[1];
- }
-
- if (preg_match('/@package[\s]+([\.\w]+)/', $docComment, $matches)) {
- $result['package'] = $matches[1];
- $result['fullPackage'] = $matches[1];
- }
-
- if (preg_match('/@subpackage[\s]+([\.\w]+)/', $docComment, $matches)) {
- $result['subpackage'] = $matches[1];
- $result['fullPackage'] .= '.' . $matches[1];
- }
-
- if (empty($result['fullPackage'])) {
- $result['fullPackage'] = $this->arrayToName(
- explode('_', str_replace('\\', '_', $className)),
- '.'
- );
- }
-
- return $result;
- }
-
- /**
- * @param array $parts
- * @param string $join
- * @return string
- */
- protected function arrayToName(array $parts, $join = '\\')
- {
- $result = '';
-
- if (count($parts) > 1) {
- array_pop($parts);
-
- $result = join($join, $parts);
- }
-
- return $result;
- }
-
- /**
- * @return boolean|string
- */
- public function getParent()
- {
- if (!$this->hasParent()) {
- return false;
- }
-
- $i = $this->id + 6;
- $tokens = $this->tokenStream->tokens();
- $className = (string)$tokens[$i];
-
- while (isset($tokens[$i+1]) &&
- !$tokens[$i+1] instanceof PHP_Token_WHITESPACE) {
- $className .= (string)$tokens[++$i];
- }
-
- return $className;
- }
-
- /**
- * @return boolean
- */
- public function hasInterfaces()
- {
- return (isset($this->tokenStream[$this->id + 4]) &&
- $this->tokenStream[$this->id + 4] instanceof PHP_Token_IMPLEMENTS) ||
- (isset($this->tokenStream[$this->id + 8]) &&
- $this->tokenStream[$this->id + 8] instanceof PHP_Token_IMPLEMENTS);
- }
-
- /**
- * @return array|boolean
- */
- public function getInterfaces()
- {
- if ($this->interfaces !== null) {
- return $this->interfaces;
- }
-
- if (!$this->hasInterfaces()) {
- return ($this->interfaces = false);
- }
-
- if ($this->tokenStream[$this->id + 4] instanceof PHP_Token_IMPLEMENTS) {
- $i = $this->id + 3;
- } else {
- $i = $this->id + 7;
- }
-
- $tokens = $this->tokenStream->tokens();
-
- while (!$tokens[$i+1] instanceof PHP_Token_OPEN_CURLY) {
- $i++;
-
- if ($tokens[$i] instanceof PHP_Token_STRING) {
- $this->interfaces[] = (string)$tokens[$i];
- }
- }
-
- return $this->interfaces;
- }
-}
-
-class PHP_Token_ABSTRACT extends PHP_Token {}
-class PHP_Token_AMPERSAND extends PHP_Token {}
-class PHP_Token_AND_EQUAL extends PHP_Token {}
-class PHP_Token_ARRAY extends PHP_Token {}
-class PHP_Token_ARRAY_CAST extends PHP_Token {}
-class PHP_Token_AS extends PHP_Token {}
-class PHP_Token_AT extends PHP_Token {}
-class PHP_Token_BACKTICK extends PHP_Token {}
-class PHP_Token_BAD_CHARACTER extends PHP_Token {}
-class PHP_Token_BOOLEAN_AND extends PHP_Token {}
-class PHP_Token_BOOLEAN_OR extends PHP_Token {}
-class PHP_Token_BOOL_CAST extends PHP_Token {}
-class PHP_Token_BREAK extends PHP_Token {}
-class PHP_Token_CARET extends PHP_Token {}
-class PHP_Token_CASE extends PHP_Token {}
-class PHP_Token_CATCH extends PHP_Token {}
-class PHP_Token_CHARACTER extends PHP_Token {}
-
-class PHP_Token_CLASS extends PHP_Token_INTERFACE
-{
- /**
- * @return string
- */
- public function getName()
- {
- $next = $this->tokenStream[$this->id + 1];
-
- if ($next instanceof PHP_Token_WHITESPACE) {
- $next = $this->tokenStream[$this->id + 2];
- }
-
- if ($next instanceof PHP_Token_STRING) {
- return (string) $next;
- }
-
- if ($next instanceof PHP_Token_OPEN_CURLY ||
- $next instanceof PHP_Token_EXTENDS ||
- $next instanceof PHP_Token_IMPLEMENTS) {
- return 'anonymous class';
- }
- }
-}
-
-class PHP_Token_CLASS_C extends PHP_Token {}
-class PHP_Token_CLASS_NAME_CONSTANT extends PHP_Token {}
-class PHP_Token_CLONE extends PHP_Token {}
-class PHP_Token_CLOSE_BRACKET extends PHP_Token {}
-class PHP_Token_CLOSE_CURLY extends PHP_Token {}
-class PHP_Token_CLOSE_SQUARE extends PHP_Token {}
-class PHP_Token_CLOSE_TAG extends PHP_Token {}
-class PHP_Token_COLON extends PHP_Token {}
-class PHP_Token_COMMA extends PHP_Token {}
-class PHP_Token_COMMENT extends PHP_Token {}
-class PHP_Token_CONCAT_EQUAL extends PHP_Token {}
-class PHP_Token_CONST extends PHP_Token {}
-class PHP_Token_CONSTANT_ENCAPSED_STRING extends PHP_Token {}
-class PHP_Token_CONTINUE extends PHP_Token {}
-class PHP_Token_CURLY_OPEN extends PHP_Token {}
-class PHP_Token_DEC extends PHP_Token {}
-class PHP_Token_DECLARE extends PHP_Token {}
-class PHP_Token_DEFAULT extends PHP_Token {}
-class PHP_Token_DIV extends PHP_Token {}
-class PHP_Token_DIV_EQUAL extends PHP_Token {}
-class PHP_Token_DNUMBER extends PHP_Token {}
-class PHP_Token_DO extends PHP_Token {}
-class PHP_Token_DOC_COMMENT extends PHP_Token {}
-class PHP_Token_DOLLAR extends PHP_Token {}
-class PHP_Token_DOLLAR_OPEN_CURLY_BRACES extends PHP_Token {}
-class PHP_Token_DOT extends PHP_Token {}
-class PHP_Token_DOUBLE_ARROW extends PHP_Token {}
-class PHP_Token_DOUBLE_CAST extends PHP_Token {}
-class PHP_Token_DOUBLE_COLON extends PHP_Token {}
-class PHP_Token_DOUBLE_QUOTES extends PHP_Token {}
-class PHP_Token_ECHO extends PHP_Token {}
-class PHP_Token_ELSE extends PHP_Token {}
-class PHP_Token_ELSEIF extends PHP_Token {}
-class PHP_Token_EMPTY extends PHP_Token {}
-class PHP_Token_ENCAPSED_AND_WHITESPACE extends PHP_Token {}
-class PHP_Token_ENDDECLARE extends PHP_Token {}
-class PHP_Token_ENDFOR extends PHP_Token {}
-class PHP_Token_ENDFOREACH extends PHP_Token {}
-class PHP_Token_ENDIF extends PHP_Token {}
-class PHP_Token_ENDSWITCH extends PHP_Token {}
-class PHP_Token_ENDWHILE extends PHP_Token {}
-class PHP_Token_END_HEREDOC extends PHP_Token {}
-class PHP_Token_EQUAL extends PHP_Token {}
-class PHP_Token_EVAL extends PHP_Token {}
-class PHP_Token_EXCLAMATION_MARK extends PHP_Token {}
-class PHP_Token_EXIT extends PHP_Token {}
-class PHP_Token_EXTENDS extends PHP_Token {}
-class PHP_Token_FILE extends PHP_Token {}
-class PHP_Token_FINAL extends PHP_Token {}
-class PHP_Token_FOR extends PHP_Token {}
-class PHP_Token_FOREACH extends PHP_Token {}
-class PHP_Token_FUNC_C extends PHP_Token {}
-class PHP_Token_GLOBAL extends PHP_Token {}
-class PHP_Token_GT extends PHP_Token {}
-class PHP_Token_IF extends PHP_Token {}
-class PHP_Token_IMPLEMENTS extends PHP_Token {}
-class PHP_Token_INC extends PHP_Token {}
-class PHP_Token_INCLUDE extends PHP_Token_Includes {}
-class PHP_Token_INCLUDE_ONCE extends PHP_Token_Includes {}
-class PHP_Token_INLINE_HTML extends PHP_Token {}
-class PHP_Token_INSTANCEOF extends PHP_Token {}
-class PHP_Token_INT_CAST extends PHP_Token {}
-class PHP_Token_ISSET extends PHP_Token {}
-class PHP_Token_IS_EQUAL extends PHP_Token {}
-class PHP_Token_IS_GREATER_OR_EQUAL extends PHP_Token {}
-class PHP_Token_IS_IDENTICAL extends PHP_Token {}
-class PHP_Token_IS_NOT_EQUAL extends PHP_Token {}
-class PHP_Token_IS_NOT_IDENTICAL extends PHP_Token {}
-class PHP_Token_IS_SMALLER_OR_EQUAL extends PHP_Token {}
-class PHP_Token_LINE extends PHP_Token {}
-class PHP_Token_LIST extends PHP_Token {}
-class PHP_Token_LNUMBER extends PHP_Token {}
-class PHP_Token_LOGICAL_AND extends PHP_Token {}
-class PHP_Token_LOGICAL_OR extends PHP_Token {}
-class PHP_Token_LOGICAL_XOR extends PHP_Token {}
-class PHP_Token_LT extends PHP_Token {}
-class PHP_Token_METHOD_C extends PHP_Token {}
-class PHP_Token_MINUS extends PHP_Token {}
-class PHP_Token_MINUS_EQUAL extends PHP_Token {}
-class PHP_Token_MOD_EQUAL extends PHP_Token {}
-class PHP_Token_MULT extends PHP_Token {}
-class PHP_Token_MUL_EQUAL extends PHP_Token {}
-class PHP_Token_NEW extends PHP_Token {}
-class PHP_Token_NUM_STRING extends PHP_Token {}
-class PHP_Token_OBJECT_CAST extends PHP_Token {}
-class PHP_Token_OBJECT_OPERATOR extends PHP_Token {}
-class PHP_Token_OPEN_BRACKET extends PHP_Token {}
-class PHP_Token_OPEN_CURLY extends PHP_Token {}
-class PHP_Token_OPEN_SQUARE extends PHP_Token {}
-class PHP_Token_OPEN_TAG extends PHP_Token {}
-class PHP_Token_OPEN_TAG_WITH_ECHO extends PHP_Token {}
-class PHP_Token_OR_EQUAL extends PHP_Token {}
-class PHP_Token_PAAMAYIM_NEKUDOTAYIM extends PHP_Token {}
-class PHP_Token_PERCENT extends PHP_Token {}
-class PHP_Token_PIPE extends PHP_Token {}
-class PHP_Token_PLUS extends PHP_Token {}
-class PHP_Token_PLUS_EQUAL extends PHP_Token {}
-class PHP_Token_PRINT extends PHP_Token {}
-class PHP_Token_PRIVATE extends PHP_Token {}
-class PHP_Token_PROTECTED extends PHP_Token {}
-class PHP_Token_PUBLIC extends PHP_Token {}
-class PHP_Token_QUESTION_MARK extends PHP_Token {}
-class PHP_Token_REQUIRE extends PHP_Token_Includes {}
-class PHP_Token_REQUIRE_ONCE extends PHP_Token_Includes {}
-class PHP_Token_RETURN extends PHP_Token {}
-class PHP_Token_SEMICOLON extends PHP_Token {}
-class PHP_Token_SL extends PHP_Token {}
-class PHP_Token_SL_EQUAL extends PHP_Token {}
-class PHP_Token_SR extends PHP_Token {}
-class PHP_Token_SR_EQUAL extends PHP_Token {}
-class PHP_Token_START_HEREDOC extends PHP_Token {}
-class PHP_Token_STATIC extends PHP_Token {}
-class PHP_Token_STRING extends PHP_Token {}
-class PHP_Token_STRING_CAST extends PHP_Token {}
-class PHP_Token_STRING_VARNAME extends PHP_Token {}
-class PHP_Token_SWITCH extends PHP_Token {}
-class PHP_Token_THROW extends PHP_Token {}
-class PHP_Token_TILDE extends PHP_Token {}
-class PHP_Token_TRY extends PHP_Token {}
-class PHP_Token_UNSET extends PHP_Token {}
-class PHP_Token_UNSET_CAST extends PHP_Token {}
-class PHP_Token_USE extends PHP_Token {}
-class PHP_Token_USE_FUNCTION extends PHP_Token {}
-class PHP_Token_VAR extends PHP_Token {}
-class PHP_Token_VARIABLE extends PHP_Token {}
-class PHP_Token_WHILE extends PHP_Token {}
-class PHP_Token_WHITESPACE extends PHP_Token {}
-class PHP_Token_XOR_EQUAL extends PHP_Token {}
-
-// Tokens introduced in PHP 5.1
-class PHP_Token_HALT_COMPILER extends PHP_Token {}
-
-// Tokens introduced in PHP 5.3
-class PHP_Token_DIR extends PHP_Token {}
-class PHP_Token_GOTO extends PHP_Token {}
-
-class PHP_Token_NAMESPACE extends PHP_TokenWithScope
-{
- /**
- * @return string
- */
- public function getName()
- {
- $tokens = $this->tokenStream->tokens();
- $namespace = (string)$tokens[$this->id+2];
-
- for ($i = $this->id + 3;; $i += 2) {
- if (isset($tokens[$i]) &&
- $tokens[$i] instanceof PHP_Token_NS_SEPARATOR) {
- $namespace .= '\\' . $tokens[$i+1];
- } else {
- break;
- }
- }
-
- return $namespace;
- }
-}
-
-class PHP_Token_NS_C extends PHP_Token {}
-class PHP_Token_NS_SEPARATOR extends PHP_Token {}
-
-// Tokens introduced in PHP 5.4
-class PHP_Token_CALLABLE extends PHP_Token {}
-class PHP_Token_INSTEADOF extends PHP_Token {}
-class PHP_Token_TRAIT extends PHP_Token_INTERFACE {}
-class PHP_Token_TRAIT_C extends PHP_Token {}
-
-// Tokens introduced in PHP 5.5
-class PHP_Token_FINALLY extends PHP_Token {}
-class PHP_Token_YIELD extends PHP_Token {}
-
-// Tokens introduced in PHP 5.6
-class PHP_Token_ELLIPSIS extends PHP_Token {}
-class PHP_Token_POW extends PHP_Token {}
-class PHP_Token_POW_EQUAL extends PHP_Token {}
-
-// Tokens introduced in PHP 7.0
-class PHP_Token_COALESCE extends PHP_Token {}
-class PHP_Token_SPACESHIP extends PHP_Token {}
-class PHP_Token_YIELD_FROM extends PHP_Token {}
-
-// Tokens introduced in HackLang / HHVM
-class PHP_Token_ASYNC extends PHP_Token {}
-class PHP_Token_AWAIT extends PHP_Token {}
-class PHP_Token_COMPILER_HALT_OFFSET extends PHP_Token {}
-class PHP_Token_ENUM extends PHP_Token {}
-class PHP_Token_EQUALS extends PHP_Token {}
-class PHP_Token_IN extends PHP_Token {}
-class PHP_Token_JOIN extends PHP_Token {}
-class PHP_Token_LAMBDA_ARROW extends PHP_Token {}
-class PHP_Token_LAMBDA_CP extends PHP_Token {}
-class PHP_Token_LAMBDA_OP extends PHP_Token {}
-class PHP_Token_ONUMBER extends PHP_Token {}
-class PHP_Token_NULLSAFE_OBJECT_OPERATOR extends PHP_Token {}
-class PHP_Token_SHAPE extends PHP_Token {}
-class PHP_Token_SUPER extends PHP_Token {}
-class PHP_Token_TYPE extends PHP_Token {}
-class PHP_Token_TYPELIST_GT extends PHP_Token {}
-class PHP_Token_TYPELIST_LT extends PHP_Token {}
-class PHP_Token_WHERE extends PHP_Token {}
-class PHP_Token_XHP_ATTRIBUTE extends PHP_Token {}
-class PHP_Token_XHP_CATEGORY extends PHP_Token {}
-class PHP_Token_XHP_CATEGORY_LABEL extends PHP_Token {}
-class PHP_Token_XHP_CHILDREN extends PHP_Token {}
-class PHP_Token_XHP_LABEL extends PHP_Token {}
-class PHP_Token_XHP_REQUIRED extends PHP_Token {}
-class PHP_Token_XHP_TAG_GT extends PHP_Token {}
-class PHP_Token_XHP_TAG_LT extends PHP_Token {}
-class PHP_Token_XHP_TEXT extends PHP_Token {}
diff --git a/vendor/phpunit/php-token-stream/src/Token/Stream.php b/vendor/phpunit/php-token-stream/src/Token/Stream.php
deleted file mode 100644
index c536d686..00000000
--- a/vendor/phpunit/php-token-stream/src/Token/Stream.php
+++ /dev/null
@@ -1,613 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * A stream of PHP tokens.
- *
- * @author Sebastian Bergmann
- * @copyright Sebastian Bergmann
- * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
- * @link http://github.com/sebastianbergmann/php-token-stream/tree
- * @since Class available since Release 1.0.0
- */
-class PHP_Token_Stream implements ArrayAccess, Countable, SeekableIterator
-{
- /**
- * @var array
- */
- protected static $customTokens = array(
- '(' => 'PHP_Token_OPEN_BRACKET',
- ')' => 'PHP_Token_CLOSE_BRACKET',
- '[' => 'PHP_Token_OPEN_SQUARE',
- ']' => 'PHP_Token_CLOSE_SQUARE',
- '{' => 'PHP_Token_OPEN_CURLY',
- '}' => 'PHP_Token_CLOSE_CURLY',
- ';' => 'PHP_Token_SEMICOLON',
- '.' => 'PHP_Token_DOT',
- ',' => 'PHP_Token_COMMA',
- '=' => 'PHP_Token_EQUAL',
- '<' => 'PHP_Token_LT',
- '>' => 'PHP_Token_GT',
- '+' => 'PHP_Token_PLUS',
- '-' => 'PHP_Token_MINUS',
- '*' => 'PHP_Token_MULT',
- '/' => 'PHP_Token_DIV',
- '?' => 'PHP_Token_QUESTION_MARK',
- '!' => 'PHP_Token_EXCLAMATION_MARK',
- ':' => 'PHP_Token_COLON',
- '"' => 'PHP_Token_DOUBLE_QUOTES',
- '@' => 'PHP_Token_AT',
- '&' => 'PHP_Token_AMPERSAND',
- '%' => 'PHP_Token_PERCENT',
- '|' => 'PHP_Token_PIPE',
- '$' => 'PHP_Token_DOLLAR',
- '^' => 'PHP_Token_CARET',
- '~' => 'PHP_Token_TILDE',
- '`' => 'PHP_Token_BACKTICK'
- );
-
- /**
- * @var string
- */
- protected $filename;
-
- /**
- * @var array
- */
- protected $tokens = array();
-
- /**
- * @var integer
- */
- protected $position = 0;
-
- /**
- * @var array
- */
- protected $linesOfCode = array('loc' => 0, 'cloc' => 0, 'ncloc' => 0);
-
- /**
- * @var array
- */
- protected $classes;
-
- /**
- * @var array
- */
- protected $functions;
-
- /**
- * @var array
- */
- protected $includes;
-
- /**
- * @var array
- */
- protected $interfaces;
-
- /**
- * @var array
- */
- protected $traits;
-
- /**
- * @var array
- */
- protected $lineToFunctionMap = array();
-
- /**
- * Constructor.
- *
- * @param string $sourceCode
- */
- public function __construct($sourceCode)
- {
- if (is_file($sourceCode)) {
- $this->filename = $sourceCode;
- $sourceCode = file_get_contents($sourceCode);
- }
-
- $this->scan($sourceCode);
- }
-
- /**
- * Destructor.
- */
- public function __destruct()
- {
- $this->tokens = array();
- }
-
- /**
- * @return string
- */
- public function __toString()
- {
- $buffer = '';
-
- foreach ($this as $token) {
- $buffer .= $token;
- }
-
- return $buffer;
- }
-
- /**
- * @return string
- * @since Method available since Release 1.1.0
- */
- public function getFilename()
- {
- return $this->filename;
- }
-
- /**
- * Scans the source for sequences of characters and converts them into a
- * stream of tokens.
- *
- * @param string $sourceCode
- */
- protected function scan($sourceCode)
- {
- $id = 0;
- $line = 1;
- $tokens = token_get_all($sourceCode);
- $numTokens = count($tokens);
-
- $lastNonWhitespaceTokenWasDoubleColon = false;
-
- for ($i = 0; $i < $numTokens; ++$i) {
- $token = $tokens[$i];
- $skip = 0;
-
- if (is_array($token)) {
- $name = substr(token_name($token[0]), 2);
- $text = $token[1];
-
- if ($lastNonWhitespaceTokenWasDoubleColon && $name == 'CLASS') {
- $name = 'CLASS_NAME_CONSTANT';
- } elseif ($name == 'USE' && isset($tokens[$i+2][0]) && $tokens[$i+2][0] == T_FUNCTION) {
- $name = 'USE_FUNCTION';
- $text .= $tokens[$i+1][1] . $tokens[$i+2][1];
- $skip = 2;
- }
-
- $tokenClass = 'PHP_Token_' . $name;
- } else {
- $text = $token;
- $tokenClass = self::$customTokens[$token];
- }
-
- $this->tokens[] = new $tokenClass($text, $line, $this, $id++);
- $lines = substr_count($text, "\n");
- $line += $lines;
-
- if ($tokenClass == 'PHP_Token_HALT_COMPILER') {
- break;
- } elseif ($tokenClass == 'PHP_Token_COMMENT' ||
- $tokenClass == 'PHP_Token_DOC_COMMENT') {
- $this->linesOfCode['cloc'] += $lines + 1;
- }
-
- if ($name == 'DOUBLE_COLON') {
- $lastNonWhitespaceTokenWasDoubleColon = true;
- } elseif ($name != 'WHITESPACE') {
- $lastNonWhitespaceTokenWasDoubleColon = false;
- }
-
- $i += $skip;
- }
-
- $this->linesOfCode['loc'] = substr_count($sourceCode, "\n");
- $this->linesOfCode['ncloc'] = $this->linesOfCode['loc'] -
- $this->linesOfCode['cloc'];
- }
-
- /**
- * @return integer
- */
- public function count()
- {
- return count($this->tokens);
- }
-
- /**
- * @return PHP_Token[]
- */
- public function tokens()
- {
- return $this->tokens;
- }
-
- /**
- * @return array
- */
- public function getClasses()
- {
- if ($this->classes !== null) {
- return $this->classes;
- }
-
- $this->parse();
-
- return $this->classes;
- }
-
- /**
- * @return array
- */
- public function getFunctions()
- {
- if ($this->functions !== null) {
- return $this->functions;
- }
-
- $this->parse();
-
- return $this->functions;
- }
-
- /**
- * @return array
- */
- public function getInterfaces()
- {
- if ($this->interfaces !== null) {
- return $this->interfaces;
- }
-
- $this->parse();
-
- return $this->interfaces;
- }
-
- /**
- * @return array
- * @since Method available since Release 1.1.0
- */
- public function getTraits()
- {
- if ($this->traits !== null) {
- return $this->traits;
- }
-
- $this->parse();
-
- return $this->traits;
- }
-
- /**
- * Gets the names of all files that have been included
- * using include(), include_once(), require() or require_once().
- *
- * Parameter $categorize set to TRUE causing this function to return a
- * multi-dimensional array with categories in the keys of the first dimension
- * and constants and their values in the second dimension.
- *
- * Parameter $category allow to filter following specific inclusion type
- *
- * @param bool $categorize OPTIONAL
- * @param string $category OPTIONAL Either 'require_once', 'require',
- * 'include_once', 'include'.
- * @return array
- * @since Method available since Release 1.1.0
- */
- public function getIncludes($categorize = false, $category = null)
- {
- if ($this->includes === null) {
- $this->includes = array(
- 'require_once' => array(),
- 'require' => array(),
- 'include_once' => array(),
- 'include' => array()
- );
-
- foreach ($this->tokens as $token) {
- switch (get_class($token)) {
- case 'PHP_Token_REQUIRE_ONCE':
- case 'PHP_Token_REQUIRE':
- case 'PHP_Token_INCLUDE_ONCE':
- case 'PHP_Token_INCLUDE':
- $this->includes[$token->getType()][] = $token->getName();
- break;
- }
- }
- }
-
- if (isset($this->includes[$category])) {
- $includes = $this->includes[$category];
- } elseif ($categorize === false) {
- $includes = array_merge(
- $this->includes['require_once'],
- $this->includes['require'],
- $this->includes['include_once'],
- $this->includes['include']
- );
- } else {
- $includes = $this->includes;
- }
-
- return $includes;
- }
-
- /**
- * Returns the name of the function or method a line belongs to.
- *
- * @return string or null if the line is not in a function or method
- * @since Method available since Release 1.2.0
- */
- public function getFunctionForLine($line)
- {
- $this->parse();
-
- if (isset($this->lineToFunctionMap[$line])) {
- return $this->lineToFunctionMap[$line];
- }
- }
-
- protected function parse()
- {
- $this->interfaces = array();
- $this->classes = array();
- $this->traits = array();
- $this->functions = array();
- $class = array();
- $classEndLine = array();
- $trait = false;
- $traitEndLine = false;
- $interface = false;
- $interfaceEndLine = false;
-
- foreach ($this->tokens as $token) {
- switch (get_class($token)) {
- case 'PHP_Token_HALT_COMPILER':
- return;
-
- case 'PHP_Token_INTERFACE':
- $interface = $token->getName();
- $interfaceEndLine = $token->getEndLine();
-
- $this->interfaces[$interface] = array(
- 'methods' => array(),
- 'parent' => $token->getParent(),
- 'keywords' => $token->getKeywords(),
- 'docblock' => $token->getDocblock(),
- 'startLine' => $token->getLine(),
- 'endLine' => $interfaceEndLine,
- 'package' => $token->getPackage(),
- 'file' => $this->filename
- );
- break;
-
- case 'PHP_Token_CLASS':
- case 'PHP_Token_TRAIT':
- $tmp = array(
- 'methods' => array(),
- 'parent' => $token->getParent(),
- 'interfaces'=> $token->getInterfaces(),
- 'keywords' => $token->getKeywords(),
- 'docblock' => $token->getDocblock(),
- 'startLine' => $token->getLine(),
- 'endLine' => $token->getEndLine(),
- 'package' => $token->getPackage(),
- 'file' => $this->filename
- );
-
- if ($token instanceof PHP_Token_CLASS) {
- $class[] = $token->getName();
- $classEndLine[] = $token->getEndLine();
-
- if ($class[count($class)-1] != 'anonymous class') {
- $this->classes[$class[count($class)-1]] = $tmp;
- }
- } else {
- $trait = $token->getName();
- $traitEndLine = $token->getEndLine();
- $this->traits[$trait] = $tmp;
- }
- break;
-
- case 'PHP_Token_FUNCTION':
- $name = $token->getName();
- $tmp = array(
- 'docblock' => $token->getDocblock(),
- 'keywords' => $token->getKeywords(),
- 'visibility'=> $token->getVisibility(),
- 'signature' => $token->getSignature(),
- 'startLine' => $token->getLine(),
- 'endLine' => $token->getEndLine(),
- 'ccn' => $token->getCCN(),
- 'file' => $this->filename
- );
-
- if (empty($class) &&
- $trait === false &&
- $interface === false) {
- $this->functions[$name] = $tmp;
-
- $this->addFunctionToMap(
- $name,
- $tmp['startLine'],
- $tmp['endLine']
- );
- } elseif (!empty($class) && $class[count($class)-1] != 'anonymous class') {
- $this->classes[$class[count($class)-1]]['methods'][$name] = $tmp;
-
- $this->addFunctionToMap(
- $class[count($class)-1] . '::' . $name,
- $tmp['startLine'],
- $tmp['endLine']
- );
- } elseif ($trait !== false) {
- $this->traits[$trait]['methods'][$name] = $tmp;
-
- $this->addFunctionToMap(
- $trait . '::' . $name,
- $tmp['startLine'],
- $tmp['endLine']
- );
- } else {
- $this->interfaces[$interface]['methods'][$name] = $tmp;
- }
- break;
-
- case 'PHP_Token_CLOSE_CURLY':
- if (!empty($classEndLine) &&
- $classEndLine[count($classEndLine)-1] == $token->getLine()) {
- array_pop($classEndLine);
- array_pop($class);
- } elseif ($traitEndLine !== false &&
- $traitEndLine == $token->getLine()) {
- $trait = false;
- $traitEndLine = false;
- } elseif ($interfaceEndLine !== false &&
- $interfaceEndLine == $token->getLine()) {
- $interface = false;
- $interfaceEndLine = false;
- }
- break;
- }
- }
- }
-
- /**
- * @return array
- */
- public function getLinesOfCode()
- {
- return $this->linesOfCode;
- }
-
- /**
- */
- public function rewind()
- {
- $this->position = 0;
- }
-
- /**
- * @return boolean
- */
- public function valid()
- {
- return isset($this->tokens[$this->position]);
- }
-
- /**
- * @return integer
- */
- public function key()
- {
- return $this->position;
- }
-
- /**
- * @return PHP_Token
- */
- public function current()
- {
- return $this->tokens[$this->position];
- }
-
- /**
- */
- public function next()
- {
- $this->position++;
- }
-
- /**
- * @param integer $offset
- * @return boolean
- */
- public function offsetExists($offset)
- {
- return isset($this->tokens[$offset]);
- }
-
- /**
- * @param integer $offset
- * @return mixed
- * @throws OutOfBoundsException
- */
- public function offsetGet($offset)
- {
- if (!$this->offsetExists($offset)) {
- throw new OutOfBoundsException(
- sprintf(
- 'No token at position "%s"',
- $offset
- )
- );
- }
-
- return $this->tokens[$offset];
- }
-
- /**
- * @param integer $offset
- * @param mixed $value
- */
- public function offsetSet($offset, $value)
- {
- $this->tokens[$offset] = $value;
- }
-
- /**
- * @param integer $offset
- * @throws OutOfBoundsException
- */
- public function offsetUnset($offset)
- {
- if (!$this->offsetExists($offset)) {
- throw new OutOfBoundsException(
- sprintf(
- 'No token at position "%s"',
- $offset
- )
- );
- }
-
- unset($this->tokens[$offset]);
- }
-
- /**
- * Seek to an absolute position.
- *
- * @param integer $position
- * @throws OutOfBoundsException
- */
- public function seek($position)
- {
- $this->position = $position;
-
- if (!$this->valid()) {
- throw new OutOfBoundsException(
- sprintf(
- 'No token at position "%s"',
- $this->position
- )
- );
- }
- }
-
- /**
- * @param string $name
- * @param integer $startLine
- * @param integer $endLine
- */
- private function addFunctionToMap($name, $startLine, $endLine)
- {
- for ($line = $startLine; $line <= $endLine; $line++) {
- $this->lineToFunctionMap[$line] = $name;
- }
- }
-}
diff --git a/vendor/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php b/vendor/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php
deleted file mode 100644
index b41b25f6..00000000
--- a/vendor/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php
+++ /dev/null
@@ -1,51 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * A caching factory for token stream objects.
- *
- * @author Sebastian Bergmann
- * @copyright Sebastian Bergmann
- * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
- * @link http://github.com/sebastianbergmann/php-token-stream/tree
- * @since Class available since Release 1.0.0
- */
-class PHP_Token_Stream_CachingFactory
-{
- /**
- * @var array
- */
- protected static $cache = array();
-
- /**
- * @param string $filename
- * @return PHP_Token_Stream
- */
- public static function get($filename)
- {
- if (!isset(self::$cache[$filename])) {
- self::$cache[$filename] = new PHP_Token_Stream($filename);
- }
-
- return self::$cache[$filename];
- }
-
- /**
- * @param string $filename
- */
- public static function clear($filename = null)
- {
- if (is_string($filename)) {
- unset(self::$cache[$filename]);
- } else {
- self::$cache = array();
- }
- }
-}
diff --git a/vendor/phpunit/php-token-stream/tests/Token/ClassTest.php b/vendor/phpunit/php-token-stream/tests/Token/ClassTest.php
deleted file mode 100644
index d1b25d83..00000000
--- a/vendor/phpunit/php-token-stream/tests/Token/ClassTest.php
+++ /dev/null
@@ -1,123 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Tests for the PHP_Token_CLASS class.
- *
- * @package PHP_TokenStream
- * @subpackage Tests
- * @author Laurent Laville
- * @copyright Sebastian Bergmann
- * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
- * @version Release: @package_version@
- * @link http://github.com/sebastianbergmann/php-token-stream/
- * @since Class available since Release 1.0.2
- */
-class PHP_Token_ClassTest extends PHPUnit_Framework_TestCase
-{
- protected $class;
- protected $function;
-
- protected function setUp()
- {
- $ts = new PHP_Token_Stream(TEST_FILES_PATH . 'source2.php');
-
- foreach ($ts as $token) {
- if ($token instanceof PHP_Token_CLASS) {
- $this->class = $token;
- }
-
- if ($token instanceof PHP_Token_FUNCTION) {
- $this->function = $token;
- break;
- }
- }
- }
-
- /**
- * @covers PHP_Token_CLASS::getKeywords
- */
- public function testGetClassKeywords()
- {
- $this->assertEquals('abstract', $this->class->getKeywords());
- }
-
- /**
- * @covers PHP_Token_FUNCTION::getKeywords
- */
- public function testGetFunctionKeywords()
- {
- $this->assertEquals('abstract,static', $this->function->getKeywords());
- }
-
- /**
- * @covers PHP_Token_FUNCTION::getVisibility
- */
- public function testGetFunctionVisibility()
- {
- $this->assertEquals('public', $this->function->getVisibility());
- }
-
- public function testIssue19()
- {
- $ts = new PHP_Token_Stream(TEST_FILES_PATH . 'issue19.php');
-
- foreach ($ts as $token) {
- if ($token instanceof PHP_Token_CLASS) {
- $this->assertFalse($token->hasInterfaces());
- }
- }
- }
-
- public function testIssue30()
- {
- $ts = new PHP_Token_Stream(TEST_FILES_PATH . 'issue30.php');
- $this->assertCount(1, $ts->getClasses());
- }
-
- /**
- * @requires PHP 7
- */
- public function testAnonymousClassesAreHandledCorrectly()
- {
- $ts = new PHP_Token_Stream(TEST_FILES_PATH . 'class_with_method_that_declares_anonymous_class.php');
-
- $classes = $ts->getClasses();
-
- $this->assertEquals(array('class_with_method_that_declares_anonymous_class'), array_keys($classes));
- }
-
- /**
- * @requires PHP 7
- * @ticket https://github.com/sebastianbergmann/php-token-stream/issues/52
- */
- public function testAnonymousClassesAreHandledCorrectly2()
- {
- $ts = new PHP_Token_Stream(TEST_FILES_PATH . 'class_with_method_that_declares_anonymous_class2.php');
-
- $classes = $ts->getClasses();
-
- $this->assertEquals(array('Test'), array_keys($classes));
- $this->assertEquals(array('methodOne', 'methodTwo'), array_keys($classes['Test']['methods']));
-
- $this->assertEmpty($ts->getFunctions());
- }
-
- /**
- * @requires PHP 5.6
- */
- public function testImportedFunctionsAreHandledCorrectly()
- {
- $ts = new PHP_Token_Stream(TEST_FILES_PATH . 'classUsesNamespacedFunction.php');
-
- $this->assertEmpty($ts->getFunctions());
- $this->assertCount(1, $ts->getClasses());
- }
-}
diff --git a/vendor/phpunit/php-token-stream/tests/Token/ClosureTest.php b/vendor/phpunit/php-token-stream/tests/Token/ClosureTest.php
deleted file mode 100644
index f1e508cf..00000000
--- a/vendor/phpunit/php-token-stream/tests/Token/ClosureTest.php
+++ /dev/null
@@ -1,85 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Tests for the PHP_Token_FUNCTION class.
- *
- * @package PHP_TokenStream
- * @subpackage Tests
- * @author Sebastian Bergmann
- * @copyright Sebastian Bergmann
- * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
- * @version Release: @package_version@
- * @link http://github.com/sebastianbergmann/php-token-stream/
- * @since Class available since Release 1.0.0
- */
-class PHP_Token_ClosureTest extends PHPUnit_Framework_TestCase
-{
- protected $functions;
-
- protected function setUp()
- {
- $ts = new PHP_Token_Stream(TEST_FILES_PATH . 'closure.php');
-
- foreach ($ts as $token) {
- if ($token instanceof PHP_Token_FUNCTION) {
- $this->functions[] = $token;
- }
- }
- }
-
- /**
- * @covers PHP_Token_FUNCTION::getArguments
- */
- public function testGetArguments()
- {
- $this->assertEquals(array('$foo' => null, '$bar' => null), $this->functions[0]->getArguments());
- $this->assertEquals(array('$foo' => 'Foo', '$bar' => null), $this->functions[1]->getArguments());
- $this->assertEquals(array('$foo' => null, '$bar' => null, '$baz' => null), $this->functions[2]->getArguments());
- $this->assertEquals(array('$foo' => 'Foo', '$bar' => null, '$baz' => null), $this->functions[3]->getArguments());
- $this->assertEquals(array(), $this->functions[4]->getArguments());
- $this->assertEquals(array(), $this->functions[5]->getArguments());
- }
-
- /**
- * @covers PHP_Token_FUNCTION::getName
- */
- public function testGetName()
- {
- $this->assertEquals('anonymous function', $this->functions[0]->getName());
- $this->assertEquals('anonymous function', $this->functions[1]->getName());
- $this->assertEquals('anonymous function', $this->functions[2]->getName());
- $this->assertEquals('anonymous function', $this->functions[3]->getName());
- $this->assertEquals('anonymous function', $this->functions[4]->getName());
- $this->assertEquals('anonymous function', $this->functions[5]->getName());
- }
-
- /**
- * @covers PHP_Token::getLine
- */
- public function testGetLine()
- {
- $this->assertEquals(2, $this->functions[0]->getLine());
- $this->assertEquals(3, $this->functions[1]->getLine());
- $this->assertEquals(4, $this->functions[2]->getLine());
- $this->assertEquals(5, $this->functions[3]->getLine());
- }
-
- /**
- * @covers PHP_TokenWithScope::getEndLine
- */
- public function testGetEndLine()
- {
- $this->assertEquals(2, $this->functions[0]->getLine());
- $this->assertEquals(3, $this->functions[1]->getLine());
- $this->assertEquals(4, $this->functions[2]->getLine());
- $this->assertEquals(5, $this->functions[3]->getLine());
- }
-}
diff --git a/vendor/phpunit/php-token-stream/tests/Token/FunctionTest.php b/vendor/phpunit/php-token-stream/tests/Token/FunctionTest.php
deleted file mode 100644
index 4f23c39d..00000000
--- a/vendor/phpunit/php-token-stream/tests/Token/FunctionTest.php
+++ /dev/null
@@ -1,146 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Tests for the PHP_Token_FUNCTION class.
- *
- * @package PHP_TokenStream
- * @subpackage Tests
- * @author Sebastian Bergmann
- * @copyright Sebastian Bergmann
- * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
- * @version Release: @package_version@
- * @link http://github.com/sebastianbergmann/php-token-stream/
- * @since Class available since Release 1.0.0
- */
-class PHP_Token_FunctionTest extends PHPUnit_Framework_TestCase
-{
- protected $functions;
-
- protected function setUp()
- {
- $ts = new PHP_Token_Stream(TEST_FILES_PATH . 'source.php');
-
- foreach ($ts as $token) {
- if ($token instanceof PHP_Token_FUNCTION) {
- $this->functions[] = $token;
- }
- }
- }
-
- /**
- * @covers PHP_Token_FUNCTION::getArguments
- */
- public function testGetArguments()
- {
- $this->assertEquals(array(), $this->functions[0]->getArguments());
-
- $this->assertEquals(
- array('$baz' => 'Baz'), $this->functions[1]->getArguments()
- );
-
- $this->assertEquals(
- array('$foobar' => 'Foobar'), $this->functions[2]->getArguments()
- );
-
- $this->assertEquals(
- array('$barfoo' => 'Barfoo'), $this->functions[3]->getArguments()
- );
-
- $this->assertEquals(array(), $this->functions[4]->getArguments());
-
- $this->assertEquals(array('$x' => null, '$y' => null), $this->functions[5]->getArguments());
- }
-
- /**
- * @covers PHP_Token_FUNCTION::getName
- */
- public function testGetName()
- {
- $this->assertEquals('foo', $this->functions[0]->getName());
- $this->assertEquals('bar', $this->functions[1]->getName());
- $this->assertEquals('foobar', $this->functions[2]->getName());
- $this->assertEquals('barfoo', $this->functions[3]->getName());
- $this->assertEquals('baz', $this->functions[4]->getName());
- }
-
- /**
- * @covers PHP_Token::getLine
- */
- public function testGetLine()
- {
- $this->assertEquals(5, $this->functions[0]->getLine());
- $this->assertEquals(10, $this->functions[1]->getLine());
- $this->assertEquals(17, $this->functions[2]->getLine());
- $this->assertEquals(21, $this->functions[3]->getLine());
- $this->assertEquals(29, $this->functions[4]->getLine());
- }
-
- /**
- * @covers PHP_TokenWithScope::getEndLine
- */
- public function testGetEndLine()
- {
- $this->assertEquals(5, $this->functions[0]->getEndLine());
- $this->assertEquals(12, $this->functions[1]->getEndLine());
- $this->assertEquals(19, $this->functions[2]->getEndLine());
- $this->assertEquals(23, $this->functions[3]->getEndLine());
- $this->assertEquals(31, $this->functions[4]->getEndLine());
- }
-
- /**
- * @covers PHP_Token_FUNCTION::getDocblock
- */
- public function testGetDocblock()
- {
- $this->assertNull($this->functions[0]->getDocblock());
-
- $this->assertEquals(
- "/**\n * @param Baz \$baz\n */",
- $this->functions[1]->getDocblock()
- );
-
- $this->assertEquals(
- "/**\n * @param Foobar \$foobar\n */",
- $this->functions[2]->getDocblock()
- );
-
- $this->assertNull($this->functions[3]->getDocblock());
- $this->assertNull($this->functions[4]->getDocblock());
- }
-
- public function testSignature()
- {
- $ts = new PHP_Token_Stream(TEST_FILES_PATH . 'source5.php');
- $f = $ts->getFunctions();
- $c = $ts->getClasses();
- $i = $ts->getInterfaces();
-
- $this->assertEquals(
- 'foo($a, array $b, array $c = array())',
- $f['foo']['signature']
- );
-
- $this->assertEquals(
- 'm($a, array $b, array $c = array())',
- $c['c']['methods']['m']['signature']
- );
-
- $this->assertEquals(
- 'm($a, array $b, array $c = array())',
- $c['a']['methods']['m']['signature']
- );
-
- $this->assertEquals(
- 'm($a, array $b, array $c = array())',
- $i['i']['methods']['m']['signature']
- );
- }
-}
diff --git a/vendor/phpunit/php-token-stream/tests/Token/IncludeTest.php b/vendor/phpunit/php-token-stream/tests/Token/IncludeTest.php
deleted file mode 100644
index 1e433512..00000000
--- a/vendor/phpunit/php-token-stream/tests/Token/IncludeTest.php
+++ /dev/null
@@ -1,73 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Tests for the PHP_Token_REQUIRE_ONCE, PHP_Token_REQUIRE
- * PHP_Token_INCLUDE_ONCE and PHP_Token_INCLUDE_ONCE classes.
- *
- * @package PHP_TokenStream
- * @subpackage Tests
- * @author Laurent Laville
- * @copyright Sebastian Bergmann
- * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
- * @version Release: @package_version@
- * @link http://github.com/sebastianbergmann/php-token-stream/
- * @since Class available since Release 1.0.2
- */
-class PHP_Token_IncludeTest extends PHPUnit_Framework_TestCase
-{
- protected $ts;
-
- protected function setUp()
- {
- $this->ts = new PHP_Token_Stream(TEST_FILES_PATH . 'source3.php');
- }
-
- /**
- * @covers PHP_Token_Includes::getName
- * @covers PHP_Token_Includes::getType
- */
- public function testGetIncludes()
- {
- $this->assertSame(
- array('test4.php', 'test3.php', 'test2.php', 'test1.php'),
- $this->ts->getIncludes()
- );
- }
-
- /**
- * @covers PHP_Token_Includes::getName
- * @covers PHP_Token_Includes::getType
- */
- public function testGetIncludesCategorized()
- {
- $this->assertSame(
- array(
- 'require_once' => array('test4.php'),
- 'require' => array('test3.php'),
- 'include_once' => array('test2.php'),
- 'include' => array('test1.php')
- ),
- $this->ts->getIncludes(TRUE)
- );
- }
-
- /**
- * @covers PHP_Token_Includes::getName
- * @covers PHP_Token_Includes::getType
- */
- public function testGetIncludesCategory()
- {
- $this->assertSame(
- array('test4.php'),
- $this->ts->getIncludes(TRUE, 'require_once')
- );
- }
-}
diff --git a/vendor/phpunit/php-token-stream/tests/Token/InterfaceTest.php b/vendor/phpunit/php-token-stream/tests/Token/InterfaceTest.php
deleted file mode 100644
index 56caede2..00000000
--- a/vendor/phpunit/php-token-stream/tests/Token/InterfaceTest.php
+++ /dev/null
@@ -1,191 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Tests for the PHP_Token_INTERFACE class.
- *
- * @package PHP_TokenStream
- * @subpackage Tests
- * @author Sebastian Bergmann
- * @author Laurent Laville
- * @copyright Sebastian Bergmann
- * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
- * @version Release: @package_version@
- * @link http://github.com/sebastianbergmann/php-token-stream/
- * @since Class available since Release 1.0.0
- */
-class PHP_Token_InterfaceTest extends PHPUnit_Framework_TestCase
-{
- protected $class;
- protected $interfaces;
-
- protected function setUp()
- {
- $ts = new PHP_Token_Stream(TEST_FILES_PATH . 'source4.php');
- $i = 0;
- foreach ($ts as $token) {
- if ($token instanceof PHP_Token_CLASS) {
- $this->class = $token;
- }
- elseif ($token instanceof PHP_Token_INTERFACE) {
- $this->interfaces[$i] = $token;
- $i++;
- }
- }
- }
-
- /**
- * @covers PHP_Token_INTERFACE::getName
- */
- public function testGetName()
- {
- $this->assertEquals(
- 'iTemplate', $this->interfaces[0]->getName()
- );
- }
-
- /**
- * @covers PHP_Token_INTERFACE::getParent
- */
- public function testGetParentNotExists()
- {
- $this->assertFalse(
- $this->interfaces[0]->getParent()
- );
- }
-
- /**
- * @covers PHP_Token_INTERFACE::hasParent
- */
- public function testHasParentNotExists()
- {
- $this->assertFalse(
- $this->interfaces[0]->hasParent()
- );
- }
-
- /**
- * @covers PHP_Token_INTERFACE::getParent
- */
- public function testGetParentExists()
- {
- $this->assertEquals(
- 'a', $this->interfaces[2]->getParent()
- );
- }
-
- /**
- * @covers PHP_Token_INTERFACE::hasParent
- */
- public function testHasParentExists()
- {
- $this->assertTrue(
- $this->interfaces[2]->hasParent()
- );
- }
-
- /**
- * @covers PHP_Token_INTERFACE::getInterfaces
- */
- public function testGetInterfacesExists()
- {
- $this->assertEquals(
- array('b'),
- $this->class->getInterfaces()
- );
- }
-
- /**
- * @covers PHP_Token_INTERFACE::hasInterfaces
- */
- public function testHasInterfacesExists()
- {
- $this->assertTrue(
- $this->class->hasInterfaces()
- );
- }
- /**
- * @covers PHP_Token_INTERFACE::getPackage
- */
- public function testGetPackageNamespace() {
- $tokenStream = new PHP_Token_Stream(TEST_FILES_PATH . 'classInNamespace.php');
- foreach($tokenStream as $token) {
- if($token instanceOf PHP_Token_INTERFACE) {
- $package = $token->getPackage();
- $this->assertSame('Foo\\Bar', $package['namespace']);
- }
- }
- }
-
-
- public function provideFilesWithClassesWithinMultipleNamespaces() {
- return array(
- array(TEST_FILES_PATH . 'multipleNamespacesWithOneClassUsingBraces.php'),
- array(TEST_FILES_PATH . 'multipleNamespacesWithOneClassUsingNonBraceSyntax.php'),
- );
- }
-
- /**
- * @dataProvider provideFilesWithClassesWithinMultipleNamespaces
- * @covers PHP_Token_INTERFACE::getPackage
- */
- public function testGetPackageNamespaceForFileWithMultipleNamespaces($filepath) {
- $tokenStream = new PHP_Token_Stream($filepath);
- $firstClassFound = false;
- foreach($tokenStream as $token) {
- if($firstClassFound === false && $token instanceOf PHP_Token_INTERFACE) {
- $package = $token->getPackage();
- $this->assertSame('TestClassInBar', $token->getName());
- $this->assertSame('Foo\\Bar', $package['namespace']);
- $firstClassFound = true;
- continue;
- }
- // Secound class
- if($token instanceOf PHP_Token_INTERFACE) {
- $package = $token->getPackage();
- $this->assertSame('TestClassInBaz', $token->getName());
- $this->assertSame('Foo\\Baz', $package['namespace']);
- return;
- }
- }
- $this->fail("Seachring for 2 classes failed");
- }
-
- public function testGetPackageNamespaceIsEmptyForInterfacesThatAreNotWithinNamespaces() {
- foreach($this->interfaces as $token) {
- $package = $token->getPackage();
- $this->assertSame("", $package['namespace']);
- }
- }
-
- /**
- * @covers PHP_Token_INTERFACE::getPackage
- */
- public function testGetPackageNamespaceWhenExtentingFromNamespaceClass() {
- $tokenStream = new PHP_Token_Stream(TEST_FILES_PATH . 'classExtendsNamespacedClass.php');
- $firstClassFound = false;
- foreach($tokenStream as $token) {
- if($firstClassFound === false && $token instanceOf PHP_Token_INTERFACE) {
- $package = $token->getPackage();
- $this->assertSame('Baz', $token->getName());
- $this->assertSame('Foo\\Bar', $package['namespace']);
- $firstClassFound = true;
- continue;
- }
- if($token instanceOf PHP_Token_INTERFACE) {
- $package = $token->getPackage();
- $this->assertSame('Extender', $token->getName());
- $this->assertSame('Other\\Space', $package['namespace']);
- return;
- }
- }
- $this->fail("Searching for 2 classes failed");
- }
-}
diff --git a/vendor/phpunit/php-token-stream/tests/Token/NamespaceTest.php b/vendor/phpunit/php-token-stream/tests/Token/NamespaceTest.php
deleted file mode 100644
index 469f7872..00000000
--- a/vendor/phpunit/php-token-stream/tests/Token/NamespaceTest.php
+++ /dev/null
@@ -1,80 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Tests for the PHP_Token_NAMESPACE class.
- *
- * @package PHP_TokenStream
- * @subpackage Tests
- * @author Sebastian Bergmann
- * @copyright Sebastian Bergmann
- * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
- * @version Release: @package_version@
- * @link http://github.com/sebastianbergmann/php-token-stream/
- * @since Class available since Release 1.0.0
- */
-class PHP_Token_NamespaceTest extends PHPUnit_Framework_TestCase
-{
- /**
- * @covers PHP_Token_NAMESPACE::getName
- */
- public function testGetName()
- {
- $tokenStream = new PHP_Token_Stream(
- TEST_FILES_PATH . 'classInNamespace.php'
- );
-
- foreach ($tokenStream as $token) {
- if ($token instanceof PHP_Token_NAMESPACE) {
- $this->assertSame('Foo\\Bar', $token->getName());
- }
- }
- }
-
- public function testGetStartLineWithUnscopedNamespace()
- {
- $tokenStream = new PHP_Token_Stream(TEST_FILES_PATH . 'classInNamespace.php');
- foreach($tokenStream as $token) {
- if($token instanceOf PHP_Token_NAMESPACE) {
- $this->assertSame(2, $token->getLine());
- }
- }
- }
-
- public function testGetEndLineWithUnscopedNamespace()
- {
- $tokenStream = new PHP_Token_Stream(TEST_FILES_PATH . 'classInNamespace.php');
- foreach($tokenStream as $token) {
- if($token instanceOf PHP_Token_NAMESPACE) {
- $this->assertSame(2, $token->getEndLine());
- }
- }
- }
- public function testGetStartLineWithScopedNamespace()
- {
- $tokenStream = new PHP_Token_Stream(TEST_FILES_PATH . 'classInScopedNamespace.php');
- foreach($tokenStream as $token) {
- if($token instanceOf PHP_Token_NAMESPACE) {
- $this->assertSame(2, $token->getLine());
- }
- }
- }
-
- public function testGetEndLineWithScopedNamespace()
- {
- $tokenStream = new PHP_Token_Stream(TEST_FILES_PATH . 'classInScopedNamespace.php');
- foreach($tokenStream as $token) {
- if($token instanceOf PHP_Token_NAMESPACE) {
- $this->assertSame(8, $token->getEndLine());
- }
- }
- }
-
-}
diff --git a/vendor/phpunit/php-token-stream/tests/TokenTest.php b/vendor/phpunit/php-token-stream/tests/TokenTest.php
deleted file mode 100644
index 67bf79a0..00000000
--- a/vendor/phpunit/php-token-stream/tests/TokenTest.php
+++ /dev/null
@@ -1,42 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Tests for the PHP_Token class.
- *
- * @package PHP_TokenStream
- * @subpackage Tests
- * @author Sebastian Bergmann
- * @copyright Sebastian Bergmann
- * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
- * @version Release: @package_version@
- * @link http://github.com/sebastianbergmann/php-token-stream/
- * @since Class available since Release 1.0.0
- */
-class PHP_TokenTest extends PHPUnit_Framework_TestCase
-{
- /**
- * @covers PHP_Token::__construct
- * @covers PHP_Token::__toString
- */
- public function testToString()
- {
- $this->markTestIncomplete();
- }
-
- /**
- * @covers PHP_Token::__construct
- * @covers PHP_Token::getLine
- */
- public function testGetLine()
- {
- $this->markTestIncomplete();
- }
-}
diff --git a/vendor/phpunit/php-token-stream/tests/_fixture/classExtendsNamespacedClass.php b/vendor/phpunit/php-token-stream/tests/_fixture/classExtendsNamespacedClass.php
deleted file mode 100644
index 560eec94..00000000
--- a/vendor/phpunit/php-token-stream/tests/_fixture/classExtendsNamespacedClass.php
+++ /dev/null
@@ -1,10 +0,0 @@
-method_in_anonymous_class();
- }
-
- public function methodTwo() {
- return false;
- }
-}
diff --git a/vendor/phpunit/php-token-stream/tests/_fixture/closure.php b/vendor/phpunit/php-token-stream/tests/_fixture/closure.php
deleted file mode 100644
index a0e3a81d..00000000
--- a/vendor/phpunit/php-token-stream/tests/_fixture/closure.php
+++ /dev/null
@@ -1,7 +0,0 @@
-.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- * Neither the name of Sebastian Bergmann nor the names of his
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/phpunit/phpunit-mock-objects/README.md b/vendor/phpunit/phpunit-mock-objects/README.md
deleted file mode 100644
index 5222da74..00000000
--- a/vendor/phpunit/phpunit-mock-objects/README.md
+++ /dev/null
@@ -1,21 +0,0 @@
-[](https://travis-ci.org/sebastianbergmann/phpunit-mock-objects)
-[](https://packagist.org/packages/phpunit/phpunit-mock-objects)
-
-# PHPUnit_MockObject
-
-**PHPUnit_MockObject** is the default mock object library for PHPUnit.
-
-## Requirements
-
-* PHP 5.3.3 is required but using the latest version of PHP is highly recommended
-
-## Installation
-
-To add PHPUnit_MockObject as a local, per-project dependency to your project, simply add a dependency on `phpunit/phpunit-mock-objects` to your project's `composer.json` file. Here is a minimal example of a `composer.json` file that just defines a dependency on PHPUnit_MockObject 2.3:
-
- {
- "require": {
- "phpunit/phpunit-mock-objects": "2.3.*"
- }
- }
-
diff --git a/vendor/phpunit/phpunit-mock-objects/build.xml b/vendor/phpunit/phpunit-mock-objects/build.xml
deleted file mode 100644
index c93503eb..00000000
--- a/vendor/phpunit/phpunit-mock-objects/build.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/vendor/phpunit/phpunit-mock-objects/build/travis-ci.xml b/vendor/phpunit/phpunit-mock-objects/build/travis-ci.xml
deleted file mode 100644
index b8498fbe..00000000
--- a/vendor/phpunit/phpunit-mock-objects/build/travis-ci.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
- ../tests
- ../tests
-
-
-
diff --git a/vendor/phpunit/phpunit-mock-objects/composer.json b/vendor/phpunit/phpunit-mock-objects/composer.json
deleted file mode 100644
index 12fb934b..00000000
--- a/vendor/phpunit/phpunit-mock-objects/composer.json
+++ /dev/null
@@ -1,50 +0,0 @@
-{
- "name": "phpunit/phpunit-mock-objects",
- "description": "Mock Object library for PHPUnit",
- "type": "library",
- "keywords": [
- "xunit",
- "mock"
- ],
- "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
- "license": "BSD-3-Clause",
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
- "role": "lead"
- }
- ],
- "support": {
- "issues": "https://github.com/sebastianbergmann/phpunit-mock-objects/issues",
- "irc": "irc://irc.freenode.net/phpunit"
- },
- "require": {
- "php": ">=5.3.3",
- "phpunit/php-text-template": "~1.2",
- "doctrine/instantiator": "^1.0.2",
- "sebastian/exporter": "~1.2"
- },
- "require-dev": {
- "phpunit/phpunit": "~4.4"
- },
- "suggest": {
- "ext-soap": "*"
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "autoload-dev": {
- "classmap": [
- "tests/_fixture/"
- ]
- },
- "extra": {
- "branch-alias": {
- "dev-master": "2.3.x-dev"
- }
- }
-}
-
diff --git a/vendor/phpunit/phpunit-mock-objects/phpunit.xml.dist b/vendor/phpunit/phpunit-mock-objects/phpunit.xml.dist
deleted file mode 100644
index e2186ea2..00000000
--- a/vendor/phpunit/phpunit-mock-objects/phpunit.xml.dist
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
- tests
- tests
-
-
-
-
-
-
-
-
- src
-
-
-
-
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Identity.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Identity.php
deleted file mode 100644
index 6f369a11..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Identity.php
+++ /dev/null
@@ -1,30 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Builder interface for unique identifiers.
- *
- * Defines the interface for recording unique identifiers. The identifiers
- * can be used to define the invocation order of expectations. The expectation
- * is recorded using id() and then defined in order using
- * PHPUnit_Framework_MockObject_Builder_Match::after().
- *
- * @since Interface available since Release 1.0.0
- */
-interface PHPUnit_Framework_MockObject_Builder_Identity
-{
- /**
- * Sets the identification of the expectation to $id.
- *
- * @note The identifier is unique per mock object.
- * @param string $id Unique identifiation of expectation.
- */
- public function id($id);
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php
deleted file mode 100644
index 865c6b25..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php
+++ /dev/null
@@ -1,255 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Builder for mocked or stubbed invocations.
- *
- * Provides methods for building expectations without having to resort to
- * instantiating the various matchers manually. These methods also form a
- * more natural way of reading the expectation. This class should be together
- * with the test case PHPUnit_Framework_MockObject_TestCase.
- *
- * @since Class available since Release 1.0.0
- */
-class PHPUnit_Framework_MockObject_Builder_InvocationMocker implements PHPUnit_Framework_MockObject_Builder_MethodNameMatch
-{
- /**
- * @var PHPUnit_Framework_MockObject_Stub_MatcherCollection
- */
- protected $collection;
-
- /**
- * @var PHPUnit_Framework_MockObject_Matcher
- */
- protected $matcher;
-
- /**
- * @param PHPUnit_Framework_MockObject_Stub_MatcherCollection $collection
- * @param PHPUnit_Framework_MockObject_Matcher_Invocation $invocationMatcher
- */
- public function __construct(PHPUnit_Framework_MockObject_Stub_MatcherCollection $collection, PHPUnit_Framework_MockObject_Matcher_Invocation $invocationMatcher)
- {
- $this->collection = $collection;
- $this->matcher = new PHPUnit_Framework_MockObject_Matcher(
- $invocationMatcher
- );
-
- $this->collection->addMatcher($this->matcher);
- }
-
- /**
- * @return PHPUnit_Framework_MockObject_Matcher
- */
- public function getMatcher()
- {
- return $this->matcher;
- }
-
- /**
- * @param mixed $id
- * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker
- */
- public function id($id)
- {
- $this->collection->registerId($id, $this);
-
- return $this;
- }
-
- /**
- * @param PHPUnit_Framework_MockObject_Stub $stub
- * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker
- */
- public function will(PHPUnit_Framework_MockObject_Stub $stub)
- {
- $this->matcher->stub = $stub;
-
- return $this;
- }
-
- /**
- * @param mixed $value
- * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker
- */
- public function willReturn($value)
- {
- $stub = new PHPUnit_Framework_MockObject_Stub_Return(
- $value
- );
-
- return $this->will($stub);
- }
-
- /**
- * @param array $valueMap
- * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker
- */
- public function willReturnMap(array $valueMap)
- {
- $stub = new PHPUnit_Framework_MockObject_Stub_ReturnValueMap(
- $valueMap
- );
-
- return $this->will($stub);
- }
-
- /**
- * @param mixed $argumentIndex
- * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker
- */
- public function willReturnArgument($argumentIndex)
- {
- $stub = new PHPUnit_Framework_MockObject_Stub_ReturnArgument(
- $argumentIndex
- );
-
- return $this->will($stub);
- }
-
- /**
- * @param callable $callback
- * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker
- */
- public function willReturnCallback($callback)
- {
- $stub = new PHPUnit_Framework_MockObject_Stub_ReturnCallback(
- $callback
- );
-
- return $this->will($stub);
- }
-
- /**
- * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker
- */
- public function willReturnSelf()
- {
- $stub = new PHPUnit_Framework_MockObject_Stub_ReturnSelf();
-
- return $this->will($stub);
- }
-
- /**
- * @param mixed $value, ...
- * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker
- */
- public function willReturnOnConsecutiveCalls()
- {
- $args = func_get_args();
-
- $stub = new PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls($args);
-
- return $this->will($stub);
- }
-
- /**
- * @param Exception $exception
- * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker
- */
- public function willThrowException(Exception $exception)
- {
- $stub = new PHPUnit_Framework_MockObject_Stub_Exception($exception);
-
- return $this->will($stub);
- }
-
- /**
- * @param mixed $id
- * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker
- */
- public function after($id)
- {
- $this->matcher->afterMatchBuilderId = $id;
-
- return $this;
- }
-
- /**
- * Validate that a parameters matcher can be defined, throw exceptions otherwise.
- *
- * @throws PHPUnit_Framework_Exception
- */
- private function canDefineParameters()
- {
- if ($this->matcher->methodNameMatcher === null) {
- throw new PHPUnit_Framework_Exception(
- 'Method name matcher is not defined, cannot define parameter ' .
- ' matcher without one'
- );
- }
-
- if ($this->matcher->parametersMatcher !== null) {
- throw new PHPUnit_Framework_Exception(
- 'Parameter matcher is already defined, cannot redefine'
- );
- }
- }
-
- /**
- * @param mixed $argument, ...
- * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker
- */
- public function with()
- {
- $args = func_get_args();
-
- $this->canDefineParameters();
-
- $this->matcher->parametersMatcher = new PHPUnit_Framework_MockObject_Matcher_Parameters($args);
-
- return $this;
- }
-
- /**
- * @param mixed ...$argument
- * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker
- */
- public function withConsecutive()
- {
-
- $args = func_get_args();
-
- $this->canDefineParameters();
-
- $this->matcher->parametersMatcher =
- new PHPUnit_Framework_MockObject_Matcher_ConsecutiveParameters($args);
-
- return $this;
- }
-
- /**
- * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker
- */
- public function withAnyParameters()
- {
- $this->canDefineParameters();
-
- $this->matcher->parametersMatcher = new PHPUnit_Framework_MockObject_Matcher_AnyParameters;
-
- return $this;
- }
-
- /**
- * @param PHPUnit_Framework_Constraint|string $constraint
- * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker
- */
- public function method($constraint)
- {
- if ($this->matcher->methodNameMatcher !== null) {
- throw new PHPUnit_Framework_Exception(
- 'Method name matcher is already defined, cannot redefine'
- );
- }
-
- $this->matcher->methodNameMatcher = new PHPUnit_Framework_MockObject_Matcher_MethodName($constraint);
-
- return $this;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Match.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Match.php
deleted file mode 100644
index 1cbd040f..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Match.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Builder interface for invocation order matches.
- *
- * @since Interface available since Release 1.0.0
- */
-interface PHPUnit_Framework_MockObject_Builder_Match extends PHPUnit_Framework_MockObject_Builder_Stub
-{
- /**
- * Defines the expectation which must occur before the current is valid.
- *
- * @param string $id The identification of the expectation that should
- * occur before this one.
- * @return PHPUnit_Framework_MockObject_Builder_Stub
- */
- public function after($id);
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/MethodNameMatch.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/MethodNameMatch.php
deleted file mode 100644
index 96bfb1e2..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/MethodNameMatch.php
+++ /dev/null
@@ -1,28 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Builder interface for matcher of method names.
- *
- * @since Interface available since Release 1.0.0
- */
-interface PHPUnit_Framework_MockObject_Builder_MethodNameMatch extends PHPUnit_Framework_MockObject_Builder_ParametersMatch
-{
- /**
- * Adds a new method name match and returns the parameter match object for
- * further matching possibilities.
- *
- * @param PHPUnit_Framework_Constraint $name
- * Constraint for matching method, if a string is passed it will use
- * the PHPUnit_Framework_Constraint_IsEqual.
- * @return PHPUnit_Framework_MockObject_Builder_ParametersMatch
- */
- public function method($name);
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Namespace.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Namespace.php
deleted file mode 100644
index 831156b1..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Namespace.php
+++ /dev/null
@@ -1,39 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Interface for builders which can register builders with a given identification.
- *
- * This interface relates to PHPUnit_Framework_MockObject_Builder_Identity.
- *
- * @since Interface available since Release 1.0.0
- */
-interface PHPUnit_Framework_MockObject_Builder_Namespace
-{
- /**
- * Looks up the match builder with identification $id and returns it.
- *
- * @param string $id The identifiction of the match builder.
- * @return PHPUnit_Framework_MockObject_Builder_Match
- */
- public function lookupId($id);
-
- /**
- * Registers the match builder $builder with the identification $id. The
- * builder can later be looked up using lookupId() to figure out if it
- * has been invoked.
- *
- * @param string $id
- * The identification of the match builder.
- * @param PHPUnit_Framework_MockObject_Builder_Match $builder
- * The builder which is being registered.
- */
- public function registerId($id, PHPUnit_Framework_MockObject_Builder_Match $builder);
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/ParametersMatch.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/ParametersMatch.php
deleted file mode 100644
index 79d96f2d..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/ParametersMatch.php
+++ /dev/null
@@ -1,49 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Builder interface for parameter matchers.
- *
- * @since Interface available since Release 1.0.0
- */
-interface PHPUnit_Framework_MockObject_Builder_ParametersMatch extends PHPUnit_Framework_MockObject_Builder_Match
-{
- /**
- * Sets the parameters to match for, each parameter to this funtion will
- * be part of match. To perform specific matches or constraints create a
- * new PHPUnit_Framework_Constraint and use it for the parameter.
- * If the parameter value is not a constraint it will use the
- * PHPUnit_Framework_Constraint_IsEqual for the value.
- *
- * Some examples:
- *
- * // match first parameter with value 2
- * $b->with(2);
- * // match first parameter with value 'smock' and second identical to 42
- * $b->with('smock', new PHPUnit_Framework_Constraint_IsEqual(42));
- *
- *
- * @return PHPUnit_Framework_MockObject_Builder_ParametersMatch
- */
- public function with();
-
- /**
- * Sets a matcher which allows any kind of parameters.
- *
- * Some examples:
- *
- * // match any number of parameters
- * $b->withAnyParamers();
- *
- *
- * @return PHPUnit_Framework_MockObject_Matcher_AnyParameters
- */
- public function withAnyParameters();
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Stub.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Stub.php
deleted file mode 100644
index cc96bacb..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Stub.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Builder interface for stubs which are actions replacing an invocation.
- *
- * @since Interface available since Release 1.0.0
- */
-interface PHPUnit_Framework_MockObject_Builder_Stub extends PHPUnit_Framework_MockObject_Builder_Identity
-{
- /**
- * Stubs the matching method with the stub object $stub. Any invocations of
- * the matched method will now be handled by the stub instead.
- *
- * @param PHPUnit_Framework_MockObject_Stub $stub The stub object.
- * @return PHPUnit_Framework_MockObject_Builder_Identity
- */
- public function will(PHPUnit_Framework_MockObject_Stub $stub);
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/BadMethodCallException.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/BadMethodCallException.php
deleted file mode 100644
index 736784bd..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/BadMethodCallException.php
+++ /dev/null
@@ -1,16 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 2.0.6
- */
-class PHPUnit_Framework_MockObject_BadMethodCallException extends BadMethodCallException implements PHPUnit_Framework_MockObject_Exception
-{
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/Exception.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/Exception.php
deleted file mode 100644
index bc8c81de..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/Exception.php
+++ /dev/null
@@ -1,18 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Interface for exceptions used by PHPUnit_MockObject.
- *
- * @since Interface available since Release 2.0.6
- */
-interface PHPUnit_Framework_MockObject_Exception
-{
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/RuntimeException.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/RuntimeException.php
deleted file mode 100644
index 1e9b6f17..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/RuntimeException.php
+++ /dev/null
@@ -1,16 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 2.0.6
- */
-class PHPUnit_Framework_MockObject_RuntimeException extends RuntimeException implements PHPUnit_Framework_MockObject_Exception
-{
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php
deleted file mode 100644
index 3df3abb0..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php
+++ /dev/null
@@ -1,1120 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-use Doctrine\Instantiator\Instantiator;
-use Doctrine\Instantiator\Exception\InvalidArgumentException as InstantiatorInvalidArgumentException;
-use Doctrine\Instantiator\Exception\UnexpectedValueException as InstantiatorUnexpectedValueException;
-
-if (!function_exists('trait_exists')) {
- function trait_exists($traitname, $autoload = true)
- {
- return false;
- }
-}
-
-/**
- * Mock Object Code Generator
- *
- * @since Class available since Release 1.0.0
- */
-class PHPUnit_Framework_MockObject_Generator
-{
- /**
- * @var array
- */
- private static $cache = array();
-
- /**
- * @var array
- */
- protected $blacklistedMethodNames = array(
- '__CLASS__' => true,
- '__DIR__' => true,
- '__FILE__' => true,
- '__FUNCTION__' => true,
- '__LINE__' => true,
- '__METHOD__' => true,
- '__NAMESPACE__' => true,
- '__TRAIT__' => true,
- '__clone' => true,
- '__halt_compiler' => true,
- 'abstract' => true,
- 'and' => true,
- 'array' => true,
- 'as' => true,
- 'break' => true,
- 'callable' => true,
- 'case' => true,
- 'catch' => true,
- 'class' => true,
- 'clone' => true,
- 'const' => true,
- 'continue' => true,
- 'declare' => true,
- 'default' => true,
- 'die' => true,
- 'do' => true,
- 'echo' => true,
- 'else' => true,
- 'elseif' => true,
- 'empty' => true,
- 'enddeclare' => true,
- 'endfor' => true,
- 'endforeach' => true,
- 'endif' => true,
- 'endswitch' => true,
- 'endwhile' => true,
- 'eval' => true,
- 'exit' => true,
- 'expects' => true,
- 'extends' => true,
- 'final' => true,
- 'for' => true,
- 'foreach' => true,
- 'function' => true,
- 'global' => true,
- 'goto' => true,
- 'if' => true,
- 'implements' => true,
- 'include' => true,
- 'include_once' => true,
- 'instanceof' => true,
- 'insteadof' => true,
- 'interface' => true,
- 'isset' => true,
- 'list' => true,
- 'namespace' => true,
- 'new' => true,
- 'or' => true,
- 'print' => true,
- 'private' => true,
- 'protected' => true,
- 'public' => true,
- 'require' => true,
- 'require_once' => true,
- 'return' => true,
- 'static' => true,
- 'switch' => true,
- 'throw' => true,
- 'trait' => true,
- 'try' => true,
- 'unset' => true,
- 'use' => true,
- 'var' => true,
- 'while' => true,
- 'xor' => true
- );
-
- /**
- * Returns a mock object for the specified class.
- *
- * @param array|string $type
- * @param array $methods
- * @param array $arguments
- * @param string $mockClassName
- * @param bool $callOriginalConstructor
- * @param bool $callOriginalClone
- * @param bool $callAutoload
- * @param bool $cloneArguments
- * @param bool $callOriginalMethods
- * @param object $proxyTarget
- * @return object
- * @throws InvalidArgumentException
- * @throws PHPUnit_Framework_Exception
- * @throws PHPUnit_Framework_MockObject_RuntimeException
- * @since Method available since Release 1.0.0
- */
- public function getMock($type, $methods = array(), array $arguments = array(), $mockClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true, $cloneArguments = true, $callOriginalMethods = false, $proxyTarget = null)
- {
- if (!is_array($type) && !is_string($type)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'array or string');
- }
-
- if (!is_string($mockClassName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(4, 'string');
- }
-
- if (!is_array($methods) && !is_null($methods)) {
- throw new InvalidArgumentException;
- }
-
- if ($type === 'Traversable' || $type === '\\Traversable') {
- $type = 'Iterator';
- }
-
- if (is_array($type)) {
- $type = array_unique(array_map(
- function ($type) {
- if ($type === 'Traversable' ||
- $type === '\\Traversable' ||
- $type === '\\Iterator') {
- return 'Iterator';
- }
-
- return $type;
- },
- $type
- ));
- }
-
- if (null !== $methods) {
- foreach ($methods as $method) {
- if (!preg_match('~[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*~', $method)) {
- throw new PHPUnit_Framework_Exception(
- sprintf(
- 'Cannot stub or mock method with invalid name "%s"',
- $method
- )
- );
- }
- }
-
- if ($methods != array_unique($methods)) {
- throw new PHPUnit_Framework_MockObject_RuntimeException(
- sprintf(
- 'Cannot stub or mock using a method list that contains duplicates: "%s"',
- implode(', ', $methods)
- )
- );
- }
- }
-
- if ($mockClassName != '' && class_exists($mockClassName, false)) {
- $reflect = new ReflectionClass($mockClassName);
-
- if (!$reflect->implementsInterface('PHPUnit_Framework_MockObject_MockObject')) {
- throw new PHPUnit_Framework_MockObject_RuntimeException(
- sprintf(
- 'Class "%s" already exists.',
- $mockClassName
- )
- );
- }
- }
-
- $mock = $this->generate(
- $type,
- $methods,
- $mockClassName,
- $callOriginalClone,
- $callAutoload,
- $cloneArguments,
- $callOriginalMethods
- );
-
- return $this->getObject(
- $mock['code'],
- $mock['mockClassName'],
- $type,
- $callOriginalConstructor,
- $callAutoload,
- $arguments,
- $callOriginalMethods,
- $proxyTarget
- );
- }
-
- /**
- * @param string $code
- * @param string $className
- * @param array|string $type
- * @param bool $callOriginalConstructor
- * @param bool $callAutoload
- * @param array $arguments
- * @param bool $callOriginalMethods
- * @param object $proxyTarget
- * @return object
- */
- protected function getObject($code, $className, $type = '', $callOriginalConstructor = false, $callAutoload = false, array $arguments = array(), $callOriginalMethods = false, $proxyTarget = null)
- {
- $this->evalClass($code, $className);
-
- if ($callOriginalConstructor &&
- is_string($type) &&
- !interface_exists($type, $callAutoload)) {
- if (count($arguments) == 0) {
- $object = new $className;
- } else {
- $class = new ReflectionClass($className);
- $object = $class->newInstanceArgs($arguments);
- }
- } else {
- try {
- $instantiator = new Instantiator;
- $object = $instantiator->instantiate($className);
- } catch (InstantiatorUnexpectedValueException $exception) {
- if ($exception->getPrevious()) {
- $exception = $exception->getPrevious();
- }
-
- throw new PHPUnit_Framework_MockObject_RuntimeException(
- $exception->getMessage()
- );
- } catch (InstantiatorInvalidArgumentException $exception) {
- throw new PHPUnit_Framework_MockObject_RuntimeException(
- $exception->getMessage()
- );
- }
- }
-
- if ($callOriginalMethods) {
- if (!is_object($proxyTarget)) {
- if (count($arguments) == 0) {
- $proxyTarget = new $type;
- } else {
- $class = new ReflectionClass($type);
- $proxyTarget = $class->newInstanceArgs($arguments);
- }
- }
-
- $object->__phpunit_setOriginalObject($proxyTarget);
- }
-
- return $object;
- }
-
- /**
- * @param string $code
- * @param string $className
- */
- protected function evalClass($code, $className)
- {
- if (!class_exists($className, false)) {
- eval($code);
- }
- }
-
- /**
- * Returns a mock object for the specified abstract class with all abstract
- * methods of the class mocked. Concrete methods to mock can be specified with
- * the last parameter
- *
- * @param string $originalClassName
- * @param array $arguments
- * @param string $mockClassName
- * @param bool $callOriginalConstructor
- * @param bool $callOriginalClone
- * @param bool $callAutoload
- * @param array $mockedMethods
- * @param bool $cloneArguments
- * @return object
- * @since Method available since Release 1.0.0
- * @throws PHPUnit_Framework_MockObject_RuntimeException
- * @throws PHPUnit_Framework_Exception
- */
- public function getMockForAbstractClass($originalClassName, array $arguments = array(), $mockClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true, $mockedMethods = array(), $cloneArguments = true)
- {
- if (!is_string($originalClassName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
- }
-
- if (!is_string($mockClassName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(3, 'string');
- }
-
- if (class_exists($originalClassName, $callAutoload) ||
- interface_exists($originalClassName, $callAutoload)) {
- $reflector = new ReflectionClass($originalClassName);
- $methods = $mockedMethods;
-
- foreach ($reflector->getMethods() as $method) {
- if ($method->isAbstract() && !in_array($method->getName(), $methods)) {
- $methods[] = $method->getName();
- }
- }
-
- if (empty($methods)) {
- $methods = null;
- }
-
- return $this->getMock(
- $originalClassName,
- $methods,
- $arguments,
- $mockClassName,
- $callOriginalConstructor,
- $callOriginalClone,
- $callAutoload,
- $cloneArguments
- );
- } else {
- throw new PHPUnit_Framework_MockObject_RuntimeException(
- sprintf('Class "%s" does not exist.', $originalClassName)
- );
- }
- }
-
- /**
- * Returns a mock object for the specified trait with all abstract methods
- * of the trait mocked. Concrete methods to mock can be specified with the
- * `$mockedMethods` parameter.
- *
- * @param string $traitName
- * @param array $arguments
- * @param string $mockClassName
- * @param bool $callOriginalConstructor
- * @param bool $callOriginalClone
- * @param bool $callAutoload
- * @param array $mockedMethods
- * @param bool $cloneArguments
- * @return object
- * @since Method available since Release 1.2.3
- * @throws PHPUnit_Framework_MockObject_RuntimeException
- * @throws PHPUnit_Framework_Exception
- */
- public function getMockForTrait($traitName, array $arguments = array(), $mockClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true, $mockedMethods = array(), $cloneArguments = true)
- {
- if (!is_string($traitName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
- }
-
- if (!is_string($mockClassName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(3, 'string');
- }
-
- if (!trait_exists($traitName, $callAutoload)) {
- throw new PHPUnit_Framework_MockObject_RuntimeException(
- sprintf(
- 'Trait "%s" does not exist.',
- $traitName
- )
- );
- }
-
- $className = $this->generateClassName(
- $traitName,
- '',
- 'Trait_'
- );
-
- $templateDir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Generator' .
- DIRECTORY_SEPARATOR;
- $classTemplate = new Text_Template(
- $templateDir . 'trait_class.tpl'
- );
-
- $classTemplate->setVar(
- array(
- 'prologue' => 'abstract ',
- 'class_name' => $className['className'],
- 'trait_name' => $traitName
- )
- );
-
- $this->evalClass(
- $classTemplate->render(),
- $className['className']
- );
-
- return $this->getMockForAbstractClass($className['className'], $arguments, $mockClassName, $callOriginalConstructor, $callOriginalClone, $callAutoload, $mockedMethods, $cloneArguments);
- }
-
- /**
- * Returns an object for the specified trait.
- *
- * @param string $traitName
- * @param array $arguments
- * @param string $traitClassName
- * @param bool $callOriginalConstructor
- * @param bool $callOriginalClone
- * @param bool $callAutoload
- * @return object
- * @since Method available since Release 1.1.0
- * @throws PHPUnit_Framework_MockObject_RuntimeException
- * @throws PHPUnit_Framework_Exception
- */
- public function getObjectForTrait($traitName, array $arguments = array(), $traitClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true)
- {
- if (!is_string($traitName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
- }
-
- if (!is_string($traitClassName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(3, 'string');
- }
-
- if (!trait_exists($traitName, $callAutoload)) {
- throw new PHPUnit_Framework_MockObject_RuntimeException(
- sprintf(
- 'Trait "%s" does not exist.',
- $traitName
- )
- );
- }
-
- $className = $this->generateClassName(
- $traitName,
- $traitClassName,
- 'Trait_'
- );
-
- $templateDir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Generator' .
- DIRECTORY_SEPARATOR;
- $classTemplate = new Text_Template(
- $templateDir . 'trait_class.tpl'
- );
-
- $classTemplate->setVar(
- array(
- 'prologue' => '',
- 'class_name' => $className['className'],
- 'trait_name' => $traitName
- )
- );
-
- return $this->getObject(
- $classTemplate->render(),
- $className['className']
- );
- }
-
- /**
- * @param array|string $type
- * @param array $methods
- * @param string $mockClassName
- * @param bool $callOriginalClone
- * @param bool $callAutoload
- * @param bool $cloneArguments
- * @param bool $callOriginalMethods
- * @return array
- */
- public function generate($type, array $methods = null, $mockClassName = '', $callOriginalClone = true, $callAutoload = true, $cloneArguments = true, $callOriginalMethods = false)
- {
- if (is_array($type)) {
- sort($type);
- }
-
- if ($mockClassName == '') {
- $key = md5(
- is_array($type) ? implode('_', $type) : $type .
- serialize($methods) .
- serialize($callOriginalClone) .
- serialize($cloneArguments) .
- serialize($callOriginalMethods)
- );
-
- if (isset(self::$cache[$key])) {
- return self::$cache[$key];
- }
- }
-
- $mock = $this->generateMock(
- $type,
- $methods,
- $mockClassName,
- $callOriginalClone,
- $callAutoload,
- $cloneArguments,
- $callOriginalMethods
- );
-
- if (isset($key)) {
- self::$cache[$key] = $mock;
- }
-
- return $mock;
- }
-
- /**
- * @param string $wsdlFile
- * @param string $className
- * @param array $methods
- * @param array $options
- * @return string
- * @throws PHPUnit_Framework_MockObject_RuntimeException
- */
- public function generateClassFromWsdl($wsdlFile, $className, array $methods = array(), array $options = array())
- {
- if (!extension_loaded('soap')) {
- throw new PHPUnit_Framework_MockObject_RuntimeException(
- 'The SOAP extension is required to generate a mock object from WSDL.'
- );
- }
-
- $options = array_merge($options, array('cache_wsdl' => WSDL_CACHE_NONE));
- $client = new SoapClient($wsdlFile, $options);
- $_methods = array_unique($client->__getFunctions());
- unset($client);
-
- sort($_methods);
-
- $templateDir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Generator' . DIRECTORY_SEPARATOR;
- $methodTemplate = new Text_Template($templateDir . 'wsdl_method.tpl');
- $methodsBuffer = '';
-
- foreach ($_methods as $method) {
- $nameStart = strpos($method, ' ') + 1;
- $nameEnd = strpos($method, '(');
- $name = substr($method, $nameStart, $nameEnd - $nameStart);
-
- if (empty($methods) || in_array($name, $methods)) {
- $args = explode(
- ',',
- substr(
- $method,
- $nameEnd + 1,
- strpos($method, ')') - $nameEnd - 1
- )
- );
- $numArgs = count($args);
-
- for ($i = 0; $i < $numArgs; $i++) {
- $args[$i] = substr($args[$i], strpos($args[$i], '$'));
- }
-
- $methodTemplate->setVar(
- array(
- 'method_name' => $name,
- 'arguments' => implode(', ', $args)
- )
- );
-
- $methodsBuffer .= $methodTemplate->render();
- }
- }
-
- $optionsBuffer = 'array(';
-
- foreach ($options as $key => $value) {
- $optionsBuffer .= $key . ' => ' . $value;
- }
-
- $optionsBuffer .= ')';
-
- $classTemplate = new Text_Template($templateDir . 'wsdl_class.tpl');
- $namespace = '';
-
- if (strpos($className, '\\') !== false) {
- $parts = explode('\\', $className);
- $className = array_pop($parts);
- $namespace = 'namespace ' . implode('\\', $parts) . ';' . "\n\n";
- }
-
- $classTemplate->setVar(
- array(
- 'namespace' => $namespace,
- 'class_name' => $className,
- 'wsdl' => $wsdlFile,
- 'options' => $optionsBuffer,
- 'methods' => $methodsBuffer
- )
- );
-
- return $classTemplate->render();
- }
-
- /**
- * @param array|string $type
- * @param array|null $methods
- * @param string $mockClassName
- * @param bool $callOriginalClone
- * @param bool $callAutoload
- * @param bool $cloneArguments
- * @param bool $callOriginalMethods
- * @return array
- * @throws PHPUnit_Framework_Exception
- */
- protected function generateMock($type, $methods, $mockClassName, $callOriginalClone, $callAutoload, $cloneArguments, $callOriginalMethods)
- {
- $templateDir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Generator' .
- DIRECTORY_SEPARATOR;
- $classTemplate = new Text_Template(
- $templateDir . 'mocked_class.tpl'
- );
-
- $additionalInterfaces = array();
- $cloneTemplate = '';
- $isClass = false;
- $isInterface = false;
-
- $mockClassName = $this->generateClassName(
- $type,
- $mockClassName,
- 'Mock_'
- );
-
- if (is_array($type)) {
- foreach ($type as $_type) {
- if (!interface_exists($_type, $callAutoload)) {
- throw new PHPUnit_Framework_Exception(
- sprintf(
- 'Interface "%s" does not exist.',
- $_type
- )
- );
- }
-
- $additionalInterfaces[] = $_type;
-
- foreach ($this->getClassMethods($_type) as $method) {
- if (in_array($method, $methods)) {
- throw new PHPUnit_Framework_Exception(
- sprintf(
- 'Duplicate method "%s" not allowed.',
- $method
- )
- );
- }
-
- $methods[] = $method;
- }
- }
- }
-
- if (class_exists($mockClassName['fullClassName'], $callAutoload)) {
- $isClass = true;
- } else {
- if (interface_exists($mockClassName['fullClassName'], $callAutoload)) {
- $isInterface = true;
- }
- }
-
- if (!class_exists($mockClassName['fullClassName'], $callAutoload) &&
- !interface_exists($mockClassName['fullClassName'], $callAutoload)) {
- $prologue = 'class ' . $mockClassName['originalClassName'] . "\n{\n}\n\n";
-
- if (!empty($mockClassName['namespaceName'])) {
- $prologue = 'namespace ' . $mockClassName['namespaceName'] .
- " {\n\n" . $prologue . "}\n\n" .
- "namespace {\n\n";
-
- $epilogue = "\n\n}";
- }
-
- $cloneTemplate = new Text_Template(
- $templateDir . 'mocked_clone.tpl'
- );
- } else {
- $class = new ReflectionClass($mockClassName['fullClassName']);
-
- if ($class->isFinal()) {
- throw new PHPUnit_Framework_Exception(
- sprintf(
- 'Class "%s" is declared "final" and cannot be mocked.',
- $mockClassName['fullClassName']
- )
- );
- }
-
- if ($class->hasMethod('__clone')) {
- $cloneMethod = $class->getMethod('__clone');
-
- if (!$cloneMethod->isFinal()) {
- if ($callOriginalClone && !$isInterface) {
- $cloneTemplate = new Text_Template(
- $templateDir . 'unmocked_clone.tpl'
- );
- } else {
- $cloneTemplate = new Text_Template(
- $templateDir . 'mocked_clone.tpl'
- );
- }
- }
- } else {
- $cloneTemplate = new Text_Template(
- $templateDir . 'mocked_clone.tpl'
- );
- }
- }
-
- if (is_object($cloneTemplate)) {
- $cloneTemplate = $cloneTemplate->render();
- }
-
- if (is_array($methods) && empty($methods) &&
- ($isClass || $isInterface)) {
- $methods = $this->getClassMethods($mockClassName['fullClassName']);
- }
-
- if (!is_array($methods)) {
- $methods = array();
- }
-
- $mockedMethods = '';
-
- if (isset($class)) {
- // https://github.com/sebastianbergmann/phpunit-mock-objects/issues/103
- if ($isInterface && $class->implementsInterface('Traversable') &&
- !$class->implementsInterface('Iterator') &&
- !$class->implementsInterface('IteratorAggregate')) {
- $additionalInterfaces[] = 'Iterator';
- $methods = array_merge($methods, $this->getClassMethods('Iterator'));
- }
-
- foreach ($methods as $methodName) {
- try {
- $method = $class->getMethod($methodName);
-
- if ($this->canMockMethod($method)) {
- $mockedMethods .= $this->generateMockedMethodDefinitionFromExisting(
- $templateDir,
- $method,
- $cloneArguments,
- $callOriginalMethods
- );
- }
- } catch (ReflectionException $e) {
- $mockedMethods .= $this->generateMockedMethodDefinition(
- $templateDir,
- $mockClassName['fullClassName'],
- $methodName,
- $cloneArguments
- );
- }
- }
- } else {
- foreach ($methods as $methodName) {
- $mockedMethods .= $this->generateMockedMethodDefinition(
- $templateDir,
- $mockClassName['fullClassName'],
- $methodName,
- $cloneArguments
- );
- }
- }
-
- $method = '';
-
- if (!in_array('method', $methods)) {
- $methodTemplate = new Text_Template(
- $templateDir . 'mocked_class_method.tpl'
- );
-
- $method = $methodTemplate->render();
- }
-
- $classTemplate->setVar(
- array(
- 'prologue' => isset($prologue) ? $prologue : '',
- 'epilogue' => isset($epilogue) ? $epilogue : '',
- 'class_declaration' => $this->generateMockClassDeclaration(
- $mockClassName,
- $isInterface,
- $additionalInterfaces
- ),
- 'clone' => $cloneTemplate,
- 'mock_class_name' => $mockClassName['className'],
- 'mocked_methods' => $mockedMethods,
- 'method' => $method
- )
- );
-
- return array(
- 'code' => $classTemplate->render(),
- 'mockClassName' => $mockClassName['className']
- );
- }
-
- /**
- * @param array|string $type
- * @param string $className
- * @param string $prefix
- * @return array
- */
- protected function generateClassName($type, $className, $prefix)
- {
- if (is_array($type)) {
- $type = implode('_', $type);
- }
-
- if ($type[0] == '\\') {
- $type = substr($type, 1);
- }
-
- $classNameParts = explode('\\', $type);
-
- if (count($classNameParts) > 1) {
- $type = array_pop($classNameParts);
- $namespaceName = implode('\\', $classNameParts);
- $fullClassName = $namespaceName . '\\' . $type;
- } else {
- $namespaceName = '';
- $fullClassName = $type;
- }
-
- if ($className == '') {
- do {
- $className = $prefix . $type . '_' .
- substr(md5(microtime()), 0, 8);
- } while (class_exists($className, false));
- }
-
- return array(
- 'className' => $className,
- 'originalClassName' => $type,
- 'fullClassName' => $fullClassName,
- 'namespaceName' => $namespaceName
- );
- }
-
- /**
- * @param array $mockClassName
- * @param bool $isInterface
- * @param array $additionalInterfaces
- * @return array
- */
- protected function generateMockClassDeclaration(array $mockClassName, $isInterface, array $additionalInterfaces = array())
- {
- $buffer = 'class ';
-
- $additionalInterfaces[] = 'PHPUnit_Framework_MockObject_MockObject';
- $interfaces = implode(', ', $additionalInterfaces);
-
- if ($isInterface) {
- $buffer .= sprintf(
- '%s implements %s',
- $mockClassName['className'],
- $interfaces
- );
-
- if (!in_array($mockClassName['originalClassName'], $additionalInterfaces)) {
- $buffer .= ', ';
-
- if (!empty($mockClassName['namespaceName'])) {
- $buffer .= $mockClassName['namespaceName'] . '\\';
- }
-
- $buffer .= $mockClassName['originalClassName'];
- }
- } else {
- $buffer .= sprintf(
- '%s extends %s%s implements %s',
- $mockClassName['className'],
- !empty($mockClassName['namespaceName']) ? $mockClassName['namespaceName'] . '\\' : '',
- $mockClassName['originalClassName'],
- $interfaces
- );
- }
-
- return $buffer;
- }
-
- /**
- * @param string $templateDir
- * @param ReflectionMethod $method
- * @param bool $cloneArguments
- * @param bool $callOriginalMethods
- * @return string
- */
- protected function generateMockedMethodDefinitionFromExisting($templateDir, ReflectionMethod $method, $cloneArguments, $callOriginalMethods)
- {
- if ($method->isPrivate()) {
- $modifier = 'private';
- } elseif ($method->isProtected()) {
- $modifier = 'protected';
- } else {
- $modifier = 'public';
- }
-
- if ($method->isStatic()) {
- $modifier .= ' static';
- }
-
- if ($method->returnsReference()) {
- $reference = '&';
- } else {
- $reference = '';
- }
-
- return $this->generateMockedMethodDefinition(
- $templateDir,
- $method->getDeclaringClass()->getName(),
- $method->getName(),
- $cloneArguments,
- $modifier,
- $this->getMethodParameters($method),
- $this->getMethodParameters($method, true),
- $reference,
- $callOriginalMethods,
- $method->isStatic()
- );
- }
-
- /**
- * @param string $templateDir
- * @param string $className
- * @param string $methodName
- * @param bool $cloneArguments
- * @param string $modifier
- * @param string $arguments_decl
- * @param string $arguments_call
- * @param string $reference
- * @param bool $callOriginalMethods
- * @param bool $static
- * @return string
- */
- protected function generateMockedMethodDefinition($templateDir, $className, $methodName, $cloneArguments = true, $modifier = 'public', $arguments_decl = '', $arguments_call = '', $reference = '', $callOriginalMethods = false, $static = false)
- {
- if ($static) {
- $templateFile = 'mocked_static_method.tpl';
- } else {
- $templateFile = sprintf(
- '%s_method.tpl',
- $callOriginalMethods ? 'proxied' : 'mocked'
- );
- }
-
- $template = new Text_Template($templateDir . $templateFile);
-
- $template->setVar(
- array(
- 'arguments_decl' => $arguments_decl,
- 'arguments_call' => $arguments_call,
- 'arguments_count' => !empty($arguments_call) ? count(explode(',', $arguments_call)) : 0,
- 'class_name' => $className,
- 'method_name' => $methodName,
- 'modifier' => $modifier,
- 'reference' => $reference,
- 'clone_arguments' => $cloneArguments ? 'TRUE' : 'FALSE'
- )
- );
-
- return $template->render();
- }
-
- /**
- * @param ReflectionMethod $method
- * @return bool
- */
- protected function canMockMethod(ReflectionMethod $method)
- {
- if ($method->isConstructor() ||
- $method->isFinal() ||
- $method->isPrivate() ||
- isset($this->blacklistedMethodNames[$method->getName()])) {
- return false;
- }
-
- return true;
- }
-
- /**
- * Returns the parameters of a function or method.
- *
- * @param ReflectionMethod $method
- * @param bool $forCall
- * @return string
- * @throws PHPUnit_Framework_MockObject_RuntimeException
- * @since Method available since Release 2.0.0
- */
- protected function getMethodParameters(ReflectionMethod $method, $forCall = false)
- {
- $parameters = array();
-
- foreach ($method->getParameters() as $i => $parameter) {
- $name = '$' . $parameter->getName();
-
- /* Note: PHP extensions may use empty names for reference arguments
- * or "..." for methods taking a variable number of arguments.
- */
- if ($name === '$' || $name === '$...') {
- $name = '$arg' . $i;
- }
-
- if ($this->isVariadic($parameter)) {
- if ($forCall) {
- continue;
- } else {
- $name = '...' . $name;
- }
- }
-
- $default = '';
- $reference = '';
- $typeDeclaration = '';
-
- if (!$forCall) {
- if ($this->hasType($parameter)) {
- $typeDeclaration = (string) $parameter->getType() . ' ';
- } elseif ($parameter->isArray()) {
- $typeDeclaration = 'array ';
- } elseif ((defined('HHVM_VERSION') || version_compare(PHP_VERSION, '5.4.0', '>='))
- && $parameter->isCallable()) {
- $typeDeclaration = 'callable ';
- } else {
- try {
- $class = $parameter->getClass();
- } catch (ReflectionException $e) {
- throw new PHPUnit_Framework_MockObject_RuntimeException(
- sprintf(
- 'Cannot mock %s::%s() because a class or ' .
- 'interface used in the signature is not loaded',
- $method->getDeclaringClass()->getName(),
- $method->getName()
- ),
- 0,
- $e
- );
- }
-
- if ($class !== null) {
- $typeDeclaration = $class->getName() . ' ';
- }
- }
-
- if (!$this->isVariadic($parameter)) {
- if ($parameter->isDefaultValueAvailable()) {
- $value = $parameter->getDefaultValue();
- $default = ' = ' . var_export($value, true);
- } elseif ($parameter->isOptional()) {
- $default = ' = null';
- }
- }
- }
-
- if ($parameter->isPassedByReference()) {
- $reference = '&';
- }
-
- $parameters[] = $typeDeclaration . $reference . $name . $default;
- }
-
- return implode(', ', $parameters);
- }
-
- /**
- * @param ReflectionParameter $parameter
- * @return bool
- * @since Method available since Release 2.2.1
- */
- private function isVariadic(ReflectionParameter $parameter)
- {
- return method_exists('ReflectionParameter', 'isVariadic') && $parameter->isVariadic();
- }
-
- /**
- * @param ReflectionParameter $parameter
- * @return bool
- * @since Method available since Release 2.3.4
- */
- private function hasType(ReflectionParameter $parameter)
- {
- return method_exists('ReflectionParameter', 'hasType') && $parameter->hasType();
- }
-
- /**
- * @param string $className
- * @return array
- * @since Method available since Release 2.3.2
- */
- private function getClassMethods($className)
- {
- $class = new ReflectionClass($className);
- $methods = array();
-
- foreach ($class->getMethods() as $method) {
- if (($method->isPublic() || $method->isAbstract()) && !in_array($method->getName(), $methods)) {
- $methods[] = $method->getName();
- }
- }
-
- return $methods;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_class.tpl.dist b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_class.tpl.dist
deleted file mode 100644
index a9a94cd0..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_class.tpl.dist
+++ /dev/null
@@ -1,36 +0,0 @@
-{prologue}{class_declaration}
-{
- private $__phpunit_invocationMocker;
- private $__phpunit_originalObject;
-
-{clone}{mocked_methods}
- public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
- {
- return $this->__phpunit_getInvocationMocker()->expects($matcher);
- }
-{method}
- public function __phpunit_setOriginalObject($originalObject)
- {
- $this->__phpunit_originalObject = $originalObject;
- }
-
- public function __phpunit_getInvocationMocker()
- {
- if ($this->__phpunit_invocationMocker === NULL) {
- $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker;
- }
-
- return $this->__phpunit_invocationMocker;
- }
-
- public function __phpunit_hasMatchers()
- {
- return $this->__phpunit_getInvocationMocker()->hasMatchers();
- }
-
- public function __phpunit_verify()
- {
- $this->__phpunit_getInvocationMocker()->verify();
- $this->__phpunit_invocationMocker = NULL;
- }
-}{epilogue}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_class_method.tpl.dist b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_class_method.tpl.dist
deleted file mode 100644
index 9e29c0d5..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_class_method.tpl.dist
+++ /dev/null
@@ -1,7 +0,0 @@
-
- public function method()
- {
- $any = new PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount;
- $expects = $this->expects($any);
- return call_user_func_array(array($expects, 'method'), func_get_args());
- }
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_clone.tpl.dist b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_clone.tpl.dist
deleted file mode 100644
index bd846dee..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_clone.tpl.dist
+++ /dev/null
@@ -1,4 +0,0 @@
- public function __clone()
- {
- $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
- }
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_method.tpl.dist b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_method.tpl.dist
deleted file mode 100644
index e2f55d9f..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_method.tpl.dist
+++ /dev/null
@@ -1,22 +0,0 @@
-
- {modifier} function {reference}{method_name}({arguments_decl})
- {
- $arguments = array({arguments_call});
- $count = func_num_args();
-
- if ($count > {arguments_count}) {
- $_arguments = func_get_args();
-
- for ($i = {arguments_count}; $i < $count; $i++) {
- $arguments[] = $_arguments[$i];
- }
- }
-
- $result = $this->__phpunit_getInvocationMocker()->invoke(
- new PHPUnit_Framework_MockObject_Invocation_Object(
- '{class_name}', '{method_name}', $arguments, $this, {clone_arguments}
- )
- );
-
- return $result;
- }
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_static_method.tpl.dist b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_static_method.tpl.dist
deleted file mode 100644
index 5454b2f3..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_static_method.tpl.dist
+++ /dev/null
@@ -1,5 +0,0 @@
-
- {modifier} function {reference}{method_name}({arguments_decl})
- {
- throw new PHPUnit_Framework_MockObject_BadMethodCallException;
- }
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/proxied_method.tpl.dist b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/proxied_method.tpl.dist
deleted file mode 100644
index 15e89bd6..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/proxied_method.tpl.dist
+++ /dev/null
@@ -1,22 +0,0 @@
-
- {modifier} function {reference}{method_name}({arguments_decl})
- {
- $arguments = array({arguments_call});
- $count = func_num_args();
-
- if ($count > {arguments_count}) {
- $_arguments = func_get_args();
-
- for ($i = {arguments_count}; $i < $count; $i++) {
- $arguments[] = $_arguments[$i];
- }
- }
-
- $this->__phpunit_getInvocationMocker()->invoke(
- new PHPUnit_Framework_MockObject_Invocation_Object(
- '{class_name}', '{method_name}', $arguments, $this, {clone_arguments}
- )
- );
-
- return call_user_func_array(array($this->__phpunit_originalObject, "{method_name}"), $arguments);
- }
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/trait_class.tpl.dist b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/trait_class.tpl.dist
deleted file mode 100644
index 4143b0f6..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/trait_class.tpl.dist
+++ /dev/null
@@ -1,4 +0,0 @@
-{prologue}class {class_name}
-{
- use {trait_name};
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/unmocked_clone.tpl.dist b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/unmocked_clone.tpl.dist
deleted file mode 100644
index fa0e70ab..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/unmocked_clone.tpl.dist
+++ /dev/null
@@ -1,5 +0,0 @@
- public function __clone()
- {
- $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
- parent::__clone();
- }
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/wsdl_class.tpl.dist b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/wsdl_class.tpl.dist
deleted file mode 100644
index cc69fd34..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/wsdl_class.tpl.dist
+++ /dev/null
@@ -1,7 +0,0 @@
-{namespace}class {class_name} extends \SoapClient
-{
- public function __construct($wsdl, array $options)
- {
- parent::__construct('{wsdl}', $options);
- }
-{methods}}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/wsdl_method.tpl.dist b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/wsdl_method.tpl.dist
deleted file mode 100644
index bb16e763..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/wsdl_method.tpl.dist
+++ /dev/null
@@ -1,4 +0,0 @@
-
- public function {method_name}({arguments})
- {
- }
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation.php
deleted file mode 100644
index 055707d5..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation.php
+++ /dev/null
@@ -1,18 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Interface for invocations.
- *
- * @since Interface available since Release 1.0.0
- */
-interface PHPUnit_Framework_MockObject_Invocation
-{
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Object.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Object.php
deleted file mode 100644
index 575c13cd..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Object.php
+++ /dev/null
@@ -1,35 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Represents a non-static invocation.
- *
- * @since Class available since Release 1.0.0
- */
-class PHPUnit_Framework_MockObject_Invocation_Object extends PHPUnit_Framework_MockObject_Invocation_Static
-{
- /**
- * @var object
- */
- public $object;
-
- /**
- * @param string $className
- * @param string $methodname
- * @param array $parameters
- * @param object $object
- * @param object $cloneObjects
- */
- public function __construct($className, $methodName, array $parameters, $object, $cloneObjects = false)
- {
- parent::__construct($className, $methodName, $parameters, $cloneObjects);
- $this->object = $object;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Static.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Static.php
deleted file mode 100644
index 3d295e59..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Static.php
+++ /dev/null
@@ -1,152 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-use SebastianBergmann\Exporter\Exporter;
-
-/**
- * Represents a static invocation.
- *
- * @since Class available since Release 1.0.0
- */
-class PHPUnit_Framework_MockObject_Invocation_Static implements PHPUnit_Framework_MockObject_Invocation, PHPUnit_Framework_SelfDescribing
-{
- /**
- * @var array
- */
- protected static $uncloneableExtensions = array(
- 'mysqli' => true,
- 'SQLite' => true,
- 'sqlite3' => true,
- 'tidy' => true,
- 'xmlwriter' => true,
- 'xsl' => true
- );
-
- /**
- * @var array
- */
- protected static $uncloneableClasses = array(
- 'Closure',
- 'COMPersistHelper',
- 'IteratorIterator',
- 'RecursiveIteratorIterator',
- 'SplFileObject',
- 'PDORow',
- 'ZipArchive'
- );
-
- /**
- * @var string
- */
- public $className;
-
- /**
- * @var string
- */
- public $methodName;
-
- /**
- * @var array
- */
- public $parameters;
-
- /**
- * @param string $className
- * @param string $methodname
- * @param array $parameters
- * @param bool $cloneObjects
- */
- public function __construct($className, $methodName, array $parameters, $cloneObjects = false)
- {
- $this->className = $className;
- $this->methodName = $methodName;
- $this->parameters = $parameters;
-
- if (!$cloneObjects) {
- return;
- }
-
- foreach ($this->parameters as $key => $value) {
- if (is_object($value)) {
- $this->parameters[$key] = $this->cloneObject($value);
- }
- }
- }
-
- /**
- * @return string
- */
- public function toString()
- {
- $exporter = new Exporter;
-
- return sprintf(
- '%s::%s(%s)',
- $this->className,
- $this->methodName,
- implode(
- ', ',
- array_map(
- array($exporter, 'shortenedExport'),
- $this->parameters
- )
- )
- );
- }
-
- /**
- * @param object $original
- * @return object
- */
- protected function cloneObject($original)
- {
- $cloneable = null;
- $object = new ReflectionObject($original);
-
- // Check the blacklist before asking PHP reflection to work around
- // https://bugs.php.net/bug.php?id=53967
- if ($object->isInternal() &&
- isset(self::$uncloneableExtensions[$object->getExtensionName()])) {
- $cloneable = false;
- }
-
- if ($cloneable === null) {
- foreach (self::$uncloneableClasses as $class) {
- if ($original instanceof $class) {
- $cloneable = false;
- break;
- }
- }
- }
-
- if ($cloneable === null && method_exists($object, 'isCloneable')) {
- $cloneable = $object->isCloneable();
- }
-
- if ($cloneable === null && $object->hasMethod('__clone')) {
- $method = $object->getMethod('__clone');
- $cloneable = $method->isPublic();
- }
-
- if ($cloneable === null) {
- $cloneable = true;
- }
-
- if ($cloneable) {
- try {
- return clone $original;
- } catch (Exception $e) {
- return $original;
- }
- } else {
- return $original;
- }
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/InvocationMocker.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/InvocationMocker.php
deleted file mode 100644
index 4bec5d62..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/InvocationMocker.php
+++ /dev/null
@@ -1,156 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Mocker for invocations which are sent from
- * PHPUnit_Framework_MockObject_MockObject objects.
- *
- * Keeps track of all expectations and stubs as well as registering
- * identifications for builders.
- *
- * @since Class available since Release 1.0.0
- */
-class PHPUnit_Framework_MockObject_InvocationMocker implements PHPUnit_Framework_MockObject_Stub_MatcherCollection, PHPUnit_Framework_MockObject_Invokable, PHPUnit_Framework_MockObject_Builder_Namespace
-{
- /**
- * @var PHPUnit_Framework_MockObject_Matcher_Invocation[]
- */
- protected $matchers = array();
-
- /**
- * @var PHPUnit_Framework_MockObject_Builder_Match[]
- */
- protected $builderMap = array();
-
- /**
- * @param PHPUnit_Framework_MockObject_Matcher_Invocation $matcher
- */
- public function addMatcher(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
- {
- $this->matchers[] = $matcher;
- }
-
- /**
- * @since Method available since Release 1.1.0
- */
- public function hasMatchers()
- {
- foreach ($this->matchers as $matcher) {
- if ($matcher->hasMatchers()) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * @param mixed $id
- * @return bool|null
- */
- public function lookupId($id)
- {
- if (isset($this->builderMap[$id])) {
- return $this->builderMap[$id];
- }
-
- return;
- }
-
- /**
- * @param mixed $id
- * @param PHPUnit_Framework_MockObject_Builder_Match $builder
- * @throws PHPUnit_Framework_Exception
- */
- public function registerId($id, PHPUnit_Framework_MockObject_Builder_Match $builder)
- {
- if (isset($this->builderMap[$id])) {
- throw new PHPUnit_Framework_Exception(
- 'Match builder with id <' . $id . '> is already registered.'
- );
- }
-
- $this->builderMap[$id] = $builder;
- }
-
- /**
- * @param PHPUnit_Framework_MockObject_Matcher_Invocation $matcher
- * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker
- */
- public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
- {
- return new PHPUnit_Framework_MockObject_Builder_InvocationMocker(
- $this,
- $matcher
- );
- }
-
- /**
- * @param PHPUnit_Framework_MockObject_Invocation $invocation
- * @return mixed
- */
- public function invoke(PHPUnit_Framework_MockObject_Invocation $invocation)
- {
- $exception = null;
- $hasReturnValue = false;
-
- if (strtolower($invocation->methodName) == '__tostring') {
- $returnValue = '';
- } else {
- $returnValue = null;
- }
-
- foreach ($this->matchers as $match) {
- try {
- if ($match->matches($invocation)) {
- $value = $match->invoked($invocation);
-
- if (!$hasReturnValue) {
- $returnValue = $value;
- $hasReturnValue = true;
- }
- }
- } catch (Exception $e) {
- $exception = $e;
- }
- }
-
- if ($exception !== null) {
- throw $exception;
- }
-
- return $returnValue;
- }
-
- /**
- * @param PHPUnit_Framework_MockObject_Invocation $invocation
- * @return bool
- */
- public function matches(PHPUnit_Framework_MockObject_Invocation $invocation)
- {
- foreach ($this->matchers as $matcher) {
- if (!$matcher->matches($invocation)) {
- return false;
- }
- }
-
- return true;
- }
-
- /**
- * @return bool
- */
- public function verify()
- {
- foreach ($this->matchers as $matcher) {
- $matcher->verify();
- }
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invokable.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invokable.php
deleted file mode 100644
index b5699a0d..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invokable.php
+++ /dev/null
@@ -1,39 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Interface for classes which can be invoked.
- *
- * The invocation will be taken from a mock object and passed to an object
- * of this class.
- *
- * @since Interface available since Release 1.0.0
- */
-interface PHPUnit_Framework_MockObject_Invokable extends PHPUnit_Framework_MockObject_Verifiable
-{
- /**
- * Invokes the invocation object $invocation so that it can be checked for
- * expectations or matched against stubs.
- *
- * @param PHPUnit_Framework_MockObject_Invocation $invocation
- * The invocation object passed from mock object.
- * @return object
- */
- public function invoke(PHPUnit_Framework_MockObject_Invocation $invocation);
-
- /**
- * Checks if the invocation matches.
- *
- * @param PHPUnit_Framework_MockObject_Invocation $invocation
- * The invocation object passed from mock object.
- * @return bool
- */
- public function matches(PHPUnit_Framework_MockObject_Invocation $invocation);
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher.php
deleted file mode 100644
index da3bcde9..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher.php
+++ /dev/null
@@ -1,271 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Main matcher which defines a full expectation using method, parameter and
- * invocation matchers.
- * This matcher encapsulates all the other matchers and allows the builder to
- * set the specific matchers when the appropriate methods are called (once(),
- * where() etc.).
- *
- * All properties are public so that they can easily be accessed by the builder.
- *
- * @since Class available since Release 1.0.0
- */
-class PHPUnit_Framework_MockObject_Matcher implements PHPUnit_Framework_MockObject_Matcher_Invocation
-{
- /**
- * @var PHPUnit_Framework_MockObject_Matcher_Invocation
- */
- public $invocationMatcher;
-
- /**
- * @var mixed
- */
- public $afterMatchBuilderId = null;
-
- /**
- * @var bool
- */
- public $afterMatchBuilderIsInvoked = false;
-
- /**
- * @var PHPUnit_Framework_MockObject_Matcher_MethodName
- */
- public $methodNameMatcher = null;
-
- /**
- * @var PHPUnit_Framework_MockObject_Matcher_Parameters
- */
- public $parametersMatcher = null;
-
- /**
- * @var PHPUnit_Framework_MockObject_Stub
- */
- public $stub = null;
-
- /**
- * @param PHPUnit_Framework_MockObject_Matcher_Invocation $invocationMatcher
- */
- public function __construct(PHPUnit_Framework_MockObject_Matcher_Invocation $invocationMatcher)
- {
- $this->invocationMatcher = $invocationMatcher;
- }
-
- /**
- * @return string
- */
- public function toString()
- {
- $list = array();
-
- if ($this->invocationMatcher !== null) {
- $list[] = $this->invocationMatcher->toString();
- }
-
- if ($this->methodNameMatcher !== null) {
- $list[] = 'where ' . $this->methodNameMatcher->toString();
- }
-
- if ($this->parametersMatcher !== null) {
- $list[] = 'and ' . $this->parametersMatcher->toString();
- }
-
- if ($this->afterMatchBuilderId !== null) {
- $list[] = 'after ' . $this->afterMatchBuilderId;
- }
-
- if ($this->stub !== null) {
- $list[] = 'will ' . $this->stub->toString();
- }
-
- return implode(' ', $list);
- }
-
- /**
- * @param PHPUnit_Framework_MockObject_Invocation $invocation
- * @return mixed
- */
- public function invoked(PHPUnit_Framework_MockObject_Invocation $invocation)
- {
- if ($this->invocationMatcher === null) {
- throw new PHPUnit_Framework_Exception(
- 'No invocation matcher is set'
- );
- }
-
- if ($this->methodNameMatcher === null) {
- throw new PHPUnit_Framework_Exception('No method matcher is set');
- }
-
- if ($this->afterMatchBuilderId !== null) {
- $builder = $invocation->object
- ->__phpunit_getInvocationMocker()
- ->lookupId($this->afterMatchBuilderId);
-
- if (!$builder) {
- throw new PHPUnit_Framework_Exception(
- sprintf(
- 'No builder found for match builder identification <%s>',
- $this->afterMatchBuilderId
- )
- );
- }
-
- $matcher = $builder->getMatcher();
-
- if ($matcher && $matcher->invocationMatcher->hasBeenInvoked()) {
- $this->afterMatchBuilderIsInvoked = true;
- }
- }
-
- $this->invocationMatcher->invoked($invocation);
-
- try {
- if ($this->parametersMatcher !== null &&
- !$this->parametersMatcher->matches($invocation)) {
- $this->parametersMatcher->verify();
- }
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- throw new PHPUnit_Framework_ExpectationFailedException(
- sprintf(
- "Expectation failed for %s when %s\n%s",
- $this->methodNameMatcher->toString(),
- $this->invocationMatcher->toString(),
- $e->getMessage()
- ),
- $e->getComparisonFailure()
- );
- }
-
- if ($this->stub) {
- return $this->stub->invoke($invocation);
- }
-
- return;
- }
-
- /**
- * @param PHPUnit_Framework_MockObject_Invocation $invocation
- * @return bool
- */
- public function matches(PHPUnit_Framework_MockObject_Invocation $invocation)
- {
- if ($this->afterMatchBuilderId !== null) {
- $builder = $invocation->object
- ->__phpunit_getInvocationMocker()
- ->lookupId($this->afterMatchBuilderId);
-
- if (!$builder) {
- throw new PHPUnit_Framework_Exception(
- sprintf(
- 'No builder found for match builder identification <%s>',
- $this->afterMatchBuilderId
- )
- );
- }
-
- $matcher = $builder->getMatcher();
-
- if (!$matcher) {
- return false;
- }
-
- if (!$matcher->invocationMatcher->hasBeenInvoked()) {
- return false;
- }
- }
-
- if ($this->invocationMatcher === null) {
- throw new PHPUnit_Framework_Exception(
- 'No invocation matcher is set'
- );
- }
-
- if ($this->methodNameMatcher === null) {
- throw new PHPUnit_Framework_Exception('No method matcher is set');
- }
-
- if (!$this->invocationMatcher->matches($invocation)) {
- return false;
- }
-
- try {
- if (!$this->methodNameMatcher->matches($invocation)) {
- return false;
- }
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- throw new PHPUnit_Framework_ExpectationFailedException(
- sprintf(
- "Expectation failed for %s when %s\n%s",
- $this->methodNameMatcher->toString(),
- $this->invocationMatcher->toString(),
- $e->getMessage()
- ),
- $e->getComparisonFailure()
- );
- }
-
- return true;
- }
-
- /**
- * @throws PHPUnit_Framework_Exception
- * @throws PHPUnit_Framework_ExpectationFailedException
- */
- public function verify()
- {
- if ($this->invocationMatcher === null) {
- throw new PHPUnit_Framework_Exception(
- 'No invocation matcher is set'
- );
- }
-
- if ($this->methodNameMatcher === null) {
- throw new PHPUnit_Framework_Exception('No method matcher is set');
- }
-
- try {
- $this->invocationMatcher->verify();
-
- if ($this->parametersMatcher === null) {
- $this->parametersMatcher = new PHPUnit_Framework_MockObject_Matcher_AnyParameters;
- }
-
- $invocationIsAny = get_class($this->invocationMatcher) === 'PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount';
- $invocationIsNever = get_class($this->invocationMatcher) === 'PHPUnit_Framework_MockObject_Matcher_InvokedCount' && $this->invocationMatcher->isNever();
- if (!$invocationIsAny && !$invocationIsNever) {
- $this->parametersMatcher->verify();
- }
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- throw new PHPUnit_Framework_ExpectationFailedException(
- sprintf(
- "Expectation failed for %s when %s.\n%s",
- $this->methodNameMatcher->toString(),
- $this->invocationMatcher->toString(),
- PHPUnit_Framework_TestFailure::exceptionToString($e)
- )
- );
- }
- }
-
- /**
- * @since Method available since Release 1.2.4
- */
- public function hasMatchers()
- {
- if ($this->invocationMatcher !== null &&
- !$this->invocationMatcher instanceof PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount) {
- return true;
- }
-
- return false;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyInvokedCount.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyInvokedCount.php
deleted file mode 100644
index 480f1fd1..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyInvokedCount.php
+++ /dev/null
@@ -1,32 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Invocation matcher which checks if a method has been invoked zero or more
- * times. This matcher will always match.
- *
- * @since Class available since Release 1.0.0
- */
-class PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount extends PHPUnit_Framework_MockObject_Matcher_InvokedRecorder
-{
- /**
- * @return string
- */
- public function toString()
- {
- return 'invoked zero or more times';
- }
-
- /**
- */
- public function verify()
- {
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyParameters.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyParameters.php
deleted file mode 100644
index 482a14f5..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyParameters.php
+++ /dev/null
@@ -1,34 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Invocation matcher which allows any parameters to a method.
- *
- * @since Class available since Release 1.0.0
- */
-class PHPUnit_Framework_MockObject_Matcher_AnyParameters extends PHPUnit_Framework_MockObject_Matcher_StatelessInvocation
-{
- /**
- * @return string
- */
- public function toString()
- {
- return 'with any parameters';
- }
-
- /**
- * @param PHPUnit_Framework_MockObject_Invocation $invocation
- * @return bool
- */
- public function matches(PHPUnit_Framework_MockObject_Invocation $invocation)
- {
- return true;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php
deleted file mode 100644
index adf74bb4..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php
+++ /dev/null
@@ -1,123 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Invocation matcher which looks for sets of specific parameters in the invocations.
- *
- * Checks the parameters of the incoming invocations, the parameter list is
- * checked against the defined constraints in $parameters. If the constraint
- * is met it will return true in matches().
- *
- * It takes a list of match groups and and increases a call index after each invocation.
- * So the first invocation uses the first group of constraints, the second the next and so on.
- */
-class PHPUnit_Framework_MockObject_Matcher_ConsecutiveParameters extends PHPUnit_Framework_MockObject_Matcher_StatelessInvocation
-{
- /**
- * @var array
- */
- private $_parameterGroups = array();
-
- /**
- * @var array
- */
- private $_invocations = array();
-
- /**
- * @param array $parameterGroups
- */
- public function __construct(array $parameterGroups)
- {
- foreach ($parameterGroups as $index => $parameters) {
- foreach ($parameters as $parameter) {
- if (!($parameter instanceof \PHPUnit_Framework_Constraint)) {
- $parameter = new \PHPUnit_Framework_Constraint_IsEqual($parameter);
- }
- $this->_parameterGroups[$index][] = $parameter;
- }
- }
- }
-
- /**
- * @return string
- */
- public function toString()
- {
- $text = 'with consecutive parameters';
-
- return $text;
- }
-
- /**
- * @param PHPUnit_Framework_MockObject_Invocation $invocation
- * @return bool
- */
- public function matches(PHPUnit_Framework_MockObject_Invocation $invocation)
- {
- $this->_invocations[] = $invocation;
- $callIndex = count($this->_invocations) - 1;
- $this->verifyInvocation($invocation, $callIndex);
-
- return false;
- }
-
- public function verify()
- {
- foreach ($this->_invocations as $callIndex => $invocation) {
- $this->verifyInvocation($invocation, $callIndex);
- }
- }
-
- /**
- * Verify a single invocation
- *
- * @param PHPUnit_Framework_MockObject_Invocation $invocation
- * @param int $callIndex
- * @throws PHPUnit_Framework_ExpectationFailedException
- */
- private function verifyInvocation(PHPUnit_Framework_MockObject_Invocation $invocation, $callIndex)
- {
-
- if (isset($this->_parameterGroups[$callIndex])) {
- $parameters = $this->_parameterGroups[$callIndex];
- } else {
- // no parameter assertion for this call index
- return;
- }
-
- if ($invocation === null) {
- throw new PHPUnit_Framework_ExpectationFailedException(
- 'Mocked method does not exist.'
- );
- }
-
- if (count($invocation->parameters) < count($parameters)) {
- throw new PHPUnit_Framework_ExpectationFailedException(
- sprintf(
- 'Parameter count for invocation %s is too low.',
- $invocation->toString()
- )
- );
- }
-
- foreach ($parameters as $i => $parameter) {
- $parameter->evaluate(
- $invocation->parameters[$i],
- sprintf(
- 'Parameter %s for invocation #%d %s does not match expected ' .
- 'value.',
- $i,
- $callIndex,
- $invocation->toString()
- )
- );
- }
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Invocation.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Invocation.php
deleted file mode 100644
index cbe428cb..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Invocation.php
+++ /dev/null
@@ -1,48 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Interface for classes which matches an invocation based on its
- * method name, argument, order or call count.
- *
- * @since Interface available since Release 1.0.0
- */
-interface PHPUnit_Framework_MockObject_Matcher_Invocation extends PHPUnit_Framework_SelfDescribing, PHPUnit_Framework_MockObject_Verifiable
-{
- /**
- * Registers the invocation $invocation in the object as being invoked.
- * This will only occur after matches() returns true which means the
- * current invocation is the correct one.
- *
- * The matcher can store information from the invocation which can later
- * be checked in verify(), or it can check the values directly and throw
- * and exception if an expectation is not met.
- *
- * If the matcher is a stub it will also have a return value.
- *
- * @param PHPUnit_Framework_MockObject_Invocation $invocation
- * Object containing information on a mocked or stubbed method which
- * was invoked.
- * @return mixed
- */
- public function invoked(PHPUnit_Framework_MockObject_Invocation $invocation);
-
- /**
- * Checks if the invocation $invocation matches the current rules. If it does
- * the matcher will get the invoked() method called which should check if an
- * expectation is met.
- *
- * @param PHPUnit_Framework_MockObject_Invocation $invocation
- * Object containing information on a mocked or stubbed method which
- * was invoked.
- * @return bool
- */
- public function matches(PHPUnit_Framework_MockObject_Invocation $invocation);
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtIndex.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtIndex.php
deleted file mode 100644
index 1b170894..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtIndex.php
+++ /dev/null
@@ -1,86 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Invocation matcher which checks if a method was invoked at a certain index.
- *
- * If the expected index number does not match the current invocation index it
- * will not match which means it skips all method and parameter matching. Only
- * once the index is reached will the method and parameter start matching and
- * verifying.
- *
- * If the index is never reached it will throw an exception in index.
- *
- * @since Class available since Release 1.0.0
- */
-class PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex implements PHPUnit_Framework_MockObject_Matcher_Invocation
-{
- /**
- * @var int
- */
- protected $sequenceIndex;
-
- /**
- * @var int
- */
- protected $currentIndex = -1;
-
- /**
- * @param int $sequenceIndex
- */
- public function __construct($sequenceIndex)
- {
- $this->sequenceIndex = $sequenceIndex;
- }
-
- /**
- * @return string
- */
- public function toString()
- {
- return 'invoked at sequence index ' . $this->sequenceIndex;
- }
-
- /**
- * @param PHPUnit_Framework_MockObject_Invocation $invocation
- * @return bool
- */
- public function matches(PHPUnit_Framework_MockObject_Invocation $invocation)
- {
- $this->currentIndex++;
-
- return $this->currentIndex == $this->sequenceIndex;
- }
-
- /**
- * @param PHPUnit_Framework_MockObject_Invocation $invocation
- */
- public function invoked(PHPUnit_Framework_MockObject_Invocation $invocation)
- {
- }
-
- /**
- * Verifies that the current expectation is valid. If everything is OK the
- * code should just return, if not it must throw an exception.
- *
- * @throws PHPUnit_Framework_ExpectationFailedException
- */
- public function verify()
- {
- if ($this->currentIndex < $this->sequenceIndex) {
- throw new PHPUnit_Framework_ExpectationFailedException(
- sprintf(
- 'The expected invocation at index %s was never reached.',
- $this->sequenceIndex
- )
- );
- }
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastCount.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastCount.php
deleted file mode 100644
index 23bf05b4..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastCount.php
+++ /dev/null
@@ -1,57 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Invocation matcher which checks if a method has been invoked at least
- * N times.
- *
- * @since Class available since Release 2.2.0
- */
-class PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastCount extends PHPUnit_Framework_MockObject_Matcher_InvokedRecorder
-{
- /**
- * @var int
- */
- private $requiredInvocations;
-
- /**
- * @param int $requiredInvocations
- */
- public function __construct($requiredInvocations)
- {
- $this->requiredInvocations = $requiredInvocations;
- }
-
- /**
- * @return string
- */
- public function toString()
- {
- return 'invoked at least ' . $this->requiredInvocations . ' times';
- }
-
- /**
- * Verifies that the current expectation is valid. If everything is OK the
- * code should just return, if not it must throw an exception.
- *
- * @throws PHPUnit_Framework_ExpectationFailedException
- */
- public function verify()
- {
- $count = $this->getInvocationCount();
-
- if ($count < $this->requiredInvocations) {
- throw new PHPUnit_Framework_ExpectationFailedException(
- 'Expected invocation at least ' . $this->requiredInvocations .
- ' times but it occured ' . $count . ' time(s).'
- );
- }
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastOnce.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastOnce.php
deleted file mode 100644
index 4df2dd1b..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastOnce.php
+++ /dev/null
@@ -1,45 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Invocation matcher which checks if a method has been invoked at least one
- * time.
- *
- * If the number of invocations is 0 it will throw an exception in verify.
- *
- * @since Class available since Release 1.0.0
- */
-class PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastOnce extends PHPUnit_Framework_MockObject_Matcher_InvokedRecorder
-{
- /**
- * @return string
- */
- public function toString()
- {
- return 'invoked at least once';
- }
-
- /**
- * Verifies that the current expectation is valid. If everything is OK the
- * code should just return, if not it must throw an exception.
- *
- * @throws PHPUnit_Framework_ExpectationFailedException
- */
- public function verify()
- {
- $count = $this->getInvocationCount();
-
- if ($count < 1) {
- throw new PHPUnit_Framework_ExpectationFailedException(
- 'Expected invocation at least once but it never occured.'
- );
- }
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtMostCount.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtMostCount.php
deleted file mode 100644
index df9f124a..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtMostCount.php
+++ /dev/null
@@ -1,57 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Invocation matcher which checks if a method has been invoked at least
- * N times.
- *
- * @since Class available since Release 2.2.0
- */
-class PHPUnit_Framework_MockObject_Matcher_InvokedAtMostCount extends PHPUnit_Framework_MockObject_Matcher_InvokedRecorder
-{
- /**
- * @var int
- */
- private $allowedInvocations;
-
- /**
- * @param int $allowedInvocations
- */
- public function __construct($allowedInvocations)
- {
- $this->allowedInvocations = $allowedInvocations;
- }
-
- /**
- * @return string
- */
- public function toString()
- {
- return 'invoked at most ' . $this->allowedInvocations . ' times';
- }
-
- /**
- * Verifies that the current expectation is valid. If everything is OK the
- * code should just return, if not it must throw an exception.
- *
- * @throws PHPUnit_Framework_ExpectationFailedException
- */
- public function verify()
- {
- $count = $this->getInvocationCount();
-
- if ($count > $this->allowedInvocations) {
- throw new PHPUnit_Framework_ExpectationFailedException(
- 'Expected invocation at most ' . $this->allowedInvocations .
- ' times but it occured ' . $count . ' time(s).'
- );
- }
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedCount.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedCount.php
deleted file mode 100644
index d87dd356..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedCount.php
+++ /dev/null
@@ -1,109 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Invocation matcher which checks if a method has been invoked a certain amount
- * of times.
- * If the number of invocations exceeds the value it will immediately throw an
- * exception,
- * If the number is less it will later be checked in verify() and also throw an
- * exception.
- *
- * @since Class available since Release 1.0.0
- */
-class PHPUnit_Framework_MockObject_Matcher_InvokedCount extends PHPUnit_Framework_MockObject_Matcher_InvokedRecorder
-{
- /**
- * @var int
- */
- protected $expectedCount;
-
- /**
- * @param int $expectedCount
- */
- public function __construct($expectedCount)
- {
- $this->expectedCount = $expectedCount;
- }
-
- /**
- * @return bool
- */
- public function isNever()
- {
- return $this->expectedCount == 0;
- }
-
- /**
- * @return string
- */
- public function toString()
- {
- return 'invoked ' . $this->expectedCount . ' time(s)';
- }
-
- /**
- * @param PHPUnit_Framework_MockObject_Invocation $invocation
- * @throws PHPUnit_Framework_ExpectationFailedException
- */
- public function invoked(PHPUnit_Framework_MockObject_Invocation $invocation)
- {
- parent::invoked($invocation);
-
- $count = $this->getInvocationCount();
-
- if ($count > $this->expectedCount) {
- $message = $invocation->toString() . ' ';
-
- switch ($this->expectedCount) {
- case 0: {
- $message .= 'was not expected to be called.';
- }
- break;
-
- case 1: {
- $message .= 'was not expected to be called more than once.';
- }
- break;
-
- default: {
- $message .= sprintf(
- 'was not expected to be called more than %d times.',
- $this->expectedCount
- );
- }
- }
-
- throw new PHPUnit_Framework_ExpectationFailedException($message);
- }
- }
-
- /**
- * Verifies that the current expectation is valid. If everything is OK the
- * code should just return, if not it must throw an exception.
- *
- * @throws PHPUnit_Framework_ExpectationFailedException
- */
- public function verify()
- {
- $count = $this->getInvocationCount();
-
- if ($count !== $this->expectedCount) {
- throw new PHPUnit_Framework_ExpectationFailedException(
- sprintf(
- 'Method was expected to be called %d times, ' .
- 'actually called %d times.',
- $this->expectedCount,
- $count
- )
- );
- }
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedRecorder.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedRecorder.php
deleted file mode 100644
index d652f2d6..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedRecorder.php
+++ /dev/null
@@ -1,67 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Records invocations and provides convenience methods for checking them later
- * on.
- * This abstract class can be implemented by matchers which needs to check the
- * number of times an invocation has occured.
- *
- * @since Class available since Release 1.0.0
- * @abstract
- */
-abstract class PHPUnit_Framework_MockObject_Matcher_InvokedRecorder implements PHPUnit_Framework_MockObject_Matcher_Invocation
-{
- /**
- * @var PHPUnit_Framework_MockObject_Invocation[]
- */
- protected $invocations = array();
-
- /**
- * @return int
- */
- public function getInvocationCount()
- {
- return count($this->invocations);
- }
-
- /**
- * @return PHPUnit_Framework_MockObject_Invocation[]
- */
- public function getInvocations()
- {
- return $this->invocations;
- }
-
- /**
- * @return bool
- */
- public function hasBeenInvoked()
- {
- return count($this->invocations) > 0;
- }
-
- /**
- * @param PHPUnit_Framework_MockObject_Invocation $invocation
- */
- public function invoked(PHPUnit_Framework_MockObject_Invocation $invocation)
- {
- $this->invocations[] = $invocation;
- }
-
- /**
- * @param PHPUnit_Framework_MockObject_Invocation $invocation
- * @return bool
- */
- public function matches(PHPUnit_Framework_MockObject_Invocation $invocation)
- {
- return true;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/MethodName.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/MethodName.php
deleted file mode 100644
index 1e32c7be..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/MethodName.php
+++ /dev/null
@@ -1,66 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Invocation matcher which looks for a specific method name in the invocations.
- *
- * Checks the method name all incoming invocations, the name is checked against
- * the defined constraint $constraint. If the constraint is met it will return
- * true in matches().
- *
- * @since Class available since Release 1.0.0
- */
-class PHPUnit_Framework_MockObject_Matcher_MethodName extends PHPUnit_Framework_MockObject_Matcher_StatelessInvocation
-{
- /**
- * @var PHPUnit_Framework_Constraint
- */
- protected $constraint;
-
- /**
- * @param PHPUnit_Framework_Constraint|string
- * @throws PHPUnit_Framework_Constraint
- */
- public function __construct($constraint)
- {
- if (!$constraint instanceof PHPUnit_Framework_Constraint) {
- if (!is_string($constraint)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
- }
-
- $constraint = new PHPUnit_Framework_Constraint_IsEqual(
- $constraint,
- 0,
- 10,
- false,
- true
- );
- }
-
- $this->constraint = $constraint;
- }
-
- /**
- * @return string
- */
- public function toString()
- {
- return 'method name ' . $this->constraint->toString();
- }
-
- /**
- * @param PHPUnit_Framework_MockObject_Invocation $invocation
- * @return bool
- */
- public function matches(PHPUnit_Framework_MockObject_Invocation $invocation)
- {
- return $this->constraint->evaluate($invocation->methodName, '', true);
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php
deleted file mode 100644
index cd8aa85f..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php
+++ /dev/null
@@ -1,127 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Invocation matcher which looks for specific parameters in the invocations.
- *
- * Checks the parameters of all incoming invocations, the parameter list is
- * checked against the defined constraints in $parameters. If the constraint
- * is met it will return true in matches().
- *
- * @since Class available since Release 1.0.0
- */
-class PHPUnit_Framework_MockObject_Matcher_Parameters extends PHPUnit_Framework_MockObject_Matcher_StatelessInvocation
-{
- /**
- * @var PHPUnit_Framework_Constraint[]
- */
- protected $parameters = array();
-
- /**
- * @var PHPUnit_Framework_MockObject_Invocation
- */
- protected $invocation;
-
- /**
- * @param array $parameters
- */
- public function __construct(array $parameters)
- {
- foreach ($parameters as $parameter) {
- if (!($parameter instanceof PHPUnit_Framework_Constraint)) {
- $parameter = new PHPUnit_Framework_Constraint_IsEqual(
- $parameter
- );
- }
-
- $this->parameters[] = $parameter;
- }
- }
-
- /**
- * @return string
- */
- public function toString()
- {
- $text = 'with parameter';
-
- foreach ($this->parameters as $index => $parameter) {
- if ($index > 0) {
- $text .= ' and';
- }
-
- $text .= ' ' . $index . ' ' . $parameter->toString();
- }
-
- return $text;
- }
-
- /**
- * @param PHPUnit_Framework_MockObject_Invocation $invocation
- * @return bool
- */
- public function matches(PHPUnit_Framework_MockObject_Invocation $invocation)
- {
- $this->invocation = $invocation;
-
- return $this->verify();
- }
-
- /**
- * Checks if the invocation $invocation matches the current rules. If it
- * does the matcher will get the invoked() method called which should check
- * if an expectation is met.
- *
- * @param PHPUnit_Framework_MockObject_Invocation $invocation
- * Object containing information on a mocked or stubbed method which
- * was invoked.
- * @return bool
- * @throws PHPUnit_Framework_ExpectationFailedException
- */
- public function verify()
- {
- if ($this->invocation === null) {
- throw new PHPUnit_Framework_ExpectationFailedException(
- 'Mocked method does not exist.'
- );
- }
-
- if (count($this->invocation->parameters) < count($this->parameters)) {
- $message = 'Parameter count for invocation %s is too low.';
-
- // The user called `->with($this->anything())`, but may have meant
- // `->withAnyParameters()`.
- //
- // @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/199
- if (count($this->parameters) === 1 &&
- get_class($this->parameters[0]) === 'PHPUnit_Framework_Constraint_IsAnything') {
- $message .= "\nTo allow 0 or more parameters with any value, omit ->with() or use ->withAnyParameters() instead.";
- }
-
- throw new PHPUnit_Framework_ExpectationFailedException(
- sprintf($message, $this->invocation->toString())
- );
- }
-
- foreach ($this->parameters as $i => $parameter) {
- $parameter->evaluate(
- $this->invocation->parameters[$i],
- sprintf(
- 'Parameter %s for invocation %s does not match expected ' .
- 'value.',
- $i,
- $this->invocation->toString()
- )
- );
- }
-
- return true;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/StatelessInvocation.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/StatelessInvocation.php
deleted file mode 100644
index c2e263a8..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/StatelessInvocation.php
+++ /dev/null
@@ -1,56 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Invocation matcher which does not care about previous state from earlier
- * invocations.
- *
- * This abstract class can be implemented by matchers which does not care about
- * state but only the current run-time value of the invocation itself.
- *
- * @since Class available since Release 1.0.0
- * @abstract
- */
-abstract class PHPUnit_Framework_MockObject_Matcher_StatelessInvocation implements PHPUnit_Framework_MockObject_Matcher_Invocation
-{
- /**
- * Registers the invocation $invocation in the object as being invoked.
- * This will only occur after matches() returns true which means the
- * current invocation is the correct one.
- *
- * The matcher can store information from the invocation which can later
- * be checked in verify(), or it can check the values directly and throw
- * and exception if an expectation is not met.
- *
- * If the matcher is a stub it will also have a return value.
- *
- * @param PHPUnit_Framework_MockObject_Invocation $invocation
- * Object containing information on a mocked or stubbed method which
- * was invoked.
- * @return mixed
- */
- public function invoked(PHPUnit_Framework_MockObject_Invocation $invocation)
- {
- }
-
- /**
- * Checks if the invocation $invocation matches the current rules. If it does
- * the matcher will get the invoked() method called which should check if an
- * expectation is met.
- *
- * @param PHPUnit_Framework_MockObject_Invocation $invocation
- * Object containing information on a mocked or stubbed method which
- * was invoked.
- * @return bool
- */
- public function verify()
- {
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockBuilder.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockBuilder.php
deleted file mode 100644
index 9f8a380e..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockBuilder.php
+++ /dev/null
@@ -1,322 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Implementation of the Builder pattern for Mock objects.
- *
- * @since File available since Release 1.0.0
- */
-class PHPUnit_Framework_MockObject_MockBuilder
-{
- /**
- * @var PHPUnit_Framework_TestCase
- */
- private $testCase;
-
- /**
- * @var string
- */
- private $type;
-
- /**
- * @var array
- */
- private $methods = array();
-
- /**
- * @var string
- */
- private $mockClassName = '';
-
- /**
- * @var array
- */
- private $constructorArgs = array();
-
- /**
- * @var bool
- */
- private $originalConstructor = true;
-
- /**
- * @var bool
- */
- private $originalClone = true;
-
- /**
- * @var bool
- */
- private $autoload = true;
-
- /**
- * @var bool
- */
- private $cloneArguments = false;
-
- /**
- * @var bool
- */
- private $callOriginalMethods = false;
-
- /**
- * @var object
- */
- private $proxyTarget = null;
-
- /**
- * @param PHPUnit_Framework_TestCase $testCase
- * @param array|string $type
- */
- public function __construct(PHPUnit_Framework_TestCase $testCase, $type)
- {
- $this->testCase = $testCase;
- $this->type = $type;
- }
-
- /**
- * Creates a mock object using a fluent interface.
- *
- * @return PHPUnit_Framework_MockObject_MockObject
- */
- public function getMock()
- {
- return $this->testCase->getMock(
- $this->type,
- $this->methods,
- $this->constructorArgs,
- $this->mockClassName,
- $this->originalConstructor,
- $this->originalClone,
- $this->autoload,
- $this->cloneArguments,
- $this->callOriginalMethods,
- $this->proxyTarget
- );
- }
-
- /**
- * Creates a mock object for an abstract class using a fluent interface.
- *
- * @return PHPUnit_Framework_MockObject_MockObject
- */
- public function getMockForAbstractClass()
- {
- return $this->testCase->getMockForAbstractClass(
- $this->type,
- $this->constructorArgs,
- $this->mockClassName,
- $this->originalConstructor,
- $this->originalClone,
- $this->autoload,
- $this->methods,
- $this->cloneArguments
- );
- }
-
- /**
- * Creates a mock object for a trait using a fluent interface.
- *
- * @return PHPUnit_Framework_MockObject_MockObject
- */
- public function getMockForTrait()
- {
- return $this->testCase->getMockForTrait(
- $this->type,
- $this->constructorArgs,
- $this->mockClassName,
- $this->originalConstructor,
- $this->originalClone,
- $this->autoload,
- $this->methods,
- $this->cloneArguments
- );
- }
-
- /**
- * Specifies the subset of methods to mock. Default is to mock all of them.
- *
- * @param array|null $methods
- * @return PHPUnit_Framework_MockObject_MockBuilder
- */
- public function setMethods($methods)
- {
- $this->methods = $methods;
-
- return $this;
- }
-
- /**
- * Specifies the arguments for the constructor.
- *
- * @param array $args
- * @return PHPUnit_Framework_MockObject_MockBuilder
- */
- public function setConstructorArgs(array $args)
- {
- $this->constructorArgs = $args;
-
- return $this;
- }
-
- /**
- * Specifies the name for the mock class.
- *
- * @param string $name
- * @return PHPUnit_Framework_MockObject_MockBuilder
- */
- public function setMockClassName($name)
- {
- $this->mockClassName = $name;
-
- return $this;
- }
-
- /**
- * Disables the invocation of the original constructor.
- *
- * @return PHPUnit_Framework_MockObject_MockBuilder
- */
- public function disableOriginalConstructor()
- {
- $this->originalConstructor = false;
-
- return $this;
- }
-
- /**
- * Enables the invocation of the original constructor.
- *
- * @return PHPUnit_Framework_MockObject_MockBuilder
- * @since Method available since Release 1.2.0
- */
- public function enableOriginalConstructor()
- {
- $this->originalConstructor = true;
-
- return $this;
- }
-
- /**
- * Disables the invocation of the original clone constructor.
- *
- * @return PHPUnit_Framework_MockObject_MockBuilder
- */
- public function disableOriginalClone()
- {
- $this->originalClone = false;
-
- return $this;
- }
-
- /**
- * Enables the invocation of the original clone constructor.
- *
- * @return PHPUnit_Framework_MockObject_MockBuilder
- * @since Method available since Release 1.2.0
- */
- public function enableOriginalClone()
- {
- $this->originalClone = true;
-
- return $this;
- }
-
- /**
- * Disables the use of class autoloading while creating the mock object.
- *
- * @return PHPUnit_Framework_MockObject_MockBuilder
- */
- public function disableAutoload()
- {
- $this->autoload = false;
-
- return $this;
- }
-
- /**
- * Enables the use of class autoloading while creating the mock object.
- *
- * @return PHPUnit_Framework_MockObject_MockBuilder
- * @since Method available since Release 1.2.0
- */
- public function enableAutoload()
- {
- $this->autoload = true;
-
- return $this;
- }
-
- /**
- * Disables the cloning of arguments passed to mocked methods.
- *
- * @return PHPUnit_Framework_MockObject_MockBuilder
- * @since Method available since Release 1.2.0
- */
- public function disableArgumentCloning()
- {
- $this->cloneArguments = false;
-
- return $this;
- }
-
- /**
- * Enables the cloning of arguments passed to mocked methods.
- *
- * @return PHPUnit_Framework_MockObject_MockBuilder
- * @since Method available since Release 1.2.0
- */
- public function enableArgumentCloning()
- {
- $this->cloneArguments = true;
-
- return $this;
- }
-
- /**
- * Enables the invocation of the original methods.
- *
- * @return PHPUnit_Framework_MockObject_MockBuilder
- * @since Method available since Release 2.0.0
- */
- public function enableProxyingToOriginalMethods()
- {
- $this->callOriginalMethods = true;
-
- return $this;
- }
-
- /**
- * Disables the invocation of the original methods.
- *
- * @return PHPUnit_Framework_MockObject_MockBuilder
- * @since Method available since Release 2.0.0
- */
- public function disableProxyingToOriginalMethods()
- {
- $this->callOriginalMethods = false;
- $this->proxyTarget = null;
-
- return $this;
- }
-
- /**
- * Sets the proxy target.
- *
- * @param object $object
- * @return PHPUnit_Framework_MockObject_MockBuilder
- * @since Method available since Release 2.0.0
- */
- public function setProxyTarget($object)
- {
- $this->proxyTarget = $object;
-
- return $this;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockObject.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockObject.php
deleted file mode 100644
index 4f1dc0d8..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockObject.php
+++ /dev/null
@@ -1,47 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Interface for all mock objects which are generated by
- * PHPUnit_Framework_MockObject_MockBuilder.
- *
- * @method PHPUnit_Framework_MockObject_Builder_InvocationMocker method($constraint)
- * @since Interface available since Release 1.0.0
- */
-interface PHPUnit_Framework_MockObject_MockObject /*extends PHPUnit_Framework_MockObject_Verifiable*/
-{
- /**
- * Registers a new expectation in the mock object and returns the match
- * object which can be infused with further details.
- *
- * @param PHPUnit_Framework_MockObject_Matcher_Invocation $matcher
- * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker
- */
- public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher);
-
- /**
- * @return PHPUnit_Framework_MockObject_InvocationMocker
- * @since Method available since Release 2.0.0
- */
- public function __phpunit_setOriginalObject($originalObject);
-
- /**
- * @return PHPUnit_Framework_MockObject_InvocationMocker
- */
- public function __phpunit_getInvocationMocker();
-
- /**
- * Verifies that the current expectation is valid. If everything is OK the
- * code should just return, if not it must throw an exception.
- *
- * @throws PHPUnit_Framework_ExpectationFailedException
- */
- public function __phpunit_verify();
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub.php
deleted file mode 100644
index 1414bcc1..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub.php
+++ /dev/null
@@ -1,31 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * An object that stubs the process of a normal method for a mock object.
- *
- * The stub object will replace the code for the stubbed method and return a
- * specific value instead of the original value.
- *
- * @since Interface available since Release 1.0.0
- */
-interface PHPUnit_Framework_MockObject_Stub extends PHPUnit_Framework_SelfDescribing
-{
- /**
- * Fakes the processing of the invocation $invocation by returning a
- * specific value.
- *
- * @param PHPUnit_Framework_MockObject_Invocation $invocation
- * The invocation which was mocked and matched by the current method
- * and argument matchers.
- * @return mixed
- */
- public function invoke(PHPUnit_Framework_MockObject_Invocation $invocation);
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ConsecutiveCalls.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ConsecutiveCalls.php
deleted file mode 100644
index afc353d9..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ConsecutiveCalls.php
+++ /dev/null
@@ -1,48 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-use SebastianBergmann\Exporter\Exporter;
-
-/**
- * Stubs a method by returning a user-defined stack of values.
- *
- * @since Class available since Release 1.0.0
- */
-class PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls implements PHPUnit_Framework_MockObject_Stub
-{
- protected $stack;
- protected $value;
-
- public function __construct($stack)
- {
- $this->stack = $stack;
- }
-
- public function invoke(PHPUnit_Framework_MockObject_Invocation $invocation)
- {
- $this->value = array_shift($this->stack);
-
- if ($this->value instanceof PHPUnit_Framework_MockObject_Stub) {
- $this->value = $this->value->invoke($invocation);
- }
-
- return $this->value;
- }
-
- public function toString()
- {
- $exporter = new Exporter;
-
- return sprintf(
- 'return user-specified value %s',
- $exporter->export($this->value)
- );
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Exception.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Exception.php
deleted file mode 100644
index 7f9359c5..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Exception.php
+++ /dev/null
@@ -1,41 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-use SebastianBergmann\Exporter\Exporter;
-
-/**
- * Stubs a method by raising a user-defined exception.
- *
- * @since Class available since Release 1.0.0
- */
-class PHPUnit_Framework_MockObject_Stub_Exception implements PHPUnit_Framework_MockObject_Stub
-{
- protected $exception;
-
- public function __construct(Exception $exception)
- {
- $this->exception = $exception;
- }
-
- public function invoke(PHPUnit_Framework_MockObject_Invocation $invocation)
- {
- throw $this->exception;
- }
-
- public function toString()
- {
- $exporter = new Exporter;
-
- return sprintf(
- 'raise user-specified exception %s',
- $exporter->export($this->exception)
- );
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/MatcherCollection.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/MatcherCollection.php
deleted file mode 100644
index 07a28777..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/MatcherCollection.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Stubs a method by returning a user-defined value.
- *
- * @since Interface available since Release 1.0.0
- */
-interface PHPUnit_Framework_MockObject_Stub_MatcherCollection
-{
- /**
- * Adds a new matcher to the collection which can be used as an expectation
- * or a stub.
- *
- * @param PHPUnit_Framework_MockObject_Matcher_Invocation $matcher
- * Matcher for invocations to mock objects.
- */
- public function addMatcher(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher);
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Return.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Return.php
deleted file mode 100644
index 630504fe..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Return.php
+++ /dev/null
@@ -1,41 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-use SebastianBergmann\Exporter\Exporter;
-
-/**
- * Stubs a method by returning a user-defined value.
- *
- * @since Class available since Release 1.0.0
- */
-class PHPUnit_Framework_MockObject_Stub_Return implements PHPUnit_Framework_MockObject_Stub
-{
- protected $value;
-
- public function __construct($value)
- {
- $this->value = $value;
- }
-
- public function invoke(PHPUnit_Framework_MockObject_Invocation $invocation)
- {
- return $this->value;
- }
-
- public function toString()
- {
- $exporter = new Exporter;
-
- return sprintf(
- 'return user-specified value %s',
- $exporter->export($this->value)
- );
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnArgument.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnArgument.php
deleted file mode 100644
index fb79f4e9..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnArgument.php
+++ /dev/null
@@ -1,38 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Stubs a method by returning an argument that was passed to the mocked method.
- *
- * @since Class available since Release 1.0.0
- */
-class PHPUnit_Framework_MockObject_Stub_ReturnArgument extends PHPUnit_Framework_MockObject_Stub_Return
-{
- protected $argumentIndex;
-
- public function __construct($argumentIndex)
- {
- $this->argumentIndex = $argumentIndex;
- }
-
- public function invoke(PHPUnit_Framework_MockObject_Invocation $invocation)
- {
- if (isset($invocation->parameters[$this->argumentIndex])) {
- return $invocation->parameters[$this->argumentIndex];
- } else {
- return;
- }
- }
-
- public function toString()
- {
- return sprintf('return argument #%d', $this->argumentIndex);
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnCallback.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnCallback.php
deleted file mode 100644
index 601b354b..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnCallback.php
+++ /dev/null
@@ -1,51 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 1.0.0
- */
-class PHPUnit_Framework_MockObject_Stub_ReturnCallback implements PHPUnit_Framework_MockObject_Stub
-{
- protected $callback;
-
- public function __construct($callback)
- {
- $this->callback = $callback;
- }
-
- public function invoke(PHPUnit_Framework_MockObject_Invocation $invocation)
- {
- return call_user_func_array($this->callback, $invocation->parameters);
- }
-
- public function toString()
- {
- if (is_array($this->callback)) {
- if (is_object($this->callback[0])) {
- $class = get_class($this->callback[0]);
- $type = '->';
- } else {
- $class = $this->callback[0];
- $type = '::';
- }
-
- return sprintf(
- 'return result of user defined callback %s%s%s() with the ' .
- 'passed arguments',
- $class,
- $type,
- $this->callback[1]
- );
- } else {
- return 'return result of user defined callback ' . $this->callback .
- ' with the passed arguments';
- }
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnSelf.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnSelf.php
deleted file mode 100644
index 582ab16c..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnSelf.php
+++ /dev/null
@@ -1,34 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Stubs a method by returning the current object.
- *
- * @since Class available since Release 1.1.0
- */
-class PHPUnit_Framework_MockObject_Stub_ReturnSelf implements PHPUnit_Framework_MockObject_Stub
-{
- public function invoke(PHPUnit_Framework_MockObject_Invocation $invocation)
- {
- if (!$invocation instanceof PHPUnit_Framework_MockObject_Invocation_Object) {
- throw new PHPUnit_Framework_Exception(
- 'The current object can only be returned when mocking an ' .
- 'object, not a static class.'
- );
- }
-
- return $invocation->object;
- }
-
- public function toString()
- {
- return 'return the current object';
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnValueMap.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnValueMap.php
deleted file mode 100644
index 25ba4d1a..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnValueMap.php
+++ /dev/null
@@ -1,47 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Stubs a method by returning a value from a map.
- *
- * @since Class available since Release 1.1.0
- */
-class PHPUnit_Framework_MockObject_Stub_ReturnValueMap implements PHPUnit_Framework_MockObject_Stub
-{
- protected $valueMap;
-
- public function __construct(array $valueMap)
- {
- $this->valueMap = $valueMap;
- }
-
- public function invoke(PHPUnit_Framework_MockObject_Invocation $invocation)
- {
- $parameterCount = count($invocation->parameters);
-
- foreach ($this->valueMap as $map) {
- if (!is_array($map) || $parameterCount != count($map) - 1) {
- continue;
- }
-
- $return = array_pop($map);
- if ($invocation->parameters === $map) {
- return $return;
- }
- }
-
- return;
- }
-
- public function toString()
- {
- return 'return value from a map';
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Verifiable.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Verifiable.php
deleted file mode 100644
index c19dfb33..00000000
--- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Verifiable.php
+++ /dev/null
@@ -1,25 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Interface for classes which must verify a given expectation.
- *
- * @since Interface available since Release 1.0.0
- */
-interface PHPUnit_Framework_MockObject_Verifiable
-{
- /**
- * Verifies that the current expectation is valid. If everything is OK the
- * code should just return, if not it must throw an exception.
- *
- * @throws PHPUnit_Framework_ExpectationFailedException
- */
- public function verify();
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/GeneratorTest.php b/vendor/phpunit/phpunit-mock-objects/tests/GeneratorTest.php
deleted file mode 100644
index 51bd20cd..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/GeneratorTest.php
+++ /dev/null
@@ -1,200 +0,0 @@
-generator = new PHPUnit_Framework_MockObject_Generator;
- }
-
- /**
- * @covers PHPUnit_Framework_MockObject_Generator::getMock
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testGetMockFailsWhenInvalidFunctionNameIsPassedInAsAFunctionToMock()
- {
- $this->generator->getMock('StdClass', array(0));
- }
-
- /**
- * @covers PHPUnit_Framework_MockObject_Generator::getMock
- */
- public function testGetMockCanCreateNonExistingFunctions()
- {
- $mock = $this->generator->getMock('StdClass', array('testFunction'));
- $this->assertTrue(method_exists($mock, 'testFunction'));
- }
-
- /**
- * @covers PHPUnit_Framework_MockObject_Generator::getMock
- * @expectedException PHPUnit_Framework_MockObject_RuntimeException
- * @expectedExceptionMessage duplicates: "foo, foo"
- */
- public function testGetMockGeneratorFails()
- {
- $mock = $this->generator->getMock('StdClass', array('foo', 'foo'));
- }
-
- /**
- * @covers PHPUnit_Framework_MockObject_Generator::getMockForAbstractClass
- */
- public function testGetMockForAbstractClassDoesNotFailWhenFakingInterfaces()
- {
- $mock = $this->generator->getMockForAbstractClass('Countable');
- $this->assertTrue(method_exists($mock, 'count'));
- }
-
- /**
- * @covers PHPUnit_Framework_MockObject_Generator::getMockForAbstractClass
- */
- public function testGetMockForAbstractClassStubbingAbstractClass()
- {
- $mock = $this->generator->getMockForAbstractClass('AbstractMockTestClass');
- $this->assertTrue(method_exists($mock, 'doSomething'));
- }
-
- /**
- * @covers PHPUnit_Framework_MockObject_Generator::getMockForAbstractClass
- */
- public function testGetMockForAbstractClassWithNonExistentMethods()
- {
- $mock = $this->generator->getMockForAbstractClass(
- 'AbstractMockTestClass',
- array(),
- '',
- true,
- true,
- true,
- array('nonexistentMethod')
- );
-
- $this->assertTrue(method_exists($mock, 'nonexistentMethod'));
- $this->assertTrue(method_exists($mock, 'doSomething'));
- }
-
- /**
- * @covers PHPUnit_Framework_MockObject_Generator::getMockForAbstractClass
- */
- public function testGetMockForAbstractClassShouldCreateStubsOnlyForAbstractMethodWhenNoMethodsWereInformed()
- {
- $mock = $this->generator->getMockForAbstractClass('AbstractMockTestClass');
-
- $mock->expects($this->any())
- ->method('doSomething')
- ->willReturn('testing');
-
- $this->assertEquals('testing', $mock->doSomething());
- $this->assertEquals(1, $mock->returnAnything());
- }
-
- /**
- * @dataProvider getMockForAbstractClassExpectsInvalidArgumentExceptionDataprovider
- * @covers PHPUnit_Framework_MockObject_Generator::getMockForAbstractClass
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testGetMockForAbstractClassExpectingInvalidArgumentException($className, $mockClassName)
- {
- $mock = $this->generator->getMockForAbstractClass($className, array(), $mockClassName);
- }
-
- /**
- * @covers PHPUnit_Framework_MockObject_Generator::getMockForAbstractClass
- * @expectedException PHPUnit_Framework_MockObject_RuntimeException
- */
- public function testGetMockForAbstractClassAbstractClassDoesNotExist()
- {
- $mock = $this->generator->getMockForAbstractClass('Tux');
- }
-
- /**
- * Dataprovider for test "testGetMockForAbstractClassExpectingInvalidArgumentException"
- */
- public static function getMockForAbstractClassExpectsInvalidArgumentExceptionDataprovider()
- {
- return array(
- 'className not a string' => array(array(), ''),
- 'mockClassName not a string' => array('Countable', new StdClass),
- );
- }
-
- /**
- * @covers PHPUnit_Framework_MockObject_Generator::getMockForTrait
- * @requires PHP 5.4.0
- */
- public function testGetMockForTraitWithNonExistentMethodsAndNonAbstractMethods()
- {
- $mock = $this->generator->getMockForTrait(
- 'AbstractTrait',
- array(),
- '',
- true,
- true,
- true,
- array('nonexistentMethod')
- );
-
- $this->assertTrue(method_exists($mock, 'nonexistentMethod'));
- $this->assertTrue(method_exists($mock, 'doSomething'));
- $this->assertTrue($mock->mockableMethod());
- $this->assertTrue($mock->anotherMockableMethod());
- }
-
- /**
- * @covers PHPUnit_Framework_MockObject_Generator::getMockForTrait
- * @requires PHP 5.4.0
- */
- public function testGetMockForTraitStubbingAbstractMethod()
- {
- $mock = $this->generator->getMockForTrait('AbstractTrait');
- $this->assertTrue(method_exists($mock, 'doSomething'));
- }
-
- /**
- * @requires PHP 5.4.0
- */
- public function testGetMockForSingletonWithReflectionSuccess()
- {
- // Probably, this should be moved to tests/autoload.php
- require_once __DIR__ . '/_fixture/SingletonClass.php';
-
- $mock = $this->generator->getMock('SingletonClass', array('doSomething'), array(), '', false);
- $this->assertInstanceOf('SingletonClass', $mock);
- }
-
- /**
- * Same as "testGetMockForSingletonWithReflectionSuccess", but we expect
- * warning for PHP < 5.4.0 since PHPUnit will try to execute private __wakeup
- * on unserialize
- */
- public function testGetMockForSingletonWithUnserializeFail()
- {
- if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
- $this->markTestSkipped('Only for PHP < 5.4.0');
- }
-
- $this->setExpectedException('PHPUnit_Framework_MockObject_RuntimeException');
-
- // Probably, this should be moved to tests/autoload.php
- require_once __DIR__ . '/_fixture/SingletonClass.php';
-
- $mock = $this->generator->getMock('SingletonClass', array('doSomething'), array(), '', false);
- }
-
- /**
- * ReflectionClass::getMethods for SoapClient on PHP 5.3 produces PHP Fatal Error
- * @runInSeparateProcess
- */
- public function testGetMockForSoapClientReflectionMethodsDuplication()
- {
- if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
- $this->markTestSkipped('Only for PHP < 5.4.0');
- }
-
- $mock = $this->generator->getMock('SoapClient', array(), array(), '', false);
- $this->assertInstanceOf('SoapClient', $mock);
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockBuilderTest.php b/vendor/phpunit/phpunit-mock-objects/tests/MockBuilderTest.php
deleted file mode 100644
index ef4a0cc3..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockBuilderTest.php
+++ /dev/null
@@ -1,107 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since File available since Release 1.0.0
- */
-class Framework_MockBuilderTest extends PHPUnit_Framework_TestCase
-{
- public function testMockBuilderRequiresClassName()
- {
- $spec = $this->getMockBuilder('Mockable');
- $mock = $spec->getMock();
- $this->assertTrue($mock instanceof Mockable);
- }
-
- public function testByDefaultMocksAllMethods()
- {
- $spec = $this->getMockBuilder('Mockable');
- $mock = $spec->getMock();
- $this->assertNull($mock->mockableMethod());
- $this->assertNull($mock->anotherMockableMethod());
- }
-
- public function testMethodsToMockCanBeSpecified()
- {
- $spec = $this->getMockBuilder('Mockable');
- $spec->setMethods(array('mockableMethod'));
- $mock = $spec->getMock();
- $this->assertNull($mock->mockableMethod());
- $this->assertTrue($mock->anotherMockableMethod());
- }
-
- public function testByDefaultDoesNotPassArgumentsToTheConstructor()
- {
- $spec = $this->getMockBuilder('Mockable');
- $mock = $spec->getMock();
- $this->assertEquals(array(null, null), $mock->constructorArgs);
- }
-
- public function testMockClassNameCanBeSpecified()
- {
- $spec = $this->getMockBuilder('Mockable');
- $spec->setMockClassName('ACustomClassName');
- $mock = $spec->getMock();
- $this->assertTrue($mock instanceof ACustomClassName);
- }
-
- public function testConstructorArgumentsCanBeSpecified()
- {
- $spec = $this->getMockBuilder('Mockable');
- $spec->setConstructorArgs($expected = array(23, 42));
- $mock = $spec->getMock();
- $this->assertEquals($expected, $mock->constructorArgs);
- }
-
- public function testOriginalConstructorCanBeDisabled()
- {
- $spec = $this->getMockBuilder('Mockable');
- $spec->disableOriginalConstructor();
- $mock = $spec->getMock();
- $this->assertNull($mock->constructorArgs);
- }
-
- public function testByDefaultOriginalCloneIsPreserved()
- {
- $spec = $this->getMockBuilder('Mockable');
- $mock = $spec->getMock();
- $cloned = clone $mock;
- $this->assertTrue($cloned->cloned);
- }
-
- public function testOriginalCloneCanBeDisabled()
- {
- $spec = $this->getMockBuilder('Mockable');
- $spec->disableOriginalClone();
- $mock = $spec->getMock();
- $mock->cloned = false;
- $cloned = clone $mock;
- $this->assertFalse($cloned->cloned);
- }
-
- public function testCallingAutoloadCanBeDisabled()
- {
- // it is not clear to me how to test this nor the difference
- // between calling it or not
- $this->markTestIncomplete();
- }
-
- public function testProvidesAFluentInterface()
- {
- $spec = $this->getMockBuilder('Mockable')
- ->setMethods(array('mockableMethod'))
- ->setConstructorArgs(array())
- ->setMockClassName('DummyClassName')
- ->disableOriginalConstructor()
- ->disableOriginalClone()
- ->disableAutoload();
- $this->assertTrue($spec instanceof PHPUnit_Framework_MockObject_MockBuilder);
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/232.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/232.phpt
deleted file mode 100644
index 3426e891..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/232.phpt
+++ /dev/null
@@ -1,129 +0,0 @@
---TEST--
-PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', TRUE, TRUE)
---SKIPIF--
-= 5.4.0 required';
-?>
---FILE--
-hi();
- }
-}
-
-class Foo
-{
- use ChildTrait;
-
- public function speak()
- {
- return $this->world();
- }
-}
-
-require __DIR__ . '/../../vendor/autoload.php';
-
-$generator = new PHPUnit_Framework_MockObject_Generator;
-
-$mock = $generator->generate(
- 'Foo',
- array(),
- 'MockFoo',
- TRUE,
- TRUE
-);
-
-print $mock['code'];
-?>
---EXPECTF--
-class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject
-{
- private $__phpunit_invocationMocker;
- private $__phpunit_originalObject;
-
- public function __clone()
- {
- $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
- }
-
- public function speak()
- {
- $arguments = array();
- $count = func_num_args();
-
- if ($count > 0) {
- $_arguments = func_get_args();
-
- for ($i = 0; $i < $count; $i++) {
- $arguments[] = $_arguments[$i];
- }
- }
-
- $result = $this->__phpunit_getInvocationMocker()->invoke(
- new PHPUnit_Framework_MockObject_Invocation_Object(
- 'Foo', 'speak', $arguments, $this, TRUE
- )
- );
-
- return $result;
- }
-
- public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
- {
- return $this->__phpunit_getInvocationMocker()->expects($matcher);
- }
-
- public function method()
- {
- $any = new PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount;
- $expects = $this->expects($any);
- return call_user_func_array(array($expects, 'method'), func_get_args());
- }
-
- public function __phpunit_setOriginalObject($originalObject)
- {
- $this->__phpunit_originalObject = $originalObject;
- }
-
- public function __phpunit_getInvocationMocker()
- {
- if ($this->__phpunit_invocationMocker === NULL) {
- $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker;
- }
-
- return $this->__phpunit_invocationMocker;
- }
-
- public function __phpunit_hasMatchers()
- {
- return $this->__phpunit_getInvocationMocker()->hasMatchers();
- }
-
- public function __phpunit_verify()
- {
- $this->__phpunit_getInvocationMocker()->verify();
- $this->__phpunit_invocationMocker = NULL;
- }
-}
-
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Invocation/ObjectTest.php b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Invocation/ObjectTest.php
deleted file mode 100644
index a9574915..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Invocation/ObjectTest.php
+++ /dev/null
@@ -1,85 +0,0 @@
-assertSame('FooClass', $invocation->className);
- }
-
- public function testAllowToGetMethodNameSetInConstructor()
- {
- $invocation = new PHPUnit_Framework_MockObject_Invocation_Object(
- 'FooClass',
- 'FooMethod',
- array('an_argument'),
- new StdClass
- );
-
- $this->assertSame('FooMethod', $invocation->methodName);
- }
-
- public function testAllowToGetObjectSetInConstructor()
- {
- $expectedObject = new StdClass;
-
- $invocation = new PHPUnit_Framework_MockObject_Invocation_Object(
- 'FooClass',
- 'FooMethod',
- array('an_argument'),
- $expectedObject
- );
-
- $this->assertSame($expectedObject, $invocation->object);
- }
-
- public function testAllowToGetMethodParametersSetInConstructor()
- {
- $expectedParameters = array(
- 'foo', 5, array('a', 'b'), new StdClass, null, false
- );
-
- $invocation = new PHPUnit_Framework_MockObject_Invocation_Object(
- 'FooClass',
- 'FooMethod',
- $expectedParameters,
- new StdClass
- );
-
- $this->assertSame($expectedParameters, $invocation->parameters);
- }
-
- public function testConstructorAllowToSetFlagCloneObjectsInParameters()
- {
- $parameters = array(new StdClass);
- $cloneObjects = true;
-
- $invocation = new PHPUnit_Framework_MockObject_Invocation_Object(
- 'FooClass',
- 'FooMethod',
- $parameters,
- new StdClass,
- $cloneObjects
- );
-
- $this->assertEquals($parameters, $invocation->parameters);
- $this->assertNotSame($parameters, $invocation->parameters);
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Invocation/StaticTest.php b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Invocation/StaticTest.php
deleted file mode 100644
index b965da17..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Invocation/StaticTest.php
+++ /dev/null
@@ -1,54 +0,0 @@
-assertSame('FooClass', $invocation->className);
- }
-
- public function testAllowToGetMethodNameSetInConstructor()
- {
- $invocation = new PHPUnit_Framework_MockObject_Invocation_Static('FooClass', 'FooMethod', array('an_argument'));
-
- $this->assertSame('FooMethod', $invocation->methodName);
- }
-
- public function testAllowToGetMethodParametersSetInConstructor()
- {
- $expectedParameters = array(
- 'foo', 5, array('a', 'b'), new StdClass, null, false
- );
-
- $invocation = new PHPUnit_Framework_MockObject_Invocation_Static(
- 'FooClass',
- 'FooMethod',
- $expectedParameters
- );
-
- $this->assertSame($expectedParameters, $invocation->parameters);
- }
-
- public function testConstructorAllowToSetFlagCloneObjectsInParameters()
- {
- $parameters = array(new StdClass);
- $cloneObjects = true;
-
- $invocation = new PHPUnit_Framework_MockObject_Invocation_Static(
- 'FooClass',
- 'FooMethod',
- $parameters,
- $cloneObjects
- );
-
- $this->assertEquals($parameters, $invocation->parameters);
- $this->assertNotSame($parameters, $invocation->parameters);
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Matcher/ConsecutiveParametersTest.php b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Matcher/ConsecutiveParametersTest.php
deleted file mode 100644
index ae26b767..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Matcher/ConsecutiveParametersTest.php
+++ /dev/null
@@ -1,45 +0,0 @@
-getMock('stdClass', array('foo'));
- $mock
- ->expects($this->any())
- ->method('foo')
- ->withConsecutive(
- array('bar'),
- array(21, 42)
- );
- $mock->foo('bar');
- $mock->foo(21, 42);
- }
-
- public function testIntegrationWithLessAssertionsThenMethodCalls()
- {
- $mock = $this->getMock('stdClass', array('foo'));
- $mock
- ->expects($this->any())
- ->method('foo')
- ->withConsecutive(
- array('bar')
- );
- $mock->foo('bar');
- $mock->foo(21, 42);
- }
-
- public function testIntegrationExpectingException()
- {
- $mock = $this->getMock('stdClass', array('foo'));
- $mock
- ->expects($this->any())
- ->method('foo')
- ->withConsecutive(
- array('bar'),
- array(21, 42)
- );
- $mock->foo('bar');
- $this->setExpectedException('PHPUnit_Framework_ExpectationFailedException');
- $mock->foo('invalid');
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/abstract_class.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/abstract_class.phpt
deleted file mode 100644
index 72450c56..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/abstract_class.phpt
+++ /dev/null
@@ -1,143 +0,0 @@
---TEST--
-PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', TRUE, TRUE)
---FILE--
-generate(
- 'Foo',
- array(),
- 'MockFoo',
- TRUE,
- TRUE
-);
-
-print $mock['code'];
-?>
---EXPECTF--
-class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject
-{
- private $__phpunit_invocationMocker;
- private $__phpunit_originalObject;
-
- public function __clone()
- {
- $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
- }
-
- public function one()
- {
- $arguments = array();
- $count = func_num_args();
-
- if ($count > 0) {
- $_arguments = func_get_args();
-
- for ($i = 0; $i < $count; $i++) {
- $arguments[] = $_arguments[$i];
- }
- }
-
- $result = $this->__phpunit_getInvocationMocker()->invoke(
- new PHPUnit_Framework_MockObject_Invocation_Object(
- 'Foo', 'one', $arguments, $this, TRUE
- )
- );
-
- return $result;
- }
-
- public function two()
- {
- $arguments = array();
- $count = func_num_args();
-
- if ($count > 0) {
- $_arguments = func_get_args();
-
- for ($i = 0; $i < $count; $i++) {
- $arguments[] = $_arguments[$i];
- }
- }
-
- $result = $this->__phpunit_getInvocationMocker()->invoke(
- new PHPUnit_Framework_MockObject_Invocation_Object(
- 'Foo', 'two', $arguments, $this, TRUE
- )
- );
-
- return $result;
- }
-
- protected function three()
- {
- $arguments = array();
- $count = func_num_args();
-
- if ($count > 0) {
- $_arguments = func_get_args();
-
- for ($i = 0; $i < $count; $i++) {
- $arguments[] = $_arguments[$i];
- }
- }
-
- $result = $this->__phpunit_getInvocationMocker()->invoke(
- new PHPUnit_Framework_MockObject_Invocation_Object(
- 'Foo', 'three', $arguments, $this, TRUE
- )
- );
-
- return $result;
- }
-
- public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
- {
- return $this->__phpunit_getInvocationMocker()->expects($matcher);
- }
-
- public function method()
- {
- $any = new PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount;
- $expects = $this->expects($any);
- return call_user_func_array(array($expects, 'method'), func_get_args());
- }
-
- public function __phpunit_setOriginalObject($originalObject)
- {
- $this->__phpunit_originalObject = $originalObject;
- }
-
- public function __phpunit_getInvocationMocker()
- {
- if ($this->__phpunit_invocationMocker === NULL) {
- $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker;
- }
-
- return $this->__phpunit_invocationMocker;
- }
-
- public function __phpunit_hasMatchers()
- {
- return $this->__phpunit_getInvocationMocker()->hasMatchers();
- }
-
- public function __phpunit_verify()
- {
- $this->__phpunit_getInvocationMocker()->verify();
- $this->__phpunit_invocationMocker = NULL;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class.phpt
deleted file mode 100644
index 2e40328c..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class.phpt
+++ /dev/null
@@ -1,121 +0,0 @@
---TEST--
-PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', TRUE, TRUE)
---FILE--
-generate(
- 'Foo',
- array(),
- 'MockFoo',
- TRUE,
- TRUE
-);
-
-print $mock['code'];
-?>
---EXPECTF--
-class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject
-{
- private $__phpunit_invocationMocker;
- private $__phpunit_originalObject;
-
- public function __clone()
- {
- $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
- }
-
- public function bar(Foo $foo)
- {
- $arguments = array($foo);
- $count = func_num_args();
-
- if ($count > 1) {
- $_arguments = func_get_args();
-
- for ($i = 1; $i < $count; $i++) {
- $arguments[] = $_arguments[$i];
- }
- }
-
- $result = $this->__phpunit_getInvocationMocker()->invoke(
- new PHPUnit_Framework_MockObject_Invocation_Object(
- 'Foo', 'bar', $arguments, $this, TRUE
- )
- );
-
- return $result;
- }
-
- public function baz(Foo $foo)
- {
- $arguments = array($foo);
- $count = func_num_args();
-
- if ($count > 1) {
- $_arguments = func_get_args();
-
- for ($i = 1; $i < $count; $i++) {
- $arguments[] = $_arguments[$i];
- }
- }
-
- $result = $this->__phpunit_getInvocationMocker()->invoke(
- new PHPUnit_Framework_MockObject_Invocation_Object(
- 'Foo', 'baz', $arguments, $this, TRUE
- )
- );
-
- return $result;
- }
-
- public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
- {
- return $this->__phpunit_getInvocationMocker()->expects($matcher);
- }
-
- public function method()
- {
- $any = new PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount;
- $expects = $this->expects($any);
- return call_user_func_array(array($expects, 'method'), func_get_args());
- }
-
- public function __phpunit_setOriginalObject($originalObject)
- {
- $this->__phpunit_originalObject = $originalObject;
- }
-
- public function __phpunit_getInvocationMocker()
- {
- if ($this->__phpunit_invocationMocker === NULL) {
- $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker;
- }
-
- return $this->__phpunit_invocationMocker;
- }
-
- public function __phpunit_hasMatchers()
- {
- return $this->__phpunit_getInvocationMocker()->hasMatchers();
- }
-
- public function __phpunit_verify()
- {
- $this->__phpunit_getInvocationMocker()->verify();
- $this->__phpunit_invocationMocker = NULL;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_call_parent_clone.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_call_parent_clone.phpt
deleted file mode 100644
index 0f91a986..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_call_parent_clone.phpt
+++ /dev/null
@@ -1,73 +0,0 @@
---TEST--
-PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', TRUE)
---FILE--
-generate(
- 'Foo',
- array(),
- 'MockFoo',
- TRUE
-);
-
-print $mock['code'];
-?>
---EXPECTF--
-class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject
-{
- private $__phpunit_invocationMocker;
- private $__phpunit_originalObject;
-
- public function __clone()
- {
- $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
- parent::__clone();
- }
-
- public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
- {
- return $this->__phpunit_getInvocationMocker()->expects($matcher);
- }
-
- public function method()
- {
- $any = new PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount;
- $expects = $this->expects($any);
- return call_user_func_array(array($expects, 'method'), func_get_args());
- }
-
- public function __phpunit_setOriginalObject($originalObject)
- {
- $this->__phpunit_originalObject = $originalObject;
- }
-
- public function __phpunit_getInvocationMocker()
- {
- if ($this->__phpunit_invocationMocker === NULL) {
- $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker;
- }
-
- return $this->__phpunit_invocationMocker;
- }
-
- public function __phpunit_hasMatchers()
- {
- return $this->__phpunit_getInvocationMocker()->hasMatchers();
- }
-
- public function __phpunit_verify()
- {
- $this->__phpunit_getInvocationMocker()->verify();
- $this->__phpunit_invocationMocker = NULL;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_call_parent_constructor.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_call_parent_constructor.phpt
deleted file mode 100644
index 6f037ee2..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_call_parent_constructor.phpt
+++ /dev/null
@@ -1,72 +0,0 @@
---TEST--
-PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', TRUE)
---FILE--
-generate(
- 'Foo',
- array(),
- 'MockFoo',
- TRUE
-);
-
-print $mock['code'];
-?>
---EXPECTF--
-class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject
-{
- private $__phpunit_invocationMocker;
- private $__phpunit_originalObject;
-
- public function __clone()
- {
- $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
- }
-
- public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
- {
- return $this->__phpunit_getInvocationMocker()->expects($matcher);
- }
-
- public function method()
- {
- $any = new PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount;
- $expects = $this->expects($any);
- return call_user_func_array(array($expects, 'method'), func_get_args());
- }
-
- public function __phpunit_setOriginalObject($originalObject)
- {
- $this->__phpunit_originalObject = $originalObject;
- }
-
- public function __phpunit_getInvocationMocker()
- {
- if ($this->__phpunit_invocationMocker === NULL) {
- $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker;
- }
-
- return $this->__phpunit_invocationMocker;
- }
-
- public function __phpunit_hasMatchers()
- {
- return $this->__phpunit_getInvocationMocker()->hasMatchers();
- }
-
- public function __phpunit_verify()
- {
- $this->__phpunit_getInvocationMocker()->verify();
- $this->__phpunit_invocationMocker = NULL;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_dont_call_parent_clone.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_dont_call_parent_clone.phpt
deleted file mode 100644
index dc829389..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_dont_call_parent_clone.phpt
+++ /dev/null
@@ -1,72 +0,0 @@
---TEST--
-PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', FALSE)
---FILE--
-generate(
- 'Foo',
- array(),
- 'MockFoo',
- FALSE
-);
-
-print $mock['code'];
-?>
---EXPECTF--
-class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject
-{
- private $__phpunit_invocationMocker;
- private $__phpunit_originalObject;
-
- public function __clone()
- {
- $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
- }
-
- public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
- {
- return $this->__phpunit_getInvocationMocker()->expects($matcher);
- }
-
- public function method()
- {
- $any = new PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount;
- $expects = $this->expects($any);
- return call_user_func_array(array($expects, 'method'), func_get_args());
- }
-
- public function __phpunit_setOriginalObject($originalObject)
- {
- $this->__phpunit_originalObject = $originalObject;
- }
-
- public function __phpunit_getInvocationMocker()
- {
- if ($this->__phpunit_invocationMocker === NULL) {
- $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker;
- }
-
- return $this->__phpunit_invocationMocker;
- }
-
- public function __phpunit_hasMatchers()
- {
- return $this->__phpunit_getInvocationMocker()->hasMatchers();
- }
-
- public function __phpunit_verify()
- {
- $this->__phpunit_getInvocationMocker()->verify();
- $this->__phpunit_invocationMocker = NULL;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_dont_call_parent_constructor.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_dont_call_parent_constructor.phpt
deleted file mode 100644
index 6f037ee2..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_dont_call_parent_constructor.phpt
+++ /dev/null
@@ -1,72 +0,0 @@
---TEST--
-PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', TRUE)
---FILE--
-generate(
- 'Foo',
- array(),
- 'MockFoo',
- TRUE
-);
-
-print $mock['code'];
-?>
---EXPECTF--
-class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject
-{
- private $__phpunit_invocationMocker;
- private $__phpunit_originalObject;
-
- public function __clone()
- {
- $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
- }
-
- public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
- {
- return $this->__phpunit_getInvocationMocker()->expects($matcher);
- }
-
- public function method()
- {
- $any = new PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount;
- $expects = $this->expects($any);
- return call_user_func_array(array($expects, 'method'), func_get_args());
- }
-
- public function __phpunit_setOriginalObject($originalObject)
- {
- $this->__phpunit_originalObject = $originalObject;
- }
-
- public function __phpunit_getInvocationMocker()
- {
- if ($this->__phpunit_invocationMocker === NULL) {
- $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker;
- }
-
- return $this->__phpunit_invocationMocker;
- }
-
- public function __phpunit_hasMatchers()
- {
- return $this->__phpunit_getInvocationMocker()->hasMatchers();
- }
-
- public function __phpunit_verify()
- {
- $this->__phpunit_getInvocationMocker()->verify();
- $this->__phpunit_invocationMocker = NULL;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_implementing_interface_call_parent_constructor.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_implementing_interface_call_parent_constructor.phpt
deleted file mode 100644
index cfc43d89..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_implementing_interface_call_parent_constructor.phpt
+++ /dev/null
@@ -1,77 +0,0 @@
---TEST--
-PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', TRUE)
---FILE--
-generate(
- 'Foo',
- array(),
- 'MockFoo',
- TRUE
-);
-
-print $mock['code'];
-?>
---EXPECTF--
-class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject
-{
- private $__phpunit_invocationMocker;
- private $__phpunit_originalObject;
-
- public function __clone()
- {
- $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
- }
-
- public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
- {
- return $this->__phpunit_getInvocationMocker()->expects($matcher);
- }
-
- public function method()
- {
- $any = new PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount;
- $expects = $this->expects($any);
- return call_user_func_array(array($expects, 'method'), func_get_args());
- }
-
- public function __phpunit_setOriginalObject($originalObject)
- {
- $this->__phpunit_originalObject = $originalObject;
- }
-
- public function __phpunit_getInvocationMocker()
- {
- if ($this->__phpunit_invocationMocker === NULL) {
- $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker;
- }
-
- return $this->__phpunit_invocationMocker;
- }
-
- public function __phpunit_hasMatchers()
- {
- return $this->__phpunit_getInvocationMocker()->hasMatchers();
- }
-
- public function __phpunit_verify()
- {
- $this->__phpunit_getInvocationMocker()->verify();
- $this->__phpunit_invocationMocker = NULL;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_implementing_interface_dont_call_parent_constructor.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_implementing_interface_dont_call_parent_constructor.phpt
deleted file mode 100644
index cfc43d89..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_implementing_interface_dont_call_parent_constructor.phpt
+++ /dev/null
@@ -1,77 +0,0 @@
---TEST--
-PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', TRUE)
---FILE--
-generate(
- 'Foo',
- array(),
- 'MockFoo',
- TRUE
-);
-
-print $mock['code'];
-?>
---EXPECTF--
-class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject
-{
- private $__phpunit_invocationMocker;
- private $__phpunit_originalObject;
-
- public function __clone()
- {
- $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
- }
-
- public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
- {
- return $this->__phpunit_getInvocationMocker()->expects($matcher);
- }
-
- public function method()
- {
- $any = new PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount;
- $expects = $this->expects($any);
- return call_user_func_array(array($expects, 'method'), func_get_args());
- }
-
- public function __phpunit_setOriginalObject($originalObject)
- {
- $this->__phpunit_originalObject = $originalObject;
- }
-
- public function __phpunit_getInvocationMocker()
- {
- if ($this->__phpunit_invocationMocker === NULL) {
- $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker;
- }
-
- return $this->__phpunit_invocationMocker;
- }
-
- public function __phpunit_hasMatchers()
- {
- return $this->__phpunit_getInvocationMocker()->hasMatchers();
- }
-
- public function __phpunit_verify()
- {
- $this->__phpunit_getInvocationMocker()->verify();
- $this->__phpunit_invocationMocker = NULL;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_partial.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_partial.phpt
deleted file mode 100644
index b8332aed..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_partial.phpt
+++ /dev/null
@@ -1,99 +0,0 @@
---TEST--
-PHPUnit_Framework_MockObject_Generator::generate('Foo', array('bar'), 'MockFoo', TRUE, TRUE)
---FILE--
-generate(
- 'Foo',
- array('bar'),
- 'MockFoo',
- TRUE,
- TRUE
-);
-
-print $mock['code'];
-?>
---EXPECTF--
-class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject
-{
- private $__phpunit_invocationMocker;
- private $__phpunit_originalObject;
-
- public function __clone()
- {
- $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
- }
-
- public function bar(Foo $foo)
- {
- $arguments = array($foo);
- $count = func_num_args();
-
- if ($count > 1) {
- $_arguments = func_get_args();
-
- for ($i = 1; $i < $count; $i++) {
- $arguments[] = $_arguments[$i];
- }
- }
-
- $result = $this->__phpunit_getInvocationMocker()->invoke(
- new PHPUnit_Framework_MockObject_Invocation_Object(
- 'Foo', 'bar', $arguments, $this, TRUE
- )
- );
-
- return $result;
- }
-
- public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
- {
- return $this->__phpunit_getInvocationMocker()->expects($matcher);
- }
-
- public function method()
- {
- $any = new PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount;
- $expects = $this->expects($any);
- return call_user_func_array(array($expects, 'method'), func_get_args());
- }
-
- public function __phpunit_setOriginalObject($originalObject)
- {
- $this->__phpunit_originalObject = $originalObject;
- }
-
- public function __phpunit_getInvocationMocker()
- {
- if ($this->__phpunit_invocationMocker === NULL) {
- $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker;
- }
-
- return $this->__phpunit_invocationMocker;
- }
-
- public function __phpunit_hasMatchers()
- {
- return $this->__phpunit_getInvocationMocker()->hasMatchers();
- }
-
- public function __phpunit_verify()
- {
- $this->__phpunit_getInvocationMocker()->verify();
- $this->__phpunit_invocationMocker = NULL;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_with_method_named_method.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_with_method_named_method.phpt
deleted file mode 100644
index 6e1ddf63..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_with_method_named_method.phpt
+++ /dev/null
@@ -1,88 +0,0 @@
---TEST--
-PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', TRUE, TRUE)
---FILE--
-generate(
- 'Foo',
- array(),
- 'MockFoo',
- TRUE,
- TRUE
-);
-
-print $mock['code'];
-?>
---EXPECTF--
-class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject
-{
- private $__phpunit_invocationMocker;
- private $__phpunit_originalObject;
-
- public function __clone()
- {
- $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
- }
-
- public function method()
- {
- $arguments = array();
- $count = func_num_args();
-
- if ($count > 0) {
- $_arguments = func_get_args();
-
- for ($i = 0; $i < $count; $i++) {
- $arguments[] = $_arguments[$i];
- }
- }
-
- $result = $this->__phpunit_getInvocationMocker()->invoke(
- new PHPUnit_Framework_MockObject_Invocation_Object(
- 'Foo', 'method', $arguments, $this, TRUE
- )
- );
-
- return $result;
- }
-
- public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
- {
- return $this->__phpunit_getInvocationMocker()->expects($matcher);
- }
-
- public function __phpunit_setOriginalObject($originalObject)
- {
- $this->__phpunit_originalObject = $originalObject;
- }
-
- public function __phpunit_getInvocationMocker()
- {
- if ($this->__phpunit_invocationMocker === NULL) {
- $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker;
- }
-
- return $this->__phpunit_invocationMocker;
- }
-
- public function __phpunit_hasMatchers()
- {
- return $this->__phpunit_getInvocationMocker()->hasMatchers();
- }
-
- public function __phpunit_verify()
- {
- $this->__phpunit_getInvocationMocker()->verify();
- $this->__phpunit_invocationMocker = NULL;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_with_method_with_variadic_arguments.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_with_method_with_variadic_arguments.phpt
deleted file mode 100644
index 8fb9a3c5..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_with_method_with_variadic_arguments.phpt
+++ /dev/null
@@ -1,99 +0,0 @@
---TEST--
-PHPUnit_Framework_MockObject_Generator::generate('ClassWithMethodWithVariadicArguments', array(), 'MockFoo', TRUE, TRUE)
---SKIPIF--
-= 5.6.0 required';
-?>
---FILE--
-generate(
- 'ClassWithMethodWithVariadicArguments',
- array(),
- 'MockFoo',
- TRUE,
- TRUE
-);
-
-print $mock['code'];
-?>
---EXPECTF--
-class MockFoo extends ClassWithMethodWithVariadicArguments implements PHPUnit_Framework_MockObject_MockObject
-{
- private $__phpunit_invocationMocker;
- private $__phpunit_originalObject;
-
- public function __clone()
- {
- $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
- }
-
- public function methodWithVariadicArguments($a, ...$parameters)
- {
- $arguments = array($a);
- $count = func_num_args();
-
- if ($count > 1) {
- $_arguments = func_get_args();
-
- for ($i = 1; $i < $count; $i++) {
- $arguments[] = $_arguments[$i];
- }
- }
-
- $result = $this->__phpunit_getInvocationMocker()->invoke(
- new PHPUnit_Framework_MockObject_Invocation_Object(
- 'ClassWithMethodWithVariadicArguments', 'methodWithVariadicArguments', $arguments, $this, TRUE
- )
- );
-
- return $result;
- }
-
- public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
- {
- return $this->__phpunit_getInvocationMocker()->expects($matcher);
- }
-
- public function method()
- {
- $any = new PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount;
- $expects = $this->expects($any);
- return call_user_func_array(array($expects, 'method'), func_get_args());
- }
-
- public function __phpunit_setOriginalObject($originalObject)
- {
- $this->__phpunit_originalObject = $originalObject;
- }
-
- public function __phpunit_getInvocationMocker()
- {
- if ($this->__phpunit_invocationMocker === NULL) {
- $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker;
- }
-
- return $this->__phpunit_invocationMocker;
- }
-
- public function __phpunit_hasMatchers()
- {
- return $this->__phpunit_getInvocationMocker()->hasMatchers();
- }
-
- public function __phpunit_verify()
- {
- $this->__phpunit_getInvocationMocker()->verify();
- $this->__phpunit_invocationMocker = NULL;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/interface.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/interface.phpt
deleted file mode 100644
index 2d38209e..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/interface.phpt
+++ /dev/null
@@ -1,93 +0,0 @@
---TEST--
-PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', TRUE, TRUE)
---FILE--
-generate(
- 'Foo',
- array(),
- 'MockFoo',
- TRUE,
- TRUE
-);
-
-print $mock['code'];
-?>
---EXPECTF--
-class MockFoo implements PHPUnit_Framework_MockObject_MockObject, Foo
-{
- private $__phpunit_invocationMocker;
- private $__phpunit_originalObject;
-
- public function __clone()
- {
- $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
- }
-
- public function bar(Foo $foo)
- {
- $arguments = array($foo);
- $count = func_num_args();
-
- if ($count > 1) {
- $_arguments = func_get_args();
-
- for ($i = 1; $i < $count; $i++) {
- $arguments[] = $_arguments[$i];
- }
- }
-
- $result = $this->__phpunit_getInvocationMocker()->invoke(
- new PHPUnit_Framework_MockObject_Invocation_Object(
- 'Foo', 'bar', $arguments, $this, TRUE
- )
- );
-
- return $result;
- }
-
- public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
- {
- return $this->__phpunit_getInvocationMocker()->expects($matcher);
- }
-
- public function method()
- {
- $any = new PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount;
- $expects = $this->expects($any);
- return call_user_func_array(array($expects, 'method'), func_get_args());
- }
-
- public function __phpunit_setOriginalObject($originalObject)
- {
- $this->__phpunit_originalObject = $originalObject;
- }
-
- public function __phpunit_getInvocationMocker()
- {
- if ($this->__phpunit_invocationMocker === NULL) {
- $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker;
- }
-
- return $this->__phpunit_invocationMocker;
- }
-
- public function __phpunit_hasMatchers()
- {
- return $this->__phpunit_getInvocationMocker()->hasMatchers();
- }
-
- public function __phpunit_verify()
- {
- $this->__phpunit_getInvocationMocker()->verify();
- $this->__phpunit_invocationMocker = NULL;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/invocation_object_clone_object.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/invocation_object_clone_object.phpt
deleted file mode 100644
index 87a979e9..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/invocation_object_clone_object.phpt
+++ /dev/null
@@ -1,122 +0,0 @@
---TEST--
-PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', TRUE, TRUE, TRUE)
---FILE--
-generate(
- 'Foo',
- array(),
- 'MockFoo',
- TRUE,
- TRUE,
- TRUE
-);
-
-print $mock['code'];
-?>
---EXPECTF--
-class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject
-{
- private $__phpunit_invocationMocker;
- private $__phpunit_originalObject;
-
- public function __clone()
- {
- $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
- }
-
- public function bar(Foo $foo)
- {
- $arguments = array($foo);
- $count = func_num_args();
-
- if ($count > 1) {
- $_arguments = func_get_args();
-
- for ($i = 1; $i < $count; $i++) {
- $arguments[] = $_arguments[$i];
- }
- }
-
- $result = $this->__phpunit_getInvocationMocker()->invoke(
- new PHPUnit_Framework_MockObject_Invocation_Object(
- 'Foo', 'bar', $arguments, $this, TRUE
- )
- );
-
- return $result;
- }
-
- public function baz(Foo $foo)
- {
- $arguments = array($foo);
- $count = func_num_args();
-
- if ($count > 1) {
- $_arguments = func_get_args();
-
- for ($i = 1; $i < $count; $i++) {
- $arguments[] = $_arguments[$i];
- }
- }
-
- $result = $this->__phpunit_getInvocationMocker()->invoke(
- new PHPUnit_Framework_MockObject_Invocation_Object(
- 'Foo', 'baz', $arguments, $this, TRUE
- )
- );
-
- return $result;
- }
-
- public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
- {
- return $this->__phpunit_getInvocationMocker()->expects($matcher);
- }
-
- public function method()
- {
- $any = new PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount;
- $expects = $this->expects($any);
- return call_user_func_array(array($expects, 'method'), func_get_args());
- }
-
- public function __phpunit_setOriginalObject($originalObject)
- {
- $this->__phpunit_originalObject = $originalObject;
- }
-
- public function __phpunit_getInvocationMocker()
- {
- if ($this->__phpunit_invocationMocker === NULL) {
- $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker;
- }
-
- return $this->__phpunit_invocationMocker;
- }
-
- public function __phpunit_hasMatchers()
- {
- return $this->__phpunit_getInvocationMocker()->hasMatchers();
- }
-
- public function __phpunit_verify()
- {
- $this->__phpunit_getInvocationMocker()->verify();
- $this->__phpunit_invocationMocker = NULL;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class.phpt
deleted file mode 100644
index e30bddc0..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class.phpt
+++ /dev/null
@@ -1,123 +0,0 @@
---TEST--
-PHPUnit_Framework_MockObject_Generator::generate('NS\Foo', array(), 'MockFoo', TRUE, TRUE)
---FILE--
-generate(
- 'NS\Foo',
- array(),
- 'MockFoo',
- TRUE,
- TRUE
-);
-
-print $mock['code'];
-?>
---EXPECTF--
-class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject
-{
- private $__phpunit_invocationMocker;
- private $__phpunit_originalObject;
-
- public function __clone()
- {
- $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
- }
-
- public function bar(NS\Foo $foo)
- {
- $arguments = array($foo);
- $count = func_num_args();
-
- if ($count > 1) {
- $_arguments = func_get_args();
-
- for ($i = 1; $i < $count; $i++) {
- $arguments[] = $_arguments[$i];
- }
- }
-
- $result = $this->__phpunit_getInvocationMocker()->invoke(
- new PHPUnit_Framework_MockObject_Invocation_Object(
- 'NS\Foo', 'bar', $arguments, $this, TRUE
- )
- );
-
- return $result;
- }
-
- public function baz(NS\Foo $foo)
- {
- $arguments = array($foo);
- $count = func_num_args();
-
- if ($count > 1) {
- $_arguments = func_get_args();
-
- for ($i = 1; $i < $count; $i++) {
- $arguments[] = $_arguments[$i];
- }
- }
-
- $result = $this->__phpunit_getInvocationMocker()->invoke(
- new PHPUnit_Framework_MockObject_Invocation_Object(
- 'NS\Foo', 'baz', $arguments, $this, TRUE
- )
- );
-
- return $result;
- }
-
- public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
- {
- return $this->__phpunit_getInvocationMocker()->expects($matcher);
- }
-
- public function method()
- {
- $any = new PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount;
- $expects = $this->expects($any);
- return call_user_func_array(array($expects, 'method'), func_get_args());
- }
-
- public function __phpunit_setOriginalObject($originalObject)
- {
- $this->__phpunit_originalObject = $originalObject;
- }
-
- public function __phpunit_getInvocationMocker()
- {
- if ($this->__phpunit_invocationMocker === NULL) {
- $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker;
- }
-
- return $this->__phpunit_invocationMocker;
- }
-
- public function __phpunit_hasMatchers()
- {
- return $this->__phpunit_getInvocationMocker()->hasMatchers();
- }
-
- public function __phpunit_verify()
- {
- $this->__phpunit_getInvocationMocker()->verify();
- $this->__phpunit_invocationMocker = NULL;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_call_parent_clone.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_call_parent_clone.phpt
deleted file mode 100644
index 3dee9c91..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_call_parent_clone.phpt
+++ /dev/null
@@ -1,75 +0,0 @@
---TEST--
-PHPUnit_Framework_MockObject_Generator::generate('NS\Foo', array(), 'MockFoo', TRUE)
---FILE--
-generate(
- 'NS\Foo',
- array(),
- 'MockFoo',
- TRUE
-);
-
-print $mock['code'];
-?>
---EXPECTF--
-class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject
-{
- private $__phpunit_invocationMocker;
- private $__phpunit_originalObject;
-
- public function __clone()
- {
- $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
- parent::__clone();
- }
-
- public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
- {
- return $this->__phpunit_getInvocationMocker()->expects($matcher);
- }
-
- public function method()
- {
- $any = new PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount;
- $expects = $this->expects($any);
- return call_user_func_array(array($expects, 'method'), func_get_args());
- }
-
- public function __phpunit_setOriginalObject($originalObject)
- {
- $this->__phpunit_originalObject = $originalObject;
- }
-
- public function __phpunit_getInvocationMocker()
- {
- if ($this->__phpunit_invocationMocker === NULL) {
- $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker;
- }
-
- return $this->__phpunit_invocationMocker;
- }
-
- public function __phpunit_hasMatchers()
- {
- return $this->__phpunit_getInvocationMocker()->hasMatchers();
- }
-
- public function __phpunit_verify()
- {
- $this->__phpunit_getInvocationMocker()->verify();
- $this->__phpunit_invocationMocker = NULL;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_call_parent_constructor.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_call_parent_constructor.phpt
deleted file mode 100644
index 105a372b..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_call_parent_constructor.phpt
+++ /dev/null
@@ -1,74 +0,0 @@
---TEST--
-PHPUnit_Framework_MockObject_Generator::generate('NS\Foo', array(), 'MockFoo', TRUE)
---FILE--
-generate(
- 'NS\Foo',
- array(),
- 'MockFoo',
- TRUE
-);
-
-print $mock['code'];
-?>
---EXPECTF--
-class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject
-{
- private $__phpunit_invocationMocker;
- private $__phpunit_originalObject;
-
- public function __clone()
- {
- $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
- }
-
- public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
- {
- return $this->__phpunit_getInvocationMocker()->expects($matcher);
- }
-
- public function method()
- {
- $any = new PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount;
- $expects = $this->expects($any);
- return call_user_func_array(array($expects, 'method'), func_get_args());
- }
-
- public function __phpunit_setOriginalObject($originalObject)
- {
- $this->__phpunit_originalObject = $originalObject;
- }
-
- public function __phpunit_getInvocationMocker()
- {
- if ($this->__phpunit_invocationMocker === NULL) {
- $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker;
- }
-
- return $this->__phpunit_invocationMocker;
- }
-
- public function __phpunit_hasMatchers()
- {
- return $this->__phpunit_getInvocationMocker()->hasMatchers();
- }
-
- public function __phpunit_verify()
- {
- $this->__phpunit_getInvocationMocker()->verify();
- $this->__phpunit_invocationMocker = NULL;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_dont_call_parent_clone.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_dont_call_parent_clone.phpt
deleted file mode 100644
index 1de9253f..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_dont_call_parent_clone.phpt
+++ /dev/null
@@ -1,74 +0,0 @@
---TEST--
-PHPUnit_Framework_MockObject_Generator::generate('NS\Foo', array(), 'MockFoo', FALSE)
---FILE--
-generate(
- 'NS\Foo',
- array(),
- 'MockFoo',
- FALSE
-);
-
-print $mock['code'];
-?>
---EXPECTF--
-class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject
-{
- private $__phpunit_invocationMocker;
- private $__phpunit_originalObject;
-
- public function __clone()
- {
- $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
- }
-
- public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
- {
- return $this->__phpunit_getInvocationMocker()->expects($matcher);
- }
-
- public function method()
- {
- $any = new PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount;
- $expects = $this->expects($any);
- return call_user_func_array(array($expects, 'method'), func_get_args());
- }
-
- public function __phpunit_setOriginalObject($originalObject)
- {
- $this->__phpunit_originalObject = $originalObject;
- }
-
- public function __phpunit_getInvocationMocker()
- {
- if ($this->__phpunit_invocationMocker === NULL) {
- $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker;
- }
-
- return $this->__phpunit_invocationMocker;
- }
-
- public function __phpunit_hasMatchers()
- {
- return $this->__phpunit_getInvocationMocker()->hasMatchers();
- }
-
- public function __phpunit_verify()
- {
- $this->__phpunit_getInvocationMocker()->verify();
- $this->__phpunit_invocationMocker = NULL;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_dont_call_parent_constructor.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_dont_call_parent_constructor.phpt
deleted file mode 100644
index 105a372b..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_dont_call_parent_constructor.phpt
+++ /dev/null
@@ -1,74 +0,0 @@
---TEST--
-PHPUnit_Framework_MockObject_Generator::generate('NS\Foo', array(), 'MockFoo', TRUE)
---FILE--
-generate(
- 'NS\Foo',
- array(),
- 'MockFoo',
- TRUE
-);
-
-print $mock['code'];
-?>
---EXPECTF--
-class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject
-{
- private $__phpunit_invocationMocker;
- private $__phpunit_originalObject;
-
- public function __clone()
- {
- $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
- }
-
- public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
- {
- return $this->__phpunit_getInvocationMocker()->expects($matcher);
- }
-
- public function method()
- {
- $any = new PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount;
- $expects = $this->expects($any);
- return call_user_func_array(array($expects, 'method'), func_get_args());
- }
-
- public function __phpunit_setOriginalObject($originalObject)
- {
- $this->__phpunit_originalObject = $originalObject;
- }
-
- public function __phpunit_getInvocationMocker()
- {
- if ($this->__phpunit_invocationMocker === NULL) {
- $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker;
- }
-
- return $this->__phpunit_invocationMocker;
- }
-
- public function __phpunit_hasMatchers()
- {
- return $this->__phpunit_getInvocationMocker()->hasMatchers();
- }
-
- public function __phpunit_verify()
- {
- $this->__phpunit_getInvocationMocker()->verify();
- $this->__phpunit_invocationMocker = NULL;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_implementing_interface_call_parent_constructor.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_implementing_interface_call_parent_constructor.phpt
deleted file mode 100644
index 6b9f6bcb..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_implementing_interface_call_parent_constructor.phpt
+++ /dev/null
@@ -1,79 +0,0 @@
---TEST--
-PHPUnit_Framework_MockObject_Generator::generate('NS\Foo', array(), 'MockFoo', TRUE)
---FILE--
-generate(
- 'NS\Foo',
- array(),
- 'MockFoo',
- TRUE
-);
-
-print $mock['code'];
-?>
---EXPECTF--
-class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject
-{
- private $__phpunit_invocationMocker;
- private $__phpunit_originalObject;
-
- public function __clone()
- {
- $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
- }
-
- public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
- {
- return $this->__phpunit_getInvocationMocker()->expects($matcher);
- }
-
- public function method()
- {
- $any = new PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount;
- $expects = $this->expects($any);
- return call_user_func_array(array($expects, 'method'), func_get_args());
- }
-
- public function __phpunit_setOriginalObject($originalObject)
- {
- $this->__phpunit_originalObject = $originalObject;
- }
-
- public function __phpunit_getInvocationMocker()
- {
- if ($this->__phpunit_invocationMocker === NULL) {
- $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker;
- }
-
- return $this->__phpunit_invocationMocker;
- }
-
- public function __phpunit_hasMatchers()
- {
- return $this->__phpunit_getInvocationMocker()->hasMatchers();
- }
-
- public function __phpunit_verify()
- {
- $this->__phpunit_getInvocationMocker()->verify();
- $this->__phpunit_invocationMocker = NULL;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_implementing_interface_dont_call_parent_constructor.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_implementing_interface_dont_call_parent_constructor.phpt
deleted file mode 100644
index 6b9f6bcb..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_implementing_interface_dont_call_parent_constructor.phpt
+++ /dev/null
@@ -1,79 +0,0 @@
---TEST--
-PHPUnit_Framework_MockObject_Generator::generate('NS\Foo', array(), 'MockFoo', TRUE)
---FILE--
-generate(
- 'NS\Foo',
- array(),
- 'MockFoo',
- TRUE
-);
-
-print $mock['code'];
-?>
---EXPECTF--
-class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject
-{
- private $__phpunit_invocationMocker;
- private $__phpunit_originalObject;
-
- public function __clone()
- {
- $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
- }
-
- public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
- {
- return $this->__phpunit_getInvocationMocker()->expects($matcher);
- }
-
- public function method()
- {
- $any = new PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount;
- $expects = $this->expects($any);
- return call_user_func_array(array($expects, 'method'), func_get_args());
- }
-
- public function __phpunit_setOriginalObject($originalObject)
- {
- $this->__phpunit_originalObject = $originalObject;
- }
-
- public function __phpunit_getInvocationMocker()
- {
- if ($this->__phpunit_invocationMocker === NULL) {
- $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker;
- }
-
- return $this->__phpunit_invocationMocker;
- }
-
- public function __phpunit_hasMatchers()
- {
- return $this->__phpunit_getInvocationMocker()->hasMatchers();
- }
-
- public function __phpunit_verify()
- {
- $this->__phpunit_getInvocationMocker()->verify();
- $this->__phpunit_invocationMocker = NULL;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_partial.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_partial.phpt
deleted file mode 100644
index 86fee1cb..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_partial.phpt
+++ /dev/null
@@ -1,101 +0,0 @@
---TEST--
-PHPUnit_Framework_MockObject_Generator::generate('NS\Foo', array('bar'), 'MockFoo', TRUE, TRUE)
---FILE--
-generate(
- 'NS\Foo',
- array('bar'),
- 'MockFoo',
- TRUE,
- TRUE
-);
-
-print $mock['code'];
-?>
---EXPECTF--
-class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject
-{
- private $__phpunit_invocationMocker;
- private $__phpunit_originalObject;
-
- public function __clone()
- {
- $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
- }
-
- public function bar(NS\Foo $foo)
- {
- $arguments = array($foo);
- $count = func_num_args();
-
- if ($count > 1) {
- $_arguments = func_get_args();
-
- for ($i = 1; $i < $count; $i++) {
- $arguments[] = $_arguments[$i];
- }
- }
-
- $result = $this->__phpunit_getInvocationMocker()->invoke(
- new PHPUnit_Framework_MockObject_Invocation_Object(
- 'NS\Foo', 'bar', $arguments, $this, TRUE
- )
- );
-
- return $result;
- }
-
- public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
- {
- return $this->__phpunit_getInvocationMocker()->expects($matcher);
- }
-
- public function method()
- {
- $any = new PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount;
- $expects = $this->expects($any);
- return call_user_func_array(array($expects, 'method'), func_get_args());
- }
-
- public function __phpunit_setOriginalObject($originalObject)
- {
- $this->__phpunit_originalObject = $originalObject;
- }
-
- public function __phpunit_getInvocationMocker()
- {
- if ($this->__phpunit_invocationMocker === NULL) {
- $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker;
- }
-
- return $this->__phpunit_invocationMocker;
- }
-
- public function __phpunit_hasMatchers()
- {
- return $this->__phpunit_getInvocationMocker()->hasMatchers();
- }
-
- public function __phpunit_verify()
- {
- $this->__phpunit_getInvocationMocker()->verify();
- $this->__phpunit_invocationMocker = NULL;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_interface.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_interface.phpt
deleted file mode 100644
index 80486463..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_interface.phpt
+++ /dev/null
@@ -1,95 +0,0 @@
---TEST--
-PHPUnit_Framework_MockObject_Generator::generate('NS\Foo', array(), 'MockFoo', TRUE, TRUE)
---FILE--
-generate(
- 'NS\Foo',
- array(),
- 'MockFoo',
- TRUE,
- TRUE
-);
-
-print $mock['code'];
-?>
---EXPECTF--
-class MockFoo implements PHPUnit_Framework_MockObject_MockObject, NS\Foo
-{
- private $__phpunit_invocationMocker;
- private $__phpunit_originalObject;
-
- public function __clone()
- {
- $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
- }
-
- public function bar(NS\Foo $foo)
- {
- $arguments = array($foo);
- $count = func_num_args();
-
- if ($count > 1) {
- $_arguments = func_get_args();
-
- for ($i = 1; $i < $count; $i++) {
- $arguments[] = $_arguments[$i];
- }
- }
-
- $result = $this->__phpunit_getInvocationMocker()->invoke(
- new PHPUnit_Framework_MockObject_Invocation_Object(
- 'NS\Foo', 'bar', $arguments, $this, TRUE
- )
- );
-
- return $result;
- }
-
- public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
- {
- return $this->__phpunit_getInvocationMocker()->expects($matcher);
- }
-
- public function method()
- {
- $any = new PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount;
- $expects = $this->expects($any);
- return call_user_func_array(array($expects, 'method'), func_get_args());
- }
-
- public function __phpunit_setOriginalObject($originalObject)
- {
- $this->__phpunit_originalObject = $originalObject;
- }
-
- public function __phpunit_getInvocationMocker()
- {
- if ($this->__phpunit_invocationMocker === NULL) {
- $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker;
- }
-
- return $this->__phpunit_invocationMocker;
- }
-
- public function __phpunit_hasMatchers()
- {
- return $this->__phpunit_getInvocationMocker()->hasMatchers();
- }
-
- public function __phpunit_verify()
- {
- $this->__phpunit_getInvocationMocker()->verify();
- $this->__phpunit_invocationMocker = NULL;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/nonexistent_class.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/nonexistent_class.phpt
deleted file mode 100644
index 8c01de06..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/nonexistent_class.phpt
+++ /dev/null
@@ -1,70 +0,0 @@
---TEST--
-PHPUnit_Framework_MockObject_Generator::generate('NonExistentClass', array(), 'MockFoo', TRUE, TRUE)
---FILE--
-generate(
- 'NonExistentClass',
- array(),
- 'MockFoo',
- TRUE,
- TRUE
-);
-
-print $mock['code'];
-?>
---EXPECTF--
-class NonExistentClass
-{
-}
-
-class MockFoo extends NonExistentClass implements PHPUnit_Framework_MockObject_MockObject
-{
- private $__phpunit_invocationMocker;
- private $__phpunit_originalObject;
-
- public function __clone()
- {
- $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
- }
-
- public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
- {
- return $this->__phpunit_getInvocationMocker()->expects($matcher);
- }
-
- public function method()
- {
- $any = new PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount;
- $expects = $this->expects($any);
- return call_user_func_array(array($expects, 'method'), func_get_args());
- }
-
- public function __phpunit_setOriginalObject($originalObject)
- {
- $this->__phpunit_originalObject = $originalObject;
- }
-
- public function __phpunit_getInvocationMocker()
- {
- if ($this->__phpunit_invocationMocker === NULL) {
- $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker;
- }
-
- return $this->__phpunit_invocationMocker;
- }
-
- public function __phpunit_hasMatchers()
- {
- return $this->__phpunit_getInvocationMocker()->hasMatchers();
- }
-
- public function __phpunit_verify()
- {
- $this->__phpunit_getInvocationMocker()->verify();
- $this->__phpunit_invocationMocker = NULL;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/nonexistent_class_with_namespace.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/nonexistent_class_with_namespace.phpt
deleted file mode 100644
index 78689775..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/nonexistent_class_with_namespace.phpt
+++ /dev/null
@@ -1,78 +0,0 @@
---TEST--
-PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', TRUE, TRUE)
---FILE--
-generate(
- 'NS\Foo',
- array(),
- 'MockFoo',
- TRUE,
- TRUE
-);
-
-print $mock['code'];
-?>
---EXPECTF--
-namespace NS {
-
-class Foo
-{
-}
-
-}
-
-namespace {
-
-class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject
-{
- private $__phpunit_invocationMocker;
- private $__phpunit_originalObject;
-
- public function __clone()
- {
- $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
- }
-
- public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
- {
- return $this->__phpunit_getInvocationMocker()->expects($matcher);
- }
-
- public function method()
- {
- $any = new PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount;
- $expects = $this->expects($any);
- return call_user_func_array(array($expects, 'method'), func_get_args());
- }
-
- public function __phpunit_setOriginalObject($originalObject)
- {
- $this->__phpunit_originalObject = $originalObject;
- }
-
- public function __phpunit_getInvocationMocker()
- {
- if ($this->__phpunit_invocationMocker === NULL) {
- $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker;
- }
-
- return $this->__phpunit_invocationMocker;
- }
-
- public function __phpunit_hasMatchers()
- {
- return $this->__phpunit_getInvocationMocker()->hasMatchers();
- }
-
- public function __phpunit_verify()
- {
- $this->__phpunit_getInvocationMocker()->verify();
- $this->__phpunit_invocationMocker = NULL;
- }
-}
-
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/nonexistent_class_with_namespace_starting_with_separator.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/nonexistent_class_with_namespace_starting_with_separator.phpt
deleted file mode 100644
index b59d1ddf..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/nonexistent_class_with_namespace_starting_with_separator.phpt
+++ /dev/null
@@ -1,78 +0,0 @@
---TEST--
-PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', TRUE, TRUE)
---FILE--
-generate(
- '\NS\Foo',
- array(),
- 'MockFoo',
- TRUE,
- TRUE
-);
-
-print $mock['code'];
-?>
---EXPECTF--
-namespace NS {
-
-class Foo
-{
-}
-
-}
-
-namespace {
-
-class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject
-{
- private $__phpunit_invocationMocker;
- private $__phpunit_originalObject;
-
- public function __clone()
- {
- $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
- }
-
- public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
- {
- return $this->__phpunit_getInvocationMocker()->expects($matcher);
- }
-
- public function method()
- {
- $any = new PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount;
- $expects = $this->expects($any);
- return call_user_func_array(array($expects, 'method'), func_get_args());
- }
-
- public function __phpunit_setOriginalObject($originalObject)
- {
- $this->__phpunit_originalObject = $originalObject;
- }
-
- public function __phpunit_getInvocationMocker()
- {
- if ($this->__phpunit_invocationMocker === NULL) {
- $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker;
- }
-
- return $this->__phpunit_invocationMocker;
- }
-
- public function __phpunit_hasMatchers()
- {
- return $this->__phpunit_getInvocationMocker()->hasMatchers();
- }
-
- public function __phpunit_verify()
- {
- $this->__phpunit_getInvocationMocker()->verify();
- $this->__phpunit_invocationMocker = NULL;
- }
-}
-
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/proxy.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/proxy.phpt
deleted file mode 100644
index f31bf3ff..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/proxy.phpt
+++ /dev/null
@@ -1,117 +0,0 @@
---TEST--
-PHPUnit_Framework_MockObject_Generator::generate('Foo', NULL, 'ProxyFoo', TRUE, TRUE, TRUE, TRUE)
---FILE--
-generate(
- 'Foo', array(), 'ProxyFoo', TRUE, TRUE, TRUE, TRUE
-);
-
-print $mock['code'];
-?>
---EXPECTF--
-class ProxyFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject
-{
- private $__phpunit_invocationMocker;
- private $__phpunit_originalObject;
-
- public function __clone()
- {
- $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
- }
-
- public function bar(Foo $foo)
- {
- $arguments = array($foo);
- $count = func_num_args();
-
- if ($count > 1) {
- $_arguments = func_get_args();
-
- for ($i = 1; $i < $count; $i++) {
- $arguments[] = $_arguments[$i];
- }
- }
-
- $this->__phpunit_getInvocationMocker()->invoke(
- new PHPUnit_Framework_MockObject_Invocation_Object(
- 'Foo', 'bar', $arguments, $this, TRUE
- )
- );
-
- return call_user_func_array(array($this->__phpunit_originalObject, "bar"), $arguments);
- }
-
- public function baz(Foo $foo)
- {
- $arguments = array($foo);
- $count = func_num_args();
-
- if ($count > 1) {
- $_arguments = func_get_args();
-
- for ($i = 1; $i < $count; $i++) {
- $arguments[] = $_arguments[$i];
- }
- }
-
- $this->__phpunit_getInvocationMocker()->invoke(
- new PHPUnit_Framework_MockObject_Invocation_Object(
- 'Foo', 'baz', $arguments, $this, TRUE
- )
- );
-
- return call_user_func_array(array($this->__phpunit_originalObject, "baz"), $arguments);
- }
-
- public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
- {
- return $this->__phpunit_getInvocationMocker()->expects($matcher);
- }
-
- public function method()
- {
- $any = new PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount;
- $expects = $this->expects($any);
- return call_user_func_array(array($expects, 'method'), func_get_args());
- }
-
- public function __phpunit_setOriginalObject($originalObject)
- {
- $this->__phpunit_originalObject = $originalObject;
- }
-
- public function __phpunit_getInvocationMocker()
- {
- if ($this->__phpunit_invocationMocker === NULL) {
- $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker;
- }
-
- return $this->__phpunit_invocationMocker;
- }
-
- public function __phpunit_hasMatchers()
- {
- return $this->__phpunit_getInvocationMocker()->hasMatchers();
- }
-
- public function __phpunit_verify()
- {
- $this->__phpunit_getInvocationMocker()->verify();
- $this->__phpunit_invocationMocker = NULL;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/scalar_type_declarations.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/scalar_type_declarations.phpt
deleted file mode 100644
index 3ad84db3..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/scalar_type_declarations.phpt
+++ /dev/null
@@ -1,99 +0,0 @@
---TEST--
-PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', TRUE, TRUE)
---SKIPIF--
-= 7.0.0 required';
-?>
---FILE--
-generate(
- 'Foo',
- array(),
- 'MockFoo',
- TRUE,
- TRUE
-);
-
-print $mock['code'];
-?>
---EXPECTF--
-class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject
-{
- private $__phpunit_invocationMocker;
- private $__phpunit_originalObject;
-
- public function __clone()
- {
- $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
- }
-
- public function bar(string $baz)
- {
- $arguments = array($baz);
- $count = func_num_args();
-
- if ($count > 1) {
- $_arguments = func_get_args();
-
- for ($i = 1; $i < $count; $i++) {
- $arguments[] = $_arguments[$i];
- }
- }
-
- $result = $this->__phpunit_getInvocationMocker()->invoke(
- new PHPUnit_Framework_MockObject_Invocation_Object(
- 'Foo', 'bar', $arguments, $this, TRUE
- )
- );
-
- return $result;
- }
-
- public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
- {
- return $this->__phpunit_getInvocationMocker()->expects($matcher);
- }
-
- public function method()
- {
- $any = new PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount;
- $expects = $this->expects($any);
- return call_user_func_array(array($expects, 'method'), func_get_args());
- }
-
- public function __phpunit_setOriginalObject($originalObject)
- {
- $this->__phpunit_originalObject = $originalObject;
- }
-
- public function __phpunit_getInvocationMocker()
- {
- if ($this->__phpunit_invocationMocker === NULL) {
- $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker;
- }
-
- return $this->__phpunit_invocationMocker;
- }
-
- public function __phpunit_hasMatchers()
- {
- return $this->__phpunit_getInvocationMocker()->hasMatchers();
- }
-
- public function __phpunit_verify()
- {
- $this->__phpunit_getInvocationMocker()->verify();
- $this->__phpunit_invocationMocker = NULL;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class.phpt
deleted file mode 100644
index 06b255f1..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class.phpt
+++ /dev/null
@@ -1,37 +0,0 @@
---TEST--
-PHPUnit_Framework_MockObject_Generator::generateClassFromWsdl('GoogleSearch.wsdl', 'GoogleSearch')
---SKIPIF--
-
---FILE--
-generateClassFromWsdl(
- dirname(dirname(__FILE__)) . '/_fixture/GoogleSearch.wsdl',
- 'GoogleSearch'
-);
-?>
---EXPECTF--
-class GoogleSearch extends \SoapClient
-{
- public function __construct($wsdl, array $options)
- {
- parent::__construct('%s/GoogleSearch.wsdl', $options);
- }
-
- public function doGoogleSearch($key, $q, $start, $maxResults, $filter, $restrict, $safeSearch, $lr, $ie, $oe)
- {
- }
-
- public function doGetCachedPage($key, $url)
- {
- }
-
- public function doSpellingSuggestion($key, $phrase)
- {
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class_namespace.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class_namespace.phpt
deleted file mode 100644
index 9460e6b4..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class_namespace.phpt
+++ /dev/null
@@ -1,39 +0,0 @@
---TEST--
-PHPUnit_Framework_MockObject_Generator::generateClassFromWsdl('GoogleSearch.wsdl', 'GoogleSearch')
---SKIPIF--
-
---FILE--
-generateClassFromWsdl(
- dirname(dirname(__FILE__)) . '/_fixture/GoogleSearch.wsdl',
- 'My\\Space\\GoogleSearch'
-);
-?>
---EXPECTF--
-namespace My\Space;
-
-class GoogleSearch extends \SoapClient
-{
- public function __construct($wsdl, array $options)
- {
- parent::__construct('%s/GoogleSearch.wsdl', $options);
- }
-
- public function doGoogleSearch($key, $q, $start, $maxResults, $filter, $restrict, $safeSearch, $lr, $ie, $oe)
- {
- }
-
- public function doGetCachedPage($key, $url)
- {
- }
-
- public function doSpellingSuggestion($key, $phrase)
- {
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class_partial.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class_partial.phpt
deleted file mode 100644
index fc814bd1..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class_partial.phpt
+++ /dev/null
@@ -1,30 +0,0 @@
---TEST--
-PHPUnit_Framework_MockObject_Generator::generateClassFromWsdl('GoogleSearch.wsdl', 'GoogleSearch', array('doGoogleSearch'))
---SKIPIF--
-
---FILE--
-generateClassFromWsdl(
- dirname(dirname(__FILE__)) . '/_fixture/GoogleSearch.wsdl',
- 'GoogleSearch',
- array('doGoogleSearch')
-);
-?>
---EXPECTF--
-class GoogleSearch extends \SoapClient
-{
- public function __construct($wsdl, array $options)
- {
- parent::__construct('%s/GoogleSearch.wsdl', $options);
- }
-
- public function doGoogleSearch($key, $q, $start, $maxResults, $filter, $restrict, $safeSearch, $lr, $ie, $oe)
- {
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObjectTest.php b/vendor/phpunit/phpunit-mock-objects/tests/MockObjectTest.php
deleted file mode 100644
index 802c133e..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/MockObjectTest.php
+++ /dev/null
@@ -1,842 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- *
- *
- * @since Class available since Release 3.0.0
- */
-class Framework_MockObjectTest extends PHPUnit_Framework_TestCase
-{
- public function testMockedMethodIsNeverCalled()
- {
- $mock = $this->getMock('AnInterface');
- $mock->expects($this->never())
- ->method('doSomething');
- }
-
- public function testMockedMethodIsNeverCalledWithParameter()
- {
- $mock = $this->getMock('SomeClass');
- $mock->expects($this->never())
- ->method('doSomething')
- ->with('someArg');
- }
-
- public function testMockedMethodIsNotCalledWhenExpectsAnyWithParameter()
- {
- $mock = $this->getMock('SomeClass');
- $mock->expects($this->any())
- ->method('doSomethingElse')
- ->with('someArg');
- }
-
- public function testMockedMethodIsNotCalledWhenMethodSpecifiedDirectlyWithParameter()
- {
- $mock = $this->getMock('SomeClass');
- $mock->method('doSomethingElse')
- ->with('someArg');
- }
-
- public function testMockedMethodIsCalledAtLeastOnce()
- {
- $mock = $this->getMock('AnInterface');
- $mock->expects($this->atLeastOnce())
- ->method('doSomething');
-
- $mock->doSomething();
- }
-
- public function testMockedMethodIsCalledAtLeastOnce2()
- {
- $mock = $this->getMock('AnInterface');
- $mock->expects($this->atLeastOnce())
- ->method('doSomething');
-
- $mock->doSomething();
- $mock->doSomething();
- }
-
- public function testMockedMethodIsCalledAtLeastTwice()
- {
- $mock = $this->getMock('AnInterface');
- $mock->expects($this->atLeast(2))
- ->method('doSomething');
-
- $mock->doSomething();
- $mock->doSomething();
- }
-
- public function testMockedMethodIsCalledAtLeastTwice2()
- {
- $mock = $this->getMock('AnInterface');
- $mock->expects($this->atLeast(2))
- ->method('doSomething');
-
- $mock->doSomething();
- $mock->doSomething();
- $mock->doSomething();
- }
-
- public function testMockedMethodIsCalledAtMostTwice()
- {
- $mock = $this->getMock('AnInterface');
- $mock->expects($this->atMost(2))
- ->method('doSomething');
-
- $mock->doSomething();
- $mock->doSomething();
- }
-
- public function testMockedMethodIsCalledAtMosttTwice2()
- {
- $mock = $this->getMock('AnInterface');
- $mock->expects($this->atMost(2))
- ->method('doSomething');
-
- $mock->doSomething();
- }
-
- public function testMockedMethodIsCalledOnce()
- {
- $mock = $this->getMock('AnInterface');
- $mock->expects($this->once())
- ->method('doSomething');
-
- $mock->doSomething();
- }
-
- public function testMockedMethodIsCalledOnceWithParameter()
- {
- $mock = $this->getMock('SomeClass');
- $mock->expects($this->once())
- ->method('doSomethingElse')
- ->with($this->equalTo('something'));
-
- $mock->doSomethingElse('something');
- }
-
- public function testMockedMethodIsCalledExactly()
- {
- $mock = $this->getMock('AnInterface');
- $mock->expects($this->exactly(2))
- ->method('doSomething');
-
- $mock->doSomething();
- $mock->doSomething();
- }
-
- public function testStubbedException()
- {
- $mock = $this->getMock('AnInterface');
- $mock->expects($this->any())
- ->method('doSomething')
- ->will($this->throwException(new Exception));
-
- try {
- $mock->doSomething();
- } catch (Exception $e) {
- return;
- }
-
- $this->fail();
- }
-
- public function testStubbedWillThrowException()
- {
- $mock = $this->getMock('AnInterface');
- $mock->expects($this->any())
- ->method('doSomething')
- ->willThrowException(new Exception);
-
- try {
- $mock->doSomething();
- } catch (Exception $e) {
- return;
- }
-
- $this->fail();
- }
-
- public function testStubbedReturnValue()
- {
- $mock = $this->getMock('AnInterface');
- $mock->expects($this->any())
- ->method('doSomething')
- ->will($this->returnValue('something'));
-
- $this->assertEquals('something', $mock->doSomething());
-
- $mock = $this->getMock('AnInterface');
- $mock->expects($this->any())
- ->method('doSomething')
- ->willReturn('something');
-
- $this->assertEquals('something', $mock->doSomething());
- }
-
- public function testStubbedReturnValueMap()
- {
- $map = array(
- array('a', 'b', 'c', 'd'),
- array('e', 'f', 'g', 'h')
- );
-
- $mock = $this->getMock('AnInterface');
- $mock->expects($this->any())
- ->method('doSomething')
- ->will($this->returnValueMap($map));
-
- $this->assertEquals('d', $mock->doSomething('a', 'b', 'c'));
- $this->assertEquals('h', $mock->doSomething('e', 'f', 'g'));
- $this->assertEquals(null, $mock->doSomething('foo', 'bar'));
-
- $mock = $this->getMock('AnInterface');
- $mock->expects($this->any())
- ->method('doSomething')
- ->willReturnMap($map);
-
- $this->assertEquals('d', $mock->doSomething('a', 'b', 'c'));
- $this->assertEquals('h', $mock->doSomething('e', 'f', 'g'));
- $this->assertEquals(null, $mock->doSomething('foo', 'bar'));
- }
-
- public function testStubbedReturnArgument()
- {
- $mock = $this->getMock('AnInterface');
- $mock->expects($this->any())
- ->method('doSomething')
- ->will($this->returnArgument(1));
-
- $this->assertEquals('b', $mock->doSomething('a', 'b'));
-
- $mock = $this->getMock('AnInterface');
- $mock->expects($this->any())
- ->method('doSomething')
- ->willReturnArgument(1);
-
- $this->assertEquals('b', $mock->doSomething('a', 'b'));
- }
-
- public function testFunctionCallback()
- {
- $mock = $this->getMock('SomeClass', array('doSomething'), array(), '', false);
- $mock->expects($this->once())
- ->method('doSomething')
- ->will($this->returnCallback('functionCallback'));
-
- $this->assertEquals('pass', $mock->doSomething('foo', 'bar'));
-
- $mock = $this->getMock('SomeClass', array('doSomething'), array(), '', false);
- $mock->expects($this->once())
- ->method('doSomething')
- ->willReturnCallback('functionCallback');
-
- $this->assertEquals('pass', $mock->doSomething('foo', 'bar'));
- }
-
- public function testStubbedReturnSelf()
- {
- $mock = $this->getMock('AnInterface');
- $mock->expects($this->any())
- ->method('doSomething')
- ->will($this->returnSelf());
-
- $this->assertEquals($mock, $mock->doSomething());
-
- $mock = $this->getMock('AnInterface');
- $mock->expects($this->any())
- ->method('doSomething')
- ->willReturnSelf();
-
- $this->assertEquals($mock, $mock->doSomething());
- }
-
- public function testStubbedReturnOnConsecutiveCalls()
- {
- $mock = $this->getMock('AnInterface');
- $mock->expects($this->any())
- ->method('doSomething')
- ->will($this->onConsecutiveCalls('a', 'b', 'c'));
-
- $this->assertEquals('a', $mock->doSomething());
- $this->assertEquals('b', $mock->doSomething());
- $this->assertEquals('c', $mock->doSomething());
-
- $mock = $this->getMock('AnInterface');
- $mock->expects($this->any())
- ->method('doSomething')
- ->willReturnOnConsecutiveCalls('a', 'b', 'c');
-
- $this->assertEquals('a', $mock->doSomething());
- $this->assertEquals('b', $mock->doSomething());
- $this->assertEquals('c', $mock->doSomething());
- }
-
- public function testStaticMethodCallback()
- {
- $mock = $this->getMock('SomeClass', array('doSomething'), array(), '', false);
- $mock->expects($this->once())
- ->method('doSomething')
- ->will($this->returnCallback(array('MethodCallback', 'staticCallback')));
-
- $this->assertEquals('pass', $mock->doSomething('foo', 'bar'));
- }
-
- public function testPublicMethodCallback()
- {
- $mock = $this->getMock('SomeClass', array('doSomething'), array(), '', false);
- $mock->expects($this->once())
- ->method('doSomething')
- ->will($this->returnCallback(array(new MethodCallback, 'nonStaticCallback')));
-
- $this->assertEquals('pass', $mock->doSomething('foo', 'bar'));
- }
-
- public function testMockClassOnlyGeneratedOnce()
- {
- $mock1 = $this->getMock('AnInterface');
- $mock2 = $this->getMock('AnInterface');
-
- $this->assertEquals(get_class($mock1), get_class($mock2));
- }
-
- public function testMockClassDifferentForPartialMocks()
- {
- $mock1 = $this->getMock('PartialMockTestClass');
- $mock2 = $this->getMock('PartialMockTestClass', array('doSomething'));
- $mock3 = $this->getMock('PartialMockTestClass', array('doSomething'));
- $mock4 = $this->getMock('PartialMockTestClass', array('doAnotherThing'));
- $mock5 = $this->getMock('PartialMockTestClass', array('doAnotherThing'));
-
- $this->assertNotEquals(get_class($mock1), get_class($mock2));
- $this->assertNotEquals(get_class($mock1), get_class($mock3));
- $this->assertNotEquals(get_class($mock1), get_class($mock4));
- $this->assertNotEquals(get_class($mock1), get_class($mock5));
- $this->assertEquals(get_class($mock2), get_class($mock3));
- $this->assertNotEquals(get_class($mock2), get_class($mock4));
- $this->assertNotEquals(get_class($mock2), get_class($mock5));
- $this->assertEquals(get_class($mock4), get_class($mock5));
- }
-
- public function testMockClassStoreOverrulable()
- {
- $mock1 = $this->getMock('PartialMockTestClass');
- $mock2 = $this->getMock('PartialMockTestClass', array(), array(), 'MyMockClassNameForPartialMockTestClass1');
- $mock3 = $this->getMock('PartialMockTestClass');
- $mock4 = $this->getMock('PartialMockTestClass', array('doSomething'), array(), 'AnotherMockClassNameForPartialMockTestClass');
- $mock5 = $this->getMock('PartialMockTestClass', array(), array(), 'MyMockClassNameForPartialMockTestClass2');
-
- $this->assertNotEquals(get_class($mock1), get_class($mock2));
- $this->assertEquals(get_class($mock1), get_class($mock3));
- $this->assertNotEquals(get_class($mock1), get_class($mock4));
- $this->assertNotEquals(get_class($mock2), get_class($mock3));
- $this->assertNotEquals(get_class($mock2), get_class($mock4));
- $this->assertNotEquals(get_class($mock2), get_class($mock5));
- $this->assertNotEquals(get_class($mock3), get_class($mock4));
- $this->assertNotEquals(get_class($mock3), get_class($mock5));
- $this->assertNotEquals(get_class($mock4), get_class($mock5));
- }
-
- /**
- * @covers PHPUnit_Framework_MockObject_Generator::getMock
- */
- public function testGetMockWithFixedClassNameCanProduceTheSameMockTwice()
- {
- $mock = $this->getMockBuilder('StdClass')->setMockClassName('FixedName')->getMock();
- $mock = $this->getMockBuilder('StdClass')->setMockClassName('FixedName')->getMock();
- $this->assertInstanceOf('StdClass', $mock);
- }
-
- public function testOriginalConstructorSettingConsidered()
- {
- $mock1 = $this->getMock('PartialMockTestClass');
- $mock2 = $this->getMock('PartialMockTestClass', array(), array(), '', false);
-
- $this->assertTrue($mock1->constructorCalled);
- $this->assertFalse($mock2->constructorCalled);
- }
-
- public function testOriginalCloneSettingConsidered()
- {
- $mock1 = $this->getMock('PartialMockTestClass');
- $mock2 = $this->getMock('PartialMockTestClass', array(), array(), '', true, false);
-
- $this->assertNotEquals(get_class($mock1), get_class($mock2));
- }
-
- public function testGetMockForAbstractClass()
- {
- $mock = $this->getMock('AbstractMockTestClass');
- $mock->expects($this->never())
- ->method('doSomething');
- }
-
- public function traversableProvider()
- {
- return array(
- array('Traversable'),
- array('\Traversable'),
- array('TraversableMockTestInterface'),
- array(array('Traversable')),
- array(array('Iterator','Traversable')),
- array(array('\Iterator','\Traversable'))
- );
- }
-
- /**
- * @dataProvider traversableProvider
- */
- public function testGetMockForTraversable($type)
- {
- $mock = $this->getMock($type);
- $this->assertInstanceOf('Traversable', $mock);
- }
-
- public function testMultipleInterfacesCanBeMockedInSingleObject()
- {
- $mock = $this->getMock(array('AnInterface', 'AnotherInterface'));
- $this->assertInstanceOf('AnInterface', $mock);
- $this->assertInstanceOf('AnotherInterface', $mock);
- }
-
- /**
- * @requires PHP 5.4.0
- */
- public function testGetMockForTrait()
- {
- $mock = $this->getMockForTrait('AbstractTrait');
- $mock->expects($this->never())->method('doSomething');
-
- $parent = get_parent_class($mock);
- $traits = class_uses($parent, false);
-
- $this->assertContains('AbstractTrait', $traits);
- }
-
- public function testClonedMockObjectShouldStillEqualTheOriginal()
- {
- $a = $this->getMock('stdClass');
- $b = clone $a;
- $this->assertEquals($a, $b);
- }
-
- public function testMockObjectsConstructedIndepentantlyShouldBeEqual()
- {
- $a = $this->getMock('stdClass');
- $b = $this->getMock('stdClass');
- $this->assertEquals($a, $b);
- }
-
- public function testMockObjectsConstructedIndepentantlyShouldNotBeTheSame()
- {
- $a = $this->getMock('stdClass');
- $b = $this->getMock('stdClass');
- $this->assertNotSame($a, $b);
- }
-
- public function testClonedMockObjectCanBeUsedInPlaceOfOriginalOne()
- {
- $x = $this->getMock('stdClass');
- $y = clone $x;
-
- $mock = $this->getMock('stdClass', array('foo'));
- $mock->expects($this->once())->method('foo')->with($this->equalTo($x));
- $mock->foo($y);
- }
-
- public function testClonedMockObjectIsNotIdenticalToOriginalOne()
- {
- $x = $this->getMock('stdClass');
- $y = clone $x;
-
- $mock = $this->getMock('stdClass', array('foo'));
- $mock->expects($this->once())->method('foo')->with($this->logicalNot($this->identicalTo($x)));
- $mock->foo($y);
- }
-
- public function testObjectMethodCallWithArgumentCloningEnabled()
- {
- $expectedObject = new StdClass;
-
- $mock = $this->getMockBuilder('SomeClass')
- ->setMethods(array('doSomethingElse'))
- ->enableArgumentCloning()
- ->getMock();
-
- $actualArguments = array();
-
- $mock->expects($this->any())
- ->method('doSomethingElse')
- ->will($this->returnCallback(function () use (&$actualArguments) {
- $actualArguments = func_get_args();
- }));
-
- $mock->doSomethingElse($expectedObject);
-
- $this->assertEquals(1, count($actualArguments));
- $this->assertEquals($expectedObject, $actualArguments[0]);
- $this->assertNotSame($expectedObject, $actualArguments[0]);
- }
-
- public function testObjectMethodCallWithArgumentCloningDisabled()
- {
- $expectedObject = new StdClass;
-
- $mock = $this->getMockBuilder('SomeClass')
- ->setMethods(array('doSomethingElse'))
- ->disableArgumentCloning()
- ->getMock();
-
- $actualArguments = array();
-
- $mock->expects($this->any())
- ->method('doSomethingElse')
- ->will($this->returnCallback(function () use (&$actualArguments) {
- $actualArguments = func_get_args();
- }));
-
- $mock->doSomethingElse($expectedObject);
-
- $this->assertEquals(1, count($actualArguments));
- $this->assertSame($expectedObject, $actualArguments[0]);
- }
-
- public function testArgumentCloningOptionGeneratesUniqueMock()
- {
- $mockWithCloning = $this->getMockBuilder('SomeClass')
- ->setMethods(array('doSomethingElse'))
- ->enableArgumentCloning()
- ->getMock();
-
- $mockWithoutCloning = $this->getMockBuilder('SomeClass')
- ->setMethods(array('doSomethingElse'))
- ->disableArgumentCloning()
- ->getMock();
-
- $this->assertNotEquals($mockWithCloning, $mockWithoutCloning);
- }
-
- public function testVerificationOfMethodNameFailsWithoutParameters()
- {
- $mock = $this->getMock('SomeClass', array('right', 'wrong'), array(), '', true, true, true);
- $mock->expects($this->once())
- ->method('right');
-
- $mock->wrong();
- try {
- $mock->__phpunit_verify();
- $this->fail('Expected exception');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertSame(
- "Expectation failed for method name is equal to when invoked 1 time(s).\n"
- . "Method was expected to be called 1 times, actually called 0 times.\n",
- $e->getMessage()
- );
- }
-
- $this->resetMockObjects();
- }
-
- public function testVerificationOfMethodNameFailsWithParameters()
- {
- $mock = $this->getMock('SomeClass', array('right', 'wrong'), array(), '', true, true, true);
- $mock->expects($this->once())
- ->method('right');
-
- $mock->wrong();
- try {
- $mock->__phpunit_verify();
- $this->fail('Expected exception');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertSame(
- "Expectation failed for method name is equal to when invoked 1 time(s).\n"
- . "Method was expected to be called 1 times, actually called 0 times.\n",
- $e->getMessage()
- );
- }
-
- $this->resetMockObjects();
- }
-
- public function testVerificationOfMethodNameFailsWithWrongParameters()
- {
- $mock = $this->getMock('SomeClass', array('right', 'wrong'), array(), '', true, true, true);
- $mock->expects($this->once())
- ->method('right')
- ->with(array('first', 'second'));
-
- try {
- $mock->right(array('second'));
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertSame(
- "Expectation failed for method name is equal to when invoked 1 time(s)\n"
- . "Parameter 0 for invocation SomeClass::right(Array (...)) does not match expected value.\n"
- . "Failed asserting that two arrays are equal.",
- $e->getMessage()
- );
- }
-
- try {
- $mock->__phpunit_verify();
- $this->fail('Expected exception');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertSame(
- "Expectation failed for method name is equal to when invoked 1 time(s).\n"
- . "Parameter 0 for invocation SomeClass::right(Array (...)) does not match expected value.\n"
- . "Failed asserting that two arrays are equal.\n"
- . "--- Expected\n"
- . "+++ Actual\n"
- . "@@ @@\n"
- . " Array (\n"
- . "- 0 => 'first'\n"
- . "- 1 => 'second'\n"
- . "+ 0 => 'second'\n"
- . " )\n",
- $e->getMessage()
- );
- }
-
- $this->resetMockObjects();
- }
-
- public function testVerificationOfNeverFailsWithEmptyParameters()
- {
- $mock = $this->getMock('SomeClass', array('right', 'wrong'), array(), '', true, true, true);
- $mock->expects($this->never())
- ->method('right')
- ->with();
-
- try {
- $mock->right();
- $this->fail('Expected exception');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertSame(
- 'SomeClass::right() was not expected to be called.',
- $e->getMessage()
- );
- }
-
- $this->resetMockObjects();
- }
-
- public function testVerificationOfNeverFailsWithAnyParameters()
- {
- $mock = $this->getMock('SomeClass', array('right', 'wrong'), array(), '', true, true, true);
- $mock->expects($this->never())
- ->method('right')
- ->withAnyParameters();
-
- try {
- $mock->right();
- $this->fail('Expected exception');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertSame(
- 'SomeClass::right() was not expected to be called.',
- $e->getMessage()
- );
- }
-
- $this->resetMockObjects();
- }
-
- /**
- * @ticket 199
- */
- public function testWithAnythingInsteadOfWithAnyParameters()
- {
- $mock = $this->getMock('SomeClass', array('right'), array(), '', true, true, true);
- $mock->expects($this->once())
- ->method('right')
- ->with($this->anything());
-
- try {
- $mock->right();
- $this->fail('Expected exception');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertSame(
- "Expectation failed for method name is equal to when invoked 1 time(s)\n" .
- "Parameter count for invocation SomeClass::right() is too low.\n" .
- "To allow 0 or more parameters with any value, omit ->with() or use ->withAnyParameters() instead.",
- $e->getMessage()
- );
- }
-
- $this->resetMockObjects();
- }
-
- /**
- * See https://github.com/sebastianbergmann/phpunit-mock-objects/issues/81
- */
- public function testMockArgumentsPassedByReference()
- {
- $foo = $this->getMockBuilder('MethodCallbackByReference')
- ->setMethods(array('bar'))
- ->disableOriginalConstructor()
- ->disableArgumentCloning()
- ->getMock();
-
- $foo->expects($this->any())
- ->method('bar')
- ->will($this->returnCallback(array($foo, 'callback')));
-
- $a = $b = $c = 0;
-
- $foo->bar($a, $b, $c);
-
- $this->assertEquals(1, $b);
- }
-
- /**
- * See https://github.com/sebastianbergmann/phpunit-mock-objects/issues/81
- */
- public function testMockArgumentsPassedByReference2()
- {
- $foo = $this->getMockBuilder('MethodCallbackByReference')
- ->disableOriginalConstructor()
- ->disableArgumentCloning()
- ->getMock();
-
- $foo->expects($this->any())
- ->method('bar')
- ->will($this->returnCallback(
- function (&$a, &$b, $c) {
- $b = 1;
- }
- ));
-
- $a = $b = $c = 0;
-
- $foo->bar($a, $b, $c);
-
- $this->assertEquals(1, $b);
- }
-
- /**
- * https://github.com/sebastianbergmann/phpunit-mock-objects/issues/116
- */
- public function testMockArgumentsPassedByReference3()
- {
- $foo = $this->getMockBuilder('MethodCallbackByReference')
- ->setMethods(array('bar'))
- ->disableOriginalConstructor()
- ->disableArgumentCloning()
- ->getMock();
-
- $a = new stdClass();
- $b = $c = 0;
-
- $foo->expects($this->any())
- ->method('bar')
- ->with($a, $b, $c)
- ->will($this->returnCallback(array($foo, 'callback')));
-
- $foo->bar($a, $b, $c);
- }
-
- /**
- * https://github.com/sebastianbergmann/phpunit/issues/796
- */
- public function testMockArgumentsPassedByReference4()
- {
- $foo = $this->getMockBuilder('MethodCallbackByReference')
- ->setMethods(array('bar'))
- ->disableOriginalConstructor()
- ->disableArgumentCloning()
- ->getMock();
-
- $a = new stdClass();
- $b = $c = 0;
-
- $foo->expects($this->any())
- ->method('bar')
- ->with($this->isInstanceOf("stdClass"), $b, $c)
- ->will($this->returnCallback(array($foo, 'callback')));
-
- $foo->bar($a, $b, $c);
- }
-
- /**
- * @requires extension soap
- */
- public function testCreateMockFromWsdl()
- {
- $mock = $this->getMockFromWsdl(__DIR__ . '/_fixture/GoogleSearch.wsdl', 'WsdlMock');
- $this->assertStringStartsWith(
- 'Mock_WsdlMock_',
- get_class($mock)
- );
- }
-
- /**
- * @requires extension soap
- */
- public function testCreateNamespacedMockFromWsdl()
- {
- $mock = $this->getMockFromWsdl(__DIR__ . '/_fixture/GoogleSearch.wsdl', 'My\\Space\\WsdlMock');
- $this->assertStringStartsWith(
- 'Mock_WsdlMock_',
- get_class($mock)
- );
- }
-
- /**
- * @requires extension soap
- */
- public function testCreateTwoMocksOfOneWsdlFile()
- {
- $mock = $this->getMockFromWsdl(__DIR__ . '/_fixture/GoogleSearch.wsdl');
- $mock = $this->getMockFromWsdl(__DIR__ . '/_fixture/GoogleSearch.wsdl');
- }
-
- /**
- * @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/156
- * @ticket 156
- */
- public function testInterfaceWithStaticMethodCanBeStubbed()
- {
- $this->assertInstanceOf(
- 'InterfaceWithStaticMethod',
- $this->getMock('InterfaceWithStaticMethod')
- );
- }
-
- /**
- * @expectedException PHPUnit_Framework_MockObject_BadMethodCallException
- */
- public function testInvokingStubbedStaticMethodRaisesException()
- {
- $mock = $this->getMock('ClassWithStaticMethod');
- $mock->staticMethod();
- }
-
- /**
- * @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/171
- * @ticket 171
- */
- public function testStubForClassThatImplementsSerializableCanBeCreatedWithoutInvokingTheConstructor()
- {
- $this->assertInstanceOf(
- 'ClassThatImplementsSerializable',
- $this->getMockBuilder('ClassThatImplementsSerializable')
- ->disableOriginalConstructor()
- ->getMock()
- );
- }
-
- private function resetMockObjects()
- {
- $refl = new ReflectionObject($this);
- $refl = $refl->getParentClass();
- $prop = $refl->getProperty('mockObjects');
- $prop->setAccessible(true);
- $prop->setValue($this, array());
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/ProxyObjectTest.php b/vendor/phpunit/phpunit-mock-objects/tests/ProxyObjectTest.php
deleted file mode 100644
index 2dde7e47..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/ProxyObjectTest.php
+++ /dev/null
@@ -1,40 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 2.0.0
- */
-class Framework_ProxyObjectTest extends PHPUnit_Framework_TestCase
-{
- public function testMockedMethodIsProxiedToOriginalMethod()
- {
- $proxy = $this->getMockBuilder('Bar')
- ->enableProxyingToOriginalMethods()
- ->getMock();
-
- $proxy->expects($this->once())
- ->method('doSomethingElse');
-
- $foo = new Foo;
- $this->assertEquals('result', $foo->doSomething($proxy));
- }
-
- public function testMockedMethodWithReferenceIsProxiedToOriginalMethod()
- {
- $proxy = $this->getMockBuilder('MethodCallbackByReference')
- ->enableProxyingToOriginalMethods()
- ->getMock();
- $a = $b = $c = 0;
-
- $proxy->callback($a, $b, $c);
-
- $this->assertEquals(1, $b);
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/_fixture/AbstractMockTestClass.php b/vendor/phpunit/phpunit-mock-objects/tests/_fixture/AbstractMockTestClass.php
deleted file mode 100644
index 1f2640cb..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/_fixture/AbstractMockTestClass.php
+++ /dev/null
@@ -1,10 +0,0 @@
- $value) {
- $this->{$key} = $value;
- }
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/_fixture/ClassWithStaticMethod.php b/vendor/phpunit/phpunit-mock-objects/tests/_fixture/ClassWithStaticMethod.php
deleted file mode 100644
index 0c13c120..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/_fixture/ClassWithStaticMethod.php
+++ /dev/null
@@ -1,7 +0,0 @@
-doSomethingElse();
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/_fixture/FunctionCallback.php b/vendor/phpunit/phpunit-mock-objects/tests/_fixture/FunctionCallback.php
deleted file mode 100644
index c12ac6cb..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/_fixture/FunctionCallback.php
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/_fixture/InterfaceWithStaticMethod.php b/vendor/phpunit/phpunit-mock-objects/tests/_fixture/InterfaceWithStaticMethod.php
deleted file mode 100644
index dee5f4fe..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/_fixture/InterfaceWithStaticMethod.php
+++ /dev/null
@@ -1,5 +0,0 @@
-constructorArgs = array($arg1, $arg2);
- }
-
- public function mockableMethod()
- {
- // something different from NULL
- return true;
- }
-
- public function anotherMockableMethod()
- {
- // something different from NULL
- return true;
- }
-
- public function __clone()
- {
- $this->cloned = true;
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/_fixture/PartialMockTestClass.php b/vendor/phpunit/phpunit-mock-objects/tests/_fixture/PartialMockTestClass.php
deleted file mode 100644
index 06099933..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/_fixture/PartialMockTestClass.php
+++ /dev/null
@@ -1,18 +0,0 @@
-constructorCalled = true;
- }
-
- public function doSomething()
- {
- }
-
- public function doAnotherThing()
- {
- }
-}
diff --git a/vendor/phpunit/phpunit-mock-objects/tests/_fixture/SingletonClass.php b/vendor/phpunit/phpunit-mock-objects/tests/_fixture/SingletonClass.php
deleted file mode 100644
index e0002668..00000000
--- a/vendor/phpunit/phpunit-mock-objects/tests/_fixture/SingletonClass.php
+++ /dev/null
@@ -1,28 +0,0 @@
-files()
- ->in('build')
- ->in('src')
- ->in('tests')
- ->name('*.php')
- ->name('*.phpt');
-
-return Symfony\CS\Config\Config::create()
- ->level(\Symfony\CS\FixerInterface::NONE_LEVEL)
- ->fixers(
- array(
- 'align_double_arrow',
- 'align_equals',
- 'braces',
- 'concat_with_spaces',
- 'duplicate_semicolon',
- 'elseif',
- 'empty_return',
- 'encoding',
- 'eof_ending',
- 'extra_empty_lines',
- 'function_call_space',
- 'function_declaration',
- 'indentation',
- 'join_function',
- 'line_after_namespace',
- 'linefeed',
- 'list_commas',
- 'long_array_syntax',
- 'lowercase_constants',
- 'lowercase_keywords',
- 'method_argument_space',
- 'multiple_use',
- 'namespace_no_leading_whitespace',
- 'no_blank_lines_after_class_opening',
- 'no_empty_lines_after_phpdocs',
- 'parenthesis',
- 'php_closing_tag',
- 'phpdoc_indent',
- 'phpdoc_no_access',
- 'phpdoc_no_empty_return',
- 'phpdoc_no_package',
- 'phpdoc_params',
- 'phpdoc_scalar',
- 'phpdoc_separation',
- 'phpdoc_to_comment',
- 'phpdoc_trim',
- 'phpdoc_types',
- 'phpdoc_var_without_name',
- 'remove_lines_between_uses',
- 'return',
- 'self_accessor',
- 'short_tag',
- 'single_line_after_imports',
- 'single_quote',
- 'spaces_before_semicolon',
- 'spaces_cast',
- 'ternary_spaces',
- 'trailing_spaces',
- 'trim_array_spaces',
- 'unused_use',
- 'visibility',
- 'whitespacy_lines'
- )
- )
- ->finder($finder);
-
diff --git a/vendor/phpunit/phpunit/.travis.yml b/vendor/phpunit/phpunit/.travis.yml
deleted file mode 100644
index a0d6bebd..00000000
--- a/vendor/phpunit/phpunit/.travis.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-language: php
-
-php:
- - 5.3
- - 5.4
- - 5.5
- - 5.6
-
-env:
- matrix:
- - DEPENDENCIES="high"
- - DEPENDENCIES="low"
-
-sudo: false
-
-before_install:
- - composer self-update
- - composer clear-cache
-
-install:
- - if [[ "$DEPENDENCIES" = 'high' ]]; then travis_retry composer update --no-interaction --no-ansi --no-progress --no-suggest --optimize-autoloader --prefer-stable; fi
- - if [[ "$DEPENDENCIES" = 'low' ]]; then travis_retry composer update --no-interaction --no-ansi --no-progress --no-suggest --optimize-autoloader --prefer-stable --prefer-lowest; fi
-
-script:
- - ./phpunit
- - ./phpunit --configuration ./build/travis-ci-fail.xml > /dev/null; if [ $? -eq 0 ]; then echo "SHOULD FAIL"; false; else echo "fail checked"; fi;
- - xmllint --noout --schema phpunit.xsd phpunit.xml
- - xmllint --noout --schema phpunit.xsd tests/_files/configuration.xml
- - xmllint --noout --schema phpunit.xsd tests/_files/configuration_empty.xml
- - xmllint --noout --schema phpunit.xsd tests/_files/configuration_xinclude.xml -xinclude
-
-notifications:
- email: false
-
diff --git a/vendor/phpunit/phpunit/CODE_OF_CONDUCT.md b/vendor/phpunit/phpunit/CODE_OF_CONDUCT.md
deleted file mode 100644
index d39d536c..00000000
--- a/vendor/phpunit/phpunit/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,28 +0,0 @@
-# Contributor Code of Conduct
-
-As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
-
-We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
-
-Examples of unacceptable behavior by participants include:
-
-* The use of sexualized language or imagery
-* Personal attacks
-* Trolling or insulting/derogatory comments
-* Public or private harassment
-* Publishing other's private information, such as physical or electronic
- addresses, without explicit permission
-* Other unethical or unprofessional conduct
-
-Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
-
-By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.
-
-This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
-
-Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project maintainer at sebastian@phpunit.de. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. Maintainers are obligated to maintain confidentiality with regard to the reporter of an incident.
-
-This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.3.0, available at [http://contributor-covenant.org/version/1/3/0/][version]
-
-[homepage]: http://contributor-covenant.org
-[version]: http://contributor-covenant.org/version/1/3/0/
diff --git a/vendor/phpunit/phpunit/CONTRIBUTING.md b/vendor/phpunit/phpunit/CONTRIBUTING.md
deleted file mode 100644
index fea001ae..00000000
--- a/vendor/phpunit/phpunit/CONTRIBUTING.md
+++ /dev/null
@@ -1,65 +0,0 @@
-# Contributing to PHPUnit
-
-## Contributor Code of Conduct
-
-Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
-
-## Workflow
-
-* Fork the project.
-* Make your bug fix or feature addition.
-* Add tests for it. This is important so we don't break it in a future version unintentionally.
-* Send a pull request. Bonus points for topic branches.
-
-Please make sure that you have [set up your user name and email address](http://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup) for use with Git. Strings such as `silly nick name ` look really stupid in the commit history of a project.
-
-Pull requests for bug fixes must be based on the current stable branch whereas pull requests for new features must be based on the `master` branch.
-
-We are trying to keep backwards compatibility breaks in PHPUnit to an absolute minimum. Please take this into account when proposing changes.
-
-Due to time constraints, we are not always able to respond as quickly as we would like. Please do not take delays personal and feel free to remind us if you feel that we forgot to respond.
-
-## Coding Guidelines
-
-This project comes with a configuration file for [php-cs-fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) (`.php_cs`) that you can use to (re)format your sourcecode for compliance with this project's coding guidelines:
-
-```bash
-$ wget http://get.sensiolabs.org/php-cs-fixer.phar
-
-$ php php-cs-fixer.phar fix
-```
-
-## Using PHPUnit from a Git checkout
-
-The following commands can be used to perform the initial checkout of PHPUnit:
-
-```bash
-$ git clone git://github.com/sebastianbergmann/phpunit.git
-
-$ cd phpunit
-```
-
-Retrieve PHPUnit's dependencies using [Composer](https://getcomposer.org/):
-
-```bash
-$ composer install
-```
-
-The `phpunit` script can be used to invoke the PHPUnit test runner:
-
-```bash
-$ ./phpunit --version
-```
-
-## Reporting issues
-
-Please use the most specific issue tracker to search for existing tickets and to open new tickets:
-
-* [General problems](https://github.com/sebastianbergmann/phpunit/issues)
-* [Code Coverage](https://github.com/sebastianbergmann/php-code-coverage/issues)
-* [Stub and Mock Objects](https://github.com/sebastianbergmann/phpunit-mock-objects/issues)
-* [DbUnit](https://github.com/sebastianbergmann/dbunit/issues)
-* [PHPUnit_Selenium](https://github.com/sebastianbergmann/phpunit-selenium/issues)
-* [Documentation](https://github.com/sebastianbergmann/phpunit-documentation/issues)
-* [Website](https://github.com/sebastianbergmann/phpunit-website/issues)
-
diff --git a/vendor/phpunit/phpunit/ChangeLog-4.0.md b/vendor/phpunit/phpunit/ChangeLog-4.0.md
deleted file mode 100644
index dc71b017..00000000
--- a/vendor/phpunit/phpunit/ChangeLog-4.0.md
+++ /dev/null
@@ -1,176 +0,0 @@
-# Changes in PHPUnit 4.0
-
-All notable changes of the PHPUnit 4.0 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
-
-## [4.0.20] - 2014-05-02
-
-### Fixed
-
-* Fixed [#1242](https://github.com/sebastianbergmann/phpunit/issues/1242): `--self-update` uses OpenSSL API that is deprecated in PHP 5.6
-
-## [4.0.19] - 2014-04-30
-
-### Fixed
-
-* Fixed [#1193](https://github.com/sebastianbergmann/phpunit/issues/1193): Process isolation does not work correctly when PHPUnit is used from PHAR
-* Fixed a BC break related to comparing `DOMNode` objects that was introduced in PHPUnit 4.0.18
-
-## [4.0.18] - 2014-04-29
-
-### Fixed
-
-* Fixed [#1218](https://github.com/sebastianbergmann/phpunit/issues/1218): `--self-update` destroys symlink
-
-## [4.0.17] - 2014-04-21
-
-### Changed
-
-* [Display a message that the PEAR installation method is no longer supported when PHPUnit was installed using the PEAR Installer](https://github.com/sebastianbergmann/phpunit/commit/70b02c6be0176ab8ad3d3c9ec97480556c5dd63b)
-
-## [4.0.16] - 2014-04-20
-
-### Fixed
-
-* [Fixed handling of the `--report-useless-tests`, `--strict-coverage`, `--disallow-test-output`, and `--enforce-time-limit` options](https://github.com/sebastianbergmann/phpunit/commit/38baa9670711adedfe44ef24a33b568f61f3f045)
-
-## [4.0.15] - 2014-04-16
-
-New release of PHPUnit as PHAR and PEAR package with updated dependencies
-
-## [4.0.14] - 2014-03-28
-
-New release of PHPUnit as PHAR and PEAR package with updated dependencies
-
-## [4.0.13] - 2014-03-26
-
-New release of PHPUnit as PHAR and PEAR package with updated dependencies
-
-## [4.0.12] - 2014-03-20
-
-### Changed
-
-* [Use blacklist from PHP_CodeCoverage](https://github.com/sebastianbergmann/phpunit/commit/16152ba4b8d0104ce34f60cb71b2b982ba84c898)
-
-## [4.0.11] - 2014-03-18
-
-### Fixed
-
-* [Fixed unintended autoloader invokation triggered by the `@beforeClass` and `@afterClass` annotations](https://github.com/sebastianbergmann/phpunit/commit/f12e10fddc3ccbddb652a04d9036aeb5a6d54bff)
-
-## [4.0.10] - 2014-03-18
-
-New release of PHPUnit as PHAR and PEAR package with updated dependencies (most notably a [fix](https://github.com/sebastianbergmann/phpunit-mock-objects/commit/c5e6274b8f2bf983cf883bb375cf44f99aff200e) in the mock object generator that caused a [performance regression](https://github.com/sebastianbergmann/phpunit/issues/1187))
-
-## [4.0.9] - 2014-03-17
-
-### Changed
-
-* Optimized the search for the `@before`, `@after`, `@beforeClass` and `@afterClass` annotations
-* Optimized the usage of `SebastianBergmann\Environment\Runtime::canCollectCodeCoverage()`
-
-### Fixed
-
-* The "No code coverage will be generated." message was displayed even when code coverage reporting was not requested
-
-## [4.0.8] - 2014-03-17
-
-### Fixed
-
-* Fixed [#1186](https://github.com/sebastianbergmann/phpunit/issues/1186): `@before` and `@after` methods are not called in `@dataProvider` methods
-
-## [4.0.7] - 2014-03-12
-
-### Fixed
-
-* Removed dependency on `phpunit/dbunit` in `composer.json` that was unintentionally added in PHPUnit 4.0.6
-
-## [4.0.6] - 2014-03-11
-
-New release of PHPUnit as PHAR and PEAR package with updated dependencies
-
-## [4.0.5] - 2014-03-10
-
-New release of PHPUnit as PHAR and PEAR package with updated dependencies
-
-## [4.0.4] - 2014-03-08
-
-### Fixed
-
-* Fixed stacktrace filtering when PHPUnit is used from a PHAR
-
-## [4.0.3] - 2014-03-07
-
-New release of PHPUnit as PHAR and PEAR package with updated dependencies
-
-## [4.0.2] - 2014-03-07
-
-### Fixed
-
-* Fixed an issue related to displaying PHPUnit's version number
-
-## [4.0.1] - 2014-03-07
-
-### Fixed
-
-* Fixed collection of code coverage data for tests that use a data provider
-
-## [4.0.0] - 2014-03-07
-
-### Added
-
-* Implemented #382: Added the `$options` parameter to `PHPUnit_Framework_TestCase::getMockFromWsdl()` for configuring the `SoapClient`
-* Implemented #628: Added `PHPUnit_Framework_Assert::countOf(), a shortcut to get a `PHPUnit_Framework_Constraint_Count` instance
-* Implemented #711: `coverage-text` now has an XML `showOnlySummary` option
-* Implemented #719: The `--stderr` switch now respects `--colors` and `--debug`
-* Implemented #746: Allow identity checking for non-object types in all asserts that depend on `TraversableContains`
-* Implemented #758: Show a proper stack trace when @expectedException fails due to a unexpected exception being thrown
-* Implemented #773: Recursive and repeated arrays are more gracefully when comparison differences are exported
-* Implemented #813: Added `@before`, `@after`, `@beforeClass` and `@afterClass` annotations
-* Implemented #834: Added the `@requires OS` annotation
-* Implemented #835: Printers that extend `PHPUnit_TextUI_ResultPrinter` should have similar construction
-* Implemented #838: Added a base test listener
-* Implemented #859: Added PHP label validation to attribute assertions
-* Implemented #869: Added support for the adjacent sibling selector (+) to `PHPUnit_Util_XML::findNodes()`
-* Implemented #871: Add Comparator for DateTime objects
-* Implemented #877: Added new HTML5 tags to `PHPUnit_Util_XML::findNodes()`
-* Added `--coverage-crap4j` switch to generate code coverage report in Crap4J XML format
-* `assertCount()`, `assertNotCount()`, `assertSameSize()`, and `assertNotSameSize()` now support all objects that implement the `Traversable` interface
-
-### Changed
-
-* A test will now fail in strict mode when it uses the `@covers` annotation and code that is not expected to be covered is executed
-* All relative paths in a configuration file are now resolved relative to that configuration file
-
-### Fixed
-
-* Fixed #240: XML strings are escaped by removing invalid characters
-* Fixed #261: `setUp()` and `setUpBeforeClass()` are run before filters are applied
-* Fixed #541: Excluded groups are counted towards total number of tests being executed
-* Fixed #789: PHP INI settings would not be passed to child processes
-* Fixed #806: Array references are now properly displayed in error output
-* Fixed #808: Resources are now reported as `resource(13) of type (stream)` instead of `NULL`
-* Fixed #873: PHPUnit suppresses exceptions thrown outside of test case function
-* Fixed: `phpt` test cases now use the correct php binary when executed through wrapper scripts
-
-[4.0.20]: https://github.com/sebastianbergmann/phpunit/compare/4.0.19...4.0.20
-[4.0.19]: https://github.com/sebastianbergmann/phpunit/compare/4.0.18...4.0.19
-[4.0.18]: https://github.com/sebastianbergmann/phpunit/compare/4.0.17...4.0.18
-[4.0.17]: https://github.com/sebastianbergmann/phpunit/compare/4.0.16...4.0.17
-[4.0.16]: https://github.com/sebastianbergmann/phpunit/compare/4.0.15...4.0.16
-[4.0.15]: https://github.com/sebastianbergmann/phpunit/compare/4.0.14...4.0.15
-[4.0.14]: https://github.com/sebastianbergmann/phpunit/compare/4.0.13...4.0.14
-[4.0.13]: https://github.com/sebastianbergmann/phpunit/compare/4.0.12...4.0.13
-[4.0.12]: https://github.com/sebastianbergmann/phpunit/compare/4.0.11...4.0.12
-[4.0.11]: https://github.com/sebastianbergmann/phpunit/compare/4.0.10...4.0.11
-[4.0.10]: https://github.com/sebastianbergmann/phpunit/compare/4.0.9...4.0.10
-[4.0.9]: https://github.com/sebastianbergmann/phpunit/compare/4.0.8...4.0.9
-[4.0.8]: https://github.com/sebastianbergmann/phpunit/compare/4.0.7...4.0.8
-[4.0.7]: https://github.com/sebastianbergmann/phpunit/compare/4.0.6...4.0.7
-[4.0.6]: https://github.com/sebastianbergmann/phpunit/compare/4.0.5...4.0.6
-[4.0.5]: https://github.com/sebastianbergmann/phpunit/compare/4.0.4...4.0.5
-[4.0.4]: https://github.com/sebastianbergmann/phpunit/compare/4.0.3...4.0.4
-[4.0.3]: https://github.com/sebastianbergmann/phpunit/compare/4.0.2...4.0.3
-[4.0.2]: https://github.com/sebastianbergmann/phpunit/compare/4.0.1...4.0.2
-[4.0.1]: https://github.com/sebastianbergmann/phpunit/compare/4.0.0...4.0.1
-[4.0.0]: https://github.com/sebastianbergmann/phpunit/compare/3.7...4.0.0
-
diff --git a/vendor/phpunit/phpunit/ChangeLog-4.1.md b/vendor/phpunit/phpunit/ChangeLog-4.1.md
deleted file mode 100644
index d7f10a74..00000000
--- a/vendor/phpunit/phpunit/ChangeLog-4.1.md
+++ /dev/null
@@ -1,73 +0,0 @@
-# Changes in PHPUnit 4.1
-
-All notable changes of the PHPUnit 4.1 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
-
-## [4.1.6] - 2014-08-17
-
-### Fixed
-
-* Fixed [#1380](https://github.com/sebastianbergmann/phpunit/issues/1380): `assertMatch()` returns `Unexpected end tag : hr`
-* Fixed [#1390](https://github.com/sebastianbergmann/phpunit/issues/1390): Licensing issue with third-party components bundled in PHAR distribution
-
-## [4.1.5] - 2014-08-07
-
-### Changed
-
-* Implemented [#1330](https://github.com/sebastianbergmann/phpunit/issues/1330): Allow non-ambiguous shortened long options
-
-### Fixed
-
-* Fixed [#529](https://github.com/sebastianbergmann/phpunit/issues/529): Tests missed in execution when another test extends from it
-* Fixed [#1149](https://github.com/sebastianbergmann/phpunit/issues/1149): Test swallows output buffer when run in a separate process
-* Fixed [#1336](https://github.com/sebastianbergmann/phpunit/issues/1336): Problem in process isolation with global variables that contain an object which contains a string which contains multiple backslashes
-* Fixed [#1337](https://github.com/sebastianbergmann/phpunit/issues/1337): Data Provider with `\` at the end of the name breaks with process isolation
-* Fixed [#1345](https://github.com/sebastianbergmann/phpunit/issues/1345): Process isolation blocks infinitely upon fatal error in child process
-* Fixed [#1354](https://github.com/sebastianbergmann/phpunit/issues/1354): PHPUnit test suite fails on Windows
-* Fixed [#1369](https://github.com/sebastianbergmann/phpunit/issues/1369): Performance of `TestSuite::addTestFile()` and missing documentation
-* Fixed [#1374](https://github.com/sebastianbergmann/phpunit/issues/1374): `tearDown()` is called despite unmet requirements
-
-## [4.1.4] - 2014-07-18
-
-### Fixed
-
-* Fixed [#1265](https://github.com/sebastianbergmann/phpunit/issues/1265): `PHPUnit_Runner_StandardTestSuiteLoader` could not be configured as loader
-* Fixed [#1311](https://github.com/sebastianbergmann/phpunit/issues/1311): Incomplete XML Schema for PHPUnit XML configuration file
-* Fixed [#1314](https://github.com/sebastianbergmann/phpunit/issues/1314): Bug in configuration parser
-
-## [4.1.3] - 2014-06-11
-
-New release of PHPUnit as PHP Archive (PHAR) with updated dependencies
-
-## [4.1.2] - 2014-06-07
-
-New release of PHPUnit as PHP Archive (PHAR) with updated dependencies
-
-## [4.1.1] - 2014-05-24
-
-### Added
-
-* Added `--selfupdate` alias for `--self-update`
-
-### Changed
-
-* Improved the fix for [#1133](https://github.com/sebastianbergmann/phpunit/issues/1133)
-
-### Fixed
-
-* Fixed the constructor argument for `SebastianBergmann\Version`
-
-## [4.1.0] - 2014-05-02
-
-### Changed
-
-* The code to compare PHP values for equality (in `assertEquals()`, for instance) has been factored out into a [separate component](https://github.com/sebastianbergmann/comparator)
-* [The mock object generator is now created lazily](https://github.com/sebastianbergmann/phpunit/pull/1165)
-
-[4.1.6]: https://github.com/sebastianbergmann/phpunit/compare/4.1.5...4.1.6
-[4.1.5]: https://github.com/sebastianbergmann/phpunit/compare/4.1.4...4.1.5
-[4.1.4]: https://github.com/sebastianbergmann/phpunit/compare/4.1.3...4.1.4
-[4.1.3]: https://github.com/sebastianbergmann/phpunit/compare/4.1.2...4.1.3
-[4.1.2]: https://github.com/sebastianbergmann/phpunit/compare/4.1.1...4.1.2
-[4.1.1]: https://github.com/sebastianbergmann/phpunit/compare/4.1.0...4.1.1
-[4.1.0]: https://github.com/sebastianbergmann/phpunit/compare/4.0...4.1.0
-
diff --git a/vendor/phpunit/phpunit/ChangeLog-4.2.md b/vendor/phpunit/phpunit/ChangeLog-4.2.md
deleted file mode 100644
index 0d902b74..00000000
--- a/vendor/phpunit/phpunit/ChangeLog-4.2.md
+++ /dev/null
@@ -1,56 +0,0 @@
-# Changes in PHPUnit 4.2
-
-All notable changes of the PHPUnit 4.2 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
-
-## [4.2.5] - 2014-09-06
-
-New release of PHPUnit as PHP Archive (PHAR) with updated dependencies
-
-## [4.2.4] - 2014-08-31
-
-### Fixed
-
-* Fixed [#1413](https://github.com/sebastianbergmann/phpunit/issues/1413): `assertCount()` hangs in infinite loop on HHVM
-
-## [4.2.3] - 2014-08-28
-
-### Fixed
-
-* Fixed [#1403](https://github.com/sebastianbergmann/phpunit/issues/1403): `phpunit --self-update` does not work
-
-## [4.2.2] - 2014-08-18
-
-### Fixed
-
-* Fixed [#1399](https://github.com/sebastianbergmann/phpunit/issues/1399): `enforceTimeLimit` configuration option is not handled
-
-## [4.2.1] - 2014-08-17
-
-### Fixed
-
-* Fixed [#1380](https://github.com/sebastianbergmann/phpunit/issues/1380): `assertMatch()` returns `Unexpected end tag : hr`
-* Fixed [#1390](https://github.com/sebastianbergmann/phpunit/issues/1390): Licensing issue with third-party components bundled in PHAR distribution
-
-## [4.2.0] - 2014-08-08
-
-### Added
-
-* Tests annotated with `@todo` will now be reported as risky when the `--disallow-todo-tests` option is used or `beStrictAboutTodoAnnotatedTests=true` is set in the configuration file
-* The `atLeast()` and `atMost()` invocation count matchers were added
-
-### Changed
-
-* `trigger_error(__METHOD__ . ' is deprecated', E_USER_DEPRECATED);` is used now to indicate that a PHPUnit API method is deprecated; the old "system" for deprecating methods has been removed
-* The PHP Archive (PHAR) distribution of PHPUnit can now be used as a library; `include()`ing or `require()`ing it will not execute the CLI test runner
-
-### Deprecated
-
-* The `assertTag()` and `assertSelect*()` assertion methods have been deprecated in favor of the [phpunit-dom-assertions](https://github.com/phpunit/phpunit-dom-assertions) extension; these methods will be removed in PHPUnit 5.0
-
-[4.2.5]: https://github.com/sebastianbergmann/phpunit/compare/4.2.4...4.2.5
-[4.2.4]: https://github.com/sebastianbergmann/phpunit/compare/4.2.3...4.2.4
-[4.2.3]: https://github.com/sebastianbergmann/phpunit/compare/4.2.2...4.2.3
-[4.2.2]: https://github.com/sebastianbergmann/phpunit/compare/4.2.1...4.2.2
-[4.2.1]: https://github.com/sebastianbergmann/phpunit/compare/4.2.0...4.2.1
-[4.2.0]: https://github.com/sebastianbergmann/phpunit/compare/4.1...4.2.0
-
diff --git a/vendor/phpunit/phpunit/ChangeLog-4.3.md b/vendor/phpunit/phpunit/ChangeLog-4.3.md
deleted file mode 100644
index 99c2826e..00000000
--- a/vendor/phpunit/phpunit/ChangeLog-4.3.md
+++ /dev/null
@@ -1,54 +0,0 @@
-# Changes in PHPUnit 4.3
-
-All notable changes of the PHPUnit 4.3 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
-
-## [4.3.5] - 2014-11-11
-
-### Changed
-
-* Merged [#1484](https://github.com/sebastianbergmann/phpunit/issues/1484): Removed `lazymap` from blacklist as it is not longer used
-* Merged [#1489](https://github.com/sebastianbergmann/phpunit/issues/1489): Do not send output from tests in process isolation when testing output
-
-## [4.3.4] - 2014-10-22
-
-### Fixed
-
-* Fixed [#1428](https://github.com/sebastianbergmann/phpunit/issues/1428): Issue with Composer dependencies
-* Fixed [#1447](https://github.com/sebastianbergmann/phpunit/issues/1447): PHPT tests treat line endings inconsistently
-
-## [4.3.3] - 2014-10-16
-
-### Fixed
-
-* Fixed [#1471](https://github.com/sebastianbergmann/phpunit/issues/1471): Output made while test is running is printed although `expectOutputString()` is used when an assertion fails
-
-## [4.3.2] - 2014-10-16
-
-### Fixed
-
-* Fixed [#1468](https://github.com/sebastianbergmann/phpunit/issues/1468): Incomplete and `@todo` annotated tests are counted twice
-
-## [4.3.1] - 2014-10-06
-
-New release of PHPUnit as PHP Archive (PHAR) with updated dependencies
-
-## [4.3.0] - 2014-10-03
-
-### Added
-
-* Merged [#1358](https://github.com/sebastianbergmann/phpunit/issues/1358): Implement `@expectedExceptionMessageRegExp` annotation
-* Merged [#1360](https://github.com/sebastianbergmann/phpunit/issues/1360): Allow a test to identify whether it runs in isolation
-
-### Fixed
-
-* Fixed [#1216](https://github.com/sebastianbergmann/phpunit/issues/1216): Bootstrap does not have global variables set when `--bootstrap` is specified on commandline
-* Fixed [#1351](https://github.com/sebastianbergmann/phpunit/issues/1351): `TestResult` object contains serialized test class upon test failure/exception in process isolation
-* Fixed [#1437](https://github.com/sebastianbergmann/phpunit/issues/1437): Risky test messages mask failures
-
-[4.3.5]: https://github.com/sebastianbergmann/phpunit/compare/4.3.4...4.3.5
-[4.3.4]: https://github.com/sebastianbergmann/phpunit/compare/4.3.3...4.3.4
-[4.3.3]: https://github.com/sebastianbergmann/phpunit/compare/4.3.2...4.3.3
-[4.3.2]: https://github.com/sebastianbergmann/phpunit/compare/4.3.1...4.3.2
-[4.3.1]: https://github.com/sebastianbergmann/phpunit/compare/4.3.0...4.3.1
-[4.3.0]: https://github.com/sebastianbergmann/phpunit/compare/4.2...4.3.0
-
diff --git a/vendor/phpunit/phpunit/ChangeLog-4.4.md b/vendor/phpunit/phpunit/ChangeLog-4.4.md
deleted file mode 100644
index 312af5ae..00000000
--- a/vendor/phpunit/phpunit/ChangeLog-4.4.md
+++ /dev/null
@@ -1,57 +0,0 @@
-# Changes in PHPUnit 4.4
-
-All notable changes of the PHPUnit 4.4 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
-
-## [4.4.5] - 2015-01-27
-
-### Fixed
-
-* Fixed [#1592](https://github.com/sebastianbergmann/phpunit/issues/1592): Incorrect dependency information
-
-## [4.4.4] - 2015-01-24
-
-### Fixed
-
-* Fixed [#1587](https://github.com/sebastianbergmann/phpunit/issues/1587): Class `SebastianBergmann\Exporter\Context` not found
-
-## [4.4.3] - 2015-01-24
-
-New PHAR release due to updated dependencies
-
-## [4.4.2] - 2015-01-17
-
-### Changed
-
-* Merged [#1573](https://github.com/sebastianbergmann/phpunit/issues/1573): Updates for the XSD for PHPUnit XML configuration
-
-### Fixed
-
-* Merged [#1567](https://github.com/sebastianbergmann/phpunit/issues/1567): `coverage-crap4j` missing in XSD for PHPUnit XML configuration
-* Fixed [#1570](https://github.com/sebastianbergmann/phpunit/issues/1570): Test that prints output is marked as failure and not as risky when `--disallow-test-output` is used
-* Fixed `--stderr` with `--tap` or `--testdox` options
-
-## [4.4.1] - 2014-12-28
-
-### Changed
-
-* Merged [#1528](https://github.com/sebastianbergmann/phpunit/issues/1528): Add `expectedCount()` to `toString()` return value
-
-## [4.4.0] - 2014-12-05
-
-### Added
-
-* Merged [#1371](https://github.com/sebastianbergmann/phpunit/issues/1371): Implement `assertArraySubset()` assertion
-* Merged [#1439](https://github.com/sebastianbergmann/phpunit/issues/1439): Add support for `double` to `assertInternalType()`
-
-### Changed
-
-* Merged [#1427](https://github.com/sebastianbergmann/phpunit/issues/1427): Improve failure output for tests when provided data is binary
-* Merged [#1458](https://github.com/sebastianbergmann/phpunit/issues/1458): Only enable colors when PHPUnit is run on a console (and output is not sent to a file)
-
-[4.4.5]: https://github.com/sebastianbergmann/phpunit/compare/4.4.4...4.4.5
-[4.4.4]: https://github.com/sebastianbergmann/phpunit/compare/4.4.3...4.4.4
-[4.4.3]: https://github.com/sebastianbergmann/phpunit/compare/4.4.2...4.4.3
-[4.4.2]: https://github.com/sebastianbergmann/phpunit/compare/4.4.1...4.4.2
-[4.4.1]: https://github.com/sebastianbergmann/phpunit/compare/4.4.0...4.4.1
-[4.4.0]: https://github.com/sebastianbergmann/phpunit/compare/4.3...4.4.0
-
diff --git a/vendor/phpunit/phpunit/ChangeLog-4.5.md b/vendor/phpunit/phpunit/ChangeLog-4.5.md
deleted file mode 100644
index 2313de10..00000000
--- a/vendor/phpunit/phpunit/ChangeLog-4.5.md
+++ /dev/null
@@ -1,28 +0,0 @@
-# Changes in PHPUnit 4.5
-
-All notable changes of the PHPUnit 4.5 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
-
-## [4.5.1] - 2015-03-29
-
-## [4.5.0] - 2015-02-05
-
-### Added
-
-* Added out-of-the-box support for [Prophecy](https://github.com/phpspec/prophecy)
-* Implemented [#137](https://github.com/sebastianbergmann/phpunit/issues/137): Add support for variable number of tests shown per line in default result printer
-
-### Changed
-
-* Merged [#1478](https://github.com/sebastianbergmann/phpunit/issues/1478): Improve the performance of `PHPUnit_Framework_Constraint_IsEqual` (which is used by `assertEquals()`, for instance) for the most common case
-
-### Deprecated
-
-* [Deprecated](https://github.com/sebastianbergmann/phpunit/commit/7abe7796f77b13fdf3cfc506fb987d6c2ab477f5) the `--strict` commandline option and the XML configuration's `strict` attribute
-
-### Fixed
-
-* Fixed [#1474](https://github.com/sebastianbergmann/phpunit/issues/1474): Allow the registration of custom comparators for `assertEquals()` et al. (again)
-
-[4.5.1]: https://github.com/sebastianbergmann/phpunit/compare/4.5.0...4.5.1
-[4.5.0]: https://github.com/sebastianbergmann/phpunit/compare/4.4...4.5.0
-
diff --git a/vendor/phpunit/phpunit/ChangeLog-4.6.md b/vendor/phpunit/phpunit/ChangeLog-4.6.md
deleted file mode 100644
index 3571634a..00000000
--- a/vendor/phpunit/phpunit/ChangeLog-4.6.md
+++ /dev/null
@@ -1,95 +0,0 @@
-# Changes in PHPUnit 4.6
-
-All notable changes of the PHPUnit 4.6 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
-
-## [4.6.10] - 2015-06-03
-
-### Changed
-
-* Merged [#1693](https://github.com/sebastianbergmann/phpunit/pull/1693): Improved API documentation
-* Merged [#1706](https://github.com/sebastianbergmann/phpunit/pull/1706): Avoid hard-coded URI to `phpunit.xsd`
-* Merged [#1725](https://github.com/sebastianbergmann/phpunit/pull/1725): Update phpDox XSD URI
-* Merged [#1735](https://github.com/sebastianbergmann/phpunit/pull/1735): Mute `chdir()` failures in XInclude handling of XML configuration file
-* Merged [#1736](https://github.com/sebastianbergmann/phpunit/pull/1736): Verify that phar file can be overwritten before attempting self update
-
-### Fixed
-
-* Fixed [#1737](https://github.com/sebastianbergmann/phpunit/issues/1737): Confusing output from `--testdox` for empty test class
-
-## [4.6.9] - 2015-05-29
-
-### Fixed
-
-* Fixed [#1731](https://github.com/sebastianbergmann/phpunit/issues/1731): `.` after failure count has no background color when `--colors` is used
-
-## [4.6.8] - 2015-05-28
-
-New PHAR release due to updated dependencies
-
-## [4.6.7] - 2015-05-25
-
-New PHAR release due to updated dependencies
-
-## [4.6.6] - 2015-04-29
-
-### Fixed
-
-* Fixed [#1684](https://github.com/sebastianbergmann/phpunit/issues/1684): PHAR does not work on HHVM
-
-## [4.6.5] - 2015-04-29
-
-* Fixed [#1677](https://github.com/sebastianbergmann/phpunit/issues/1677): Number of risky tests not printed when there are failing tests
-* Fixed [#1688](https://github.com/sebastianbergmann/phpunit/issues/1688): Self-Update operation does not work due to outdated SSL certificate
-
-## [4.6.4] - 2015-04-11
-
-### Changed
-
-* The default list of blacklisted classes is now always passed to PHP_CodeCoverage
-
-## [4.6.3] - 2015-04-11
-
-### Changed
-
-* Updated the default list of blacklisted classes
-
-## [4.6.2] - 2015-04-07
-
-### Fixed
-
-* Fixed [#1667](https://github.com/sebastianbergmann/phpunit/issues/1667): Loading `src/Framework/Assert/Functions.php` by default causes collisions
-
-## [4.6.1] - 2015-04-03
-
-### Fixed
-
-* Fixed [#1665](https://github.com/sebastianbergmann/phpunit/issues/1665): PHPUnit 4.6.0 PHAR does not work when renamed to `phpunit`
-
-## [4.6.0] - 2015-04-03
-
-### Added
-
-* Added the `--strict-global-state` command-line option and the `beStrictAboutChangesToGlobalState` configuration setting for enabling a check that global variabes, super-global variables, and static attributes in user-defined classes are not modified during a test
-* Merged [#1527](https://github.com/sebastianbergmann/phpunit/issues/1527) and [#1529](https://github.com/sebastianbergmann/phpunit/issues/1529): Allow to define options for displaying colors
-
-### Changed
-
-* Merged [#1528](https://github.com/sebastianbergmann/phpunit/issues/1528): Improve message when `PHPUnit_Framework_Constraint_Count` is used with logical operators
-
-### Fixed
-
-* Merged [#1537](https://github.com/sebastianbergmann/phpunit/issues/1537): Fix problem of `--stderr` with `--tap` and `--testdox`
-* Fixed [#1599](https://github.com/sebastianbergmann/phpunit/issues/1599): The PHAR build of PHPUnit no longer uses an autoloader to load PHPUnit's own classes and instead statically loads all classes on startup
-
-[4.6.10]: https://github.com/sebastianbergmann/phpunit/compare/4.6.9...4.6.10
-[4.6.9]: https://github.com/sebastianbergmann/phpunit/compare/4.6.8...4.6.9
-[4.6.8]: https://github.com/sebastianbergmann/phpunit/compare/4.6.7...4.6.8
-[4.6.7]: https://github.com/sebastianbergmann/phpunit/compare/4.6.6...4.6.7
-[4.6.6]: https://github.com/sebastianbergmann/phpunit/compare/4.6.5...4.6.6
-[4.6.5]: https://github.com/sebastianbergmann/phpunit/compare/4.6.4...4.6.5
-[4.6.4]: https://github.com/sebastianbergmann/phpunit/compare/4.6.3...4.6.4
-[4.6.3]: https://github.com/sebastianbergmann/phpunit/compare/4.6.2...4.6.3
-[4.6.2]: https://github.com/sebastianbergmann/phpunit/compare/4.6.1...4.6.2
-[4.6.1]: https://github.com/sebastianbergmann/phpunit/compare/4.6.0...4.6.1
-[4.6.0]: https://github.com/sebastianbergmann/phpunit/compare/4.5...4.6.0
-
diff --git a/vendor/phpunit/phpunit/ChangeLog-4.7.md b/vendor/phpunit/phpunit/ChangeLog-4.7.md
deleted file mode 100644
index 948c1274..00000000
--- a/vendor/phpunit/phpunit/ChangeLog-4.7.md
+++ /dev/null
@@ -1,71 +0,0 @@
-# Changes in PHPUnit 4.7
-
-All notable changes of the PHPUnit 4.7 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
-
-## [4.7.7] - 2015-07-13
-
-New PHAR release due to updated dependencies
-
-## [4.7.6] - 2015-06-30
-
-### Fixed
-
-* Fixed [#1681](https://github.com/sebastianbergmann/phpunit/issues/1681): Code Coverage filter configuration is not passed to child processes
-* Fixed [#1692](https://github.com/sebastianbergmann/phpunit/issues/1692): Clean up `PHPUnit_Extensions_RepeatedTest` after refactoring
-* Fixed [#1763](https://github.com/sebastianbergmann/phpunit/issues/1763): `@before` and `@after` annotations do not work when inherited
-
-## [4.7.5] - 2015-06-21
-
-### Fixed
-
-* Fixed [#490](https://github.com/sebastianbergmann/phpunit/issues/490): Ensure that a test can only be one of `@small`, `@medium`, or `@large`.
-* Fixed [#1704](https://github.com/sebastianbergmann/phpunit/issues/1704): Output printed during test missing when using TAP
-
-## [4.7.4] - 2015-06-18
-
-### Changed
-
-* The `PHPUnit_Framework_Constraint_IsType` constraint now knows about the `real` type (which is an alias for `float`)
-* Various work on compatibility with PHP 7
-
-### Fixed
-
-* Fixed [#1749](https://github.com/sebastianbergmann/phpunit/issues/1749): `stopOnError` configuration setting does not work
-
-## [4.7.3] - 2015-06-11
-
-### Fixed
-
-* Fixed [#1317](https://github.com/sebastianbergmann/phpunit/issues/1317): JUnit XML logfiles does not contain warnings
-* Fixed an [issue](https://github.com/sebastianbergmann/php-code-coverage/issues/347) where the warning that no whitelist is used is displayed when it should not
-
-## [4.7.2] - 2015-06-06
-
-New PHAR release due to updated dependencies
-
-## [4.7.1] - 2015-06-05
-
-New PHAR release due to updated dependencies
-
-## [4.7.0] - 2015-06-05
-
-### Added
-
-* Merged [#1718](https://github.com/sebastianbergmann/phpunit/issues/1718): Support for `--INI--` section in PHPT tests
-
-### Changed
-
-* Tests not annotated with `@small`, `@medium`, or `@large` are no longer treated as being annotated with `@small`
-* In verbose mode, the test runner now prints information about the PHP runtime
-* To be consistent with the printing of PHP runtime information, the configuration file used is only printed in verbose mode
-* A warning is now printed when code coverage data is collected but no whitelist is configured
-
-[4.7.7]: https://github.com/sebastianbergmann/phpunit/compare/4.7.6...4.7.7
-[4.7.6]: https://github.com/sebastianbergmann/phpunit/compare/4.7.5...4.7.6
-[4.7.5]: https://github.com/sebastianbergmann/phpunit/compare/4.7.4...4.7.5
-[4.7.4]: https://github.com/sebastianbergmann/phpunit/compare/4.7.3...4.7.4
-[4.7.3]: https://github.com/sebastianbergmann/phpunit/compare/4.7.2...4.7.3
-[4.7.2]: https://github.com/sebastianbergmann/phpunit/compare/4.7.1...4.7.2
-[4.7.1]: https://github.com/sebastianbergmann/phpunit/compare/4.7.0...4.7.1
-[4.7.0]: https://github.com/sebastianbergmann/phpunit/compare/4.6...4.7.0
-
diff --git a/vendor/phpunit/phpunit/ChangeLog-4.8.md b/vendor/phpunit/phpunit/ChangeLog-4.8.md
deleted file mode 100644
index fee9ed22..00000000
--- a/vendor/phpunit/phpunit/ChangeLog-4.8.md
+++ /dev/null
@@ -1,293 +0,0 @@
-# Changes in PHPUnit 4.8
-
-All notable changes of the PHPUnit 4.8 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
-
-## [4.8.36] - 2017-06-21
-
-### Added
-
-* Added `PHPUnit\Framework\AssertionFailedError`, `PHPUnit\Framework\Test`, and `PHPUnit\Framework\TestSuite` to the forward compatibility layer for PHPUnit 6
-
-## [4.8.35] - 2017-02-06
-
-### Added
-
-* Backported the forward compatibility layer for PHPUnit 6 from PHPUnit 5 so that `PHPUnit\Framework\TestCase` can be used instead of `PHPUnit_Framework_TestCase`
-
-## [4.8.34] - 2017-01-26
-
-* Fixed [#2447](https://github.com/sebastianbergmann/phpunit/issues/2447): Reverted backwards incompatible change to handling of boolean environment variable values specified in XML
-
-## [4.8.33] - 2017-01-25
-
-### Fixed
-
-* Fixed [#1983](https://github.com/sebastianbergmann/phpunit/pull/1983): Tests with `@expectedException` annotation cannot be skipped
-* Fixed [#2275](https://github.com/sebastianbergmann/phpunit/pull/2275): Invalid UTF-8 characters can lead to missing output
-* Fixed [#2331](https://github.com/sebastianbergmann/phpunit/issues/2331): Boolean environment variable values specified in XML get mangled
-* Fixed [#2392](https://github.com/sebastianbergmann/phpunit/issues/2392): Empty (but valid) data provider should skip the test
-* Fixed [#2431](https://github.com/sebastianbergmann/phpunit/issues/2431): `assertArraySubset()` does not support `ArrayAccess`
-
-## [4.8.32] - 2017-01-22
-
-### Fixed
-
-* Fixed [#2428](https://github.com/sebastianbergmann/phpunit/pull/2428): Nested arrays specificied in XML configuration file are not handled correctly
-
-## [4.8.31] - 2016-12-09
-
-### Fixed
-
-* Fixed [#2384](https://github.com/sebastianbergmann/phpunit/pull/2384): Handle `PHPUnit_Framework_Exception` correctly when expecting exceptions
-
-## [4.8.30] - 2016-12-02
-
-### Fixed
-
-* Fixed [#2367](https://github.com/sebastianbergmann/phpunit/pull/2367): Bug in `PHPUnit_Util_Test::parseAnnotationContent()`
-* Fixed [#2375](https://github.com/sebastianbergmann/phpunit/issues/2375): Invalid regular expression for `--filter` causes PHP warning
-
-## [4.8.29] - 2016-11-20
-
-### Changed
-
-* Bumped the required version of `sebastian/comparator`
-
-## [4.8.28] - 2016-11-14
-
-### Fixed
-
-* Improved the fix for [#1955](https://github.com/sebastianbergmann/phpunit/issues/1955): Process isolation fails when running tests with `phpdbg -qrr`
-
-## [4.8.27] - 2016-07-21
-
-### Fixed
-
-* Fixed [#1968](https://github.com/sebastianbergmann/phpunit/issues/1968): Invalid data sets are not handled correctly for `@testWith` annotation
-
-## [4.8.26] - 2016-05-17
-
-### Fixed
-
-* Fixed [phpunit-mock-objects/#301](https://github.com/sebastianbergmann/phpunit-mock-objects/issues/301): `PHPUnit_Framework_MockObject_MockBuilder::getMock()` calls `PHPUnit_Framework_TestCase::getMock()` with more arguments than accepted
-
-## [4.8.25] - 2016-05-10
-
-### Fixed
-
-* Fixed [#2112](https://github.com/sebastianbergmann/phpunit/issues/2112): Output is html entity encoded when ran through `phpdbg`
-* Fixed [#2158](https://github.com/sebastianbergmann/phpunit/issues/2158): Failure to run tests in separate processes if a file included into main process contains constant definition
-
-## [4.8.24] - 2016-03-14
-
-### Fixed
-
-* Fixed [#1959](https://github.com/sebastianbergmann/phpunit/issues/1959): Prophecy errors are not handled correctly
-* Fixed [#2039](https://github.com/sebastianbergmann/phpunit/issues/2039): TestDox does not handle snake_case test methods properly
-* Fixed [#2109](https://github.com/sebastianbergmann/phpunit/issues/2109): Process isolation leaks global variable
-
-## [4.8.23] - 2016-02-11
-
-### Fixed
-
-* Fixed [#2072](https://github.com/sebastianbergmann/phpunit/issues/2072): Paths in XML configuration file were not handled correctly when they have whitespace around them
-
-## [4.8.22] - 2016-02-02
-
-### Fixed
-
-* Fixed [#2050](https://github.com/sebastianbergmann/phpunit/issues/2050): `PHPUnit_Util_XML::load()` raises exception with empty message when XML string is empty
-* Fixed a bug in `PHPUnit_Runner_Version::series()`
-
-## [4.8.21] - 2015-12-12
-
-### Changed
-
-* Reverted the changes introduced in PHPUnit 4.8.20 as the only thing the new version constraint in `composer.json` achieved was locking PHP 7 users to PHPUnit 4.8.19
-
-## [4.8.20] - 2015-12-10
-
-### Changed
-
-* Changed PHP version constraint in `composer.json` to prevent installing PHPUnit 4.8 on PHP 7
-* `phpunit.phar` will now refuse to work on PHP 7
-
-## [4.8.19] - 2015-11-30
-
-### Fixed
-
-* Fixed [#1955](https://github.com/sebastianbergmann/phpunit/issues/1955): Process isolation fails when running tests with `phpdbg -qrr`
-
-## [4.8.18] - 2015-11-11
-
-### Changed
-
-* DbUnit 1.4 is bundled again in the PHAR distribution
-
-## [4.8.17] - 2015-11-10
-
-### Fixed
-
-* Fixed [#1935](https://github.com/sebastianbergmann/phpunit/issues/1935): `PHP_CodeCoverage_Exception` not handled properly
-* Fixed [#1948](https://github.com/sebastianbergmann/phpunit/issues/1948): Unable to use PHAR due to unsupported signature error
-
-### Changed
-
-* DbUnit >= 2.0.2 is now bundled in the PHAR distribution
-
-## [4.8.16] - 2015-10-23
-
-### Added
-
-* Implemented [#1925](https://github.com/sebastianbergmann/phpunit/issues/1925): Provide a library-only PHAR
-
-## [4.8.15] - 2015-10-22
-
-### Fixed
-
-* The backup of global state is now properly restored when changes to global state are disallowed
-* The `__PHPUNIT_PHAR__` constant is now properly set when the PHPUnit PHAR is used as a library
-
-## [4.8.14] - 2015-10-17
-
-### Fixed
-
-* Fixed [#1892](https://github.com/sebastianbergmann/phpunit/issues/1892): `--coverage-text` does not honor color settings
-
-## [4.8.13] - 2015-10-14
-
-### Added
-
-* Added the `--self-upgrade` commandline switch for upgrading a PHPUnit PHAR to the latest version
-
-### Changed
-
-* The `--self-update` commandline switch now updates a PHPUnit PHAR to the latest version within the same release series
-
-## [4.8.12] - 2015-10-12
-
-### Changed
-
-* Merged [#1893](https://github.com/sebastianbergmann/phpunit/issues/1893): Removed workaround for phpab bug
-
-## [4.8.11] - 2015-10-07
-
-### Fixed
-
-* Merged [#1885](https://github.com/sebastianbergmann/phpunit/issues/1885): Fixed handling of PHP configuration settings for process isolation
-* Fixed [#1857](https://github.com/sebastianbergmann/phpunit/issues/1857): `@covers` and `@uses` should only take a single word
-* Fixed [#1879](https://github.com/sebastianbergmann/phpunit/issues/1879): `assertEqualXMLStructure()` cannot compare nodes with an ID
-* Fixed [#1898](https://github.com/sebastianbergmann/phpunit/issues/1898): `@covers` and `@uses` cannot be used for namespaced functions
-* Fixed [#1901](https://github.com/sebastianbergmann/phpunit/issues/1901): `--self-update` updates to PHPUnit 5, even on PHP < 5.6
-
-## [4.8.10] - 2015-10-01
-
-### Fixed
-
-* Merged [#1884](https://github.com/sebastianbergmann/phpunit/issues/1884): Avoid passing `Error` to `onNotSuccessfulTest()` on PHP 7
-
-## [4.8.9] - 2015-09-20
-
-### Fixed
-
-* Fixed regression introduced in PHPUnit 4.8.8
-
-## [4.8.8] - 2015-09-19
-
-### Fixed
-
-* Fixed [#1860](https://github.com/sebastianbergmann/phpunit/issues/1860): Not well-formed XML strings are always considered equal by `PHPUnit_Framework_Assert::assertXmlStringEqualsXmlString()`
-
-## [4.8.7] - 2015-09-14
-
-New PHAR release due to updated dependencies
-
-## [4.8.6] - 2015-08-24
-
-### Fixed
-
-* Fixed [#1835](https://github.com/sebastianbergmann/phpunit/issues/1835): Skipped test reported as errored since PHPUnit 4.7.4
-
-## [4.8.5] - 2015-08-19
-
-### Fixed
-
-* Fixed [#1831](https://github.com/sebastianbergmann/phpunit/issues/1831): PHAR manifest is missing
-
-## [4.8.4] - 2015-08-15
-
-### Fixed
-
-* Fixed [#1823](https://github.com/sebastianbergmann/phpunit/issues/1823): Columns attribute in XML configuration file is ignored
-
-## [4.8.3] - 2015-08-10
-
-### Changed
-
-* PHPUnit now exits early during bootstrap when an unsupported version of PHP is used
-
-## [4.8.2] - 2015-08-07
-
-### Fixed
-
-* Fixed [#1816](https://github.com/sebastianbergmann/phpunit/issues/1816): PHPUnit 4.8.1 shows "4.8.0" as version number
-
-## [4.8.1] - 2015-08-07
-
-### Fixed
-
-* Fixed [#1815](https://github.com/sebastianbergmann/phpunit/issues/1815): `phpunit --self-update` does not work in PHPUnit 4.8.0
-
-## [4.8.0] - 2015-08-07
-
-### Added
-
-* Added `--check-version` commandline switch to check whether the current version of PHPUnit is used (PHAR only)
-* Added `--no-coverage` commandline switch to ignore code coverage configuration from the configuration file
-* Implemented [#1663](https://github.com/sebastianbergmann/phpunit/issues/1663): The Crap4J report's threshold is now configurable
-* Merged [#1728](https://github.com/sebastianbergmann/phpunit/issues/1728): Implemented the `@testWith` annotation as "syntactic sugar" for data providers
-* Merged [#1739](https://github.com/sebastianbergmann/phpunit/issues/1739): Added support to the commandline test runner for using options after arguments
-
-### Changed
-
-* Made the argument check of `assertContains()` and `assertNotContains()` more strict to prevent undefined behavior such as [#1808](https://github.com/sebastianbergmann/phpunit/issues/1808)
-* Changed the name of the default group from `__nogroup__` to `default`
-
-[4.8.36]: https://github.com/sebastianbergmann/phpunit/compare/4.8.35...4.8.36
-[4.8.35]: https://github.com/sebastianbergmann/phpunit/compare/4.8.34...4.8.35
-[4.8.34]: https://github.com/sebastianbergmann/phpunit/compare/4.8.33...4.8.34
-[4.8.33]: https://github.com/sebastianbergmann/phpunit/compare/4.8.32...4.8.33
-[4.8.32]: https://github.com/sebastianbergmann/phpunit/compare/4.8.31...4.8.32
-[4.8.31]: https://github.com/sebastianbergmann/phpunit/compare/4.8.30...4.8.31
-[4.8.30]: https://github.com/sebastianbergmann/phpunit/compare/4.8.29...4.8.30
-[4.8.29]: https://github.com/sebastianbergmann/phpunit/compare/4.8.28...4.8.29
-[4.8.28]: https://github.com/sebastianbergmann/phpunit/compare/4.8.27...4.8.28
-[4.8.27]: https://github.com/sebastianbergmann/phpunit/compare/4.8.26...4.8.27
-[4.8.26]: https://github.com/sebastianbergmann/phpunit/compare/4.8.25...4.8.26
-[4.8.25]: https://github.com/sebastianbergmann/phpunit/compare/4.8.24...4.8.25
-[4.8.24]: https://github.com/sebastianbergmann/phpunit/compare/4.8.23...4.8.24
-[4.8.23]: https://github.com/sebastianbergmann/phpunit/compare/4.8.22...4.8.23
-[4.8.22]: https://github.com/sebastianbergmann/phpunit/compare/4.8.21...4.8.22
-[4.8.21]: https://github.com/sebastianbergmann/phpunit/compare/4.8.20...4.8.21
-[4.8.20]: https://github.com/sebastianbergmann/phpunit/compare/4.8.19...4.8.20
-[4.8.19]: https://github.com/sebastianbergmann/phpunit/compare/4.8.18...4.8.19
-[4.8.18]: https://github.com/sebastianbergmann/phpunit/compare/4.8.17...4.8.18
-[4.8.17]: https://github.com/sebastianbergmann/phpunit/compare/4.8.16...4.8.17
-[4.8.16]: https://github.com/sebastianbergmann/phpunit/compare/4.8.15...4.8.16
-[4.8.15]: https://github.com/sebastianbergmann/phpunit/compare/4.8.14...4.8.15
-[4.8.14]: https://github.com/sebastianbergmann/phpunit/compare/4.8.13...4.8.14
-[4.8.13]: https://github.com/sebastianbergmann/phpunit/compare/4.8.12...4.8.13
-[4.8.12]: https://github.com/sebastianbergmann/phpunit/compare/4.8.11...4.8.12
-[4.8.11]: https://github.com/sebastianbergmann/phpunit/compare/4.8.10...4.8.11
-[4.8.10]: https://github.com/sebastianbergmann/phpunit/compare/4.8.9...4.8.10
-[4.8.9]: https://github.com/sebastianbergmann/phpunit/compare/4.8.8...4.8.9
-[4.8.8]: https://github.com/sebastianbergmann/phpunit/compare/4.8.7...4.8.8
-[4.8.7]: https://github.com/sebastianbergmann/phpunit/compare/4.8.6...4.8.7
-[4.8.6]: https://github.com/sebastianbergmann/phpunit/compare/4.8.5...4.8.6
-[4.8.5]: https://github.com/sebastianbergmann/phpunit/compare/4.8.4...4.8.5
-[4.8.4]: https://github.com/sebastianbergmann/phpunit/compare/4.8.3...4.8.4
-[4.8.3]: https://github.com/sebastianbergmann/phpunit/compare/4.8.2...4.8.3
-[4.8.2]: https://github.com/sebastianbergmann/phpunit/compare/4.8.1...4.8.2
-[4.8.1]: https://github.com/sebastianbergmann/phpunit/compare/4.8.0...4.8.1
-[4.8.0]: https://github.com/sebastianbergmann/phpunit/compare/4.7...4.8.0
-
diff --git a/vendor/phpunit/phpunit/LICENSE b/vendor/phpunit/phpunit/LICENSE
deleted file mode 100644
index c9d881fc..00000000
--- a/vendor/phpunit/phpunit/LICENSE
+++ /dev/null
@@ -1,33 +0,0 @@
-PHPUnit
-
-Copyright (c) 2001-2017, Sebastian Bergmann .
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- * Neither the name of Sebastian Bergmann nor the names of his
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/phpunit/phpunit/README.md b/vendor/phpunit/phpunit/README.md
deleted file mode 100644
index 53a10145..00000000
--- a/vendor/phpunit/phpunit/README.md
+++ /dev/null
@@ -1,46 +0,0 @@
-# PHPUnit
-
-PHPUnit is a programmer-oriented testing framework for PHP. It is an instance of the xUnit architecture for unit testing frameworks.
-
-[](https://packagist.org/packages/phpunit/phpunit)
-[](https://php.net/)
-[](https://phpunit.de/build-status.html)
-
-## Installation
-
-We distribute a [PHP Archive (PHAR)](https://php.net/phar) that has all required (as well as some optional) dependencies of PHPUnit bundled in a single file:
-
-```bash
-$ wget https://phar.phpunit.de/phpunit.phar
-
-$ chmod +x phpunit.phar
-
-$ mv phpunit.phar /usr/local/bin/phpunit
-```
-
-You can also immediately use the PHAR after you have downloaded it, of course:
-
-```bash
-$ wget https://phar.phpunit.de/phpunit.phar
-
-$ php phpunit.phar
-```
-
-Alternatively, you may use [Composer](https://getcomposer.org/) to download and install PHPUnit as well as its dependencies. Please refer to the [documentation](https://phpunit.de/documentation.html) for details on how to do this.
-
-## Contribute
-
-Please refer to [CONTRIBUTING.md](https://github.com/sebastianbergmann/phpunit/blob/master/CONTRIBUTING.md) for information on how to contribute to PHPUnit and its related projects.
-
-## List of Contributors
-
-Thanks to everyone who has contributed to PHPUnit! You can find a detailed list of contributors on every PHPUnit related package on GitHub. This list shows only the major components:
-
-* [PHPUnit](https://github.com/sebastianbergmann/phpunit/graphs/contributors)
-* [PHP_CodeCoverage](https://github.com/sebastianbergmann/php-code-coverage/graphs/contributors)
-* [PHPUnit_MockObject](https://github.com/sebastianbergmann/phpunit-mock-objects/graphs/contributors)
-
-A very special thanks to everyone who has contributed to the documentation and helps maintain the translations:
-
-* [PHPUnit Documentation](https://github.com/sebastianbergmann/phpunit-documentation/graphs/contributors)
-
diff --git a/vendor/phpunit/phpunit/build.xml b/vendor/phpunit/phpunit/build.xml
deleted file mode 100644
index 0ad41463..00000000
--- a/vendor/phpunit/phpunit/build.xml
+++ /dev/null
@@ -1,379 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/vendor/phpunit/phpunit/composer.json b/vendor/phpunit/phpunit/composer.json
deleted file mode 100644
index 4db53654..00000000
--- a/vendor/phpunit/phpunit/composer.json
+++ /dev/null
@@ -1,73 +0,0 @@
-{
- "name": "phpunit/phpunit",
- "description": "The PHP Unit Testing framework.",
- "type": "library",
- "keywords": [
- "phpunit",
- "xunit",
- "testing"
- ],
- "homepage": "https://phpunit.de/",
- "license": "BSD-3-Clause",
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- }
- ],
- "support": {
- "issues": "https://github.com/sebastianbergmann/phpunit/issues"
- },
- "require": {
- "php": ">=5.3.3",
- "phpunit/php-file-iterator": "~1.4",
- "phpunit/php-text-template": "~1.2",
- "phpunit/php-code-coverage": "~2.1",
- "phpunit/php-timer": "^1.0.6",
- "phpunit/phpunit-mock-objects": "~2.3",
- "phpspec/prophecy": "^1.3.1",
- "symfony/yaml": "~2.1|~3.0",
- "sebastian/comparator": "~1.2.2",
- "sebastian/diff": "~1.2",
- "sebastian/environment": "~1.3",
- "sebastian/exporter": "~1.2",
- "sebastian/global-state": "~1.0",
- "sebastian/version": "~1.0",
- "ext-dom": "*",
- "ext-json": "*",
- "ext-pcre": "*",
- "ext-reflection": "*",
- "ext-spl": "*"
- },
- "config": {
- "platform": {
- "php": "5.3.3"
- }
- },
- "suggest": {
- "phpunit/php-invoker": "~1.1"
- },
- "bin": [
- "phpunit"
- ],
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "autoload-dev": {
- "classmap": [
- "tests/"
- ],
- "files": [
- "src/Framework/Assert/Functions.php",
- "tests/_files/CoveredFunction.php"
- ]
- },
- "extra": {
- "branch-alias": {
- "dev-master": "4.8.x-dev"
- }
- }
-}
diff --git a/vendor/phpunit/phpunit/phpunit b/vendor/phpunit/phpunit/phpunit
deleted file mode 100755
index 539b8420..00000000
--- a/vendor/phpunit/phpunit/phpunit
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/usr/bin/env php
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-if (version_compare('5.3.3', PHP_VERSION, '>')) {
- fwrite(
- STDERR,
- sprintf(
- 'This version of PHPUnit is supported on PHP 5.3, PHP 5.4, PHP 5.5, and PHP 5.6.' . PHP_EOL .
- 'You are using PHP %s%s.' . PHP_EOL,
- PHP_VERSION,
- defined('PHP_BINARY') ? ' (' . PHP_BINARY . ')' : ''
- )
- );
-
- die(1);
-}
-
-if (!ini_get('date.timezone')) {
- ini_set('date.timezone', 'UTC');
-}
-
-foreach (array(__DIR__ . '/../../autoload.php', __DIR__ . '/../vendor/autoload.php', __DIR__ . '/vendor/autoload.php') as $file) {
- if (file_exists($file)) {
- define('PHPUNIT_COMPOSER_INSTALL', $file);
-
- break;
- }
-}
-
-unset($file);
-
-if (!defined('PHPUNIT_COMPOSER_INSTALL')) {
- fwrite(STDERR,
- 'You need to set up the project dependencies using Composer:' . PHP_EOL . PHP_EOL .
- ' composer install' . PHP_EOL . PHP_EOL .
- 'You can learn all about Composer on https://getcomposer.org/.' . PHP_EOL
- );
-
- die(1);
-}
-
-require PHPUNIT_COMPOSER_INSTALL;
-
-PHPUnit_TextUI_Command::main();
diff --git a/vendor/phpunit/phpunit/phpunit.xsd b/vendor/phpunit/phpunit/phpunit.xsd
deleted file mode 100644
index 7c6d04ff..00000000
--- a/vendor/phpunit/phpunit/phpunit.xsd
+++ /dev/null
@@ -1,264 +0,0 @@
-
-
-
-
- This Schema file defines the rules by which the XML configuration file of PHPUnit 4.8 may be structured.
-
-
-
-
-
- Root Element
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- The main type specifying the document structure
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/vendor/phpunit/phpunit/src/Exception.php b/vendor/phpunit/phpunit/src/Exception.php
deleted file mode 100644
index 480ec936..00000000
--- a/vendor/phpunit/phpunit/src/Exception.php
+++ /dev/null
@@ -1,18 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Marker interface for PHPUnit exceptions.
- *
- * @since Interface available since Release 4.0.0
- */
-interface PHPUnit_Exception
-{
-}
diff --git a/vendor/phpunit/phpunit/src/Extensions/GroupTestSuite.php b/vendor/phpunit/phpunit/src/Extensions/GroupTestSuite.php
deleted file mode 100644
index e4488977..00000000
--- a/vendor/phpunit/phpunit/src/Extensions/GroupTestSuite.php
+++ /dev/null
@@ -1,60 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * We have a TestSuite object A.
- * In TestSuite object A we have Tests tagged with @group.
- * We want a TestSuite object B that contains TestSuite objects C, D, ...
- * for the Tests tagged with @group C, @group D, ...
- * Running the Tests from TestSuite object B results in Tests tagged with both
- *
- * @group C and @group D in TestSuite object A to be run twice .
- *
- *
- * $suite = new PHPUnit_Extensions_GroupTestSuite($A, array('C', 'D'));
- *
- *
- * @since Class available since Release 3.3.0
- */
-class PHPUnit_Extensions_GroupTestSuite extends PHPUnit_Framework_TestSuite
-{
- public function __construct(PHPUnit_Framework_TestSuite $suite, array $groups)
- {
- $groupSuites = array();
- $name = $suite->getName();
-
- foreach ($groups as $group) {
- $groupSuites[$group] = new PHPUnit_Framework_TestSuite($name . ' - ' . $group);
- $this->addTest($groupSuites[$group]);
- }
-
- $tests = new RecursiveIteratorIterator(
- new PHPUnit_Util_TestSuiteIterator($suite),
- RecursiveIteratorIterator::LEAVES_ONLY
- );
-
- foreach ($tests as $test) {
- if ($test instanceof PHPUnit_Framework_TestCase) {
- $testGroups = PHPUnit_Util_Test::getGroups(
- get_class($test),
- $test->getName(false)
- );
-
- foreach ($groups as $group) {
- foreach ($testGroups as $testGroup) {
- if ($group == $testGroup) {
- $groupSuites[$group]->addTest($test);
- }
- }
- }
- }
- }
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Extensions/PhptTestCase.php b/vendor/phpunit/phpunit/src/Extensions/PhptTestCase.php
deleted file mode 100644
index 4ac8fd81..00000000
--- a/vendor/phpunit/phpunit/src/Extensions/PhptTestCase.php
+++ /dev/null
@@ -1,241 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Runner for PHPT test cases.
- *
- * @since Class available since Release 3.1.4
- */
-class PHPUnit_Extensions_PhptTestCase implements PHPUnit_Framework_Test, PHPUnit_Framework_SelfDescribing
-{
- /**
- * @var string
- */
- private $filename;
-
- /**
- * @var array
- */
- private $settings = array(
- 'allow_url_fopen=1',
- 'auto_append_file=',
- 'auto_prepend_file=',
- 'disable_functions=',
- 'display_errors=1',
- 'docref_root=',
- 'docref_ext=.html',
- 'error_append_string=',
- 'error_prepend_string=',
- 'error_reporting=-1',
- 'html_errors=0',
- 'log_errors=0',
- 'magic_quotes_runtime=0',
- 'output_handler=',
- 'open_basedir=',
- 'output_buffering=Off',
- 'report_memleaks=0',
- 'report_zend_debug=0',
- 'safe_mode=0',
- 'track_errors=1',
- 'xdebug.default_enable=0'
- );
-
- /**
- * Constructs a test case with the given filename.
- *
- * @param string $filename
- *
- * @throws PHPUnit_Framework_Exception
- */
- public function __construct($filename)
- {
- if (!is_string($filename)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
- }
-
- if (!is_file($filename)) {
- throw new PHPUnit_Framework_Exception(
- sprintf(
- 'File "%s" does not exist.',
- $filename
- )
- );
- }
-
- $this->filename = $filename;
- }
-
- /**
- * Counts the number of test cases executed by run(TestResult result).
- *
- * @return int
- */
- public function count()
- {
- return 1;
- }
-
- /**
- * Runs a test and collects its result in a TestResult instance.
- *
- * @param PHPUnit_Framework_TestResult $result
- *
- * @return PHPUnit_Framework_TestResult
- */
- public function run(PHPUnit_Framework_TestResult $result = null)
- {
- $sections = $this->parse();
- $code = $this->render($sections['FILE']);
-
- if ($result === null) {
- $result = new PHPUnit_Framework_TestResult;
- }
-
- $php = PHPUnit_Util_PHP::factory();
- $skip = false;
- $time = 0;
- $settings = $this->settings;
-
- $result->startTest($this);
-
- if (isset($sections['INI'])) {
- $settings = array_merge($settings, $this->parseIniSection($sections['INI']));
- }
-
- if (isset($sections['SKIPIF'])) {
- $jobResult = $php->runJob($sections['SKIPIF'], $settings);
-
- if (!strncasecmp('skip', ltrim($jobResult['stdout']), 4)) {
- if (preg_match('/^\s*skip\s*(.+)\s*/i', $jobResult['stdout'], $message)) {
- $message = substr($message[1], 2);
- } else {
- $message = '';
- }
-
- $result->addFailure($this, new PHPUnit_Framework_SkippedTestError($message), 0);
-
- $skip = true;
- }
- }
-
- if (!$skip) {
- PHP_Timer::start();
- $jobResult = $php->runJob($code, $settings);
- $time = PHP_Timer::stop();
-
- if (isset($sections['EXPECT'])) {
- $assertion = 'assertEquals';
- $expected = $sections['EXPECT'];
- } else {
- $assertion = 'assertStringMatchesFormat';
- $expected = $sections['EXPECTF'];
- }
-
- $output = preg_replace('/\r\n/', "\n", trim($jobResult['stdout']));
- $expected = preg_replace('/\r\n/', "\n", trim($expected));
-
- try {
- PHPUnit_Framework_Assert::$assertion($expected, $output);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- $result->addFailure($this, $e, $time);
- } catch (Throwable $t) {
- $result->addError($this, $t, $time);
- } catch (Exception $e) {
- $result->addError($this, $e, $time);
- }
- }
-
- $result->endTest($this, $time);
-
- return $result;
- }
-
- /**
- * Returns the name of the test case.
- *
- * @return string
- */
- public function getName()
- {
- return $this->toString();
- }
-
- /**
- * Returns a string representation of the test case.
- *
- * @return string
- */
- public function toString()
- {
- return $this->filename;
- }
-
- /**
- * @return array
- *
- * @throws PHPUnit_Framework_Exception
- */
- private function parse()
- {
- $sections = array();
- $section = '';
-
- foreach (file($this->filename) as $line) {
- if (preg_match('/^--([_A-Z]+)--/', $line, $result)) {
- $section = $result[1];
- $sections[$section] = '';
- continue;
- } elseif (empty($section)) {
- throw new PHPUnit_Framework_Exception('Invalid PHPT file');
- }
-
- $sections[$section] .= $line;
- }
-
- if (!isset($sections['FILE']) ||
- (!isset($sections['EXPECT']) && !isset($sections['EXPECTF']))) {
- throw new PHPUnit_Framework_Exception('Invalid PHPT file');
- }
-
- return $sections;
- }
-
- /**
- * @param string $code
- *
- * @return string
- */
- private function render($code)
- {
- return str_replace(
- array(
- '__DIR__',
- '__FILE__'
- ),
- array(
- "'" . dirname($this->filename) . "'",
- "'" . $this->filename . "'"
- ),
- $code
- );
- }
-
- /**
- * Parse --INI-- section key value pairs and return as array.
- *
- * @param string
- *
- * @return array
- */
- protected function parseIniSection($content)
- {
- return preg_split('/\n|\r/', $content, -1, PREG_SPLIT_NO_EMPTY);
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Extensions/PhptTestSuite.php b/vendor/phpunit/phpunit/src/Extensions/PhptTestSuite.php
deleted file mode 100644
index f21509b1..00000000
--- a/vendor/phpunit/phpunit/src/Extensions/PhptTestSuite.php
+++ /dev/null
@@ -1,40 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Suite for .phpt test cases.
- *
- * @since Class available since Release 3.1.4
- */
-class PHPUnit_Extensions_PhptTestSuite extends PHPUnit_Framework_TestSuite
-{
- /**
- * Constructs a new TestSuite for .phpt test cases.
- *
- * @param string $directory
- *
- * @throws PHPUnit_Framework_Exception
- */
- public function __construct($directory)
- {
- if (is_string($directory) && is_dir($directory)) {
- $this->setName($directory);
-
- $facade = new File_Iterator_Facade;
- $files = $facade->getFilesAsArray($directory, '.phpt');
-
- foreach ($files as $file) {
- $this->addTestFile($file);
- }
- } else {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'directory name');
- }
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Extensions/RepeatedTest.php b/vendor/phpunit/phpunit/src/Extensions/RepeatedTest.php
deleted file mode 100644
index 152bffc4..00000000
--- a/vendor/phpunit/phpunit/src/Extensions/RepeatedTest.php
+++ /dev/null
@@ -1,90 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * A Decorator that runs a test repeatedly.
- *
- * @since Class available since Release 2.0.0
- */
-class PHPUnit_Extensions_RepeatedTest extends PHPUnit_Extensions_TestDecorator
-{
- /**
- * @var bool
- */
- protected $processIsolation = false;
-
- /**
- * @var int
- */
- protected $timesRepeat = 1;
-
- /**
- * @param PHPUnit_Framework_Test $test
- * @param int $timesRepeat
- * @param bool $processIsolation
- *
- * @throws PHPUnit_Framework_Exception
- */
- public function __construct(PHPUnit_Framework_Test $test, $timesRepeat = 1, $processIsolation = false)
- {
- parent::__construct($test);
-
- if (is_integer($timesRepeat) &&
- $timesRepeat >= 0) {
- $this->timesRepeat = $timesRepeat;
- } else {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(
- 2,
- 'positive integer'
- );
- }
-
- $this->processIsolation = $processIsolation;
- }
-
- /**
- * Counts the number of test cases that
- * will be run by this test.
- *
- * @return int
- */
- public function count()
- {
- return $this->timesRepeat * count($this->test);
- }
-
- /**
- * Runs the decorated test and collects the
- * result in a TestResult.
- *
- * @param PHPUnit_Framework_TestResult $result
- *
- * @return PHPUnit_Framework_TestResult
- *
- * @throws PHPUnit_Framework_Exception
- */
- public function run(PHPUnit_Framework_TestResult $result = null)
- {
- if ($result === null) {
- $result = $this->createResult();
- }
-
- //@codingStandardsIgnoreStart
- for ($i = 0; $i < $this->timesRepeat && !$result->shouldStop(); $i++) {
- //@codingStandardsIgnoreEnd
- if ($this->test instanceof PHPUnit_Framework_TestSuite) {
- $this->test->setRunTestInSeparateProcess($this->processIsolation);
- }
- $this->test->run($result);
- }
-
- return $result;
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Extensions/TestDecorator.php b/vendor/phpunit/phpunit/src/Extensions/TestDecorator.php
deleted file mode 100644
index 1f1530f9..00000000
--- a/vendor/phpunit/phpunit/src/Extensions/TestDecorator.php
+++ /dev/null
@@ -1,109 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * A Decorator for Tests.
- *
- * Use TestDecorator as the base class for defining new
- * test decorators. Test decorator subclasses can be introduced
- * to add behaviour before or after a test is run.
- *
- * @since Class available since Release 2.0.0
- */
-class PHPUnit_Extensions_TestDecorator extends PHPUnit_Framework_Assert implements PHPUnit_Framework_Test, PHPUnit_Framework_SelfDescribing
-{
- /**
- * The Test to be decorated.
- *
- * @var object
- */
- protected $test = null;
-
- /**
- * Constructor.
- *
- * @param PHPUnit_Framework_Test $test
- */
- public function __construct(PHPUnit_Framework_Test $test)
- {
- $this->test = $test;
- }
-
- /**
- * Returns a string representation of the test.
- *
- * @return string
- */
- public function toString()
- {
- return $this->test->toString();
- }
-
- /**
- * Runs the test and collects the
- * result in a TestResult.
- *
- * @param PHPUnit_Framework_TestResult $result
- */
- public function basicRun(PHPUnit_Framework_TestResult $result)
- {
- $this->test->run($result);
- }
-
- /**
- * Counts the number of test cases that
- * will be run by this test.
- *
- * @return int
- */
- public function count()
- {
- return count($this->test);
- }
-
- /**
- * Creates a default TestResult object.
- *
- * @return PHPUnit_Framework_TestResult
- */
- protected function createResult()
- {
- return new PHPUnit_Framework_TestResult;
- }
-
- /**
- * Returns the test to be run.
- *
- * @return PHPUnit_Framework_Test
- */
- public function getTest()
- {
- return $this->test;
- }
-
- /**
- * Runs the decorated test and collects the
- * result in a TestResult.
- *
- * @param PHPUnit_Framework_TestResult $result
- *
- * @return PHPUnit_Framework_TestResult
- */
- public function run(PHPUnit_Framework_TestResult $result = null)
- {
- if ($result === null) {
- $result = $this->createResult();
- }
-
- $this->basicRun($result);
-
- return $result;
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Extensions/TicketListener.php b/vendor/phpunit/phpunit/src/Extensions/TicketListener.php
deleted file mode 100644
index e282f8bc..00000000
--- a/vendor/phpunit/phpunit/src/Extensions/TicketListener.php
+++ /dev/null
@@ -1,204 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Base class for test listeners that interact with an issue tracker.
- *
- * @since Class available since Release 3.4.0
- */
-abstract class PHPUnit_Extensions_TicketListener implements PHPUnit_Framework_TestListener
-{
- /**
- * @var array
- */
- protected $ticketCounts = array();
-
- /**
- * @var bool
- */
- protected $ran = false;
-
- /**
- * An error occurred.
- *
- * @param PHPUnit_Framework_Test $test
- * @param Exception $e
- * @param float $time
- */
- public function addError(PHPUnit_Framework_Test $test, Exception $e, $time)
- {
- }
-
- /**
- * A failure occurred.
- *
- * @param PHPUnit_Framework_Test $test
- * @param PHPUnit_Framework_AssertionFailedError $e
- * @param float $time
- */
- public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time)
- {
- }
-
- /**
- * Incomplete test.
- *
- * @param PHPUnit_Framework_Test $test
- * @param Exception $e
- * @param float $time
- */
- public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time)
- {
- }
-
- /**
- * Risky test.
- *
- * @param PHPUnit_Framework_Test $test
- * @param Exception $e
- * @param float $time
- *
- * @since Method available since Release 4.0.0
- */
- public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time)
- {
- }
-
- /**
- * Skipped test.
- *
- * @param PHPUnit_Framework_Test $test
- * @param Exception $e
- * @param float $time
- *
- * @since Method available since Release 3.0.0
- */
- public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time)
- {
- }
-
- /**
- * A test suite started.
- *
- * @param PHPUnit_Framework_TestSuite $suite
- *
- * @since Method available since Release 2.2.0
- */
- public function startTestSuite(PHPUnit_Framework_TestSuite $suite)
- {
- }
-
- /**
- * A test suite ended.
- *
- * @param PHPUnit_Framework_TestSuite $suite
- *
- * @since Method available since Release 2.2.0
- */
- public function endTestSuite(PHPUnit_Framework_TestSuite $suite)
- {
- }
-
- /**
- * A test started.
- *
- * @param PHPUnit_Framework_Test $test
- */
- public function startTest(PHPUnit_Framework_Test $test)
- {
- if (!$test instanceof PHPUnit_Framework_Warning) {
- if ($this->ran) {
- return;
- }
-
- $name = $test->getName(false);
- $tickets = PHPUnit_Util_Test::getTickets(get_class($test), $name);
-
- foreach ($tickets as $ticket) {
- $this->ticketCounts[$ticket][$name] = 1;
- }
-
- $this->ran = true;
- }
- }
-
- /**
- * A test ended.
- *
- * @param PHPUnit_Framework_Test $test
- * @param float $time
- */
- public function endTest(PHPUnit_Framework_Test $test, $time)
- {
- if (!$test instanceof PHPUnit_Framework_Warning) {
- if ($test->getStatus() == PHPUnit_Runner_BaseTestRunner::STATUS_PASSED) {
- $ifStatus = array('assigned', 'new', 'reopened');
- $newStatus = 'closed';
- $message = 'Automatically closed by PHPUnit (test passed).';
- $resolution = 'fixed';
- $cumulative = true;
- } elseif ($test->getStatus() == PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE) {
- $ifStatus = array('closed');
- $newStatus = 'reopened';
- $message = 'Automatically reopened by PHPUnit (test failed).';
- $resolution = '';
- $cumulative = false;
- } else {
- return;
- }
-
- $name = $test->getName(false);
- $tickets = PHPUnit_Util_Test::getTickets(get_class($test), $name);
-
- foreach ($tickets as $ticket) {
- // Remove this test from the totals (if it passed).
- if ($test->getStatus() == PHPUnit_Runner_BaseTestRunner::STATUS_PASSED) {
- unset($this->ticketCounts[$ticket][$name]);
- }
-
- // Only close tickets if ALL referenced cases pass
- // but reopen tickets if a single test fails.
- if ($cumulative) {
- // Determine number of to-pass tests:
- if (count($this->ticketCounts[$ticket]) > 0) {
- // There exist remaining test cases with this reference.
- $adjustTicket = false;
- } else {
- // No remaining tickets, go ahead and adjust.
- $adjustTicket = true;
- }
- } else {
- $adjustTicket = true;
- }
-
- $ticketInfo = $this->getTicketInfo($ticket);
-
- if ($adjustTicket && in_array($ticketInfo['status'], $ifStatus)) {
- $this->updateTicket($ticket, $newStatus, $message, $resolution);
- }
- }
- }
- }
-
- /**
- * @param mixed $ticketId
- *
- * @return mixed
- */
- abstract protected function getTicketInfo($ticketId = null);
-
- /**
- * @param string $ticketId
- * @param string $newStatus
- * @param string $message
- * @param string $resolution
- */
- abstract protected function updateTicket($ticketId, $newStatus, $message, $resolution);
-}
diff --git a/vendor/phpunit/phpunit/src/ForwardCompatibility/Assert.php b/vendor/phpunit/phpunit/src/ForwardCompatibility/Assert.php
deleted file mode 100644
index cf3186ae..00000000
--- a/vendor/phpunit/phpunit/src/ForwardCompatibility/Assert.php
+++ /dev/null
@@ -1,17 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace PHPUnit\Framework;
-
-use PHPUnit_Framework_Assert;
-
-abstract class Assert extends PHPUnit_Framework_Assert
-{
-}
diff --git a/vendor/phpunit/phpunit/src/ForwardCompatibility/AssertionFailedError.php b/vendor/phpunit/phpunit/src/ForwardCompatibility/AssertionFailedError.php
deleted file mode 100644
index d0cbe72c..00000000
--- a/vendor/phpunit/phpunit/src/ForwardCompatibility/AssertionFailedError.php
+++ /dev/null
@@ -1,17 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace PHPUnit\Framework;
-
-use PHPUnit_Framework_AssertionFailedError;
-
-class AssertionFailedError extends PHPUnit_Framework_AssertionFailedError
-{
-}
diff --git a/vendor/phpunit/phpunit/src/ForwardCompatibility/BaseTestListener.php b/vendor/phpunit/phpunit/src/ForwardCompatibility/BaseTestListener.php
deleted file mode 100644
index 3eef4902..00000000
--- a/vendor/phpunit/phpunit/src/ForwardCompatibility/BaseTestListener.php
+++ /dev/null
@@ -1,17 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace PHPUnit\Framework;
-
-use PHPUnit_Framework_BaseTestListener;
-
-abstract class BaseTestListener extends PHPUnit_Framework_BaseTestListener
-{
-}
diff --git a/vendor/phpunit/phpunit/src/ForwardCompatibility/Test.php b/vendor/phpunit/phpunit/src/ForwardCompatibility/Test.php
deleted file mode 100644
index ce98526d..00000000
--- a/vendor/phpunit/phpunit/src/ForwardCompatibility/Test.php
+++ /dev/null
@@ -1,17 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace PHPUnit\Framework;
-
-use PHPUnit_Framework_Test;
-
-interface Test extends PHPUnit_Framework_Test
-{
-}
diff --git a/vendor/phpunit/phpunit/src/ForwardCompatibility/TestCase.php b/vendor/phpunit/phpunit/src/ForwardCompatibility/TestCase.php
deleted file mode 100644
index 03189e3b..00000000
--- a/vendor/phpunit/phpunit/src/ForwardCompatibility/TestCase.php
+++ /dev/null
@@ -1,17 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace PHPUnit\Framework;
-
-use PHPUnit_Framework_TestCase;
-
-abstract class TestCase extends PHPUnit_Framework_TestCase
-{
-}
diff --git a/vendor/phpunit/phpunit/src/ForwardCompatibility/TestListener.php b/vendor/phpunit/phpunit/src/ForwardCompatibility/TestListener.php
deleted file mode 100644
index 8440b14a..00000000
--- a/vendor/phpunit/phpunit/src/ForwardCompatibility/TestListener.php
+++ /dev/null
@@ -1,17 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace PHPUnit\Framework;
-
-use PHPUnit_Framework_TestListener;
-
-interface TestListener extends PHPUnit_Framework_TestListener
-{
-}
diff --git a/vendor/phpunit/phpunit/src/ForwardCompatibility/TestSuite.php b/vendor/phpunit/phpunit/src/ForwardCompatibility/TestSuite.php
deleted file mode 100644
index 535bbbed..00000000
--- a/vendor/phpunit/phpunit/src/ForwardCompatibility/TestSuite.php
+++ /dev/null
@@ -1,17 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace PHPUnit\Framework;
-
-use PHPUnit_Framework_TestSuite;
-
-class TestSuite extends PHPUnit_Framework_TestSuite
-{
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Assert.php b/vendor/phpunit/phpunit/src/Framework/Assert.php
deleted file mode 100644
index 2dd563eb..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Assert.php
+++ /dev/null
@@ -1,3165 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * A set of assertion methods.
- *
- * @since Class available since Release 2.0.0
- */
-abstract class PHPUnit_Framework_Assert
-{
- /**
- * @var int
- */
- private static $count = 0;
-
- /**
- * Asserts that an array has a specified key.
- *
- * @param mixed $key
- * @param array|ArrayAccess $array
- * @param string $message
- *
- * @since Method available since Release 3.0.0
- */
- public static function assertArrayHasKey($key, $array, $message = '')
- {
- if (!(is_integer($key) || is_string($key))) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(
- 1,
- 'integer or string'
- );
- }
-
- if (!(is_array($array) || $array instanceof ArrayAccess)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(
- 2,
- 'array or ArrayAccess'
- );
- }
-
- $constraint = new PHPUnit_Framework_Constraint_ArrayHasKey($key);
-
- self::assertThat($array, $constraint, $message);
- }
-
- /**
- * Asserts that an array has a specified subset.
- *
- * @param array|ArrayAccess $subset
- * @param array|ArrayAccess $array
- * @param bool $strict Check for object identity
- * @param string $message
- *
- * @since Method available since Release 4.4.0
- */
- public static function assertArraySubset($subset, $array, $strict = false, $message = '')
- {
- if (!(is_array($subset) || $subset instanceof ArrayAccess)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(
- 1,
- 'array or ArrayAccess'
- );
- }
-
- if (!(is_array($array) || $array instanceof ArrayAccess)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(
- 2,
- 'array or ArrayAccess'
- );
- }
-
- $constraint = new PHPUnit_Framework_Constraint_ArraySubset($subset, $strict);
-
- self::assertThat($array, $constraint, $message);
- }
-
- /**
- * Asserts that an array does not have a specified key.
- *
- * @param mixed $key
- * @param array|ArrayAccess $array
- * @param string $message
- *
- * @since Method available since Release 3.0.0
- */
- public static function assertArrayNotHasKey($key, $array, $message = '')
- {
- if (!(is_integer($key) || is_string($key))) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(
- 1,
- 'integer or string'
- );
- }
-
- if (!(is_array($array) || $array instanceof ArrayAccess)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(
- 2,
- 'array or ArrayAccess'
- );
- }
-
- $constraint = new PHPUnit_Framework_Constraint_Not(
- new PHPUnit_Framework_Constraint_ArrayHasKey($key)
- );
-
- self::assertThat($array, $constraint, $message);
- }
-
- /**
- * Asserts that a haystack contains a needle.
- *
- * @param mixed $needle
- * @param mixed $haystack
- * @param string $message
- * @param bool $ignoreCase
- * @param bool $checkForObjectIdentity
- * @param bool $checkForNonObjectIdentity
- *
- * @since Method available since Release 2.1.0
- */
- public static function assertContains($needle, $haystack, $message = '', $ignoreCase = false, $checkForObjectIdentity = true, $checkForNonObjectIdentity = false)
- {
- if (is_array($haystack) ||
- is_object($haystack) && $haystack instanceof Traversable) {
- $constraint = new PHPUnit_Framework_Constraint_TraversableContains(
- $needle,
- $checkForObjectIdentity,
- $checkForNonObjectIdentity
- );
- } elseif (is_string($haystack)) {
- if (!is_string($needle)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(
- 1,
- 'string'
- );
- }
-
- $constraint = new PHPUnit_Framework_Constraint_StringContains(
- $needle,
- $ignoreCase
- );
- } else {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(
- 2,
- 'array, traversable or string'
- );
- }
-
- self::assertThat($haystack, $constraint, $message);
- }
-
- /**
- * Asserts that a haystack that is stored in a static attribute of a class
- * or an attribute of an object contains a needle.
- *
- * @param mixed $needle
- * @param string $haystackAttributeName
- * @param mixed $haystackClassOrObject
- * @param string $message
- * @param bool $ignoreCase
- * @param bool $checkForObjectIdentity
- * @param bool $checkForNonObjectIdentity
- *
- * @since Method available since Release 3.0.0
- */
- public static function assertAttributeContains($needle, $haystackAttributeName, $haystackClassOrObject, $message = '', $ignoreCase = false, $checkForObjectIdentity = true, $checkForNonObjectIdentity = false)
- {
- self::assertContains(
- $needle,
- self::readAttribute($haystackClassOrObject, $haystackAttributeName),
- $message,
- $ignoreCase,
- $checkForObjectIdentity,
- $checkForNonObjectIdentity
- );
- }
-
- /**
- * Asserts that a haystack does not contain a needle.
- *
- * @param mixed $needle
- * @param mixed $haystack
- * @param string $message
- * @param bool $ignoreCase
- * @param bool $checkForObjectIdentity
- * @param bool $checkForNonObjectIdentity
- *
- * @since Method available since Release 2.1.0
- */
- public static function assertNotContains($needle, $haystack, $message = '', $ignoreCase = false, $checkForObjectIdentity = true, $checkForNonObjectIdentity = false)
- {
- if (is_array($haystack) ||
- is_object($haystack) && $haystack instanceof Traversable) {
- $constraint = new PHPUnit_Framework_Constraint_Not(
- new PHPUnit_Framework_Constraint_TraversableContains(
- $needle,
- $checkForObjectIdentity,
- $checkForNonObjectIdentity
- )
- );
- } elseif (is_string($haystack)) {
- if (!is_string($needle)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(
- 1,
- 'string'
- );
- }
-
- $constraint = new PHPUnit_Framework_Constraint_Not(
- new PHPUnit_Framework_Constraint_StringContains(
- $needle,
- $ignoreCase
- )
- );
- } else {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(
- 2,
- 'array, traversable or string'
- );
- }
-
- self::assertThat($haystack, $constraint, $message);
- }
-
- /**
- * Asserts that a haystack that is stored in a static attribute of a class
- * or an attribute of an object does not contain a needle.
- *
- * @param mixed $needle
- * @param string $haystackAttributeName
- * @param mixed $haystackClassOrObject
- * @param string $message
- * @param bool $ignoreCase
- * @param bool $checkForObjectIdentity
- * @param bool $checkForNonObjectIdentity
- *
- * @since Method available since Release 3.0.0
- */
- public static function assertAttributeNotContains($needle, $haystackAttributeName, $haystackClassOrObject, $message = '', $ignoreCase = false, $checkForObjectIdentity = true, $checkForNonObjectIdentity = false)
- {
- self::assertNotContains(
- $needle,
- self::readAttribute($haystackClassOrObject, $haystackAttributeName),
- $message,
- $ignoreCase,
- $checkForObjectIdentity,
- $checkForNonObjectIdentity
- );
- }
-
- /**
- * Asserts that a haystack contains only values of a given type.
- *
- * @param string $type
- * @param mixed $haystack
- * @param bool $isNativeType
- * @param string $message
- *
- * @since Method available since Release 3.1.4
- */
- public static function assertContainsOnly($type, $haystack, $isNativeType = null, $message = '')
- {
- if (!(is_array($haystack) ||
- is_object($haystack) && $haystack instanceof Traversable)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(
- 2,
- 'array or traversable'
- );
- }
-
- if ($isNativeType == null) {
- $isNativeType = PHPUnit_Util_Type::isType($type);
- }
-
- self::assertThat(
- $haystack,
- new PHPUnit_Framework_Constraint_TraversableContainsOnly(
- $type,
- $isNativeType
- ),
- $message
- );
- }
-
- /**
- * Asserts that a haystack contains only instances of a given classname
- *
- * @param string $classname
- * @param array|Traversable $haystack
- * @param string $message
- */
- public static function assertContainsOnlyInstancesOf($classname, $haystack, $message = '')
- {
- if (!(is_array($haystack) ||
- is_object($haystack) && $haystack instanceof Traversable)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(
- 2,
- 'array or traversable'
- );
- }
-
- self::assertThat(
- $haystack,
- new PHPUnit_Framework_Constraint_TraversableContainsOnly(
- $classname,
- false
- ),
- $message
- );
- }
-
- /**
- * Asserts that a haystack that is stored in a static attribute of a class
- * or an attribute of an object contains only values of a given type.
- *
- * @param string $type
- * @param string $haystackAttributeName
- * @param mixed $haystackClassOrObject
- * @param bool $isNativeType
- * @param string $message
- *
- * @since Method available since Release 3.1.4
- */
- public static function assertAttributeContainsOnly($type, $haystackAttributeName, $haystackClassOrObject, $isNativeType = null, $message = '')
- {
- self::assertContainsOnly(
- $type,
- self::readAttribute($haystackClassOrObject, $haystackAttributeName),
- $isNativeType,
- $message
- );
- }
-
- /**
- * Asserts that a haystack does not contain only values of a given type.
- *
- * @param string $type
- * @param mixed $haystack
- * @param bool $isNativeType
- * @param string $message
- *
- * @since Method available since Release 3.1.4
- */
- public static function assertNotContainsOnly($type, $haystack, $isNativeType = null, $message = '')
- {
- if (!(is_array($haystack) ||
- is_object($haystack) && $haystack instanceof Traversable)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(
- 2,
- 'array or traversable'
- );
- }
-
- if ($isNativeType == null) {
- $isNativeType = PHPUnit_Util_Type::isType($type);
- }
-
- self::assertThat(
- $haystack,
- new PHPUnit_Framework_Constraint_Not(
- new PHPUnit_Framework_Constraint_TraversableContainsOnly(
- $type,
- $isNativeType
- )
- ),
- $message
- );
- }
-
- /**
- * Asserts that a haystack that is stored in a static attribute of a class
- * or an attribute of an object does not contain only values of a given
- * type.
- *
- * @param string $type
- * @param string $haystackAttributeName
- * @param mixed $haystackClassOrObject
- * @param bool $isNativeType
- * @param string $message
- *
- * @since Method available since Release 3.1.4
- */
- public static function assertAttributeNotContainsOnly($type, $haystackAttributeName, $haystackClassOrObject, $isNativeType = null, $message = '')
- {
- self::assertNotContainsOnly(
- $type,
- self::readAttribute($haystackClassOrObject, $haystackAttributeName),
- $isNativeType,
- $message
- );
- }
-
- /**
- * Asserts the number of elements of an array, Countable or Traversable.
- *
- * @param int $expectedCount
- * @param mixed $haystack
- * @param string $message
- */
- public static function assertCount($expectedCount, $haystack, $message = '')
- {
- if (!is_int($expectedCount)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'integer');
- }
-
- if (!$haystack instanceof Countable &&
- !$haystack instanceof Traversable &&
- !is_array($haystack)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'countable or traversable');
- }
-
- self::assertThat(
- $haystack,
- new PHPUnit_Framework_Constraint_Count($expectedCount),
- $message
- );
- }
-
- /**
- * Asserts the number of elements of an array, Countable or Traversable
- * that is stored in an attribute.
- *
- * @param int $expectedCount
- * @param string $haystackAttributeName
- * @param mixed $haystackClassOrObject
- * @param string $message
- *
- * @since Method available since Release 3.6.0
- */
- public static function assertAttributeCount($expectedCount, $haystackAttributeName, $haystackClassOrObject, $message = '')
- {
- self::assertCount(
- $expectedCount,
- self::readAttribute($haystackClassOrObject, $haystackAttributeName),
- $message
- );
- }
-
- /**
- * Asserts the number of elements of an array, Countable or Traversable.
- *
- * @param int $expectedCount
- * @param mixed $haystack
- * @param string $message
- */
- public static function assertNotCount($expectedCount, $haystack, $message = '')
- {
- if (!is_int($expectedCount)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'integer');
- }
-
- if (!$haystack instanceof Countable &&
- !$haystack instanceof Traversable &&
- !is_array($haystack)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'countable or traversable');
- }
-
- $constraint = new PHPUnit_Framework_Constraint_Not(
- new PHPUnit_Framework_Constraint_Count($expectedCount)
- );
-
- self::assertThat($haystack, $constraint, $message);
- }
-
- /**
- * Asserts the number of elements of an array, Countable or Traversable
- * that is stored in an attribute.
- *
- * @param int $expectedCount
- * @param string $haystackAttributeName
- * @param mixed $haystackClassOrObject
- * @param string $message
- *
- * @since Method available since Release 3.6.0
- */
- public static function assertAttributeNotCount($expectedCount, $haystackAttributeName, $haystackClassOrObject, $message = '')
- {
- self::assertNotCount(
- $expectedCount,
- self::readAttribute($haystackClassOrObject, $haystackAttributeName),
- $message
- );
- }
-
- /**
- * Asserts that two variables are equal.
- *
- * @param mixed $expected
- * @param mixed $actual
- * @param string $message
- * @param float $delta
- * @param int $maxDepth
- * @param bool $canonicalize
- * @param bool $ignoreCase
- */
- public static function assertEquals($expected, $actual, $message = '', $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false)
- {
- $constraint = new PHPUnit_Framework_Constraint_IsEqual(
- $expected,
- $delta,
- $maxDepth,
- $canonicalize,
- $ignoreCase
- );
-
- self::assertThat($actual, $constraint, $message);
- }
-
- /**
- * Asserts that a variable is equal to an attribute of an object.
- *
- * @param mixed $expected
- * @param string $actualAttributeName
- * @param string $actualClassOrObject
- * @param string $message
- * @param float $delta
- * @param int $maxDepth
- * @param bool $canonicalize
- * @param bool $ignoreCase
- */
- public static function assertAttributeEquals($expected, $actualAttributeName, $actualClassOrObject, $message = '', $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false)
- {
- self::assertEquals(
- $expected,
- self::readAttribute($actualClassOrObject, $actualAttributeName),
- $message,
- $delta,
- $maxDepth,
- $canonicalize,
- $ignoreCase
- );
- }
-
- /**
- * Asserts that two variables are not equal.
- *
- * @param mixed $expected
- * @param mixed $actual
- * @param string $message
- * @param float $delta
- * @param int $maxDepth
- * @param bool $canonicalize
- * @param bool $ignoreCase
- *
- * @since Method available since Release 2.3.0
- */
- public static function assertNotEquals($expected, $actual, $message = '', $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false)
- {
- $constraint = new PHPUnit_Framework_Constraint_Not(
- new PHPUnit_Framework_Constraint_IsEqual(
- $expected,
- $delta,
- $maxDepth,
- $canonicalize,
- $ignoreCase
- )
- );
-
- self::assertThat($actual, $constraint, $message);
- }
-
- /**
- * Asserts that a variable is not equal to an attribute of an object.
- *
- * @param mixed $expected
- * @param string $actualAttributeName
- * @param string $actualClassOrObject
- * @param string $message
- * @param float $delta
- * @param int $maxDepth
- * @param bool $canonicalize
- * @param bool $ignoreCase
- */
- public static function assertAttributeNotEquals($expected, $actualAttributeName, $actualClassOrObject, $message = '', $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false)
- {
- self::assertNotEquals(
- $expected,
- self::readAttribute($actualClassOrObject, $actualAttributeName),
- $message,
- $delta,
- $maxDepth,
- $canonicalize,
- $ignoreCase
- );
- }
-
- /**
- * Asserts that a variable is empty.
- *
- * @param mixed $actual
- * @param string $message
- *
- * @throws PHPUnit_Framework_AssertionFailedError
- */
- public static function assertEmpty($actual, $message = '')
- {
- self::assertThat($actual, self::isEmpty(), $message);
- }
-
- /**
- * Asserts that a static attribute of a class or an attribute of an object
- * is empty.
- *
- * @param string $haystackAttributeName
- * @param mixed $haystackClassOrObject
- * @param string $message
- *
- * @since Method available since Release 3.5.0
- */
- public static function assertAttributeEmpty($haystackAttributeName, $haystackClassOrObject, $message = '')
- {
- self::assertEmpty(
- self::readAttribute($haystackClassOrObject, $haystackAttributeName),
- $message
- );
- }
-
- /**
- * Asserts that a variable is not empty.
- *
- * @param mixed $actual
- * @param string $message
- *
- * @throws PHPUnit_Framework_AssertionFailedError
- */
- public static function assertNotEmpty($actual, $message = '')
- {
- self::assertThat($actual, self::logicalNot(self::isEmpty()), $message);
- }
-
- /**
- * Asserts that a static attribute of a class or an attribute of an object
- * is not empty.
- *
- * @param string $haystackAttributeName
- * @param mixed $haystackClassOrObject
- * @param string $message
- *
- * @since Method available since Release 3.5.0
- */
- public static function assertAttributeNotEmpty($haystackAttributeName, $haystackClassOrObject, $message = '')
- {
- self::assertNotEmpty(
- self::readAttribute($haystackClassOrObject, $haystackAttributeName),
- $message
- );
- }
-
- /**
- * Asserts that a value is greater than another value.
- *
- * @param mixed $expected
- * @param mixed $actual
- * @param string $message
- *
- * @since Method available since Release 3.1.0
- */
- public static function assertGreaterThan($expected, $actual, $message = '')
- {
- self::assertThat($actual, self::greaterThan($expected), $message);
- }
-
- /**
- * Asserts that an attribute is greater than another value.
- *
- * @param mixed $expected
- * @param string $actualAttributeName
- * @param string $actualClassOrObject
- * @param string $message
- *
- * @since Method available since Release 3.1.0
- */
- public static function assertAttributeGreaterThan($expected, $actualAttributeName, $actualClassOrObject, $message = '')
- {
- self::assertGreaterThan(
- $expected,
- self::readAttribute($actualClassOrObject, $actualAttributeName),
- $message
- );
- }
-
- /**
- * Asserts that a value is greater than or equal to another value.
- *
- * @param mixed $expected
- * @param mixed $actual
- * @param string $message
- *
- * @since Method available since Release 3.1.0
- */
- public static function assertGreaterThanOrEqual($expected, $actual, $message = '')
- {
- self::assertThat(
- $actual,
- self::greaterThanOrEqual($expected),
- $message
- );
- }
-
- /**
- * Asserts that an attribute is greater than or equal to another value.
- *
- * @param mixed $expected
- * @param string $actualAttributeName
- * @param string $actualClassOrObject
- * @param string $message
- *
- * @since Method available since Release 3.1.0
- */
- public static function assertAttributeGreaterThanOrEqual($expected, $actualAttributeName, $actualClassOrObject, $message = '')
- {
- self::assertGreaterThanOrEqual(
- $expected,
- self::readAttribute($actualClassOrObject, $actualAttributeName),
- $message
- );
- }
-
- /**
- * Asserts that a value is smaller than another value.
- *
- * @param mixed $expected
- * @param mixed $actual
- * @param string $message
- *
- * @since Method available since Release 3.1.0
- */
- public static function assertLessThan($expected, $actual, $message = '')
- {
- self::assertThat($actual, self::lessThan($expected), $message);
- }
-
- /**
- * Asserts that an attribute is smaller than another value.
- *
- * @param mixed $expected
- * @param string $actualAttributeName
- * @param string $actualClassOrObject
- * @param string $message
- *
- * @since Method available since Release 3.1.0
- */
- public static function assertAttributeLessThan($expected, $actualAttributeName, $actualClassOrObject, $message = '')
- {
- self::assertLessThan(
- $expected,
- self::readAttribute($actualClassOrObject, $actualAttributeName),
- $message
- );
- }
-
- /**
- * Asserts that a value is smaller than or equal to another value.
- *
- * @param mixed $expected
- * @param mixed $actual
- * @param string $message
- *
- * @since Method available since Release 3.1.0
- */
- public static function assertLessThanOrEqual($expected, $actual, $message = '')
- {
- self::assertThat($actual, self::lessThanOrEqual($expected), $message);
- }
-
- /**
- * Asserts that an attribute is smaller than or equal to another value.
- *
- * @param mixed $expected
- * @param string $actualAttributeName
- * @param string $actualClassOrObject
- * @param string $message
- *
- * @since Method available since Release 3.1.0
- */
- public static function assertAttributeLessThanOrEqual($expected, $actualAttributeName, $actualClassOrObject, $message = '')
- {
- self::assertLessThanOrEqual(
- $expected,
- self::readAttribute($actualClassOrObject, $actualAttributeName),
- $message
- );
- }
-
- /**
- * Asserts that the contents of one file is equal to the contents of another
- * file.
- *
- * @param string $expected
- * @param string $actual
- * @param string $message
- * @param bool $canonicalize
- * @param bool $ignoreCase
- *
- * @since Method available since Release 3.2.14
- */
- public static function assertFileEquals($expected, $actual, $message = '', $canonicalize = false, $ignoreCase = false)
- {
- self::assertFileExists($expected, $message);
- self::assertFileExists($actual, $message);
-
- self::assertEquals(
- file_get_contents($expected),
- file_get_contents($actual),
- $message,
- 0,
- 10,
- $canonicalize,
- $ignoreCase
- );
- }
-
- /**
- * Asserts that the contents of one file is not equal to the contents of
- * another file.
- *
- * @param string $expected
- * @param string $actual
- * @param string $message
- * @param bool $canonicalize
- * @param bool $ignoreCase
- *
- * @since Method available since Release 3.2.14
- */
- public static function assertFileNotEquals($expected, $actual, $message = '', $canonicalize = false, $ignoreCase = false)
- {
- self::assertFileExists($expected, $message);
- self::assertFileExists($actual, $message);
-
- self::assertNotEquals(
- file_get_contents($expected),
- file_get_contents($actual),
- $message,
- 0,
- 10,
- $canonicalize,
- $ignoreCase
- );
- }
-
- /**
- * Asserts that the contents of a string is equal
- * to the contents of a file.
- *
- * @param string $expectedFile
- * @param string $actualString
- * @param string $message
- * @param bool $canonicalize
- * @param bool $ignoreCase
- *
- * @since Method available since Release 3.3.0
- */
- public static function assertStringEqualsFile($expectedFile, $actualString, $message = '', $canonicalize = false, $ignoreCase = false)
- {
- self::assertFileExists($expectedFile, $message);
-
- self::assertEquals(
- file_get_contents($expectedFile),
- $actualString,
- $message,
- 0,
- 10,
- $canonicalize,
- $ignoreCase
- );
- }
-
- /**
- * Asserts that the contents of a string is not equal
- * to the contents of a file.
- *
- * @param string $expectedFile
- * @param string $actualString
- * @param string $message
- * @param bool $canonicalize
- * @param bool $ignoreCase
- *
- * @since Method available since Release 3.3.0
- */
- public static function assertStringNotEqualsFile($expectedFile, $actualString, $message = '', $canonicalize = false, $ignoreCase = false)
- {
- self::assertFileExists($expectedFile, $message);
-
- self::assertNotEquals(
- file_get_contents($expectedFile),
- $actualString,
- $message,
- 0,
- 10,
- $canonicalize,
- $ignoreCase
- );
- }
-
- /**
- * Asserts that a file exists.
- *
- * @param string $filename
- * @param string $message
- *
- * @since Method available since Release 3.0.0
- */
- public static function assertFileExists($filename, $message = '')
- {
- if (!is_string($filename)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
- }
-
- $constraint = new PHPUnit_Framework_Constraint_FileExists;
-
- self::assertThat($filename, $constraint, $message);
- }
-
- /**
- * Asserts that a file does not exist.
- *
- * @param string $filename
- * @param string $message
- *
- * @since Method available since Release 3.0.0
- */
- public static function assertFileNotExists($filename, $message = '')
- {
- if (!is_string($filename)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
- }
-
- $constraint = new PHPUnit_Framework_Constraint_Not(
- new PHPUnit_Framework_Constraint_FileExists
- );
-
- self::assertThat($filename, $constraint, $message);
- }
-
- /**
- * Asserts that a condition is true.
- *
- * @param bool $condition
- * @param string $message
- *
- * @throws PHPUnit_Framework_AssertionFailedError
- */
- public static function assertTrue($condition, $message = '')
- {
- self::assertThat($condition, self::isTrue(), $message);
- }
-
- /**
- * Asserts that a condition is not true.
- *
- * @param bool $condition
- * @param string $message
- *
- * @throws PHPUnit_Framework_AssertionFailedError
- */
- public static function assertNotTrue($condition, $message = '')
- {
- self::assertThat($condition, self::logicalNot(self::isTrue()), $message);
- }
-
- /**
- * Asserts that a condition is false.
- *
- * @param bool $condition
- * @param string $message
- *
- * @throws PHPUnit_Framework_AssertionFailedError
- */
- public static function assertFalse($condition, $message = '')
- {
- self::assertThat($condition, self::isFalse(), $message);
- }
-
- /**
- * Asserts that a condition is not false.
- *
- * @param bool $condition
- * @param string $message
- *
- * @throws PHPUnit_Framework_AssertionFailedError
- */
- public static function assertNotFalse($condition, $message = '')
- {
- self::assertThat($condition, self::logicalNot(self::isFalse()), $message);
- }
-
- /**
- * Asserts that a variable is not null.
- *
- * @param mixed $actual
- * @param string $message
- */
- public static function assertNotNull($actual, $message = '')
- {
- self::assertThat($actual, self::logicalNot(self::isNull()), $message);
- }
-
- /**
- * Asserts that a variable is null.
- *
- * @param mixed $actual
- * @param string $message
- */
- public static function assertNull($actual, $message = '')
- {
- self::assertThat($actual, self::isNull(), $message);
- }
-
- /**
- * Asserts that a class has a specified attribute.
- *
- * @param string $attributeName
- * @param string $className
- * @param string $message
- *
- * @since Method available since Release 3.1.0
- */
- public static function assertClassHasAttribute($attributeName, $className, $message = '')
- {
- if (!is_string($attributeName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
- }
-
- if (!preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $attributeName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'valid attribute name');
- }
-
- if (!is_string($className) || !class_exists($className)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'class name', $className);
- }
-
- $constraint = new PHPUnit_Framework_Constraint_ClassHasAttribute(
- $attributeName
- );
-
- self::assertThat($className, $constraint, $message);
- }
-
- /**
- * Asserts that a class does not have a specified attribute.
- *
- * @param string $attributeName
- * @param string $className
- * @param string $message
- *
- * @since Method available since Release 3.1.0
- */
- public static function assertClassNotHasAttribute($attributeName, $className, $message = '')
- {
- if (!is_string($attributeName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
- }
-
- if (!preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $attributeName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'valid attribute name');
- }
-
- if (!is_string($className) || !class_exists($className)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'class name', $className);
- }
-
- $constraint = new PHPUnit_Framework_Constraint_Not(
- new PHPUnit_Framework_Constraint_ClassHasAttribute($attributeName)
- );
-
- self::assertThat($className, $constraint, $message);
- }
-
- /**
- * Asserts that a class has a specified static attribute.
- *
- * @param string $attributeName
- * @param string $className
- * @param string $message
- *
- * @since Method available since Release 3.1.0
- */
- public static function assertClassHasStaticAttribute($attributeName, $className, $message = '')
- {
- if (!is_string($attributeName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
- }
-
- if (!preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $attributeName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'valid attribute name');
- }
-
- if (!is_string($className) || !class_exists($className)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'class name', $className);
- }
-
- $constraint = new PHPUnit_Framework_Constraint_ClassHasStaticAttribute(
- $attributeName
- );
-
- self::assertThat($className, $constraint, $message);
- }
-
- /**
- * Asserts that a class does not have a specified static attribute.
- *
- * @param string $attributeName
- * @param string $className
- * @param string $message
- *
- * @since Method available since Release 3.1.0
- */
- public static function assertClassNotHasStaticAttribute($attributeName, $className, $message = '')
- {
- if (!is_string($attributeName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
- }
-
- if (!preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $attributeName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'valid attribute name');
- }
-
- if (!is_string($className) || !class_exists($className)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'class name', $className);
- }
-
- $constraint = new PHPUnit_Framework_Constraint_Not(
- new PHPUnit_Framework_Constraint_ClassHasStaticAttribute(
- $attributeName
- )
- );
-
- self::assertThat($className, $constraint, $message);
- }
-
- /**
- * Asserts that an object has a specified attribute.
- *
- * @param string $attributeName
- * @param object $object
- * @param string $message
- *
- * @since Method available since Release 3.0.0
- */
- public static function assertObjectHasAttribute($attributeName, $object, $message = '')
- {
- if (!is_string($attributeName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
- }
-
- if (!preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $attributeName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'valid attribute name');
- }
-
- if (!is_object($object)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'object');
- }
-
- $constraint = new PHPUnit_Framework_Constraint_ObjectHasAttribute(
- $attributeName
- );
-
- self::assertThat($object, $constraint, $message);
- }
-
- /**
- * Asserts that an object does not have a specified attribute.
- *
- * @param string $attributeName
- * @param object $object
- * @param string $message
- *
- * @since Method available since Release 3.0.0
- */
- public static function assertObjectNotHasAttribute($attributeName, $object, $message = '')
- {
- if (!is_string($attributeName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
- }
-
- if (!preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $attributeName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'valid attribute name');
- }
-
- if (!is_object($object)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'object');
- }
-
- $constraint = new PHPUnit_Framework_Constraint_Not(
- new PHPUnit_Framework_Constraint_ObjectHasAttribute($attributeName)
- );
-
- self::assertThat($object, $constraint, $message);
- }
-
- /**
- * Asserts that two variables have the same type and value.
- * Used on objects, it asserts that two variables reference
- * the same object.
- *
- * @param mixed $expected
- * @param mixed $actual
- * @param string $message
- */
- public static function assertSame($expected, $actual, $message = '')
- {
- if (is_bool($expected) && is_bool($actual)) {
- self::assertEquals($expected, $actual, $message);
- } else {
- $constraint = new PHPUnit_Framework_Constraint_IsIdentical(
- $expected
- );
-
- self::assertThat($actual, $constraint, $message);
- }
- }
-
- /**
- * Asserts that a variable and an attribute of an object have the same type
- * and value.
- *
- * @param mixed $expected
- * @param string $actualAttributeName
- * @param object $actualClassOrObject
- * @param string $message
- */
- public static function assertAttributeSame($expected, $actualAttributeName, $actualClassOrObject, $message = '')
- {
- self::assertSame(
- $expected,
- self::readAttribute($actualClassOrObject, $actualAttributeName),
- $message
- );
- }
-
- /**
- * Asserts that two variables do not have the same type and value.
- * Used on objects, it asserts that two variables do not reference
- * the same object.
- *
- * @param mixed $expected
- * @param mixed $actual
- * @param string $message
- */
- public static function assertNotSame($expected, $actual, $message = '')
- {
- if (is_bool($expected) && is_bool($actual)) {
- self::assertNotEquals($expected, $actual, $message);
- } else {
- $constraint = new PHPUnit_Framework_Constraint_Not(
- new PHPUnit_Framework_Constraint_IsIdentical($expected)
- );
-
- self::assertThat($actual, $constraint, $message);
- }
- }
-
- /**
- * Asserts that a variable and an attribute of an object do not have the
- * same type and value.
- *
- * @param mixed $expected
- * @param string $actualAttributeName
- * @param object $actualClassOrObject
- * @param string $message
- */
- public static function assertAttributeNotSame($expected, $actualAttributeName, $actualClassOrObject, $message = '')
- {
- self::assertNotSame(
- $expected,
- self::readAttribute($actualClassOrObject, $actualAttributeName),
- $message
- );
- }
-
- /**
- * Asserts that a variable is of a given type.
- *
- * @param string $expected
- * @param mixed $actual
- * @param string $message
- *
- * @since Method available since Release 3.5.0
- */
- public static function assertInstanceOf($expected, $actual, $message = '')
- {
- if (!(is_string($expected) && (class_exists($expected) || interface_exists($expected)))) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'class or interface name');
- }
-
- $constraint = new PHPUnit_Framework_Constraint_IsInstanceOf(
- $expected
- );
-
- self::assertThat($actual, $constraint, $message);
- }
-
- /**
- * Asserts that an attribute is of a given type.
- *
- * @param string $expected
- * @param string $attributeName
- * @param mixed $classOrObject
- * @param string $message
- *
- * @since Method available since Release 3.5.0
- */
- public static function assertAttributeInstanceOf($expected, $attributeName, $classOrObject, $message = '')
- {
- self::assertInstanceOf(
- $expected,
- self::readAttribute($classOrObject, $attributeName),
- $message
- );
- }
-
- /**
- * Asserts that a variable is not of a given type.
- *
- * @param string $expected
- * @param mixed $actual
- * @param string $message
- *
- * @since Method available since Release 3.5.0
- */
- public static function assertNotInstanceOf($expected, $actual, $message = '')
- {
- if (!(is_string($expected) && (class_exists($expected) || interface_exists($expected)))) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'class or interface name');
- }
-
- $constraint = new PHPUnit_Framework_Constraint_Not(
- new PHPUnit_Framework_Constraint_IsInstanceOf($expected)
- );
-
- self::assertThat($actual, $constraint, $message);
- }
-
- /**
- * Asserts that an attribute is of a given type.
- *
- * @param string $expected
- * @param string $attributeName
- * @param mixed $classOrObject
- * @param string $message
- *
- * @since Method available since Release 3.5.0
- */
- public static function assertAttributeNotInstanceOf($expected, $attributeName, $classOrObject, $message = '')
- {
- self::assertNotInstanceOf(
- $expected,
- self::readAttribute($classOrObject, $attributeName),
- $message
- );
- }
-
- /**
- * Asserts that a variable is of a given type.
- *
- * @param string $expected
- * @param mixed $actual
- * @param string $message
- *
- * @since Method available since Release 3.5.0
- */
- public static function assertInternalType($expected, $actual, $message = '')
- {
- if (!is_string($expected)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
- }
-
- $constraint = new PHPUnit_Framework_Constraint_IsType(
- $expected
- );
-
- self::assertThat($actual, $constraint, $message);
- }
-
- /**
- * Asserts that an attribute is of a given type.
- *
- * @param string $expected
- * @param string $attributeName
- * @param mixed $classOrObject
- * @param string $message
- *
- * @since Method available since Release 3.5.0
- */
- public static function assertAttributeInternalType($expected, $attributeName, $classOrObject, $message = '')
- {
- self::assertInternalType(
- $expected,
- self::readAttribute($classOrObject, $attributeName),
- $message
- );
- }
-
- /**
- * Asserts that a variable is not of a given type.
- *
- * @param string $expected
- * @param mixed $actual
- * @param string $message
- *
- * @since Method available since Release 3.5.0
- */
- public static function assertNotInternalType($expected, $actual, $message = '')
- {
- if (!is_string($expected)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
- }
-
- $constraint = new PHPUnit_Framework_Constraint_Not(
- new PHPUnit_Framework_Constraint_IsType($expected)
- );
-
- self::assertThat($actual, $constraint, $message);
- }
-
- /**
- * Asserts that an attribute is of a given type.
- *
- * @param string $expected
- * @param string $attributeName
- * @param mixed $classOrObject
- * @param string $message
- *
- * @since Method available since Release 3.5.0
- */
- public static function assertAttributeNotInternalType($expected, $attributeName, $classOrObject, $message = '')
- {
- self::assertNotInternalType(
- $expected,
- self::readAttribute($classOrObject, $attributeName),
- $message
- );
- }
-
- /**
- * Asserts that a string matches a given regular expression.
- *
- * @param string $pattern
- * @param string $string
- * @param string $message
- */
- public static function assertRegExp($pattern, $string, $message = '')
- {
- if (!is_string($pattern)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
- }
-
- if (!is_string($string)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'string');
- }
-
- $constraint = new PHPUnit_Framework_Constraint_PCREMatch($pattern);
-
- self::assertThat($string, $constraint, $message);
- }
-
- /**
- * Asserts that a string does not match a given regular expression.
- *
- * @param string $pattern
- * @param string $string
- * @param string $message
- *
- * @since Method available since Release 2.1.0
- */
- public static function assertNotRegExp($pattern, $string, $message = '')
- {
- if (!is_string($pattern)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
- }
-
- if (!is_string($string)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'string');
- }
-
- $constraint = new PHPUnit_Framework_Constraint_Not(
- new PHPUnit_Framework_Constraint_PCREMatch($pattern)
- );
-
- self::assertThat($string, $constraint, $message);
- }
-
- /**
- * Assert that the size of two arrays (or `Countable` or `Traversable` objects)
- * is the same.
- *
- * @param array|Countable|Traversable $expected
- * @param array|Countable|Traversable $actual
- * @param string $message
- */
- public static function assertSameSize($expected, $actual, $message = '')
- {
- if (!$expected instanceof Countable &&
- !$expected instanceof Traversable &&
- !is_array($expected)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'countable or traversable');
- }
-
- if (!$actual instanceof Countable &&
- !$actual instanceof Traversable &&
- !is_array($actual)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'countable or traversable');
- }
-
- self::assertThat(
- $actual,
- new PHPUnit_Framework_Constraint_SameSize($expected),
- $message
- );
- }
-
- /**
- * Assert that the size of two arrays (or `Countable` or `Traversable` objects)
- * is not the same.
- *
- * @param array|Countable|Traversable $expected
- * @param array|Countable|Traversable $actual
- * @param string $message
- */
- public static function assertNotSameSize($expected, $actual, $message = '')
- {
- if (!$expected instanceof Countable &&
- !$expected instanceof Traversable &&
- !is_array($expected)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'countable or traversable');
- }
-
- if (!$actual instanceof Countable &&
- !$actual instanceof Traversable &&
- !is_array($actual)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'countable or traversable');
- }
-
- $constraint = new PHPUnit_Framework_Constraint_Not(
- new PHPUnit_Framework_Constraint_SameSize($expected)
- );
-
- self::assertThat($actual, $constraint, $message);
- }
-
- /**
- * Asserts that a string matches a given format string.
- *
- * @param string $format
- * @param string $string
- * @param string $message
- *
- * @since Method available since Release 3.5.0
- */
- public static function assertStringMatchesFormat($format, $string, $message = '')
- {
- if (!is_string($format)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
- }
-
- if (!is_string($string)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'string');
- }
-
- $constraint = new PHPUnit_Framework_Constraint_StringMatches($format);
-
- self::assertThat($string, $constraint, $message);
- }
-
- /**
- * Asserts that a string does not match a given format string.
- *
- * @param string $format
- * @param string $string
- * @param string $message
- *
- * @since Method available since Release 3.5.0
- */
- public static function assertStringNotMatchesFormat($format, $string, $message = '')
- {
- if (!is_string($format)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
- }
-
- if (!is_string($string)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'string');
- }
-
- $constraint = new PHPUnit_Framework_Constraint_Not(
- new PHPUnit_Framework_Constraint_StringMatches($format)
- );
-
- self::assertThat($string, $constraint, $message);
- }
-
- /**
- * Asserts that a string matches a given format file.
- *
- * @param string $formatFile
- * @param string $string
- * @param string $message
- *
- * @since Method available since Release 3.5.0
- */
- public static function assertStringMatchesFormatFile($formatFile, $string, $message = '')
- {
- self::assertFileExists($formatFile, $message);
-
- if (!is_string($string)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'string');
- }
-
- $constraint = new PHPUnit_Framework_Constraint_StringMatches(
- file_get_contents($formatFile)
- );
-
- self::assertThat($string, $constraint, $message);
- }
-
- /**
- * Asserts that a string does not match a given format string.
- *
- * @param string $formatFile
- * @param string $string
- * @param string $message
- *
- * @since Method available since Release 3.5.0
- */
- public static function assertStringNotMatchesFormatFile($formatFile, $string, $message = '')
- {
- self::assertFileExists($formatFile, $message);
-
- if (!is_string($string)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'string');
- }
-
- $constraint = new PHPUnit_Framework_Constraint_Not(
- new PHPUnit_Framework_Constraint_StringMatches(
- file_get_contents($formatFile)
- )
- );
-
- self::assertThat($string, $constraint, $message);
- }
-
- /**
- * Asserts that a string starts with a given prefix.
- *
- * @param string $prefix
- * @param string $string
- * @param string $message
- *
- * @since Method available since Release 3.4.0
- */
- public static function assertStringStartsWith($prefix, $string, $message = '')
- {
- if (!is_string($prefix)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
- }
-
- if (!is_string($string)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'string');
- }
-
- $constraint = new PHPUnit_Framework_Constraint_StringStartsWith(
- $prefix
- );
-
- self::assertThat($string, $constraint, $message);
- }
-
- /**
- * Asserts that a string starts not with a given prefix.
- *
- * @param string $prefix
- * @param string $string
- * @param string $message
- *
- * @since Method available since Release 3.4.0
- */
- public static function assertStringStartsNotWith($prefix, $string, $message = '')
- {
- if (!is_string($prefix)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
- }
-
- if (!is_string($string)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'string');
- }
-
- $constraint = new PHPUnit_Framework_Constraint_Not(
- new PHPUnit_Framework_Constraint_StringStartsWith($prefix)
- );
-
- self::assertThat($string, $constraint, $message);
- }
-
- /**
- * Asserts that a string ends with a given suffix.
- *
- * @param string $suffix
- * @param string $string
- * @param string $message
- *
- * @since Method available since Release 3.4.0
- */
- public static function assertStringEndsWith($suffix, $string, $message = '')
- {
- if (!is_string($suffix)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
- }
-
- if (!is_string($string)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'string');
- }
-
- $constraint = new PHPUnit_Framework_Constraint_StringEndsWith($suffix);
-
- self::assertThat($string, $constraint, $message);
- }
-
- /**
- * Asserts that a string ends not with a given suffix.
- *
- * @param string $suffix
- * @param string $string
- * @param string $message
- *
- * @since Method available since Release 3.4.0
- */
- public static function assertStringEndsNotWith($suffix, $string, $message = '')
- {
- if (!is_string($suffix)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
- }
-
- if (!is_string($string)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'string');
- }
-
- $constraint = new PHPUnit_Framework_Constraint_Not(
- new PHPUnit_Framework_Constraint_StringEndsWith($suffix)
- );
-
- self::assertThat($string, $constraint, $message);
- }
-
- /**
- * Asserts that two XML files are equal.
- *
- * @param string $expectedFile
- * @param string $actualFile
- * @param string $message
- *
- * @since Method available since Release 3.1.0
- */
- public static function assertXmlFileEqualsXmlFile($expectedFile, $actualFile, $message = '')
- {
- $expected = PHPUnit_Util_XML::loadFile($expectedFile);
- $actual = PHPUnit_Util_XML::loadFile($actualFile);
-
- self::assertEquals($expected, $actual, $message);
- }
-
- /**
- * Asserts that two XML files are not equal.
- *
- * @param string $expectedFile
- * @param string $actualFile
- * @param string $message
- *
- * @since Method available since Release 3.1.0
- */
- public static function assertXmlFileNotEqualsXmlFile($expectedFile, $actualFile, $message = '')
- {
- $expected = PHPUnit_Util_XML::loadFile($expectedFile);
- $actual = PHPUnit_Util_XML::loadFile($actualFile);
-
- self::assertNotEquals($expected, $actual, $message);
- }
-
- /**
- * Asserts that two XML documents are equal.
- *
- * @param string $expectedFile
- * @param string $actualXml
- * @param string $message
- *
- * @since Method available since Release 3.3.0
- */
- public static function assertXmlStringEqualsXmlFile($expectedFile, $actualXml, $message = '')
- {
- $expected = PHPUnit_Util_XML::loadFile($expectedFile);
- $actual = PHPUnit_Util_XML::load($actualXml);
-
- self::assertEquals($expected, $actual, $message);
- }
-
- /**
- * Asserts that two XML documents are not equal.
- *
- * @param string $expectedFile
- * @param string $actualXml
- * @param string $message
- *
- * @since Method available since Release 3.3.0
- */
- public static function assertXmlStringNotEqualsXmlFile($expectedFile, $actualXml, $message = '')
- {
- $expected = PHPUnit_Util_XML::loadFile($expectedFile);
- $actual = PHPUnit_Util_XML::load($actualXml);
-
- self::assertNotEquals($expected, $actual, $message);
- }
-
- /**
- * Asserts that two XML documents are equal.
- *
- * @param string $expectedXml
- * @param string $actualXml
- * @param string $message
- *
- * @since Method available since Release 3.1.0
- */
- public static function assertXmlStringEqualsXmlString($expectedXml, $actualXml, $message = '')
- {
- $expected = PHPUnit_Util_XML::load($expectedXml);
- $actual = PHPUnit_Util_XML::load($actualXml);
-
- self::assertEquals($expected, $actual, $message);
- }
-
- /**
- * Asserts that two XML documents are not equal.
- *
- * @param string $expectedXml
- * @param string $actualXml
- * @param string $message
- *
- * @since Method available since Release 3.1.0
- */
- public static function assertXmlStringNotEqualsXmlString($expectedXml, $actualXml, $message = '')
- {
- $expected = PHPUnit_Util_XML::load($expectedXml);
- $actual = PHPUnit_Util_XML::load($actualXml);
-
- self::assertNotEquals($expected, $actual, $message);
- }
-
- /**
- * Asserts that a hierarchy of DOMElements matches.
- *
- * @param DOMElement $expectedElement
- * @param DOMElement $actualElement
- * @param bool $checkAttributes
- * @param string $message
- *
- * @since Method available since Release 3.3.0
- */
- public static function assertEqualXMLStructure(DOMElement $expectedElement, DOMElement $actualElement, $checkAttributes = false, $message = '')
- {
- $tmp = new DOMDocument;
- $expectedElement = $tmp->importNode($expectedElement, true);
-
- $tmp = new DOMDocument;
- $actualElement = $tmp->importNode($actualElement, true);
-
- unset($tmp);
-
- self::assertEquals(
- $expectedElement->tagName,
- $actualElement->tagName,
- $message
- );
-
- if ($checkAttributes) {
- self::assertEquals(
- $expectedElement->attributes->length,
- $actualElement->attributes->length,
- sprintf(
- '%s%sNumber of attributes on node "%s" does not match',
- $message,
- !empty($message) ? "\n" : '',
- $expectedElement->tagName
- )
- );
-
- for ($i = 0; $i < $expectedElement->attributes->length; $i++) {
- $expectedAttribute = $expectedElement->attributes->item($i);
- $actualAttribute = $actualElement->attributes->getNamedItem(
- $expectedAttribute->name
- );
-
- if (!$actualAttribute) {
- self::fail(
- sprintf(
- '%s%sCould not find attribute "%s" on node "%s"',
- $message,
- !empty($message) ? "\n" : '',
- $expectedAttribute->name,
- $expectedElement->tagName
- )
- );
- }
- }
- }
-
- PHPUnit_Util_XML::removeCharacterDataNodes($expectedElement);
- PHPUnit_Util_XML::removeCharacterDataNodes($actualElement);
-
- self::assertEquals(
- $expectedElement->childNodes->length,
- $actualElement->childNodes->length,
- sprintf(
- '%s%sNumber of child nodes of "%s" differs',
- $message,
- !empty($message) ? "\n" : '',
- $expectedElement->tagName
- )
- );
-
- for ($i = 0; $i < $expectedElement->childNodes->length; $i++) {
- self::assertEqualXMLStructure(
- $expectedElement->childNodes->item($i),
- $actualElement->childNodes->item($i),
- $checkAttributes,
- $message
- );
- }
- }
-
- /**
- * Assert the presence, absence, or count of elements in a document matching
- * the CSS $selector, regardless of the contents of those elements.
- *
- * The first argument, $selector, is the CSS selector used to match
- * the elements in the $actual document.
- *
- * The second argument, $count, can be either boolean or numeric.
- * When boolean, it asserts for presence of elements matching the selector
- * (true) or absence of elements (false).
- * When numeric, it asserts the count of elements.
- *
- * assertSelectCount("#binder", true, $xml); // any?
- * assertSelectCount(".binder", 3, $xml); // exactly 3?
- *
- * @param array $selector
- * @param int|bool|array $count
- * @param mixed $actual
- * @param string $message
- * @param bool $isHtml
- *
- * @since Method available since Release 3.3.0
- * @deprecated
- * @codeCoverageIgnore
- */
- public static function assertSelectCount($selector, $count, $actual, $message = '', $isHtml = true)
- {
- trigger_error(__METHOD__ . ' is deprecated', E_USER_DEPRECATED);
-
- self::assertSelectEquals(
- $selector,
- true,
- $count,
- $actual,
- $message,
- $isHtml
- );
- }
-
- /**
- * assertSelectRegExp("#binder .name", "/Mike|Derek/", true, $xml); // any?
- * assertSelectRegExp("#binder .name", "/Mike|Derek/", 3, $xml); // 3?
- *
- * @param array $selector
- * @param string $pattern
- * @param int|bool|array $count
- * @param mixed $actual
- * @param string $message
- * @param bool $isHtml
- *
- * @since Method available since Release 3.3.0
- * @deprecated
- * @codeCoverageIgnore
- */
- public static function assertSelectRegExp($selector, $pattern, $count, $actual, $message = '', $isHtml = true)
- {
- trigger_error(__METHOD__ . ' is deprecated', E_USER_DEPRECATED);
-
- self::assertSelectEquals(
- $selector,
- "regexp:$pattern",
- $count,
- $actual,
- $message,
- $isHtml
- );
- }
-
- /**
- * assertSelectEquals("#binder .name", "Chuck", true, $xml); // any?
- * assertSelectEquals("#binder .name", "Chuck", false, $xml); // none?
- *
- * @param array $selector
- * @param string $content
- * @param int|bool|array $count
- * @param mixed $actual
- * @param string $message
- * @param bool $isHtml
- *
- * @since Method available since Release 3.3.0
- * @deprecated
- * @codeCoverageIgnore
- */
- public static function assertSelectEquals($selector, $content, $count, $actual, $message = '', $isHtml = true)
- {
- trigger_error(__METHOD__ . ' is deprecated', E_USER_DEPRECATED);
-
- $tags = PHPUnit_Util_XML::cssSelect(
- $selector,
- $content,
- $actual,
- $isHtml
- );
-
- // assert specific number of elements
- if (is_numeric($count)) {
- $counted = $tags ? count($tags) : 0;
- self::assertEquals($count, $counted, $message);
- } // assert any elements exist if true, assert no elements exist if false
- elseif (is_bool($count)) {
- $any = count($tags) > 0 && $tags[0] instanceof DOMNode;
-
- if ($count) {
- self::assertTrue($any, $message);
- } else {
- self::assertFalse($any, $message);
- }
- } // check for range number of elements
- elseif (is_array($count) &&
- (isset($count['>']) || isset($count['<']) ||
- isset($count['>=']) || isset($count['<=']))) {
- $counted = $tags ? count($tags) : 0;
-
- if (isset($count['>'])) {
- self::assertTrue($counted > $count['>'], $message);
- }
-
- if (isset($count['>='])) {
- self::assertTrue($counted >= $count['>='], $message);
- }
-
- if (isset($count['<'])) {
- self::assertTrue($counted < $count['<'], $message);
- }
-
- if (isset($count['<='])) {
- self::assertTrue($counted <= $count['<='], $message);
- }
- } else {
- throw new PHPUnit_Framework_Exception;
- }
- }
-
- /**
- * Evaluate an HTML or XML string and assert its structure and/or contents.
- *
- * The first argument ($matcher) is an associative array that specifies the
- * match criteria for the assertion:
- *
- * - `id` : the node with the given id attribute must match the
- * corresponding value.
- * - `tag` : the node type must match the corresponding value.
- * - `attributes` : a hash. The node's attributes must match the
- * corresponding values in the hash.
- * - `content` : The text content must match the given value.
- * - `parent` : a hash. The node's parent must match the
- * corresponding hash.
- * - `child` : a hash. At least one of the node's immediate children
- * must meet the criteria described by the hash.
- * - `ancestor` : a hash. At least one of the node's ancestors must
- * meet the criteria described by the hash.
- * - `descendant` : a hash. At least one of the node's descendants must
- * meet the criteria described by the hash.
- * - `children` : a hash, for counting children of a node.
- * Accepts the keys:
- * - `count` : a number which must equal the number of children
- * that match
- * - `less_than` : the number of matching children must be greater
- * than this number
- * - `greater_than` : the number of matching children must be less than
- * this number
- * - `only` : another hash consisting of the keys to use to match
- * on the children, and only matching children will be
- * counted
- *
- *
- * // Matcher that asserts that there is an element with an id="my_id".
- * $matcher = array('id' => 'my_id');
- *
- * // Matcher that asserts that there is a "span" tag.
- * $matcher = array('tag' => 'span');
- *
- * // Matcher that asserts that there is a "span" tag with the content
- * // "Hello World".
- * $matcher = array('tag' => 'span', 'content' => 'Hello World');
- *
- * // Matcher that asserts that there is a "span" tag with content matching
- * // the regular expression pattern.
- * $matcher = array('tag' => 'span', 'content' => 'regexp:/Try P(HP|ython)/');
- *
- * // Matcher that asserts that there is a "span" with an "list" class
- * // attribute.
- * $matcher = array(
- * 'tag' => 'span',
- * 'attributes' => array('class' => 'list')
- * );
- *
- * // Matcher that asserts that there is a "span" inside of a "div".
- * $matcher = array(
- * 'tag' => 'span',
- * 'parent' => array('tag' => 'div')
- * );
- *
- * // Matcher that asserts that there is a "span" somewhere inside a
- * // "table".
- * $matcher = array(
- * 'tag' => 'span',
- * 'ancestor' => array('tag' => 'table')
- * );
- *
- * // Matcher that asserts that there is a "span" with at least one "em"
- * // child.
- * $matcher = array(
- * 'tag' => 'span',
- * 'child' => array('tag' => 'em')
- * );
- *
- * // Matcher that asserts that there is a "span" containing a (possibly
- * // nested) "strong" tag.
- * $matcher = array(
- * 'tag' => 'span',
- * 'descendant' => array('tag' => 'strong')
- * );
- *
- * // Matcher that asserts that there is a "span" containing 5-10 "em" tags
- * // as immediate children.
- * $matcher = array(
- * 'tag' => 'span',
- * 'children' => array(
- * 'less_than' => 11,
- * 'greater_than' => 4,
- * 'only' => array('tag' => 'em')
- * )
- * );
- *
- * // Matcher that asserts that there is a "div", with an "ul" ancestor and
- * // a "li" parent (with class="enum"), and containing a "span" descendant
- * // that contains an element with id="my_test" and the text "Hello World".
- * $matcher = array(
- * 'tag' => 'div',
- * 'ancestor' => array('tag' => 'ul'),
- * 'parent' => array(
- * 'tag' => 'li',
- * 'attributes' => array('class' => 'enum')
- * ),
- * 'descendant' => array(
- * 'tag' => 'span',
- * 'child' => array(
- * 'id' => 'my_test',
- * 'content' => 'Hello World'
- * )
- * )
- * );
- *
- * // Use assertTag() to apply a $matcher to a piece of $html.
- * $this->assertTag($matcher, $html);
- *
- * // Use assertTag() to apply a $matcher to a piece of $xml.
- * $this->assertTag($matcher, $xml, '', false);
- *
- *
- * The second argument ($actual) is a string containing either HTML or
- * XML text to be tested.
- *
- * The third argument ($message) is an optional message that will be
- * used if the assertion fails.
- *
- * The fourth argument ($html) is an optional flag specifying whether
- * to load the $actual string into a DOMDocument using the HTML or
- * XML load strategy. It is true by default, which assumes the HTML
- * load strategy. In many cases, this will be acceptable for XML as well.
- *
- * @param array $matcher
- * @param string $actual
- * @param string $message
- * @param bool $isHtml
- *
- * @since Method available since Release 3.3.0
- * @deprecated
- * @codeCoverageIgnore
- */
- public static function assertTag($matcher, $actual, $message = '', $isHtml = true)
- {
- trigger_error(__METHOD__ . ' is deprecated', E_USER_DEPRECATED);
-
- $dom = PHPUnit_Util_XML::load($actual, $isHtml);
- $tags = PHPUnit_Util_XML::findNodes($dom, $matcher, $isHtml);
- $matched = count($tags) > 0 && $tags[0] instanceof DOMNode;
-
- self::assertTrue($matched, $message);
- }
-
- /**
- * This assertion is the exact opposite of assertTag().
- *
- * Rather than asserting that $matcher results in a match, it asserts that
- * $matcher does not match.
- *
- * @param array $matcher
- * @param string $actual
- * @param string $message
- * @param bool $isHtml
- *
- * @since Method available since Release 3.3.0
- * @deprecated
- * @codeCoverageIgnore
- */
- public static function assertNotTag($matcher, $actual, $message = '', $isHtml = true)
- {
- trigger_error(__METHOD__ . ' is deprecated', E_USER_DEPRECATED);
-
- $dom = PHPUnit_Util_XML::load($actual, $isHtml);
- $tags = PHPUnit_Util_XML::findNodes($dom, $matcher, $isHtml);
- $matched = count($tags) > 0 && $tags[0] instanceof DOMNode;
-
- self::assertFalse($matched, $message);
- }
-
- /**
- * Evaluates a PHPUnit_Framework_Constraint matcher object.
- *
- * @param mixed $value
- * @param PHPUnit_Framework_Constraint $constraint
- * @param string $message
- *
- * @since Method available since Release 3.0.0
- */
- public static function assertThat($value, PHPUnit_Framework_Constraint $constraint, $message = '')
- {
- self::$count += count($constraint);
-
- $constraint->evaluate($value, $message);
- }
-
- /**
- * Asserts that a string is a valid JSON string.
- *
- * @param string $actualJson
- * @param string $message
- *
- * @since Method available since Release 3.7.20
- */
- public static function assertJson($actualJson, $message = '')
- {
- if (!is_string($actualJson)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
- }
-
- self::assertThat($actualJson, self::isJson(), $message);
- }
-
- /**
- * Asserts that two given JSON encoded objects or arrays are equal.
- *
- * @param string $expectedJson
- * @param string $actualJson
- * @param string $message
- */
- public static function assertJsonStringEqualsJsonString($expectedJson, $actualJson, $message = '')
- {
- self::assertJson($expectedJson, $message);
- self::assertJson($actualJson, $message);
-
- $expected = json_decode($expectedJson);
- $actual = json_decode($actualJson);
-
- self::assertEquals($expected, $actual, $message);
- }
-
- /**
- * Asserts that two given JSON encoded objects or arrays are not equal.
- *
- * @param string $expectedJson
- * @param string $actualJson
- * @param string $message
- */
- public static function assertJsonStringNotEqualsJsonString($expectedJson, $actualJson, $message = '')
- {
- self::assertJson($expectedJson, $message);
- self::assertJson($actualJson, $message);
-
- $expected = json_decode($expectedJson);
- $actual = json_decode($actualJson);
-
- self::assertNotEquals($expected, $actual, $message);
- }
-
- /**
- * Asserts that the generated JSON encoded object and the content of the given file are equal.
- *
- * @param string $expectedFile
- * @param string $actualJson
- * @param string $message
- */
- public static function assertJsonStringEqualsJsonFile($expectedFile, $actualJson, $message = '')
- {
- self::assertFileExists($expectedFile, $message);
- $expectedJson = file_get_contents($expectedFile);
-
- self::assertJson($expectedJson, $message);
- self::assertJson($actualJson, $message);
-
- // call constraint
- $constraint = new PHPUnit_Framework_Constraint_JsonMatches(
- $expectedJson
- );
-
- self::assertThat($actualJson, $constraint, $message);
- }
-
- /**
- * Asserts that the generated JSON encoded object and the content of the given file are not equal.
- *
- * @param string $expectedFile
- * @param string $actualJson
- * @param string $message
- */
- public static function assertJsonStringNotEqualsJsonFile($expectedFile, $actualJson, $message = '')
- {
- self::assertFileExists($expectedFile, $message);
- $expectedJson = file_get_contents($expectedFile);
-
- self::assertJson($expectedJson, $message);
- self::assertJson($actualJson, $message);
-
- // call constraint
- $constraint = new PHPUnit_Framework_Constraint_JsonMatches(
- $expectedJson
- );
-
- self::assertThat($actualJson, new PHPUnit_Framework_Constraint_Not($constraint), $message);
- }
-
- /**
- * Asserts that two JSON files are not equal.
- *
- * @param string $expectedFile
- * @param string $actualFile
- * @param string $message
- */
- public static function assertJsonFileNotEqualsJsonFile($expectedFile, $actualFile, $message = '')
- {
- self::assertFileExists($expectedFile, $message);
- self::assertFileExists($actualFile, $message);
-
- $actualJson = file_get_contents($actualFile);
- $expectedJson = file_get_contents($expectedFile);
-
- self::assertJson($expectedJson, $message);
- self::assertJson($actualJson, $message);
-
- // call constraint
- $constraintExpected = new PHPUnit_Framework_Constraint_JsonMatches(
- $expectedJson
- );
-
- $constraintActual = new PHPUnit_Framework_Constraint_JsonMatches($actualJson);
-
- self::assertThat($expectedJson, new PHPUnit_Framework_Constraint_Not($constraintActual), $message);
- self::assertThat($actualJson, new PHPUnit_Framework_Constraint_Not($constraintExpected), $message);
- }
-
- /**
- * Asserts that two JSON files are equal.
- *
- * @param string $expectedFile
- * @param string $actualFile
- * @param string $message
- */
- public static function assertJsonFileEqualsJsonFile($expectedFile, $actualFile, $message = '')
- {
- self::assertFileExists($expectedFile, $message);
- self::assertFileExists($actualFile, $message);
-
- $actualJson = file_get_contents($actualFile);
- $expectedJson = file_get_contents($expectedFile);
-
- self::assertJson($expectedJson, $message);
- self::assertJson($actualJson, $message);
-
- // call constraint
- $constraintExpected = new PHPUnit_Framework_Constraint_JsonMatches(
- $expectedJson
- );
-
- $constraintActual = new PHPUnit_Framework_Constraint_JsonMatches($actualJson);
-
- self::assertThat($expectedJson, $constraintActual, $message);
- self::assertThat($actualJson, $constraintExpected, $message);
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_And matcher object.
- *
- * @return PHPUnit_Framework_Constraint_And
- *
- * @since Method available since Release 3.0.0
- */
- public static function logicalAnd()
- {
- $constraints = func_get_args();
-
- $constraint = new PHPUnit_Framework_Constraint_And;
- $constraint->setConstraints($constraints);
-
- return $constraint;
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_Or matcher object.
- *
- * @return PHPUnit_Framework_Constraint_Or
- *
- * @since Method available since Release 3.0.0
- */
- public static function logicalOr()
- {
- $constraints = func_get_args();
-
- $constraint = new PHPUnit_Framework_Constraint_Or;
- $constraint->setConstraints($constraints);
-
- return $constraint;
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_Not matcher object.
- *
- * @param PHPUnit_Framework_Constraint $constraint
- *
- * @return PHPUnit_Framework_Constraint_Not
- *
- * @since Method available since Release 3.0.0
- */
- public static function logicalNot(PHPUnit_Framework_Constraint $constraint)
- {
- return new PHPUnit_Framework_Constraint_Not($constraint);
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_Xor matcher object.
- *
- * @return PHPUnit_Framework_Constraint_Xor
- *
- * @since Method available since Release 3.0.0
- */
- public static function logicalXor()
- {
- $constraints = func_get_args();
-
- $constraint = new PHPUnit_Framework_Constraint_Xor;
- $constraint->setConstraints($constraints);
-
- return $constraint;
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_IsAnything matcher object.
- *
- * @return PHPUnit_Framework_Constraint_IsAnything
- *
- * @since Method available since Release 3.0.0
- */
- public static function anything()
- {
- return new PHPUnit_Framework_Constraint_IsAnything;
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_IsTrue matcher object.
- *
- * @return PHPUnit_Framework_Constraint_IsTrue
- *
- * @since Method available since Release 3.3.0
- */
- public static function isTrue()
- {
- return new PHPUnit_Framework_Constraint_IsTrue;
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_Callback matcher object.
- *
- * @param callable $callback
- *
- * @return PHPUnit_Framework_Constraint_Callback
- */
- public static function callback($callback)
- {
- return new PHPUnit_Framework_Constraint_Callback($callback);
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_IsFalse matcher object.
- *
- * @return PHPUnit_Framework_Constraint_IsFalse
- *
- * @since Method available since Release 3.3.0
- */
- public static function isFalse()
- {
- return new PHPUnit_Framework_Constraint_IsFalse;
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_IsJson matcher object.
- *
- * @return PHPUnit_Framework_Constraint_IsJson
- *
- * @since Method available since Release 3.7.20
- */
- public static function isJson()
- {
- return new PHPUnit_Framework_Constraint_IsJson;
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_IsNull matcher object.
- *
- * @return PHPUnit_Framework_Constraint_IsNull
- *
- * @since Method available since Release 3.3.0
- */
- public static function isNull()
- {
- return new PHPUnit_Framework_Constraint_IsNull;
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_Attribute matcher object.
- *
- * @param PHPUnit_Framework_Constraint $constraint
- * @param string $attributeName
- *
- * @return PHPUnit_Framework_Constraint_Attribute
- *
- * @since Method available since Release 3.1.0
- */
- public static function attribute(PHPUnit_Framework_Constraint $constraint, $attributeName)
- {
- return new PHPUnit_Framework_Constraint_Attribute(
- $constraint,
- $attributeName
- );
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_TraversableContains matcher
- * object.
- *
- * @param mixed $value
- * @param bool $checkForObjectIdentity
- * @param bool $checkForNonObjectIdentity
- *
- * @return PHPUnit_Framework_Constraint_TraversableContains
- *
- * @since Method available since Release 3.0.0
- */
- public static function contains($value, $checkForObjectIdentity = true, $checkForNonObjectIdentity = false)
- {
- return new PHPUnit_Framework_Constraint_TraversableContains($value, $checkForObjectIdentity, $checkForNonObjectIdentity);
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_TraversableContainsOnly matcher
- * object.
- *
- * @param string $type
- *
- * @return PHPUnit_Framework_Constraint_TraversableContainsOnly
- *
- * @since Method available since Release 3.1.4
- */
- public static function containsOnly($type)
- {
- return new PHPUnit_Framework_Constraint_TraversableContainsOnly($type);
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_TraversableContainsOnly matcher
- * object.
- *
- * @param string $classname
- *
- * @return PHPUnit_Framework_Constraint_TraversableContainsOnly
- */
- public static function containsOnlyInstancesOf($classname)
- {
- return new PHPUnit_Framework_Constraint_TraversableContainsOnly($classname, false);
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_ArrayHasKey matcher object.
- *
- * @param mixed $key
- *
- * @return PHPUnit_Framework_Constraint_ArrayHasKey
- *
- * @since Method available since Release 3.0.0
- */
- public static function arrayHasKey($key)
- {
- return new PHPUnit_Framework_Constraint_ArrayHasKey($key);
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_IsEqual matcher object.
- *
- * @param mixed $value
- * @param float $delta
- * @param int $maxDepth
- * @param bool $canonicalize
- * @param bool $ignoreCase
- *
- * @return PHPUnit_Framework_Constraint_IsEqual
- *
- * @since Method available since Release 3.0.0
- */
- public static function equalTo($value, $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false)
- {
- return new PHPUnit_Framework_Constraint_IsEqual(
- $value,
- $delta,
- $maxDepth,
- $canonicalize,
- $ignoreCase
- );
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_IsEqual matcher object
- * that is wrapped in a PHPUnit_Framework_Constraint_Attribute matcher
- * object.
- *
- * @param string $attributeName
- * @param mixed $value
- * @param float $delta
- * @param int $maxDepth
- * @param bool $canonicalize
- * @param bool $ignoreCase
- *
- * @return PHPUnit_Framework_Constraint_Attribute
- *
- * @since Method available since Release 3.1.0
- */
- public static function attributeEqualTo($attributeName, $value, $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false)
- {
- return self::attribute(
- self::equalTo(
- $value,
- $delta,
- $maxDepth,
- $canonicalize,
- $ignoreCase
- ),
- $attributeName
- );
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_IsEmpty matcher object.
- *
- * @return PHPUnit_Framework_Constraint_IsEmpty
- *
- * @since Method available since Release 3.5.0
- */
- public static function isEmpty()
- {
- return new PHPUnit_Framework_Constraint_IsEmpty;
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_FileExists matcher object.
- *
- * @return PHPUnit_Framework_Constraint_FileExists
- *
- * @since Method available since Release 3.0.0
- */
- public static function fileExists()
- {
- return new PHPUnit_Framework_Constraint_FileExists;
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_GreaterThan matcher object.
- *
- * @param mixed $value
- *
- * @return PHPUnit_Framework_Constraint_GreaterThan
- *
- * @since Method available since Release 3.0.0
- */
- public static function greaterThan($value)
- {
- return new PHPUnit_Framework_Constraint_GreaterThan($value);
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_Or matcher object that wraps
- * a PHPUnit_Framework_Constraint_IsEqual and a
- * PHPUnit_Framework_Constraint_GreaterThan matcher object.
- *
- * @param mixed $value
- *
- * @return PHPUnit_Framework_Constraint_Or
- *
- * @since Method available since Release 3.1.0
- */
- public static function greaterThanOrEqual($value)
- {
- return self::logicalOr(
- new PHPUnit_Framework_Constraint_IsEqual($value),
- new PHPUnit_Framework_Constraint_GreaterThan($value)
- );
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_ClassHasAttribute matcher object.
- *
- * @param string $attributeName
- *
- * @return PHPUnit_Framework_Constraint_ClassHasAttribute
- *
- * @since Method available since Release 3.1.0
- */
- public static function classHasAttribute($attributeName)
- {
- return new PHPUnit_Framework_Constraint_ClassHasAttribute(
- $attributeName
- );
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_ClassHasStaticAttribute matcher
- * object.
- *
- * @param string $attributeName
- *
- * @return PHPUnit_Framework_Constraint_ClassHasStaticAttribute
- *
- * @since Method available since Release 3.1.0
- */
- public static function classHasStaticAttribute($attributeName)
- {
- return new PHPUnit_Framework_Constraint_ClassHasStaticAttribute(
- $attributeName
- );
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_ObjectHasAttribute matcher object.
- *
- * @param string $attributeName
- *
- * @return PHPUnit_Framework_Constraint_ObjectHasAttribute
- *
- * @since Method available since Release 3.0.0
- */
- public static function objectHasAttribute($attributeName)
- {
- return new PHPUnit_Framework_Constraint_ObjectHasAttribute(
- $attributeName
- );
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_IsIdentical matcher object.
- *
- * @param mixed $value
- *
- * @return PHPUnit_Framework_Constraint_IsIdentical
- *
- * @since Method available since Release 3.0.0
- */
- public static function identicalTo($value)
- {
- return new PHPUnit_Framework_Constraint_IsIdentical($value);
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_IsInstanceOf matcher object.
- *
- * @param string $className
- *
- * @return PHPUnit_Framework_Constraint_IsInstanceOf
- *
- * @since Method available since Release 3.0.0
- */
- public static function isInstanceOf($className)
- {
- return new PHPUnit_Framework_Constraint_IsInstanceOf($className);
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_IsType matcher object.
- *
- * @param string $type
- *
- * @return PHPUnit_Framework_Constraint_IsType
- *
- * @since Method available since Release 3.0.0
- */
- public static function isType($type)
- {
- return new PHPUnit_Framework_Constraint_IsType($type);
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_LessThan matcher object.
- *
- * @param mixed $value
- *
- * @return PHPUnit_Framework_Constraint_LessThan
- *
- * @since Method available since Release 3.0.0
- */
- public static function lessThan($value)
- {
- return new PHPUnit_Framework_Constraint_LessThan($value);
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_Or matcher object that wraps
- * a PHPUnit_Framework_Constraint_IsEqual and a
- * PHPUnit_Framework_Constraint_LessThan matcher object.
- *
- * @param mixed $value
- *
- * @return PHPUnit_Framework_Constraint_Or
- *
- * @since Method available since Release 3.1.0
- */
- public static function lessThanOrEqual($value)
- {
- return self::logicalOr(
- new PHPUnit_Framework_Constraint_IsEqual($value),
- new PHPUnit_Framework_Constraint_LessThan($value)
- );
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_PCREMatch matcher object.
- *
- * @param string $pattern
- *
- * @return PHPUnit_Framework_Constraint_PCREMatch
- *
- * @since Method available since Release 3.0.0
- */
- public static function matchesRegularExpression($pattern)
- {
- return new PHPUnit_Framework_Constraint_PCREMatch($pattern);
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_StringMatches matcher object.
- *
- * @param string $string
- *
- * @return PHPUnit_Framework_Constraint_StringMatches
- *
- * @since Method available since Release 3.5.0
- */
- public static function matches($string)
- {
- return new PHPUnit_Framework_Constraint_StringMatches($string);
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_StringStartsWith matcher object.
- *
- * @param mixed $prefix
- *
- * @return PHPUnit_Framework_Constraint_StringStartsWith
- *
- * @since Method available since Release 3.4.0
- */
- public static function stringStartsWith($prefix)
- {
- return new PHPUnit_Framework_Constraint_StringStartsWith($prefix);
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_StringContains matcher object.
- *
- * @param string $string
- * @param bool $case
- *
- * @return PHPUnit_Framework_Constraint_StringContains
- *
- * @since Method available since Release 3.0.0
- */
- public static function stringContains($string, $case = true)
- {
- return new PHPUnit_Framework_Constraint_StringContains($string, $case);
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_StringEndsWith matcher object.
- *
- * @param mixed $suffix
- *
- * @return PHPUnit_Framework_Constraint_StringEndsWith
- *
- * @since Method available since Release 3.4.0
- */
- public static function stringEndsWith($suffix)
- {
- return new PHPUnit_Framework_Constraint_StringEndsWith($suffix);
- }
-
- /**
- * Returns a PHPUnit_Framework_Constraint_Count matcher object.
- *
- * @param int $count
- *
- * @return PHPUnit_Framework_Constraint_Count
- */
- public static function countOf($count)
- {
- return new PHPUnit_Framework_Constraint_Count($count);
- }
- /**
- * Fails a test with the given message.
- *
- * @param string $message
- *
- * @throws PHPUnit_Framework_AssertionFailedError
- */
- public static function fail($message = '')
- {
- throw new PHPUnit_Framework_AssertionFailedError($message);
- }
-
- /**
- * Returns the value of an attribute of a class or an object.
- * This also works for attributes that are declared protected or private.
- *
- * @param mixed $classOrObject
- * @param string $attributeName
- *
- * @return mixed
- *
- * @throws PHPUnit_Framework_Exception
- */
- public static function readAttribute($classOrObject, $attributeName)
- {
- if (!is_string($attributeName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'string');
- }
-
- if (!preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $attributeName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'valid attribute name');
- }
-
- if (is_string($classOrObject)) {
- if (!class_exists($classOrObject)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(
- 1,
- 'class name'
- );
- }
-
- return self::getStaticAttribute(
- $classOrObject,
- $attributeName
- );
- } elseif (is_object($classOrObject)) {
- return self::getObjectAttribute(
- $classOrObject,
- $attributeName
- );
- } else {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(
- 1,
- 'class name or object'
- );
- }
- }
-
- /**
- * Returns the value of a static attribute.
- * This also works for attributes that are declared protected or private.
- *
- * @param string $className
- * @param string $attributeName
- *
- * @return mixed
- *
- * @throws PHPUnit_Framework_Exception
- *
- * @since Method available since Release 4.0.0
- */
- public static function getStaticAttribute($className, $attributeName)
- {
- if (!is_string($className)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
- }
-
- if (!class_exists($className)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'class name');
- }
-
- if (!is_string($attributeName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'string');
- }
-
- if (!preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $attributeName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'valid attribute name');
- }
-
- $class = new ReflectionClass($className);
-
- while ($class) {
- $attributes = $class->getStaticProperties();
-
- if (array_key_exists($attributeName, $attributes)) {
- return $attributes[$attributeName];
- }
-
- $class = $class->getParentClass();
- }
-
- throw new PHPUnit_Framework_Exception(
- sprintf(
- 'Attribute "%s" not found in class.',
- $attributeName
- )
- );
- }
-
- /**
- * Returns the value of an object's attribute.
- * This also works for attributes that are declared protected or private.
- *
- * @param object $object
- * @param string $attributeName
- *
- * @return mixed
- *
- * @throws PHPUnit_Framework_Exception
- *
- * @since Method available since Release 4.0.0
- */
- public static function getObjectAttribute($object, $attributeName)
- {
- if (!is_object($object)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'object');
- }
-
- if (!is_string($attributeName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'string');
- }
-
- if (!preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $attributeName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'valid attribute name');
- }
-
- try {
- $attribute = new ReflectionProperty($object, $attributeName);
- } catch (ReflectionException $e) {
- $reflector = new ReflectionObject($object);
-
- while ($reflector = $reflector->getParentClass()) {
- try {
- $attribute = $reflector->getProperty($attributeName);
- break;
- } catch (ReflectionException $e) {
- }
- }
- }
-
- if (isset($attribute)) {
- if (!$attribute || $attribute->isPublic()) {
- return $object->$attributeName;
- }
-
- $attribute->setAccessible(true);
- $value = $attribute->getValue($object);
- $attribute->setAccessible(false);
-
- return $value;
- }
-
- throw new PHPUnit_Framework_Exception(
- sprintf(
- 'Attribute "%s" not found in object.',
- $attributeName
- )
- );
- }
-
- /**
- * Mark the test as incomplete.
- *
- * @param string $message
- *
- * @throws PHPUnit_Framework_IncompleteTestError
- *
- * @since Method available since Release 3.0.0
- */
- public static function markTestIncomplete($message = '')
- {
- throw new PHPUnit_Framework_IncompleteTestError($message);
- }
-
- /**
- * Mark the test as skipped.
- *
- * @param string $message
- *
- * @throws PHPUnit_Framework_SkippedTestError
- *
- * @since Method available since Release 3.0.0
- */
- public static function markTestSkipped($message = '')
- {
- throw new PHPUnit_Framework_SkippedTestError($message);
- }
-
- /**
- * Return the current assertion count.
- *
- * @return int
- *
- * @since Method available since Release 3.3.3
- */
- public static function getCount()
- {
- return self::$count;
- }
-
- /**
- * Reset the assertion counter.
- *
- * @since Method available since Release 3.3.3
- */
- public static function resetCount()
- {
- self::$count = 0;
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php b/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php
deleted file mode 100644
index db957438..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php
+++ /dev/null
@@ -1,2569 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Returns a matcher that matches when the method is executed
- * zero or more times.
- *
- * @return PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount
- *
- * @since Method available since Release 3.0.0
- */
-function any()
-{
- return call_user_func_array(
- 'PHPUnit_Framework_TestCase::any',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_IsAnything matcher object.
- *
- * @return PHPUnit_Framework_Constraint_IsAnything
- *
- * @since Method available since Release 3.0.0
- */
-function anything()
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::anything',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_ArrayHasKey matcher object.
- *
- * @param mixed $key
- *
- * @return PHPUnit_Framework_Constraint_ArrayHasKey
- *
- * @since Method available since Release 3.0.0
- */
-function arrayHasKey($key)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::arrayHasKey',
- func_get_args()
- );
-}
-
-/**
- * Asserts that an array has a specified key.
- *
- * @param mixed $key
- * @param array|ArrayAccess $array
- * @param string $message
- *
- * @since Method available since Release 3.0.0
- */
-function assertArrayHasKey($key, $array, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertArrayHasKey',
- func_get_args()
- );
-}
-
-/**
- * Asserts that an array has a specified subset.
- *
- * @param array|ArrayAccess $subset
- * @param array|ArrayAccess $array
- * @param bool $strict Check for object identity
- * @param string $message
- *
- * @since Method available since Release 4.4.0
- */
-function assertArraySubset($subset, $array, $strict = false, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertArraySubset',
- func_get_args()
- );
-}
-
-/**
- * Asserts that an array does not have a specified key.
- *
- * @param mixed $key
- * @param array|ArrayAccess $array
- * @param string $message
- *
- * @since Method available since Release 3.0.0
- */
-function assertArrayNotHasKey($key, $array, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertArrayNotHasKey',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a haystack that is stored in a static attribute of a class
- * or an attribute of an object contains a needle.
- *
- * @param mixed $needle
- * @param string $haystackAttributeName
- * @param mixed $haystackClassOrObject
- * @param string $message
- * @param bool $ignoreCase
- * @param bool $checkForObjectIdentity
- * @param bool $checkForNonObjectIdentity
- *
- * @since Method available since Release 3.0.0
- */
-function assertAttributeContains($needle, $haystackAttributeName, $haystackClassOrObject, $message = '', $ignoreCase = false, $checkForObjectIdentity = true, $checkForNonObjectIdentity = false)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertAttributeContains',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a haystack that is stored in a static attribute of a class
- * or an attribute of an object contains only values of a given type.
- *
- * @param string $type
- * @param string $haystackAttributeName
- * @param mixed $haystackClassOrObject
- * @param bool $isNativeType
- * @param string $message
- *
- * @since Method available since Release 3.1.4
- */
-function assertAttributeContainsOnly($type, $haystackAttributeName, $haystackClassOrObject, $isNativeType = null, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertAttributeContainsOnly',
- func_get_args()
- );
-}
-
-/**
- * Asserts the number of elements of an array, Countable or Traversable
- * that is stored in an attribute.
- *
- * @param int $expectedCount
- * @param string $haystackAttributeName
- * @param mixed $haystackClassOrObject
- * @param string $message
- *
- * @since Method available since Release 3.6.0
- */
-function assertAttributeCount($expectedCount, $haystackAttributeName, $haystackClassOrObject, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertAttributeCount',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a static attribute of a class or an attribute of an object
- * is empty.
- *
- * @param string $haystackAttributeName
- * @param mixed $haystackClassOrObject
- * @param string $message
- *
- * @since Method available since Release 3.5.0
- */
-function assertAttributeEmpty($haystackAttributeName, $haystackClassOrObject, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertAttributeEmpty',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a variable is equal to an attribute of an object.
- *
- * @param mixed $expected
- * @param string $actualAttributeName
- * @param string $actualClassOrObject
- * @param string $message
- * @param float $delta
- * @param int $maxDepth
- * @param bool $canonicalize
- * @param bool $ignoreCase
- */
-function assertAttributeEquals($expected, $actualAttributeName, $actualClassOrObject, $message = '', $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertAttributeEquals',
- func_get_args()
- );
-}
-
-/**
- * Asserts that an attribute is greater than another value.
- *
- * @param mixed $expected
- * @param string $actualAttributeName
- * @param string $actualClassOrObject
- * @param string $message
- *
- * @since Method available since Release 3.1.0
- */
-function assertAttributeGreaterThan($expected, $actualAttributeName, $actualClassOrObject, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertAttributeGreaterThan',
- func_get_args()
- );
-}
-
-/**
- * Asserts that an attribute is greater than or equal to another value.
- *
- * @param mixed $expected
- * @param string $actualAttributeName
- * @param string $actualClassOrObject
- * @param string $message
- *
- * @since Method available since Release 3.1.0
- */
-function assertAttributeGreaterThanOrEqual($expected, $actualAttributeName, $actualClassOrObject, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertAttributeGreaterThanOrEqual',
- func_get_args()
- );
-}
-
-/**
- * Asserts that an attribute is of a given type.
- *
- * @param string $expected
- * @param string $attributeName
- * @param mixed $classOrObject
- * @param string $message
- *
- * @since Method available since Release 3.5.0
- */
-function assertAttributeInstanceOf($expected, $attributeName, $classOrObject, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertAttributeInstanceOf',
- func_get_args()
- );
-}
-
-/**
- * Asserts that an attribute is of a given type.
- *
- * @param string $expected
- * @param string $attributeName
- * @param mixed $classOrObject
- * @param string $message
- *
- * @since Method available since Release 3.5.0
- */
-function assertAttributeInternalType($expected, $attributeName, $classOrObject, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertAttributeInternalType',
- func_get_args()
- );
-}
-
-/**
- * Asserts that an attribute is smaller than another value.
- *
- * @param mixed $expected
- * @param string $actualAttributeName
- * @param string $actualClassOrObject
- * @param string $message
- *
- * @since Method available since Release 3.1.0
- */
-function assertAttributeLessThan($expected, $actualAttributeName, $actualClassOrObject, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertAttributeLessThan',
- func_get_args()
- );
-}
-
-/**
- * Asserts that an attribute is smaller than or equal to another value.
- *
- * @param mixed $expected
- * @param string $actualAttributeName
- * @param string $actualClassOrObject
- * @param string $message
- *
- * @since Method available since Release 3.1.0
- */
-function assertAttributeLessThanOrEqual($expected, $actualAttributeName, $actualClassOrObject, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertAttributeLessThanOrEqual',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a haystack that is stored in a static attribute of a class
- * or an attribute of an object does not contain a needle.
- *
- * @param mixed $needle
- * @param string $haystackAttributeName
- * @param mixed $haystackClassOrObject
- * @param string $message
- * @param bool $ignoreCase
- * @param bool $checkForObjectIdentity
- * @param bool $checkForNonObjectIdentity
- *
- * @since Method available since Release 3.0.0
- */
-function assertAttributeNotContains($needle, $haystackAttributeName, $haystackClassOrObject, $message = '', $ignoreCase = false, $checkForObjectIdentity = true, $checkForNonObjectIdentity = false)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertAttributeNotContains',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a haystack that is stored in a static attribute of a class
- * or an attribute of an object does not contain only values of a given
- * type.
- *
- * @param string $type
- * @param string $haystackAttributeName
- * @param mixed $haystackClassOrObject
- * @param bool $isNativeType
- * @param string $message
- *
- * @since Method available since Release 3.1.4
- */
-function assertAttributeNotContainsOnly($type, $haystackAttributeName, $haystackClassOrObject, $isNativeType = null, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertAttributeNotContainsOnly',
- func_get_args()
- );
-}
-
-/**
- * Asserts the number of elements of an array, Countable or Traversable
- * that is stored in an attribute.
- *
- * @param int $expectedCount
- * @param string $haystackAttributeName
- * @param mixed $haystackClassOrObject
- * @param string $message
- *
- * @since Method available since Release 3.6.0
- */
-function assertAttributeNotCount($expectedCount, $haystackAttributeName, $haystackClassOrObject, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertAttributeNotCount',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a static attribute of a class or an attribute of an object
- * is not empty.
- *
- * @param string $haystackAttributeName
- * @param mixed $haystackClassOrObject
- * @param string $message
- *
- * @since Method available since Release 3.5.0
- */
-function assertAttributeNotEmpty($haystackAttributeName, $haystackClassOrObject, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertAttributeNotEmpty',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a variable is not equal to an attribute of an object.
- *
- * @param mixed $expected
- * @param string $actualAttributeName
- * @param string $actualClassOrObject
- * @param string $message
- * @param float $delta
- * @param int $maxDepth
- * @param bool $canonicalize
- * @param bool $ignoreCase
- */
-function assertAttributeNotEquals($expected, $actualAttributeName, $actualClassOrObject, $message = '', $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertAttributeNotEquals',
- func_get_args()
- );
-}
-
-/**
- * Asserts that an attribute is of a given type.
- *
- * @param string $expected
- * @param string $attributeName
- * @param mixed $classOrObject
- * @param string $message
- *
- * @since Method available since Release 3.5.0
- */
-function assertAttributeNotInstanceOf($expected, $attributeName, $classOrObject, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertAttributeNotInstanceOf',
- func_get_args()
- );
-}
-
-/**
- * Asserts that an attribute is of a given type.
- *
- * @param string $expected
- * @param string $attributeName
- * @param mixed $classOrObject
- * @param string $message
- *
- * @since Method available since Release 3.5.0
- */
-function assertAttributeNotInternalType($expected, $attributeName, $classOrObject, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertAttributeNotInternalType',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a variable and an attribute of an object do not have the
- * same type and value.
- *
- * @param mixed $expected
- * @param string $actualAttributeName
- * @param object $actualClassOrObject
- * @param string $message
- */
-function assertAttributeNotSame($expected, $actualAttributeName, $actualClassOrObject, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertAttributeNotSame',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a variable and an attribute of an object have the same type
- * and value.
- *
- * @param mixed $expected
- * @param string $actualAttributeName
- * @param object $actualClassOrObject
- * @param string $message
- */
-function assertAttributeSame($expected, $actualAttributeName, $actualClassOrObject, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertAttributeSame',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a class has a specified attribute.
- *
- * @param string $attributeName
- * @param string $className
- * @param string $message
- *
- * @since Method available since Release 3.1.0
- */
-function assertClassHasAttribute($attributeName, $className, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertClassHasAttribute',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a class has a specified static attribute.
- *
- * @param string $attributeName
- * @param string $className
- * @param string $message
- *
- * @since Method available since Release 3.1.0
- */
-function assertClassHasStaticAttribute($attributeName, $className, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertClassHasStaticAttribute',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a class does not have a specified attribute.
- *
- * @param string $attributeName
- * @param string $className
- * @param string $message
- *
- * @since Method available since Release 3.1.0
- */
-function assertClassNotHasAttribute($attributeName, $className, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertClassNotHasAttribute',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a class does not have a specified static attribute.
- *
- * @param string $attributeName
- * @param string $className
- * @param string $message
- *
- * @since Method available since Release 3.1.0
- */
-function assertClassNotHasStaticAttribute($attributeName, $className, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertClassNotHasStaticAttribute',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a haystack contains a needle.
- *
- * @param mixed $needle
- * @param mixed $haystack
- * @param string $message
- * @param bool $ignoreCase
- * @param bool $checkForObjectIdentity
- * @param bool $checkForNonObjectIdentity
- *
- * @since Method available since Release 2.1.0
- */
-function assertContains($needle, $haystack, $message = '', $ignoreCase = false, $checkForObjectIdentity = true, $checkForNonObjectIdentity = false)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertContains',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a haystack contains only values of a given type.
- *
- * @param string $type
- * @param mixed $haystack
- * @param bool $isNativeType
- * @param string $message
- *
- * @since Method available since Release 3.1.4
- */
-function assertContainsOnly($type, $haystack, $isNativeType = null, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertContainsOnly',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a haystack contains only instances of a given classname
- *
- * @param string $classname
- * @param array|Traversable $haystack
- * @param string $message
- */
-function assertContainsOnlyInstancesOf($classname, $haystack, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertContainsOnlyInstancesOf',
- func_get_args()
- );
-}
-
-/**
- * Asserts the number of elements of an array, Countable or Traversable.
- *
- * @param int $expectedCount
- * @param mixed $haystack
- * @param string $message
- */
-function assertCount($expectedCount, $haystack, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertCount',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a variable is empty.
- *
- * @param mixed $actual
- * @param string $message
- *
- * @throws PHPUnit_Framework_AssertionFailedError
- */
-function assertEmpty($actual, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertEmpty',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a hierarchy of DOMElements matches.
- *
- * @param DOMElement $expectedElement
- * @param DOMElement $actualElement
- * @param bool $checkAttributes
- * @param string $message
- *
- * @since Method available since Release 3.3.0
- */
-function assertEqualXMLStructure(DOMElement $expectedElement, DOMElement $actualElement, $checkAttributes = false, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertEqualXMLStructure',
- func_get_args()
- );
-}
-
-/**
- * Asserts that two variables are equal.
- *
- * @param mixed $expected
- * @param mixed $actual
- * @param string $message
- * @param float $delta
- * @param int $maxDepth
- * @param bool $canonicalize
- * @param bool $ignoreCase
- */
-function assertEquals($expected, $actual, $message = '', $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertEquals',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a condition is not true.
- *
- * @param bool $condition
- * @param string $message
- *
- * @throws PHPUnit_Framework_AssertionFailedError
- */
-function assertNotTrue($condition, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertNotTrue',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a condition is false.
- *
- * @param bool $condition
- * @param string $message
- *
- * @throws PHPUnit_Framework_AssertionFailedError
- */
-function assertFalse($condition, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertFalse',
- func_get_args()
- );
-}
-
-/**
- * Asserts that the contents of one file is equal to the contents of another
- * file.
- *
- * @param string $expected
- * @param string $actual
- * @param string $message
- * @param bool $canonicalize
- * @param bool $ignoreCase
- *
- * @since Method available since Release 3.2.14
- */
-function assertFileEquals($expected, $actual, $message = '', $canonicalize = false, $ignoreCase = false)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertFileEquals',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a file exists.
- *
- * @param string $filename
- * @param string $message
- *
- * @since Method available since Release 3.0.0
- */
-function assertFileExists($filename, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertFileExists',
- func_get_args()
- );
-}
-
-/**
- * Asserts that the contents of one file is not equal to the contents of
- * another file.
- *
- * @param string $expected
- * @param string $actual
- * @param string $message
- * @param bool $canonicalize
- * @param bool $ignoreCase
- *
- * @since Method available since Release 3.2.14
- */
-function assertFileNotEquals($expected, $actual, $message = '', $canonicalize = false, $ignoreCase = false)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertFileNotEquals',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a file does not exist.
- *
- * @param string $filename
- * @param string $message
- *
- * @since Method available since Release 3.0.0
- */
-function assertFileNotExists($filename, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertFileNotExists',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a value is greater than another value.
- *
- * @param mixed $expected
- * @param mixed $actual
- * @param string $message
- *
- * @since Method available since Release 3.1.0
- */
-function assertGreaterThan($expected, $actual, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertGreaterThan',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a value is greater than or equal to another value.
- *
- * @param mixed $expected
- * @param mixed $actual
- * @param string $message
- *
- * @since Method available since Release 3.1.0
- */
-function assertGreaterThanOrEqual($expected, $actual, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertGreaterThanOrEqual',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a variable is of a given type.
- *
- * @param string $expected
- * @param mixed $actual
- * @param string $message
- *
- * @since Method available since Release 3.5.0
- */
-function assertInstanceOf($expected, $actual, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertInstanceOf',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a variable is of a given type.
- *
- * @param string $expected
- * @param mixed $actual
- * @param string $message
- *
- * @since Method available since Release 3.5.0
- */
-function assertInternalType($expected, $actual, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertInternalType',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a string is a valid JSON string.
- *
- * @param string $actualJson
- * @param string $message
- *
- * @since Method available since Release 3.7.20
- */
-function assertJson($actualJson, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertJson',
- func_get_args()
- );
-}
-
-/**
- * Asserts that two JSON files are equal.
- *
- * @param string $expectedFile
- * @param string $actualFile
- * @param string $message
- */
-function assertJsonFileEqualsJsonFile($expectedFile, $actualFile, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertJsonFileEqualsJsonFile',
- func_get_args()
- );
-}
-
-/**
- * Asserts that two JSON files are not equal.
- *
- * @param string $expectedFile
- * @param string $actualFile
- * @param string $message
- */
-function assertJsonFileNotEqualsJsonFile($expectedFile, $actualFile, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertJsonFileNotEqualsJsonFile',
- func_get_args()
- );
-}
-
-/**
- * Asserts that the generated JSON encoded object and the content of the given file are equal.
- *
- * @param string $expectedFile
- * @param string $actualJson
- * @param string $message
- */
-function assertJsonStringEqualsJsonFile($expectedFile, $actualJson, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertJsonStringEqualsJsonFile',
- func_get_args()
- );
-}
-
-/**
- * Asserts that two given JSON encoded objects or arrays are equal.
- *
- * @param string $expectedJson
- * @param string $actualJson
- * @param string $message
- */
-function assertJsonStringEqualsJsonString($expectedJson, $actualJson, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertJsonStringEqualsJsonString',
- func_get_args()
- );
-}
-
-/**
- * Asserts that the generated JSON encoded object and the content of the given file are not equal.
- *
- * @param string $expectedFile
- * @param string $actualJson
- * @param string $message
- */
-function assertJsonStringNotEqualsJsonFile($expectedFile, $actualJson, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertJsonStringNotEqualsJsonFile',
- func_get_args()
- );
-}
-
-/**
- * Asserts that two given JSON encoded objects or arrays are not equal.
- *
- * @param string $expectedJson
- * @param string $actualJson
- * @param string $message
- */
-function assertJsonStringNotEqualsJsonString($expectedJson, $actualJson, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertJsonStringNotEqualsJsonString',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a value is smaller than another value.
- *
- * @param mixed $expected
- * @param mixed $actual
- * @param string $message
- *
- * @since Method available since Release 3.1.0
- */
-function assertLessThan($expected, $actual, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertLessThan',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a value is smaller than or equal to another value.
- *
- * @param mixed $expected
- * @param mixed $actual
- * @param string $message
- *
- * @since Method available since Release 3.1.0
- */
-function assertLessThanOrEqual($expected, $actual, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertLessThanOrEqual',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a haystack does not contain a needle.
- *
- * @param mixed $needle
- * @param mixed $haystack
- * @param string $message
- * @param bool $ignoreCase
- * @param bool $checkForObjectIdentity
- * @param bool $checkForNonObjectIdentity
- *
- * @since Method available since Release 2.1.0
- */
-function assertNotContains($needle, $haystack, $message = '', $ignoreCase = false, $checkForObjectIdentity = true, $checkForNonObjectIdentity = false)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertNotContains',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a haystack does not contain only values of a given type.
- *
- * @param string $type
- * @param mixed $haystack
- * @param bool $isNativeType
- * @param string $message
- *
- * @since Method available since Release 3.1.4
- */
-function assertNotContainsOnly($type, $haystack, $isNativeType = null, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertNotContainsOnly',
- func_get_args()
- );
-}
-
-/**
- * Asserts the number of elements of an array, Countable or Traversable.
- *
- * @param int $expectedCount
- * @param mixed $haystack
- * @param string $message
- */
-function assertNotCount($expectedCount, $haystack, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertNotCount',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a variable is not empty.
- *
- * @param mixed $actual
- * @param string $message
- *
- * @throws PHPUnit_Framework_AssertionFailedError
- */
-function assertNotEmpty($actual, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertNotEmpty',
- func_get_args()
- );
-}
-
-/**
- * Asserts that two variables are not equal.
- *
- * @param mixed $expected
- * @param mixed $actual
- * @param string $message
- * @param float $delta
- * @param int $maxDepth
- * @param bool $canonicalize
- * @param bool $ignoreCase
- *
- * @since Method available since Release 2.3.0
- */
-function assertNotEquals($expected, $actual, $message = '', $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertNotEquals',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a variable is not of a given type.
- *
- * @param string $expected
- * @param mixed $actual
- * @param string $message
- *
- * @since Method available since Release 3.5.0
- */
-function assertNotInstanceOf($expected, $actual, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertNotInstanceOf',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a variable is not of a given type.
- *
- * @param string $expected
- * @param mixed $actual
- * @param string $message
- *
- * @since Method available since Release 3.5.0
- */
-function assertNotInternalType($expected, $actual, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertNotInternalType',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a condition is not false.
- *
- * @param bool $condition
- * @param string $message
- *
- * @throws PHPUnit_Framework_AssertionFailedError
- */
-function assertNotFalse($condition, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertNotFalse',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a variable is not null.
- *
- * @param mixed $actual
- * @param string $message
- */
-function assertNotNull($actual, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertNotNull',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a string does not match a given regular expression.
- *
- * @param string $pattern
- * @param string $string
- * @param string $message
- *
- * @since Method available since Release 2.1.0
- */
-function assertNotRegExp($pattern, $string, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertNotRegExp',
- func_get_args()
- );
-}
-
-/**
- * Asserts that two variables do not have the same type and value.
- * Used on objects, it asserts that two variables do not reference
- * the same object.
- *
- * @param mixed $expected
- * @param mixed $actual
- * @param string $message
- */
-function assertNotSame($expected, $actual, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertNotSame',
- func_get_args()
- );
-}
-
-/**
- * Assert that the size of two arrays (or `Countable` or `Traversable` objects)
- * is not the same.
- *
- * @param array|Countable|Traversable $expected
- * @param array|Countable|Traversable $actual
- * @param string $message
- */
-function assertNotSameSize($expected, $actual, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertNotSameSize',
- func_get_args()
- );
-}
-
-/**
- * This assertion is the exact opposite of assertTag().
- *
- * Rather than asserting that $matcher results in a match, it asserts that
- * $matcher does not match.
- *
- * @param array $matcher
- * @param string $actual
- * @param string $message
- * @param bool $isHtml
- *
- * @since Method available since Release 3.3.0
- */
-function assertNotTag($matcher, $actual, $message = '', $isHtml = true)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertNotTag',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a variable is null.
- *
- * @param mixed $actual
- * @param string $message
- */
-function assertNull($actual, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertNull',
- func_get_args()
- );
-}
-
-/**
- * Asserts that an object has a specified attribute.
- *
- * @param string $attributeName
- * @param object $object
- * @param string $message
- *
- * @since Method available since Release 3.0.0
- */
-function assertObjectHasAttribute($attributeName, $object, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertObjectHasAttribute',
- func_get_args()
- );
-}
-
-/**
- * Asserts that an object does not have a specified attribute.
- *
- * @param string $attributeName
- * @param object $object
- * @param string $message
- *
- * @since Method available since Release 3.0.0
- */
-function assertObjectNotHasAttribute($attributeName, $object, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertObjectNotHasAttribute',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a string matches a given regular expression.
- *
- * @param string $pattern
- * @param string $string
- * @param string $message
- */
-function assertRegExp($pattern, $string, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertRegExp',
- func_get_args()
- );
-}
-
-/**
- * Asserts that two variables have the same type and value.
- * Used on objects, it asserts that two variables reference
- * the same object.
- *
- * @param mixed $expected
- * @param mixed $actual
- * @param string $message
- */
-function assertSame($expected, $actual, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertSame',
- func_get_args()
- );
-}
-
-/**
- * Assert that the size of two arrays (or `Countable` or `Traversable` objects)
- * is the same.
- *
- * @param array|Countable|Traversable $expected
- * @param array|Countable|Traversable $actual
- * @param string $message
- */
-function assertSameSize($expected, $actual, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertSameSize',
- func_get_args()
- );
-}
-
-/**
- * Assert the presence, absence, or count of elements in a document matching
- * the CSS $selector, regardless of the contents of those elements.
- *
- * The first argument, $selector, is the CSS selector used to match
- * the elements in the $actual document.
- *
- * The second argument, $count, can be either boolean or numeric.
- * When boolean, it asserts for presence of elements matching the selector
- * (true) or absence of elements (false).
- * When numeric, it asserts the count of elements.
- *
- * assertSelectCount("#binder", true, $xml); // any?
- * assertSelectCount(".binder", 3, $xml); // exactly 3?
- *
- * @param array $selector
- * @param int $count
- * @param mixed $actual
- * @param string $message
- * @param bool $isHtml
- *
- * @since Method available since Release 3.3.0
- */
-function assertSelectCount($selector, $count, $actual, $message = '', $isHtml = true)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertSelectCount',
- func_get_args()
- );
-}
-
-/**
- * assertSelectEquals("#binder .name", "Chuck", true, $xml); // any?
- * assertSelectEquals("#binder .name", "Chuck", false, $xml); // none?
- *
- * @param array $selector
- * @param string $content
- * @param int $count
- * @param mixed $actual
- * @param string $message
- * @param bool $isHtml
- *
- * @since Method available since Release 3.3.0
- */
-function assertSelectEquals($selector, $content, $count, $actual, $message = '', $isHtml = true)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertSelectEquals',
- func_get_args()
- );
-}
-
-/**
- * assertSelectRegExp("#binder .name", "/Mike|Derek/", true, $xml); // any?
- * assertSelectRegExp("#binder .name", "/Mike|Derek/", 3, $xml);// 3?
- *
- * @param array $selector
- * @param string $pattern
- * @param int $count
- * @param mixed $actual
- * @param string $message
- * @param bool $isHtml
- *
- * @since Method available since Release 3.3.0
- */
-function assertSelectRegExp($selector, $pattern, $count, $actual, $message = '', $isHtml = true)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertSelectRegExp',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a string ends not with a given prefix.
- *
- * @param string $suffix
- * @param string $string
- * @param string $message
- *
- * @since Method available since Release 3.4.0
- */
-function assertStringEndsNotWith($suffix, $string, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertStringEndsNotWith',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a string ends with a given prefix.
- *
- * @param string $suffix
- * @param string $string
- * @param string $message
- *
- * @since Method available since Release 3.4.0
- */
-function assertStringEndsWith($suffix, $string, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertStringEndsWith',
- func_get_args()
- );
-}
-
-/**
- * Asserts that the contents of a string is equal
- * to the contents of a file.
- *
- * @param string $expectedFile
- * @param string $actualString
- * @param string $message
- * @param bool $canonicalize
- * @param bool $ignoreCase
- *
- * @since Method available since Release 3.3.0
- */
-function assertStringEqualsFile($expectedFile, $actualString, $message = '', $canonicalize = false, $ignoreCase = false)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertStringEqualsFile',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a string matches a given format string.
- *
- * @param string $format
- * @param string $string
- * @param string $message
- *
- * @since Method available since Release 3.5.0
- */
-function assertStringMatchesFormat($format, $string, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertStringMatchesFormat',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a string matches a given format file.
- *
- * @param string $formatFile
- * @param string $string
- * @param string $message
- *
- * @since Method available since Release 3.5.0
- */
-function assertStringMatchesFormatFile($formatFile, $string, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertStringMatchesFormatFile',
- func_get_args()
- );
-}
-
-/**
- * Asserts that the contents of a string is not equal
- * to the contents of a file.
- *
- * @param string $expectedFile
- * @param string $actualString
- * @param string $message
- * @param bool $canonicalize
- * @param bool $ignoreCase
- *
- * @since Method available since Release 3.3.0
- */
-function assertStringNotEqualsFile($expectedFile, $actualString, $message = '', $canonicalize = false, $ignoreCase = false)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertStringNotEqualsFile',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a string does not match a given format string.
- *
- * @param string $format
- * @param string $string
- * @param string $message
- *
- * @since Method available since Release 3.5.0
- */
-function assertStringNotMatchesFormat($format, $string, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertStringNotMatchesFormat',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a string does not match a given format string.
- *
- * @param string $formatFile
- * @param string $string
- * @param string $message
- *
- * @since Method available since Release 3.5.0
- */
-function assertStringNotMatchesFormatFile($formatFile, $string, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertStringNotMatchesFormatFile',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a string starts not with a given prefix.
- *
- * @param string $prefix
- * @param string $string
- * @param string $message
- *
- * @since Method available since Release 3.4.0
- */
-function assertStringStartsNotWith($prefix, $string, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertStringStartsNotWith',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a string starts with a given prefix.
- *
- * @param string $prefix
- * @param string $string
- * @param string $message
- *
- * @since Method available since Release 3.4.0
- */
-function assertStringStartsWith($prefix, $string, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertStringStartsWith',
- func_get_args()
- );
-}
-
-/**
- * Evaluate an HTML or XML string and assert its structure and/or contents.
- *
- * The first argument ($matcher) is an associative array that specifies the
- * match criteria for the assertion:
- *
- * - `id` : the node with the given id attribute must match the
- * corresponding value.
- * - `tag` : the node type must match the corresponding value.
- * - `attributes` : a hash. The node's attributes must match the
- * corresponding values in the hash.
- * - `content` : The text content must match the given value.
- * - `parent` : a hash. The node's parent must match the
- * corresponding hash.
- * - `child`: a hash. At least one of the node's immediate children
- * must meet the criteria described by the hash.
- * - `ancestor` : a hash. At least one of the node's ancestors must
- * meet the criteria described by the hash.
- * - `descendant` : a hash. At least one of the node's descendants must
- * meet the criteria described by the hash.
- * - `children` : a hash, for counting children of a node.
- * Accepts the keys:
- *- `count`: a number which must equal the number of children
- * that match
- *- `less_than`: the number of matching children must be greater
- * than this number
- *- `greater_than` : the number of matching children must be less than
- * this number
- *- `only` : another hash consisting of the keys to use to match
- * on the children, and only matching children will be
- * counted
- *
- *
- * // Matcher that asserts that there is an element with an id="my_id".
- * $matcher = array('id' => 'my_id');
- *
- * // Matcher that asserts that there is a "span" tag.
- * $matcher = array('tag' => 'span');
- *
- * // Matcher that asserts that there is a "span" tag with the content
- * // "Hello World".
- * $matcher = array('tag' => 'span', 'content' => 'Hello World');
- *
- * // Matcher that asserts that there is a "span" tag with content matching
- * // the regular expression pattern.
- * $matcher = array('tag' => 'span', 'content' => 'regexp:/Try P(HP|ython)/');
- *
- * // Matcher that asserts that there is a "span" with an "list" class
- * // attribute.
- * $matcher = array(
- * 'tag'=> 'span',
- * 'attributes' => array('class' => 'list')
- * );
- *
- * // Matcher that asserts that there is a "span" inside of a "div".
- * $matcher = array(
- * 'tag'=> 'span',
- * 'parent' => array('tag' => 'div')
- * );
- *
- * // Matcher that asserts that there is a "span" somewhere inside a
- * // "table".
- * $matcher = array(
- * 'tag' => 'span',
- * 'ancestor' => array('tag' => 'table')
- * );
- *
- * // Matcher that asserts that there is a "span" with at least one "em"
- * // child.
- * $matcher = array(
- * 'tag' => 'span',
- * 'child' => array('tag' => 'em')
- * );
- *
- * // Matcher that asserts that there is a "span" containing a (possibly
- * // nested) "strong" tag.
- * $matcher = array(
- * 'tag'=> 'span',
- * 'descendant' => array('tag' => 'strong')
- * );
- *
- * // Matcher that asserts that there is a "span" containing 5-10 "em" tags
- * // as immediate children.
- * $matcher = array(
- * 'tag' => 'span',
- * 'children' => array(
- * 'less_than'=> 11,
- * 'greater_than' => 4,
- * 'only' => array('tag' => 'em')
- * )
- * );
- *
- * // Matcher that asserts that there is a "div", with an "ul" ancestor and
- * // a "li" parent (with class="enum"), and containing a "span" descendant
- * // that contains an element with id="my_test" and the text "Hello World".
- * $matcher = array(
- * 'tag'=> 'div',
- * 'ancestor' => array('tag' => 'ul'),
- * 'parent' => array(
- * 'tag'=> 'li',
- * 'attributes' => array('class' => 'enum')
- * ),
- * 'descendant' => array(
- * 'tag' => 'span',
- * 'child' => array(
- * 'id' => 'my_test',
- * 'content' => 'Hello World'
- * )
- * )
- * );
- *
- * // Use assertTag() to apply a $matcher to a piece of $html.
- * $this->assertTag($matcher, $html);
- *
- * // Use assertTag() to apply a $matcher to a piece of $xml.
- * $this->assertTag($matcher, $xml, '', false);
- *
- *
- * The second argument ($actual) is a string containing either HTML or
- * XML text to be tested.
- *
- * The third argument ($message) is an optional message that will be
- * used if the assertion fails.
- *
- * The fourth argument ($html) is an optional flag specifying whether
- * to load the $actual string into a DOMDocument using the HTML or
- * XML load strategy. It is true by default, which assumes the HTML
- * load strategy. In many cases, this will be acceptable for XML as well.
- *
- * @param array $matcher
- * @param string $actual
- * @param string $message
- * @param bool $isHtml
- *
- * @since Method available since Release 3.3.0
- */
-function assertTag($matcher, $actual, $message = '', $isHtml = true)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertTag',
- func_get_args()
- );
-}
-
-/**
- * Evaluates a PHPUnit_Framework_Constraint matcher object.
- *
- * @param mixed $value
- * @param PHPUnit_Framework_Constraint $constraint
- * @param string $message
- *
- * @since Method available since Release 3.0.0
- */
-function assertThat($value, PHPUnit_Framework_Constraint $constraint, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertThat',
- func_get_args()
- );
-}
-
-/**
- * Asserts that a condition is true.
- *
- * @param bool $condition
- * @param string $message
- *
- * @throws PHPUnit_Framework_AssertionFailedError
- */
-function assertTrue($condition, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertTrue',
- func_get_args()
- );
-}
-
-/**
- * Asserts that two XML files are equal.
- *
- * @param string $expectedFile
- * @param string $actualFile
- * @param string $message
- *
- * @since Method available since Release 3.1.0
- */
-function assertXmlFileEqualsXmlFile($expectedFile, $actualFile, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertXmlFileEqualsXmlFile',
- func_get_args()
- );
-}
-
-/**
- * Asserts that two XML files are not equal.
- *
- * @param string $expectedFile
- * @param string $actualFile
- * @param string $message
- *
- * @since Method available since Release 3.1.0
- */
-function assertXmlFileNotEqualsXmlFile($expectedFile, $actualFile, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertXmlFileNotEqualsXmlFile',
- func_get_args()
- );
-}
-
-/**
- * Asserts that two XML documents are equal.
- *
- * @param string $expectedFile
- * @param string $actualXml
- * @param string $message
- *
- * @since Method available since Release 3.3.0
- */
-function assertXmlStringEqualsXmlFile($expectedFile, $actualXml, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertXmlStringEqualsXmlFile',
- func_get_args()
- );
-}
-
-/**
- * Asserts that two XML documents are equal.
- *
- * @param string $expectedXml
- * @param string $actualXml
- * @param string $message
- *
- * @since Method available since Release 3.1.0
- */
-function assertXmlStringEqualsXmlString($expectedXml, $actualXml, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertXmlStringEqualsXmlString',
- func_get_args()
- );
-}
-
-/**
- * Asserts that two XML documents are not equal.
- *
- * @param string $expectedFile
- * @param string $actualXml
- * @param string $message
- *
- * @since Method available since Release 3.3.0
- */
-function assertXmlStringNotEqualsXmlFile($expectedFile, $actualXml, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertXmlStringNotEqualsXmlFile',
- func_get_args()
- );
-}
-
-/**
- * Asserts that two XML documents are not equal.
- *
- * @param string $expectedXml
- * @param string $actualXml
- * @param string $message
- *
- * @since Method available since Release 3.1.0
- */
-function assertXmlStringNotEqualsXmlString($expectedXml, $actualXml, $message = '')
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::assertXmlStringNotEqualsXmlString',
- func_get_args()
- );
-}
-
-/**
- * Returns a matcher that matches when the method is executed
- * at the given $index.
- *
- * @param int $index
- *
- * @return PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex
- *
- * @since Method available since Release 3.0.0
- */
-function at($index)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_TestCase::at',
- func_get_args()
- );
-}
-
-/**
- * Returns a matcher that matches when the method is executed at least once.
- *
- * @return PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastOnce
- *
- * @since Method available since Release 3.0.0
- */
-function atLeastOnce()
-{
- return call_user_func_array(
- 'PHPUnit_Framework_TestCase::atLeastOnce',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_Attribute matcher object.
- *
- * @param PHPUnit_Framework_Constraint $constraint
- * @param string $attributeName
- *
- * @return PHPUnit_Framework_Constraint_Attribute
- *
- * @since Method available since Release 3.1.0
- */
-function attribute(PHPUnit_Framework_Constraint $constraint, $attributeName)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::attribute',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_IsEqual matcher object
- * that is wrapped in a PHPUnit_Framework_Constraint_Attribute matcher
- * object.
- *
- * @param string $attributeName
- * @param mixed $value
- * @param float $delta
- * @param int $maxDepth
- * @param bool $canonicalize
- * @param bool $ignoreCase
- *
- * @return PHPUnit_Framework_Constraint_Attribute
- *
- * @since Method available since Release 3.1.0
- */
-function attributeEqualTo($attributeName, $value, $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::attributeEqualTo',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_Callback matcher object.
- *
- * @param callable $callback
- *
- * @return PHPUnit_Framework_Constraint_Callback
- */
-function callback($callback)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::callback',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_ClassHasAttribute matcher object.
- *
- * @param string $attributeName
- *
- * @return PHPUnit_Framework_Constraint_ClassHasAttribute
- *
- * @since Method available since Release 3.1.0
- */
-function classHasAttribute($attributeName)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::classHasAttribute',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_ClassHasStaticAttribute matcher
- * object.
- *
- * @param string $attributeName
- *
- * @return PHPUnit_Framework_Constraint_ClassHasStaticAttribute
- *
- * @since Method available since Release 3.1.0
- */
-function classHasStaticAttribute($attributeName)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::classHasStaticAttribute',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_TraversableContains matcher
- * object.
- *
- * @param mixed $value
- * @param bool $checkForObjectIdentity
- * @param bool $checkForNonObjectIdentity
- *
- * @return PHPUnit_Framework_Constraint_TraversableContains
- *
- * @since Method available since Release 3.0.0
- */
-function contains($value, $checkForObjectIdentity = true, $checkForNonObjectIdentity = false)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::contains',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_TraversableContainsOnly matcher
- * object.
- *
- * @param string $type
- *
- * @return PHPUnit_Framework_Constraint_TraversableContainsOnly
- *
- * @since Method available since Release 3.1.4
- */
-function containsOnly($type)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::containsOnly',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_TraversableContainsOnly matcher
- * object.
- *
- * @param string $classname
- *
- * @return PHPUnit_Framework_Constraint_TraversableContainsOnly
- */
-function containsOnlyInstancesOf($classname)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::containsOnlyInstancesOf',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_IsEqual matcher object.
- *
- * @param mixed $value
- * @param float $delta
- * @param int $maxDepth
- * @param bool $canonicalize
- * @param bool $ignoreCase
- *
- * @return PHPUnit_Framework_Constraint_IsEqual
- *
- * @since Method available since Release 3.0.0
- */
-function equalTo($value, $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::equalTo',
- func_get_args()
- );
-}
-
-/**
- * Returns a matcher that matches when the method is executed
- * exactly $count times.
- *
- * @param int $count
- *
- * @return PHPUnit_Framework_MockObject_Matcher_InvokedCount
- *
- * @since Method available since Release 3.0.0
- */
-function exactly($count)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_TestCase::exactly',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_FileExists matcher object.
- *
- * @return PHPUnit_Framework_Constraint_FileExists
- *
- * @since Method available since Release 3.0.0
- */
-function fileExists()
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::fileExists',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_GreaterThan matcher object.
- *
- * @param mixed $value
- *
- * @return PHPUnit_Framework_Constraint_GreaterThan
- *
- * @since Method available since Release 3.0.0
- */
-function greaterThan($value)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::greaterThan',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_Or matcher object that wraps
- * a PHPUnit_Framework_Constraint_IsEqual and a
- * PHPUnit_Framework_Constraint_GreaterThan matcher object.
- *
- * @param mixed $value
- *
- * @return PHPUnit_Framework_Constraint_Or
- *
- * @since Method available since Release 3.1.0
- */
-function greaterThanOrEqual($value)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::greaterThanOrEqual',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_IsIdentical matcher object.
- *
- * @param mixed $value
- *
- * @return PHPUnit_Framework_Constraint_IsIdentical
- *
- * @since Method available since Release 3.0.0
- */
-function identicalTo($value)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::identicalTo',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_IsEmpty matcher object.
- *
- * @return PHPUnit_Framework_Constraint_IsEmpty
- *
- * @since Method available since Release 3.5.0
- */
-function isEmpty()
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::isEmpty',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_IsFalse matcher object.
- *
- * @return PHPUnit_Framework_Constraint_IsFalse
- *
- * @since Method available since Release 3.3.0
- */
-function isFalse()
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::isFalse',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_IsInstanceOf matcher object.
- *
- * @param string $className
- *
- * @return PHPUnit_Framework_Constraint_IsInstanceOf
- *
- * @since Method available since Release 3.0.0
- */
-function isInstanceOf($className)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::isInstanceOf',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_IsJson matcher object.
- *
- * @return PHPUnit_Framework_Constraint_IsJson
- *
- * @since Method available since Release 3.7.20
- */
-function isJson()
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::isJson',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_IsNull matcher object.
- *
- * @return PHPUnit_Framework_Constraint_IsNull
- *
- * @since Method available since Release 3.3.0
- */
-function isNull()
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::isNull',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_IsTrue matcher object.
- *
- * @return PHPUnit_Framework_Constraint_IsTrue
- *
- * @since Method available since Release 3.3.0
- */
-function isTrue()
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::isTrue',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_IsType matcher object.
- *
- * @param string $type
- *
- * @return PHPUnit_Framework_Constraint_IsType
- *
- * @since Method available since Release 3.0.0
- */
-function isType($type)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::isType',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_LessThan matcher object.
- *
- * @param mixed $value
- *
- * @return PHPUnit_Framework_Constraint_LessThan
- *
- * @since Method available since Release 3.0.0
- */
-function lessThan($value)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::lessThan',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_Or matcher object that wraps
- * a PHPUnit_Framework_Constraint_IsEqual and a
- * PHPUnit_Framework_Constraint_LessThan matcher object.
- *
- * @param mixed $value
- *
- * @return PHPUnit_Framework_Constraint_Or
- *
- * @since Method available since Release 3.1.0
- */
-function lessThanOrEqual($value)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::lessThanOrEqual',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_And matcher object.
- *
- * @return PHPUnit_Framework_Constraint_And
- *
- * @since Method available since Release 3.0.0
- */
-function logicalAnd()
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::logicalAnd',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_Not matcher object.
- *
- * @param PHPUnit_Framework_Constraint $constraint
- *
- * @return PHPUnit_Framework_Constraint_Not
- *
- * @since Method available since Release 3.0.0
- */
-function logicalNot(PHPUnit_Framework_Constraint $constraint)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::logicalNot',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_Or matcher object.
- *
- * @return PHPUnit_Framework_Constraint_Or
- *
- * @since Method available since Release 3.0.0
- */
-function logicalOr()
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::logicalOr',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_Xor matcher object.
- *
- * @return PHPUnit_Framework_Constraint_Xor
- *
- * @since Method available since Release 3.0.0
- */
-function logicalXor()
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::logicalXor',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_StringMatches matcher object.
- *
- * @param string $string
- *
- * @return PHPUnit_Framework_Constraint_StringMatches
- *
- * @since Method available since Release 3.5.0
- */
-function matches($string)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::matches',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_PCREMatch matcher object.
- *
- * @param string $pattern
- *
- * @return PHPUnit_Framework_Constraint_PCREMatch
- *
- * @since Method available since Release 3.0.0
- */
-function matchesRegularExpression($pattern)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::matchesRegularExpression',
- func_get_args()
- );
-}
-
-/**
- * Returns a matcher that matches when the method is never executed.
- *
- * @return PHPUnit_Framework_MockObject_Matcher_InvokedCount
- *
- * @since Method available since Release 3.0.0
- */
-function never()
-{
- return call_user_func_array(
- 'PHPUnit_Framework_TestCase::never',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_ObjectHasAttribute matcher object.
- *
- * @param string $attributeName
- *
- * @return PHPUnit_Framework_Constraint_ObjectHasAttribute
- *
- * @since Method available since Release 3.0.0
- */
-function objectHasAttribute($attributeName)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::objectHasAttribute',
- func_get_args()
- );
-}
-
-/**
- * @param mixed $value, ...
- *
- * @return PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls
- *
- * @since Method available since Release 3.0.0
- */
-function onConsecutiveCalls()
-{
- return call_user_func_array(
- 'PHPUnit_Framework_TestCase::onConsecutiveCalls',
- func_get_args()
- );
-}
-
-/**
- * Returns a matcher that matches when the method is executed exactly once.
- *
- * @return PHPUnit_Framework_MockObject_Matcher_InvokedCount
- *
- * @since Method available since Release 3.0.0
- */
-function once()
-{
- return call_user_func_array(
- 'PHPUnit_Framework_TestCase::once',
- func_get_args()
- );
-}
-
-/**
- * @param int $argumentIndex
- *
- * @return PHPUnit_Framework_MockObject_Stub_ReturnArgument
- *
- * @since Method available since Release 3.3.0
- */
-function returnArgument($argumentIndex)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_TestCase::returnArgument',
- func_get_args()
- );
-}
-
-/**
- * @param mixed $callback
- *
- * @return PHPUnit_Framework_MockObject_Stub_ReturnCallback
- *
- * @since Method available since Release 3.3.0
- */
-function returnCallback($callback)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_TestCase::returnCallback',
- func_get_args()
- );
-}
-
-/**
- * Returns the current object.
- *
- * This method is useful when mocking a fluent interface.
- *
- * @return PHPUnit_Framework_MockObject_Stub_ReturnSelf
- *
- * @since Method available since Release 3.6.0
- */
-function returnSelf()
-{
- return call_user_func_array(
- 'PHPUnit_Framework_TestCase::returnSelf',
- func_get_args()
- );
-}
-
-/**
- * @param mixed $value
- *
- * @return PHPUnit_Framework_MockObject_Stub_Return
- *
- * @since Method available since Release 3.0.0
- */
-function returnValue($value)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_TestCase::returnValue',
- func_get_args()
- );
-}
-
-/**
- * @param array $valueMap
- *
- * @return PHPUnit_Framework_MockObject_Stub_ReturnValueMap
- *
- * @since Method available since Release 3.6.0
- */
-function returnValueMap(array $valueMap)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_TestCase::returnValueMap',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_StringContains matcher object.
- *
- * @param string $string
- * @param bool $case
- *
- * @return PHPUnit_Framework_Constraint_StringContains
- *
- * @since Method available since Release 3.0.0
- */
-function stringContains($string, $case = true)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::stringContains',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_StringEndsWith matcher object.
- *
- * @param mixed $suffix
- *
- * @return PHPUnit_Framework_Constraint_StringEndsWith
- *
- * @since Method available since Release 3.4.0
- */
-function stringEndsWith($suffix)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::stringEndsWith',
- func_get_args()
- );
-}
-
-/**
- * Returns a PHPUnit_Framework_Constraint_StringStartsWith matcher object.
- *
- * @param mixed $prefix
- *
- * @return PHPUnit_Framework_Constraint_StringStartsWith
- *
- * @since Method available since Release 3.4.0
- */
-function stringStartsWith($prefix)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_Assert::stringStartsWith',
- func_get_args()
- );
-}
-
-/**
- * @param Exception $exception
- *
- * @return PHPUnit_Framework_MockObject_Stub_Exception
- *
- * @since Method available since Release 3.1.0
- */
-function throwException(Exception $exception)
-{
- return call_user_func_array(
- 'PHPUnit_Framework_TestCase::throwException',
- func_get_args()
- );
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/AssertionFailedError.php b/vendor/phpunit/phpunit/src/Framework/AssertionFailedError.php
deleted file mode 100644
index b554e6c4..00000000
--- a/vendor/phpunit/phpunit/src/Framework/AssertionFailedError.php
+++ /dev/null
@@ -1,27 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Thrown when an assertion failed.
- *
- * @since Class available since Release 2.0.0
- */
-class PHPUnit_Framework_AssertionFailedError extends PHPUnit_Framework_Exception implements PHPUnit_Framework_SelfDescribing
-{
- /**
- * Wrapper for getMessage() which is declared as final.
- *
- * @return string
- */
- public function toString()
- {
- return $this->getMessage();
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/BaseTestListener.php b/vendor/phpunit/phpunit/src/Framework/BaseTestListener.php
deleted file mode 100644
index c6e5d773..00000000
--- a/vendor/phpunit/phpunit/src/Framework/BaseTestListener.php
+++ /dev/null
@@ -1,55 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * An empty Listener that can be extended to implement TestListener
- * with just a few lines of code.
- *
- * @see PHPUnit_Framework_TestListener for documentation on the API methods.
- * @since Class available since Release 4.0.0
- */
-abstract class PHPUnit_Framework_BaseTestListener implements PHPUnit_Framework_TestListener
-{
- public function addError(PHPUnit_Framework_Test $test, Exception $e, $time)
- {
- }
-
- public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time)
- {
- }
-
- public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time)
- {
- }
-
- public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time)
- {
- }
-
- public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time)
- {
- }
-
- public function startTestSuite(PHPUnit_Framework_TestSuite $suite)
- {
- }
-
- public function endTestSuite(PHPUnit_Framework_TestSuite $suite)
- {
- }
-
- public function startTest(PHPUnit_Framework_Test $test)
- {
- }
-
- public function endTest(PHPUnit_Framework_Test $test, $time)
- {
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/CodeCoverageException.php b/vendor/phpunit/phpunit/src/Framework/CodeCoverageException.php
deleted file mode 100644
index b75edd7a..00000000
--- a/vendor/phpunit/phpunit/src/Framework/CodeCoverageException.php
+++ /dev/null
@@ -1,16 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 4.0.0
- */
-class PHPUnit_Framework_CodeCoverageException extends PHPUnit_Framework_Exception
-{
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint.php b/vendor/phpunit/phpunit/src/Framework/Constraint.php
deleted file mode 100644
index e2db66fd..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint.php
+++ /dev/null
@@ -1,153 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-use SebastianBergmann\Exporter\Exporter;
-
-/**
- * Abstract base class for constraints which can be applied to any value.
- *
- * @since Interface available since Release 3.0.0
- */
-abstract class PHPUnit_Framework_Constraint implements Countable, PHPUnit_Framework_SelfDescribing
-{
- protected $exporter;
-
- public function __construct()
- {
- $this->exporter = new Exporter;
- }
-
- /**
- * Evaluates the constraint for parameter $other
- *
- * If $returnResult is set to false (the default), an exception is thrown
- * in case of a failure. null is returned otherwise.
- *
- * If $returnResult is true, the result of the evaluation is returned as
- * a boolean value instead: true in case of success, false in case of a
- * failure.
- *
- * @param mixed $other Value or object to evaluate.
- * @param string $description Additional information about the test
- * @param bool $returnResult Whether to return a result or throw an exception
- *
- * @return mixed
- *
- * @throws PHPUnit_Framework_ExpectationFailedException
- */
- public function evaluate($other, $description = '', $returnResult = false)
- {
- $success = false;
-
- if ($this->matches($other)) {
- $success = true;
- }
-
- if ($returnResult) {
- return $success;
- }
-
- if (!$success) {
- $this->fail($other, $description);
- }
- }
-
- /**
- * Evaluates the constraint for parameter $other. Returns true if the
- * constraint is met, false otherwise.
- *
- * This method can be overridden to implement the evaluation algorithm.
- *
- * @param mixed $other Value or object to evaluate.
- *
- * @return bool
- */
- protected function matches($other)
- {
- return false;
- }
-
- /**
- * Counts the number of constraint elements.
- *
- * @return int
- *
- * @since Method available since Release 3.4.0
- */
- public function count()
- {
- return 1;
- }
-
- /**
- * Throws an exception for the given compared value and test description
- *
- * @param mixed $other Evaluated value or object.
- * @param string $description Additional information about the test
- * @param SebastianBergmann\Comparator\ComparisonFailure $comparisonFailure
- *
- * @throws PHPUnit_Framework_ExpectationFailedException
- */
- protected function fail($other, $description, SebastianBergmann\Comparator\ComparisonFailure $comparisonFailure = null)
- {
- $failureDescription = sprintf(
- 'Failed asserting that %s.',
- $this->failureDescription($other)
- );
-
- $additionalFailureDescription = $this->additionalFailureDescription($other);
-
- if ($additionalFailureDescription) {
- $failureDescription .= "\n" . $additionalFailureDescription;
- }
-
- if (!empty($description)) {
- $failureDescription = $description . "\n" . $failureDescription;
- }
-
- throw new PHPUnit_Framework_ExpectationFailedException(
- $failureDescription,
- $comparisonFailure
- );
- }
-
- /**
- * Return additional failure description where needed
- *
- * The function can be overridden to provide additional failure
- * information like a diff
- *
- * @param mixed $other Evaluated value or object.
- *
- * @return string
- */
- protected function additionalFailureDescription($other)
- {
- return '';
- }
-
- /**
- * Returns the description of the failure
- *
- * The beginning of failure messages is "Failed asserting that" in most
- * cases. This method should return the second part of that sentence.
- *
- * To provide additional failure information additionalFailureDescription
- * can be used.
- *
- * @param mixed $other Evaluated value or object.
- *
- * @return string
- */
- protected function failureDescription($other)
- {
- return $this->exporter->export($other) . ' ' . $this->toString();
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/And.php b/vendor/phpunit/phpunit/src/Framework/Constraint/And.php
deleted file mode 100644
index e4fa32ff..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/And.php
+++ /dev/null
@@ -1,125 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Logical AND.
- *
- * @since Class available since Release 3.0.0
- */
-class PHPUnit_Framework_Constraint_And extends PHPUnit_Framework_Constraint
-{
- /**
- * @var PHPUnit_Framework_Constraint[]
- */
- protected $constraints = array();
-
- /**
- * @var PHPUnit_Framework_Constraint
- */
- protected $lastConstraint = null;
-
- /**
- * @param PHPUnit_Framework_Constraint[] $constraints
- *
- * @throws PHPUnit_Framework_Exception
- */
- public function setConstraints(array $constraints)
- {
- $this->constraints = array();
-
- foreach ($constraints as $constraint) {
- if (!($constraint instanceof PHPUnit_Framework_Constraint)) {
- throw new PHPUnit_Framework_Exception(
- 'All parameters to ' . __CLASS__ .
- ' must be a constraint object.'
- );
- }
-
- $this->constraints[] = $constraint;
- }
- }
-
- /**
- * Evaluates the constraint for parameter $other
- *
- * If $returnResult is set to false (the default), an exception is thrown
- * in case of a failure. null is returned otherwise.
- *
- * If $returnResult is true, the result of the evaluation is returned as
- * a boolean value instead: true in case of success, false in case of a
- * failure.
- *
- * @param mixed $other Value or object to evaluate.
- * @param string $description Additional information about the test
- * @param bool $returnResult Whether to return a result or throw an exception
- *
- * @return mixed
- *
- * @throws PHPUnit_Framework_ExpectationFailedException
- */
- public function evaluate($other, $description = '', $returnResult = false)
- {
- $success = true;
- $constraint = null;
-
- foreach ($this->constraints as $constraint) {
- if (!$constraint->evaluate($other, $description, true)) {
- $success = false;
- break;
- }
- }
-
- if ($returnResult) {
- return $success;
- }
-
- if (!$success) {
- $this->fail($other, $description);
- }
- }
-
- /**
- * Returns a string representation of the constraint.
- *
- * @return string
- */
- public function toString()
- {
- $text = '';
-
- foreach ($this->constraints as $key => $constraint) {
- if ($key > 0) {
- $text .= ' and ';
- }
-
- $text .= $constraint->toString();
- }
-
- return $text;
- }
-
- /**
- * Counts the number of constraint elements.
- *
- * @return int
- *
- * @since Method available since Release 3.4.0
- */
- public function count()
- {
- $count = 0;
-
- foreach ($this->constraints as $constraint) {
- $count += count($constraint);
- }
-
- return $count;
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/ArrayHasKey.php b/vendor/phpunit/phpunit/src/Framework/Constraint/ArrayHasKey.php
deleted file mode 100644
index f208b709..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/ArrayHasKey.php
+++ /dev/null
@@ -1,82 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Constraint that asserts that the array it is evaluated for has a given key.
- *
- * Uses array_key_exists() to check if the key is found in the input array, if
- * not found the evaluation fails.
- *
- * The array key is passed in the constructor.
- *
- * @since Class available since Release 3.0.0
- */
-class PHPUnit_Framework_Constraint_ArrayHasKey extends PHPUnit_Framework_Constraint
-{
- /**
- * @var int|string
- */
- protected $key;
-
- /**
- * @param int|string $key
- */
- public function __construct($key)
- {
- parent::__construct();
- $this->key = $key;
- }
-
- /**
- * Evaluates the constraint for parameter $other. Returns true if the
- * constraint is met, false otherwise.
- *
- * @param mixed $other Value or object to evaluate.
- *
- * @return bool
- */
- protected function matches($other)
- {
- if (is_array($other)) {
- return array_key_exists($this->key, $other);
- }
-
- if ($other instanceof ArrayAccess) {
- return $other->offsetExists($this->key);
- }
-
- return false;
- }
-
- /**
- * Returns a string representation of the constraint.
- *
- * @return string
- */
- public function toString()
- {
- return 'has the key ' . $this->exporter->export($this->key);
- }
-
- /**
- * Returns the description of the failure
- *
- * The beginning of failure messages is "Failed asserting that" in most
- * cases. This method should return the second part of that sentence.
- *
- * @param mixed $other Evaluated value or object.
- *
- * @return string
- */
- protected function failureDescription($other)
- {
- return 'an array ' . $this->toString();
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/ArraySubset.php b/vendor/phpunit/phpunit/src/Framework/Constraint/ArraySubset.php
deleted file mode 100644
index aa67238f..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/ArraySubset.php
+++ /dev/null
@@ -1,95 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Constraint that asserts that the array it is evaluated for has a specified subset.
- *
- * Uses array_replace_recursive() to check if a key value subset is part of the
- * subject array.
- *
- * @since Class available since Release 4.4.0
- */
-class PHPUnit_Framework_Constraint_ArraySubset extends PHPUnit_Framework_Constraint
-{
- /**
- * @var array|ArrayAccess
- */
- protected $subset;
-
- /**
- * @var bool
- */
- protected $strict;
-
- /**
- * @param array|ArrayAccess $subset
- * @param bool $strict Check for object identity
- */
- public function __construct($subset, $strict = false)
- {
- parent::__construct();
- $this->strict = $strict;
- $this->subset = $subset;
- }
-
- /**
- * Evaluates the constraint for parameter $other. Returns true if the
- * constraint is met, false otherwise.
- *
- * @param array|ArrayAccess $other Array or ArrayAccess object to evaluate.
- *
- * @return bool
- */
- protected function matches($other)
- {
- //type cast $other & $this->subset as an array to allow
- //support in standard array functions.
- if($other instanceof ArrayAccess) {
- $other = (array) $other;
- }
-
- if($this->subset instanceof ArrayAccess) {
- $this->subset = (array) $this->subset;
- }
-
- $patched = array_replace_recursive($other, $this->subset);
-
- if ($this->strict) {
- return $other === $patched;
- } else {
- return $other == $patched;
- }
- }
-
- /**
- * Returns a string representation of the constraint.
- *
- * @return string
- */
- public function toString()
- {
- return 'has the subset ' . $this->exporter->export($this->subset);
- }
-
- /**
- * Returns the description of the failure
- *
- * The beginning of failure messages is "Failed asserting that" in most
- * cases. This method should return the second part of that sentence.
- *
- * @param mixed $other Evaluated value or object.
- *
- * @return string
- */
- protected function failureDescription($other)
- {
- return 'an array ' . $this->toString();
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Attribute.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Attribute.php
deleted file mode 100644
index 5a0c458e..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/Attribute.php
+++ /dev/null
@@ -1,87 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 3.1.0
- */
-class PHPUnit_Framework_Constraint_Attribute extends PHPUnit_Framework_Constraint_Composite
-{
- /**
- * @var string
- */
- protected $attributeName;
-
- /**
- * @param PHPUnit_Framework_Constraint $constraint
- * @param string $attributeName
- */
- public function __construct(PHPUnit_Framework_Constraint $constraint, $attributeName)
- {
- parent::__construct($constraint);
-
- $this->attributeName = $attributeName;
- }
-
- /**
- * Evaluates the constraint for parameter $other
- *
- * If $returnResult is set to false (the default), an exception is thrown
- * in case of a failure. null is returned otherwise.
- *
- * If $returnResult is true, the result of the evaluation is returned as
- * a boolean value instead: true in case of success, false in case of a
- * failure.
- *
- * @param mixed $other Value or object to evaluate.
- * @param string $description Additional information about the test
- * @param bool $returnResult Whether to return a result or throw an exception
- *
- * @return mixed
- *
- * @throws PHPUnit_Framework_ExpectationFailedException
- */
- public function evaluate($other, $description = '', $returnResult = false)
- {
- return parent::evaluate(
- PHPUnit_Framework_Assert::readAttribute(
- $other,
- $this->attributeName
- ),
- $description,
- $returnResult
- );
- }
-
- /**
- * Returns a string representation of the constraint.
- *
- * @return string
- */
- public function toString()
- {
- return 'attribute "' . $this->attributeName . '" ' .
- $this->innerConstraint->toString();
- }
-
- /**
- * Returns the description of the failure
- *
- * The beginning of failure messages is "Failed asserting that" in most
- * cases. This method should return the second part of that sentence.
- *
- * @param mixed $other Evaluated value or object.
- *
- * @return string
- */
- protected function failureDescription($other)
- {
- return $this->toString();
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Callback.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Callback.php
deleted file mode 100644
index df60d68e..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/Callback.php
+++ /dev/null
@@ -1,59 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Constraint that evaluates against a specified closure.
- */
-class PHPUnit_Framework_Constraint_Callback extends PHPUnit_Framework_Constraint
-{
- private $callback;
-
- /**
- * @param callable $callback
- *
- * @throws PHPUnit_Framework_Exception
- */
- public function __construct($callback)
- {
- if (!is_callable($callback)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(
- 1,
- 'callable'
- );
- }
-
- parent::__construct();
-
- $this->callback = $callback;
- }
-
- /**
- * Evaluates the constraint for parameter $value. Returns true if the
- * constraint is met, false otherwise.
- *
- * @param mixed $other Value or object to evaluate.
- *
- * @return bool
- */
- protected function matches($other)
- {
- return call_user_func($this->callback, $other);
- }
-
- /**
- * Returns a string representation of the constraint.
- *
- * @return string
- */
- public function toString()
- {
- return 'is accepted by specified callback';
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/ClassHasAttribute.php b/vendor/phpunit/phpunit/src/Framework/Constraint/ClassHasAttribute.php
deleted file mode 100644
index 97315c96..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/ClassHasAttribute.php
+++ /dev/null
@@ -1,82 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Constraint that asserts that the class it is evaluated for has a given
- * attribute.
- *
- * The attribute name is passed in the constructor.
- *
- * @since Class available since Release 3.1.0
- */
-class PHPUnit_Framework_Constraint_ClassHasAttribute extends PHPUnit_Framework_Constraint
-{
- /**
- * @var string
- */
- protected $attributeName;
-
- /**
- * @param string $attributeName
- */
- public function __construct($attributeName)
- {
- parent::__construct();
- $this->attributeName = $attributeName;
- }
-
- /**
- * Evaluates the constraint for parameter $other. Returns true if the
- * constraint is met, false otherwise.
- *
- * @param mixed $other Value or object to evaluate.
- *
- * @return bool
- */
- protected function matches($other)
- {
- $class = new ReflectionClass($other);
-
- return $class->hasProperty($this->attributeName);
- }
-
- /**
- * Returns a string representation of the constraint.
- *
- * @return string
- */
- public function toString()
- {
- return sprintf(
- 'has attribute "%s"',
- $this->attributeName
- );
- }
-
- /**
- * Returns the description of the failure
- *
- * The beginning of failure messages is "Failed asserting that" in most
- * cases. This method should return the second part of that sentence.
- *
- * @param mixed $other Evaluated value or object.
- *
- * @return string
- */
- protected function failureDescription($other)
- {
- return sprintf(
- '%sclass "%s" %s',
- is_object($other) ? 'object of ' : '',
- is_object($other) ? get_class($other) : $other,
- $this->toString()
- );
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/ClassHasStaticAttribute.php b/vendor/phpunit/phpunit/src/Framework/Constraint/ClassHasStaticAttribute.php
deleted file mode 100644
index 7bc29f17..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/ClassHasStaticAttribute.php
+++ /dev/null
@@ -1,56 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Constraint that asserts that the class it is evaluated for has a given
- * static attribute.
- *
- * The attribute name is passed in the constructor.
- *
- * @since Class available since Release 3.1.0
- */
-class PHPUnit_Framework_Constraint_ClassHasStaticAttribute extends PHPUnit_Framework_Constraint_ClassHasAttribute
-{
- /**
- * Evaluates the constraint for parameter $other. Returns true if the
- * constraint is met, false otherwise.
- *
- * @param mixed $other Value or object to evaluate.
- *
- * @return bool
- */
- protected function matches($other)
- {
- $class = new ReflectionClass($other);
-
- if ($class->hasProperty($this->attributeName)) {
- $attribute = $class->getProperty($this->attributeName);
-
- return $attribute->isStatic();
- } else {
- return false;
- }
- }
-
- /**
- * Returns a string representation of the constraint.
- *
- * @return string
- *
- * @since Method available since Release 3.3.0
- */
- public function toString()
- {
- return sprintf(
- 'has static attribute "%s"',
- $this->attributeName
- );
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Composite.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Composite.php
deleted file mode 100644
index 680b832a..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/Composite.php
+++ /dev/null
@@ -1,70 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 3.1.0
- */
-abstract class PHPUnit_Framework_Constraint_Composite extends PHPUnit_Framework_Constraint
-{
- /**
- * @var PHPUnit_Framework_Constraint
- */
- protected $innerConstraint;
-
- /**
- * @param PHPUnit_Framework_Constraint $innerConstraint
- */
- public function __construct(PHPUnit_Framework_Constraint $innerConstraint)
- {
- parent::__construct();
- $this->innerConstraint = $innerConstraint;
- }
-
- /**
- * Evaluates the constraint for parameter $other
- *
- * If $returnResult is set to false (the default), an exception is thrown
- * in case of a failure. null is returned otherwise.
- *
- * If $returnResult is true, the result of the evaluation is returned as
- * a boolean value instead: true in case of success, false in case of a
- * failure.
- *
- * @param mixed $other Value or object to evaluate.
- * @param string $description Additional information about the test
- * @param bool $returnResult Whether to return a result or throw an exception
- *
- * @return mixed
- *
- * @throws PHPUnit_Framework_ExpectationFailedException
- */
- public function evaluate($other, $description = '', $returnResult = false)
- {
- try {
- return $this->innerConstraint->evaluate(
- $other,
- $description,
- $returnResult
- );
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->fail($other, $description);
- }
- }
-
- /**
- * Counts the number of constraint elements.
- *
- * @return int
- */
- public function count()
- {
- return count($this->innerConstraint);
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Count.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Count.php
deleted file mode 100644
index ee370ea5..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/Count.php
+++ /dev/null
@@ -1,104 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 3.6.0
- */
-class PHPUnit_Framework_Constraint_Count extends PHPUnit_Framework_Constraint
-{
- /**
- * @var int
- */
- protected $expectedCount = 0;
-
- /**
- * @param int $expected
- */
- public function __construct($expected)
- {
- parent::__construct();
- $this->expectedCount = $expected;
- }
-
- /**
- * Evaluates the constraint for parameter $other. Returns true if the
- * constraint is met, false otherwise.
- *
- * @param mixed $other
- *
- * @return bool
- */
- protected function matches($other)
- {
- return $this->expectedCount === $this->getCountOf($other);
- }
-
- /**
- * @param mixed $other
- *
- * @return bool
- */
- protected function getCountOf($other)
- {
- if ($other instanceof Countable || is_array($other)) {
- return count($other);
- } elseif ($other instanceof Traversable) {
- if ($other instanceof IteratorAggregate) {
- $iterator = $other->getIterator();
- } else {
- $iterator = $other;
- }
-
- $key = $iterator->key();
- $count = iterator_count($iterator);
-
- // manually rewind $iterator to previous key, since iterator_count
- // moves pointer
- if ($key !== null) {
- $iterator->rewind();
- while ($iterator->valid() && $key !== $iterator->key()) {
- $iterator->next();
- }
- }
-
- return $count;
- }
- }
-
- /**
- * Returns the description of the failure
- *
- * The beginning of failure messages is "Failed asserting that" in most
- * cases. This method should return the second part of that sentence.
- *
- * @param mixed $other Evaluated value or object.
- *
- * @return string
- */
- protected function failureDescription($other)
- {
- return sprintf(
- 'actual size %d matches expected size %d',
- $this->getCountOf($other),
- $this->expectedCount
- );
- }
-
- /**
- * @return string
- */
- public function toString()
- {
- return sprintf(
- 'count matches %d',
- $this->expectedCount
- );
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Exception.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Exception.php
deleted file mode 100644
index c05f1725..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/Exception.php
+++ /dev/null
@@ -1,88 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 3.6.6
- */
-class PHPUnit_Framework_Constraint_Exception extends PHPUnit_Framework_Constraint
-{
- /**
- * @var string
- */
- protected $className;
-
- /**
- * @param string $className
- */
- public function __construct($className)
- {
- parent::__construct();
- $this->className = $className;
- }
-
- /**
- * Evaluates the constraint for parameter $other. Returns true if the
- * constraint is met, false otherwise.
- *
- * @param mixed $other Value or object to evaluate.
- *
- * @return bool
- */
- protected function matches($other)
- {
- return $other instanceof $this->className;
- }
-
- /**
- * Returns the description of the failure
- *
- * The beginning of failure messages is "Failed asserting that" in most
- * cases. This method should return the second part of that sentence.
- *
- * @param mixed $other Evaluated value or object.
- *
- * @return string
- */
- protected function failureDescription($other)
- {
- if ($other !== null) {
- $message = '';
- if ($other instanceof Exception) {
- $message = '. Message was: "' . $other->getMessage() . '" at'
- . "\n" . $other->getTraceAsString();
- }
-
- return sprintf(
- 'exception of type "%s" matches expected exception "%s"%s',
- get_class($other),
- $this->className,
- $message
- );
- }
-
- return sprintf(
- 'exception of type "%s" is thrown',
- $this->className
- );
- }
-
- /**
- * Returns a string representation of the constraint.
- *
- * @return string
- */
- public function toString()
- {
- return sprintf(
- 'exception of type "%s"',
- $this->className
- );
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionCode.php b/vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionCode.php
deleted file mode 100644
index 8f402fca..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionCode.php
+++ /dev/null
@@ -1,69 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 3.6.6
- */
-class PHPUnit_Framework_Constraint_ExceptionCode extends PHPUnit_Framework_Constraint
-{
- /**
- * @var int
- */
- protected $expectedCode;
-
- /**
- * @param int $expected
- */
- public function __construct($expected)
- {
- parent::__construct();
- $this->expectedCode = $expected;
- }
-
- /**
- * Evaluates the constraint for parameter $other. Returns true if the
- * constraint is met, false otherwise.
- *
- * @param Exception $other
- *
- * @return bool
- */
- protected function matches($other)
- {
- return (string) $other->getCode() == (string) $this->expectedCode;
- }
-
- /**
- * Returns the description of the failure
- *
- * The beginning of failure messages is "Failed asserting that" in most
- * cases. This method should return the second part of that sentence.
- *
- * @param mixed $other Evaluated value or object.
- *
- * @return string
- */
- protected function failureDescription($other)
- {
- return sprintf(
- '%s is equal to expected exception code %s',
- $this->exporter->export($other->getCode()),
- $this->exporter->export($this->expectedCode)
- );
- }
-
- /**
- * @return string
- */
- public function toString()
- {
- return 'exception code is ';
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php b/vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php
deleted file mode 100644
index c9632e9b..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php
+++ /dev/null
@@ -1,69 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 3.6.6
- */
-class PHPUnit_Framework_Constraint_ExceptionMessage extends PHPUnit_Framework_Constraint
-{
- /**
- * @var int
- */
- protected $expectedMessage;
-
- /**
- * @param string $expected
- */
- public function __construct($expected)
- {
- parent::__construct();
- $this->expectedMessage = $expected;
- }
-
- /**
- * Evaluates the constraint for parameter $other. Returns true if the
- * constraint is met, false otherwise.
- *
- * @param Exception $other
- *
- * @return bool
- */
- protected function matches($other)
- {
- return strpos($other->getMessage(), $this->expectedMessage) !== false;
- }
-
- /**
- * Returns the description of the failure
- *
- * The beginning of failure messages is "Failed asserting that" in most
- * cases. This method should return the second part of that sentence.
- *
- * @param mixed $other Evaluated value or object.
- *
- * @return string
- */
- protected function failureDescription($other)
- {
- return sprintf(
- "exception message '%s' contains '%s'",
- $other->getMessage(),
- $this->expectedMessage
- );
- }
-
- /**
- * @return string
- */
- public function toString()
- {
- return 'exception message contains ';
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionMessageRegExp.php b/vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionMessageRegExp.php
deleted file mode 100644
index 7f2283ac..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionMessageRegExp.php
+++ /dev/null
@@ -1,77 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 4.3.0
- */
-class PHPUnit_Framework_Constraint_ExceptionMessageRegExp extends PHPUnit_Framework_Constraint
-{
- /**
- * @var int
- */
- protected $expectedMessageRegExp;
-
- /**
- * @param string $expected
- */
- public function __construct($expected)
- {
- parent::__construct();
- $this->expectedMessageRegExp = $expected;
- }
-
- /**
- * Evaluates the constraint for parameter $other. Returns true if the
- * constraint is met, false otherwise.
- *
- * @param Exception $other
- *
- * @return bool
- */
- protected function matches($other)
- {
- $match = PHPUnit_Util_Regex::pregMatchSafe($this->expectedMessageRegExp, $other->getMessage());
-
- if (false === $match) {
- throw new PHPUnit_Framework_Exception(
- "Invalid expected exception message regex given: '{$this->expectedMessageRegExp}'"
- );
- }
-
- return 1 === $match;
- }
-
- /**
- * Returns the description of the failure
- *
- * The beginning of failure messages is "Failed asserting that" in most
- * cases. This method should return the second part of that sentence.
- *
- * @param mixed $other Evaluated value or object.
- *
- * @return string
- */
- protected function failureDescription($other)
- {
- return sprintf(
- "exception message '%s' matches '%s'",
- $other->getMessage(),
- $this->expectedMessageRegExp
- );
- }
-
- /**
- * @return string
- */
- public function toString()
- {
- return 'exception message matches ';
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/FileExists.php b/vendor/phpunit/phpunit/src/Framework/Constraint/FileExists.php
deleted file mode 100644
index 25643bd2..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/FileExists.php
+++ /dev/null
@@ -1,60 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Constraint that checks if the file(name) that it is evaluated for exists.
- *
- * The file path to check is passed as $other in evaluate().
- *
- * @since Class available since Release 3.0.0
- */
-class PHPUnit_Framework_Constraint_FileExists extends PHPUnit_Framework_Constraint
-{
- /**
- * Evaluates the constraint for parameter $other. Returns true if the
- * constraint is met, false otherwise.
- *
- * @param mixed $other Value or object to evaluate.
- *
- * @return bool
- */
- protected function matches($other)
- {
- return file_exists($other);
- }
-
- /**
- * Returns the description of the failure
- *
- * The beginning of failure messages is "Failed asserting that" in most
- * cases. This method should return the second part of that sentence.
- *
- * @param mixed $other Evaluated value or object.
- *
- * @return string
- */
- protected function failureDescription($other)
- {
- return sprintf(
- 'file "%s" exists',
- $other
- );
- }
-
- /**
- * Returns a string representation of the constraint.
- *
- * @return string
- */
- public function toString()
- {
- return 'file exists';
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/GreaterThan.php b/vendor/phpunit/phpunit/src/Framework/Constraint/GreaterThan.php
deleted file mode 100644
index b67eae41..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/GreaterThan.php
+++ /dev/null
@@ -1,55 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Constraint that asserts that the value it is evaluated for is greater
- * than a given value.
- *
- * @since Class available since Release 3.0.0
- */
-class PHPUnit_Framework_Constraint_GreaterThan extends PHPUnit_Framework_Constraint
-{
- /**
- * @var numeric
- */
- protected $value;
-
- /**
- * @param numeric $value
- */
- public function __construct($value)
- {
- parent::__construct();
- $this->value = $value;
- }
-
- /**
- * Evaluates the constraint for parameter $other. Returns true if the
- * constraint is met, false otherwise.
- *
- * @param mixed $other Value or object to evaluate.
- *
- * @return bool
- */
- protected function matches($other)
- {
- return $this->value < $other;
- }
-
- /**
- * Returns a string representation of the constraint.
- *
- * @return string
- */
- public function toString()
- {
- return 'is greater than ' . $this->exporter->export($this->value);
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/IsAnything.php b/vendor/phpunit/phpunit/src/Framework/Constraint/IsAnything.php
deleted file mode 100644
index bfaa201d..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/IsAnything.php
+++ /dev/null
@@ -1,62 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Constraint that accepts any input value.
- *
- * @since Class available since Release 3.0.0
- */
-class PHPUnit_Framework_Constraint_IsAnything extends PHPUnit_Framework_Constraint
-{
- /**
- * Evaluates the constraint for parameter $other
- *
- * If $returnResult is set to false (the default), an exception is thrown
- * in case of a failure. null is returned otherwise.
- *
- * If $returnResult is true, the result of the evaluation is returned as
- * a boolean value instead: true in case of success, false in case of a
- * failure.
- *
- * @param mixed $other Value or object to evaluate.
- * @param string $description Additional information about the test
- * @param bool $returnResult Whether to return a result or throw an exception
- *
- * @return mixed
- *
- * @throws PHPUnit_Framework_ExpectationFailedException
- */
- public function evaluate($other, $description = '', $returnResult = false)
- {
- return $returnResult ? true : null;
- }
-
- /**
- * Returns a string representation of the constraint.
- *
- * @return string
- */
- public function toString()
- {
- return 'is anything';
- }
-
- /**
- * Counts the number of constraint elements.
- *
- * @return int
- *
- * @since Method available since Release 3.5.0
- */
- public function count()
- {
- return 0;
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/IsEmpty.php b/vendor/phpunit/phpunit/src/Framework/Constraint/IsEmpty.php
deleted file mode 100644
index e4906691..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/IsEmpty.php
+++ /dev/null
@@ -1,66 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Constraint that checks whether a variable is empty().
- *
- * @since Class available since Release 3.5.0
- */
-class PHPUnit_Framework_Constraint_IsEmpty extends PHPUnit_Framework_Constraint
-{
- /**
- * Evaluates the constraint for parameter $other. Returns true if the
- * constraint is met, false otherwise.
- *
- * @param mixed $other Value or object to evaluate.
- *
- * @return bool
- */
- protected function matches($other)
- {
- if ($other instanceof Countable) {
- return count($other) === 0;
- }
-
- return empty($other);
- }
-
- /**
- * Returns a string representation of the constraint.
- *
- * @return string
- */
- public function toString()
- {
- return 'is empty';
- }
-
- /**
- * Returns the description of the failure
- *
- * The beginning of failure messages is "Failed asserting that" in most
- * cases. This method should return the second part of that sentence.
- *
- * @param mixed $other Evaluated value or object.
- *
- * @return string
- */
- protected function failureDescription($other)
- {
- $type = gettype($other);
-
- return sprintf(
- '%s %s %s',
- $type[0] == 'a' || $type[0] == 'o' ? 'an' : 'a',
- $type,
- $this->toString()
- );
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/IsEqual.php b/vendor/phpunit/phpunit/src/Framework/Constraint/IsEqual.php
deleted file mode 100644
index da5348d2..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/IsEqual.php
+++ /dev/null
@@ -1,179 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Constraint that checks if one value is equal to another.
- *
- * Equality is checked with PHP's == operator, the operator is explained in
- * detail at {@url http://www.php.net/manual/en/types.comparisons.php}.
- * Two values are equal if they have the same value disregarding type.
- *
- * The expected value is passed in the constructor.
- *
- * @since Class available since Release 3.0.0
- */
-class PHPUnit_Framework_Constraint_IsEqual extends PHPUnit_Framework_Constraint
-{
- /**
- * @var mixed
- */
- protected $value;
-
- /**
- * @var float
- */
- protected $delta = 0.0;
-
- /**
- * @var int
- */
- protected $maxDepth = 10;
-
- /**
- * @var bool
- */
- protected $canonicalize = false;
-
- /**
- * @var bool
- */
- protected $ignoreCase = false;
-
- /**
- * @var SebastianBergmann\Comparator\ComparisonFailure
- */
- protected $lastFailure;
-
- /**
- * @param mixed $value
- * @param float $delta
- * @param int $maxDepth
- * @param bool $canonicalize
- * @param bool $ignoreCase
- *
- * @throws PHPUnit_Framework_Exception
- */
- public function __construct($value, $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false)
- {
- parent::__construct();
-
- if (!is_numeric($delta)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'numeric');
- }
-
- if (!is_int($maxDepth)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(3, 'integer');
- }
-
- if (!is_bool($canonicalize)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(4, 'boolean');
- }
-
- if (!is_bool($ignoreCase)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(5, 'boolean');
- }
-
- $this->value = $value;
- $this->delta = $delta;
- $this->maxDepth = $maxDepth;
- $this->canonicalize = $canonicalize;
- $this->ignoreCase = $ignoreCase;
- }
-
- /**
- * Evaluates the constraint for parameter $other
- *
- * If $returnResult is set to false (the default), an exception is thrown
- * in case of a failure. null is returned otherwise.
- *
- * If $returnResult is true, the result of the evaluation is returned as
- * a boolean value instead: true in case of success, false in case of a
- * failure.
- *
- * @param mixed $other Value or object to evaluate.
- * @param string $description Additional information about the test
- * @param bool $returnResult Whether to return a result or throw an exception
- *
- * @return mixed
- *
- * @throws PHPUnit_Framework_ExpectationFailedException
- */
- public function evaluate($other, $description = '', $returnResult = false)
- {
- // If $this->value and $other are identical, they are also equal.
- // This is the most common path and will allow us to skip
- // initialization of all the comparators.
- if ($this->value === $other) {
- return true;
- }
-
- $comparatorFactory = SebastianBergmann\Comparator\Factory::getInstance();
-
- try {
- $comparator = $comparatorFactory->getComparatorFor(
- $this->value,
- $other
- );
-
- $comparator->assertEquals(
- $this->value,
- $other,
- $this->delta,
- $this->canonicalize,
- $this->ignoreCase
- );
- } catch (SebastianBergmann\Comparator\ComparisonFailure $f) {
- if ($returnResult) {
- return false;
- }
-
- throw new PHPUnit_Framework_ExpectationFailedException(
- trim($description . "\n" . $f->getMessage()),
- $f
- );
- }
-
- return true;
- }
-
- /**
- * Returns a string representation of the constraint.
- *
- * @return string
- */
- public function toString()
- {
- $delta = '';
-
- if (is_string($this->value)) {
- if (strpos($this->value, "\n") !== false) {
- return 'is equal to ';
- } else {
- return sprintf(
- 'is equal to ',
- $this->value
- );
- }
- } else {
- if ($this->delta != 0) {
- $delta = sprintf(
- ' with delta <%F>',
- $this->delta
- );
- }
-
- return sprintf(
- 'is equal to %s%s',
- $this->exporter->export($this->value),
- $delta
- );
- }
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/IsFalse.php b/vendor/phpunit/phpunit/src/Framework/Constraint/IsFalse.php
deleted file mode 100644
index d476b097..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/IsFalse.php
+++ /dev/null
@@ -1,40 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Constraint that accepts false.
- *
- * @since Class available since Release 3.3.0
- */
-class PHPUnit_Framework_Constraint_IsFalse extends PHPUnit_Framework_Constraint
-{
- /**
- * Evaluates the constraint for parameter $other. Returns true if the
- * constraint is met, false otherwise.
- *
- * @param mixed $other Value or object to evaluate.
- *
- * @return bool
- */
- protected function matches($other)
- {
- return $other === false;
- }
-
- /**
- * Returns a string representation of the constraint.
- *
- * @return string
- */
- public function toString()
- {
- return 'is false';
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php b/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php
deleted file mode 100644
index 9d8b5a15..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php
+++ /dev/null
@@ -1,132 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Constraint that asserts that one value is identical to another.
- *
- * Identical check is performed with PHP's === operator, the operator is
- * explained in detail at
- * {@url http://www.php.net/manual/en/types.comparisons.php}.
- * Two values are identical if they have the same value and are of the same
- * type.
- *
- * The expected value is passed in the constructor.
- *
- * @since Class available since Release 3.0.0
- */
-class PHPUnit_Framework_Constraint_IsIdentical extends PHPUnit_Framework_Constraint
-{
- /**
- * @var float
- */
- const EPSILON = 0.0000000001;
-
- /**
- * @var mixed
- */
- protected $value;
-
- /**
- * @param mixed $value
- */
- public function __construct($value)
- {
- parent::__construct();
- $this->value = $value;
- }
-
- /**
- * Evaluates the constraint for parameter $other
- *
- * If $returnResult is set to false (the default), an exception is thrown
- * in case of a failure. null is returned otherwise.
- *
- * If $returnResult is true, the result of the evaluation is returned as
- * a boolean value instead: true in case of success, false in case of a
- * failure.
- *
- * @param mixed $other Value or object to evaluate.
- * @param string $description Additional information about the test
- * @param bool $returnResult Whether to return a result or throw an exception
- *
- * @return mixed
- *
- * @throws PHPUnit_Framework_ExpectationFailedException
- */
- public function evaluate($other, $description = '', $returnResult = false)
- {
- if (is_double($this->value) && is_double($other) &&
- !is_infinite($this->value) && !is_infinite($other) &&
- !is_nan($this->value) && !is_nan($other)) {
- $success = abs($this->value - $other) < self::EPSILON;
- } else {
- $success = $this->value === $other;
- }
-
- if ($returnResult) {
- return $success;
- }
-
- if (!$success) {
- $f = null;
-
- // if both values are strings, make sure a diff is generated
- if (is_string($this->value) && is_string($other)) {
- $f = new SebastianBergmann\Comparator\ComparisonFailure(
- $this->value,
- $other,
- $this->value,
- $other
- );
- }
-
- $this->fail($other, $description, $f);
- }
- }
-
- /**
- * Returns the description of the failure
- *
- * The beginning of failure messages is "Failed asserting that" in most
- * cases. This method should return the second part of that sentence.
- *
- * @param mixed $other Evaluated value or object.
- *
- * @return string
- */
- protected function failureDescription($other)
- {
- if (is_object($this->value) && is_object($other)) {
- return 'two variables reference the same object';
- }
-
- if (is_string($this->value) && is_string($other)) {
- return 'two strings are identical';
- }
-
- return parent::failureDescription($other);
- }
-
- /**
- * Returns a string representation of the constraint.
- *
- * @return string
- */
- public function toString()
- {
- if (is_object($this->value)) {
- return 'is identical to an object of class "' .
- get_class($this->value) . '"';
- } else {
- return 'is identical to ' .
- $this->exporter->export($this->value);
- }
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/IsInstanceOf.php b/vendor/phpunit/phpunit/src/Framework/Constraint/IsInstanceOf.php
deleted file mode 100644
index 69a7a786..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/IsInstanceOf.php
+++ /dev/null
@@ -1,94 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Constraint that asserts that the object it is evaluated for is an instance
- * of a given class.
- *
- * The expected class name is passed in the constructor.
- *
- * @since Class available since Release 3.0.0
- */
-class PHPUnit_Framework_Constraint_IsInstanceOf extends PHPUnit_Framework_Constraint
-{
- /**
- * @var string
- */
- protected $className;
-
- /**
- * @param string $className
- */
- public function __construct($className)
- {
- parent::__construct();
- $this->className = $className;
- }
-
- /**
- * Evaluates the constraint for parameter $other. Returns true if the
- * constraint is met, false otherwise.
- *
- * @param mixed $other Value or object to evaluate.
- *
- * @return bool
- */
- protected function matches($other)
- {
- return ($other instanceof $this->className);
- }
-
- /**
- * Returns the description of the failure
- *
- * The beginning of failure messages is "Failed asserting that" in most
- * cases. This method should return the second part of that sentence.
- *
- * @param mixed $other Evaluated value or object.
- *
- * @return string
- */
- protected function failureDescription($other)
- {
- return sprintf(
- '%s is an instance of %s "%s"',
- $this->exporter->shortenedExport($other),
- $this->getType(),
- $this->className
- );
- }
-
- /**
- * Returns a string representation of the constraint.
- *
- * @return string
- */
- public function toString()
- {
- return sprintf(
- 'is instance of %s "%s"',
- $this->getType(),
- $this->className
- );
- }
-
- private function getType()
- {
- try {
- $reflection = new ReflectionClass($this->className);
- if ($reflection->isInterface()) {
- return 'interface';
- }
- } catch (ReflectionException $e) {
- }
-
- return 'class';
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/IsJson.php b/vendor/phpunit/phpunit/src/Framework/Constraint/IsJson.php
deleted file mode 100644
index f6951bab..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/IsJson.php
+++ /dev/null
@@ -1,69 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Constraint that asserts that a string is valid JSON.
- *
- * @since Class available since Release 3.7.20
- */
-class PHPUnit_Framework_Constraint_IsJson extends PHPUnit_Framework_Constraint
-{
- /**
- * Evaluates the constraint for parameter $other. Returns true if the
- * constraint is met, false otherwise.
- *
- * @param mixed $other Value or object to evaluate.
- *
- * @return bool
- */
- protected function matches($other)
- {
- json_decode($other);
- if (json_last_error()) {
- return false;
- }
-
- return true;
- }
-
- /**
- * Returns the description of the failure
- *
- * The beginning of failure messages is "Failed asserting that" in most
- * cases. This method should return the second part of that sentence.
- *
- * @param mixed $other Evaluated value or object.
- *
- * @return string
- */
- protected function failureDescription($other)
- {
- json_decode($other);
- $error = PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider::determineJsonError(
- json_last_error()
- );
-
- return sprintf(
- '%s is valid JSON (%s)',
- $this->exporter->shortenedExport($other),
- $error
- );
- }
-
- /**
- * Returns a string representation of the constraint.
- *
- * @return string
- */
- public function toString()
- {
- return 'is valid JSON';
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/IsNull.php b/vendor/phpunit/phpunit/src/Framework/Constraint/IsNull.php
deleted file mode 100644
index d3b23a6e..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/IsNull.php
+++ /dev/null
@@ -1,40 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Constraint that accepts null.
- *
- * @since Class available since Release 3.3.0
- */
-class PHPUnit_Framework_Constraint_IsNull extends PHPUnit_Framework_Constraint
-{
- /**
- * Evaluates the constraint for parameter $other. Returns true if the
- * constraint is met, false otherwise.
- *
- * @param mixed $other Value or object to evaluate.
- *
- * @return bool
- */
- protected function matches($other)
- {
- return $other === null;
- }
-
- /**
- * Returns a string representation of the constraint.
- *
- * @return string
- */
- public function toString()
- {
- return 'is null';
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/IsTrue.php b/vendor/phpunit/phpunit/src/Framework/Constraint/IsTrue.php
deleted file mode 100644
index 6acddbbb..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/IsTrue.php
+++ /dev/null
@@ -1,40 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Constraint that accepts true.
- *
- * @since Class available since Release 3.3.0
- */
-class PHPUnit_Framework_Constraint_IsTrue extends PHPUnit_Framework_Constraint
-{
- /**
- * Evaluates the constraint for parameter $other. Returns true if the
- * constraint is met, false otherwise.
- *
- * @param mixed $other Value or object to evaluate.
- *
- * @return bool
- */
- protected function matches($other)
- {
- return $other === true;
- }
-
- /**
- * Returns a string representation of the constraint.
- *
- * @return string
- */
- public function toString()
- {
- return 'is true';
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/IsType.php b/vendor/phpunit/phpunit/src/Framework/Constraint/IsType.php
deleted file mode 100644
index 7f0499b3..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/IsType.php
+++ /dev/null
@@ -1,143 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Constraint that asserts that the value it is evaluated for is of a
- * specified type.
- *
- * The expected value is passed in the constructor.
- *
- * @since Class available since Release 3.0.0
- */
-class PHPUnit_Framework_Constraint_IsType extends PHPUnit_Framework_Constraint
-{
- const TYPE_ARRAY = 'array';
- const TYPE_BOOL = 'bool';
- const TYPE_FLOAT = 'float';
- const TYPE_INT = 'int';
- const TYPE_NULL = 'null';
- const TYPE_NUMERIC = 'numeric';
- const TYPE_OBJECT = 'object';
- const TYPE_RESOURCE = 'resource';
- const TYPE_STRING = 'string';
- const TYPE_SCALAR = 'scalar';
- const TYPE_CALLABLE = 'callable';
-
- /**
- * @var array
- */
- protected $types = array(
- 'array' => true,
- 'boolean' => true,
- 'bool' => true,
- 'double' => true,
- 'float' => true,
- 'integer' => true,
- 'int' => true,
- 'null' => true,
- 'numeric' => true,
- 'object' => true,
- 'real' => true,
- 'resource' => true,
- 'string' => true,
- 'scalar' => true,
- 'callable' => true
- );
-
- /**
- * @var string
- */
- protected $type;
-
- /**
- * @param string $type
- *
- * @throws PHPUnit_Framework_Exception
- */
- public function __construct($type)
- {
- parent::__construct();
-
- if (!isset($this->types[$type])) {
- throw new PHPUnit_Framework_Exception(
- sprintf(
- 'Type specified for PHPUnit_Framework_Constraint_IsType <%s> ' .
- 'is not a valid type.',
- $type
- )
- );
- }
-
- $this->type = $type;
- }
-
- /**
- * Evaluates the constraint for parameter $other. Returns true if the
- * constraint is met, false otherwise.
- *
- * @param mixed $other Value or object to evaluate.
- *
- * @return bool
- */
- protected function matches($other)
- {
- switch ($this->type) {
- case 'numeric':
- return is_numeric($other);
-
- case 'integer':
- case 'int':
- return is_integer($other);
-
- case 'double':
- case 'float':
- case 'real':
- return is_float($other);
-
- case 'string':
- return is_string($other);
-
- case 'boolean':
- case 'bool':
- return is_bool($other);
-
- case 'null':
- return is_null($other);
-
- case 'array':
- return is_array($other);
-
- case 'object':
- return is_object($other);
-
- case 'resource':
- return is_resource($other) || is_string(@get_resource_type($other));
-
- case 'scalar':
- return is_scalar($other);
-
- case 'callable':
- return is_callable($other);
- }
- }
-
- /**
- * Returns a string representation of the constraint.
- *
- * @return string
- */
- public function toString()
- {
- return sprintf(
- 'is of type "%s"',
- $this->type
- );
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php b/vendor/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php
deleted file mode 100644
index 700abe38..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php
+++ /dev/null
@@ -1,71 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Asserts whether or not two JSON objects are equal.
- *
- * @since Class available since Release 3.7.0
- */
-class PHPUnit_Framework_Constraint_JsonMatches extends PHPUnit_Framework_Constraint
-{
- /**
- * @var string
- */
- protected $value;
-
- /**
- * Creates a new constraint.
- *
- * @param string $value
- */
- public function __construct($value)
- {
- parent::__construct();
- $this->value = $value;
- }
-
- /**
- * Evaluates the constraint for parameter $other. Returns true if the
- * constraint is met, false otherwise.
- *
- * This method can be overridden to implement the evaluation algorithm.
- *
- * @param mixed $other Value or object to evaluate.
- *
- * @return bool
- */
- protected function matches($other)
- {
- $decodedOther = json_decode($other);
- if (json_last_error()) {
- return false;
- }
-
- $decodedValue = json_decode($this->value);
- if (json_last_error()) {
- return false;
- }
-
- return $decodedOther == $decodedValue;
- }
-
- /**
- * Returns a string representation of the object.
- *
- * @return string
- */
- public function toString()
- {
- return sprintf(
- 'matches JSON string "%s"',
- $this->value
- );
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/JsonMatches/ErrorMessageProvider.php b/vendor/phpunit/phpunit/src/Framework/Constraint/JsonMatches/ErrorMessageProvider.php
deleted file mode 100644
index 0d062774..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/JsonMatches/ErrorMessageProvider.php
+++ /dev/null
@@ -1,69 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Provides human readable messages for each JSON error.
- *
- * @since Class available since Release 3.7.0
- */
-class PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider
-{
- /**
- * Translates JSON error to a human readable string.
- *
- * @param string $error
- * @param string $prefix
- *
- * @return string
- */
- public static function determineJsonError($error, $prefix = '')
- {
- switch ($error) {
- case JSON_ERROR_NONE:
- return;
- case JSON_ERROR_DEPTH:
- return $prefix . 'Maximum stack depth exceeded';
- case JSON_ERROR_STATE_MISMATCH:
- return $prefix . 'Underflow or the modes mismatch';
- case JSON_ERROR_CTRL_CHAR:
- return $prefix . 'Unexpected control character found';
- case JSON_ERROR_SYNTAX:
- return $prefix . 'Syntax error, malformed JSON';
- case JSON_ERROR_UTF8:
- return $prefix . 'Malformed UTF-8 characters, possibly incorrectly encoded';
- default:
- return $prefix . 'Unknown error';
- }
- }
-
- /**
- * Translates a given type to a human readable message prefix.
- *
- * @param string $type
- *
- * @return string
- */
- public static function translateTypeToPrefix($type)
- {
- switch (strtolower($type)) {
- case 'expected':
- $prefix = 'Expected value JSON decode error - ';
- break;
- case 'actual':
- $prefix = 'Actual value JSON decode error - ';
- break;
- default:
- $prefix = '';
- break;
- }
-
- return $prefix;
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/LessThan.php b/vendor/phpunit/phpunit/src/Framework/Constraint/LessThan.php
deleted file mode 100644
index 0160ec35..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/LessThan.php
+++ /dev/null
@@ -1,55 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Constraint that asserts that the value it is evaluated for is less than
- * a given value.
- *
- * @since Class available since Release 3.0.0
- */
-class PHPUnit_Framework_Constraint_LessThan extends PHPUnit_Framework_Constraint
-{
- /**
- * @var numeric
- */
- protected $value;
-
- /**
- * @param numeric $value
- */
- public function __construct($value)
- {
- parent::__construct();
- $this->value = $value;
- }
-
- /**
- * Evaluates the constraint for parameter $other. Returns true if the
- * constraint is met, false otherwise.
- *
- * @param mixed $other Value or object to evaluate.
- *
- * @return bool
- */
- protected function matches($other)
- {
- return $this->value > $other;
- }
-
- /**
- * Returns a string representation of the constraint.
- *
- * @return string
- */
- public function toString()
- {
- return 'is less than ' . $this->exporter->export($this->value);
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Not.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Not.php
deleted file mode 100644
index 72e25484..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/Not.php
+++ /dev/null
@@ -1,160 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Logical NOT.
- *
- * @since Class available since Release 3.0.0
- */
-class PHPUnit_Framework_Constraint_Not extends PHPUnit_Framework_Constraint
-{
- /**
- * @var PHPUnit_Framework_Constraint
- */
- protected $constraint;
-
- /**
- * @param PHPUnit_Framework_Constraint $constraint
- */
- public function __construct($constraint)
- {
- parent::__construct();
-
- if (!($constraint instanceof PHPUnit_Framework_Constraint)) {
- $constraint = new PHPUnit_Framework_Constraint_IsEqual($constraint);
- }
-
- $this->constraint = $constraint;
- }
-
- /**
- * @param string $string
- *
- * @return string
- */
- public static function negate($string)
- {
- return str_replace(
- array(
- 'contains ',
- 'exists',
- 'has ',
- 'is ',
- 'are ',
- 'matches ',
- 'starts with ',
- 'ends with ',
- 'reference ',
- 'not not '
- ),
- array(
- 'does not contain ',
- 'does not exist',
- 'does not have ',
- 'is not ',
- 'are not ',
- 'does not match ',
- 'starts not with ',
- 'ends not with ',
- 'don\'t reference ',
- 'not '
- ),
- $string
- );
- }
-
- /**
- * Evaluates the constraint for parameter $other
- *
- * If $returnResult is set to false (the default), an exception is thrown
- * in case of a failure. null is returned otherwise.
- *
- * If $returnResult is true, the result of the evaluation is returned as
- * a boolean value instead: true in case of success, false in case of a
- * failure.
- *
- * @param mixed $other Value or object to evaluate.
- * @param string $description Additional information about the test
- * @param bool $returnResult Whether to return a result or throw an exception
- *
- * @return mixed
- *
- * @throws PHPUnit_Framework_ExpectationFailedException
- */
- public function evaluate($other, $description = '', $returnResult = false)
- {
- $success = !$this->constraint->evaluate($other, $description, true);
-
- if ($returnResult) {
- return $success;
- }
-
- if (!$success) {
- $this->fail($other, $description);
- }
- }
-
- /**
- * Returns the description of the failure
- *
- * The beginning of failure messages is "Failed asserting that" in most
- * cases. This method should return the second part of that sentence.
- *
- * @param mixed $other Evaluated value or object.
- *
- * @return string
- */
- protected function failureDescription($other)
- {
- switch (get_class($this->constraint)) {
- case 'PHPUnit_Framework_Constraint_And':
- case 'PHPUnit_Framework_Constraint_Not':
- case 'PHPUnit_Framework_Constraint_Or':
- return 'not( ' . $this->constraint->failureDescription($other) . ' )';
-
- default:
- return self::negate(
- $this->constraint->failureDescription($other)
- );
- }
- }
-
- /**
- * Returns a string representation of the constraint.
- *
- * @return string
- */
- public function toString()
- {
- switch (get_class($this->constraint)) {
- case 'PHPUnit_Framework_Constraint_And':
- case 'PHPUnit_Framework_Constraint_Not':
- case 'PHPUnit_Framework_Constraint_Or':
- return 'not( ' . $this->constraint->toString() . ' )';
-
- default:
- return self::negate(
- $this->constraint->toString()
- );
- }
- }
-
- /**
- * Counts the number of constraint elements.
- *
- * @return int
- *
- * @since Method available since Release 3.4.0
- */
- public function count()
- {
- return count($this->constraint);
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/ObjectHasAttribute.php b/vendor/phpunit/phpunit/src/Framework/Constraint/ObjectHasAttribute.php
deleted file mode 100644
index 700fbf48..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/ObjectHasAttribute.php
+++ /dev/null
@@ -1,35 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Constraint that asserts that the object it is evaluated for has a given
- * attribute.
- *
- * The attribute name is passed in the constructor.
- *
- * @since Class available since Release 3.0.0
- */
-class PHPUnit_Framework_Constraint_ObjectHasAttribute extends PHPUnit_Framework_Constraint_ClassHasAttribute
-{
- /**
- * Evaluates the constraint for parameter $other. Returns true if the
- * constraint is met, false otherwise.
- *
- * @param mixed $other Value or object to evaluate.
- *
- * @return bool
- */
- protected function matches($other)
- {
- $object = new ReflectionObject($other);
-
- return $object->hasProperty($this->attributeName);
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Or.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Or.php
deleted file mode 100644
index b2614564..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/Or.php
+++ /dev/null
@@ -1,117 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Logical OR.
- *
- * @since Class available since Release 3.0.0
- */
-class PHPUnit_Framework_Constraint_Or extends PHPUnit_Framework_Constraint
-{
- /**
- * @var PHPUnit_Framework_Constraint[]
- */
- protected $constraints = array();
-
- /**
- * @param PHPUnit_Framework_Constraint[] $constraints
- */
- public function setConstraints(array $constraints)
- {
- $this->constraints = array();
-
- foreach ($constraints as $constraint) {
- if (!($constraint instanceof PHPUnit_Framework_Constraint)) {
- $constraint = new PHPUnit_Framework_Constraint_IsEqual(
- $constraint
- );
- }
-
- $this->constraints[] = $constraint;
- }
- }
-
- /**
- * Evaluates the constraint for parameter $other
- *
- * If $returnResult is set to false (the default), an exception is thrown
- * in case of a failure. null is returned otherwise.
- *
- * If $returnResult is true, the result of the evaluation is returned as
- * a boolean value instead: true in case of success, false in case of a
- * failure.
- *
- * @param mixed $other Value or object to evaluate.
- * @param string $description Additional information about the test
- * @param bool $returnResult Whether to return a result or throw an exception
- *
- * @return mixed
- *
- * @throws PHPUnit_Framework_ExpectationFailedException
- */
- public function evaluate($other, $description = '', $returnResult = false)
- {
- $success = false;
- $constraint = null;
-
- foreach ($this->constraints as $constraint) {
- if ($constraint->evaluate($other, $description, true)) {
- $success = true;
- break;
- }
- }
-
- if ($returnResult) {
- return $success;
- }
-
- if (!$success) {
- $this->fail($other, $description);
- }
- }
-
- /**
- * Returns a string representation of the constraint.
- *
- * @return string
- */
- public function toString()
- {
- $text = '';
-
- foreach ($this->constraints as $key => $constraint) {
- if ($key > 0) {
- $text .= ' or ';
- }
-
- $text .= $constraint->toString();
- }
-
- return $text;
- }
-
- /**
- * Counts the number of constraint elements.
- *
- * @return int
- *
- * @since Method available since Release 3.4.0
- */
- public function count()
- {
- $count = 0;
-
- foreach ($this->constraints as $constraint) {
- $count += count($constraint);
- }
-
- return $count;
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/PCREMatch.php b/vendor/phpunit/phpunit/src/Framework/Constraint/PCREMatch.php
deleted file mode 100644
index fe1acc25..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/PCREMatch.php
+++ /dev/null
@@ -1,63 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Constraint that asserts that the string it is evaluated for matches
- * a regular expression.
- *
- * Checks a given value using the Perl Compatible Regular Expression extension
- * in PHP. The pattern is matched by executing preg_match().
- *
- * The pattern string passed in the constructor.
- *
- * @since Class available since Release 3.0.0
- */
-class PHPUnit_Framework_Constraint_PCREMatch extends PHPUnit_Framework_Constraint
-{
- /**
- * @var string
- */
- protected $pattern;
-
- /**
- * @param string $pattern
- */
- public function __construct($pattern)
- {
- parent::__construct();
- $this->pattern = $pattern;
- }
-
- /**
- * Evaluates the constraint for parameter $other. Returns true if the
- * constraint is met, false otherwise.
- *
- * @param mixed $other Value or object to evaluate.
- *
- * @return bool
- */
- protected function matches($other)
- {
- return preg_match($this->pattern, $other) > 0;
- }
-
- /**
- * Returns a string representation of the constraint.
- *
- * @return string
- */
- public function toString()
- {
- return sprintf(
- 'matches PCRE pattern "%s"',
- $this->pattern
- );
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/SameSize.php b/vendor/phpunit/phpunit/src/Framework/Constraint/SameSize.php
deleted file mode 100644
index e372c1a3..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/SameSize.php
+++ /dev/null
@@ -1,28 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 3.6.0
- */
-class PHPUnit_Framework_Constraint_SameSize extends PHPUnit_Framework_Constraint_Count
-{
- /**
- * @var int
- */
- protected $expectedCount;
-
- /**
- * @param int $expected
- */
- public function __construct($expected)
- {
- parent::__construct($this->getCountOf($expected));
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/StringContains.php b/vendor/phpunit/phpunit/src/Framework/Constraint/StringContains.php
deleted file mode 100644
index ee02bf4e..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/StringContains.php
+++ /dev/null
@@ -1,81 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Constraint that asserts that the string it is evaluated for contains
- * a given string.
- *
- * Uses strpos() to find the position of the string in the input, if not found
- * the evaluation fails.
- *
- * The sub-string is passed in the constructor.
- *
- * @since Class available since Release 3.0.0
- */
-class PHPUnit_Framework_Constraint_StringContains extends PHPUnit_Framework_Constraint
-{
- /**
- * @var string
- */
- protected $string;
-
- /**
- * @var bool
- */
- protected $ignoreCase;
-
- /**
- * @param string $string
- * @param bool $ignoreCase
- */
- public function __construct($string, $ignoreCase = false)
- {
- parent::__construct();
-
- $this->string = $string;
- $this->ignoreCase = $ignoreCase;
- }
-
- /**
- * Evaluates the constraint for parameter $other. Returns true if the
- * constraint is met, false otherwise.
- *
- * @param mixed $other Value or object to evaluate.
- *
- * @return bool
- */
- protected function matches($other)
- {
- if ($this->ignoreCase) {
- return stripos($other, $this->string) !== false;
- } else {
- return strpos($other, $this->string) !== false;
- }
- }
-
- /**
- * Returns a string representation of the constraint.
- *
- * @return string
- */
- public function toString()
- {
- if ($this->ignoreCase) {
- $string = strtolower($this->string);
- } else {
- $string = $this->string;
- }
-
- return sprintf(
- 'contains "%s"',
- $string
- );
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/StringEndsWith.php b/vendor/phpunit/phpunit/src/Framework/Constraint/StringEndsWith.php
deleted file mode 100644
index ebeb9217..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/StringEndsWith.php
+++ /dev/null
@@ -1,55 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Constraint that asserts that the string it is evaluated for ends with a given
- * suffix.
- *
- * @since Class available since Release 3.4.0
- */
-class PHPUnit_Framework_Constraint_StringEndsWith extends PHPUnit_Framework_Constraint
-{
- /**
- * @var string
- */
- protected $suffix;
-
- /**
- * @param string $suffix
- */
- public function __construct($suffix)
- {
- parent::__construct();
- $this->suffix = $suffix;
- }
-
- /**
- * Evaluates the constraint for parameter $other. Returns true if the
- * constraint is met, false otherwise.
- *
- * @param mixed $other Value or object to evaluate.
- *
- * @return bool
- */
- protected function matches($other)
- {
- return substr($other, 0 - strlen($this->suffix)) == $this->suffix;
- }
-
- /**
- * Returns a string representation of the constraint.
- *
- * @return string
- */
- public function toString()
- {
- return 'ends with "' . $this->suffix . '"';
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/StringMatches.php b/vendor/phpunit/phpunit/src/Framework/Constraint/StringMatches.php
deleted file mode 100644
index af42fc1d..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/StringMatches.php
+++ /dev/null
@@ -1,101 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-use SebastianBergmann\Diff\Differ;
-
-/**
- * ...
- *
- * @since Class available since Release 3.5.0
- */
-class PHPUnit_Framework_Constraint_StringMatches extends PHPUnit_Framework_Constraint_PCREMatch
-{
- /**
- * @var string
- */
- protected $string;
-
- /**
- * @param string $string
- */
- public function __construct($string)
- {
- parent::__construct($string);
-
- $this->pattern = $this->createPatternFromFormat(
- preg_replace('/\r\n/', "\n", $string)
- );
-
- $this->string = $string;
- }
-
- protected function failureDescription($other)
- {
- return 'format description matches text';
- }
-
- protected function additionalFailureDescription($other)
- {
- $from = preg_split('(\r\n|\r|\n)', $this->string);
- $to = preg_split('(\r\n|\r|\n)', $other);
-
- foreach ($from as $index => $line) {
- if (isset($to[$index]) && $line !== $to[$index]) {
- $line = $this->createPatternFromFormat($line);
-
- if (preg_match($line, $to[$index]) > 0) {
- $from[$index] = $to[$index];
- }
- }
- }
-
- $this->string = implode("\n", $from);
- $other = implode("\n", $to);
-
- $differ = new Differ("--- Expected\n+++ Actual\n");
-
- return $differ->diff($this->string, $other);
- }
-
- protected function createPatternFromFormat($string)
- {
- $string = str_replace(
- array(
- '%e',
- '%s',
- '%S',
- '%a',
- '%A',
- '%w',
- '%i',
- '%d',
- '%x',
- '%f',
- '%c'
- ),
- array(
- '\\' . DIRECTORY_SEPARATOR,
- '[^\r\n]+',
- '[^\r\n]*',
- '.+',
- '.*',
- '\s*',
- '[+-]?\d+',
- '\d+',
- '[0-9a-fA-F]+',
- '[+-]?\.?\d+\.?\d*(?:[Ee][+-]?\d+)?',
- '.'
- ),
- preg_quote($string, '/')
- );
-
- return '/^' . $string . '$/s';
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/StringStartsWith.php b/vendor/phpunit/phpunit/src/Framework/Constraint/StringStartsWith.php
deleted file mode 100644
index 9aee0116..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/StringStartsWith.php
+++ /dev/null
@@ -1,55 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Constraint that asserts that the string it is evaluated for begins with a
- * given prefix.
- *
- * @since Class available since Release 3.4.0
- */
-class PHPUnit_Framework_Constraint_StringStartsWith extends PHPUnit_Framework_Constraint
-{
- /**
- * @var string
- */
- protected $prefix;
-
- /**
- * @param string $prefix
- */
- public function __construct($prefix)
- {
- parent::__construct();
- $this->prefix = $prefix;
- }
-
- /**
- * Evaluates the constraint for parameter $other. Returns true if the
- * constraint is met, false otherwise.
- *
- * @param mixed $other Value or object to evaluate.
- *
- * @return bool
- */
- protected function matches($other)
- {
- return strpos($other, $this->prefix) === 0;
- }
-
- /**
- * Returns a string representation of the constraint.
- *
- * @return string
- */
- public function toString()
- {
- return 'starts with "' . $this->prefix . '"';
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/TraversableContains.php b/vendor/phpunit/phpunit/src/Framework/Constraint/TraversableContains.php
deleted file mode 100644
index 1903b1bd..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/TraversableContains.php
+++ /dev/null
@@ -1,125 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Constraint that asserts that the Traversable it is applied to contains
- * a given value.
- *
- * @since Class available since Release 3.0.0
- */
-class PHPUnit_Framework_Constraint_TraversableContains extends PHPUnit_Framework_Constraint
-{
- /**
- * @var bool
- */
- protected $checkForObjectIdentity;
-
- /**
- * @var bool
- */
- protected $checkForNonObjectIdentity;
-
- /**
- * @var mixed
- */
- protected $value;
-
- /**
- * @param mixed $value
- * @param bool $checkForObjectIdentity
- * @param bool $checkForNonObjectIdentity
- *
- * @throws PHPUnit_Framework_Exception
- */
- public function __construct($value, $checkForObjectIdentity = true, $checkForNonObjectIdentity = false)
- {
- parent::__construct();
-
- if (!is_bool($checkForObjectIdentity)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'boolean');
- }
-
- if (!is_bool($checkForNonObjectIdentity)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(3, 'boolean');
- }
-
- $this->checkForObjectIdentity = $checkForObjectIdentity;
- $this->checkForNonObjectIdentity = $checkForNonObjectIdentity;
- $this->value = $value;
- }
-
- /**
- * Evaluates the constraint for parameter $other. Returns true if the
- * constraint is met, false otherwise.
- *
- * @param mixed $other Value or object to evaluate.
- *
- * @return bool
- */
- protected function matches($other)
- {
- if ($other instanceof SplObjectStorage) {
- return $other->contains($this->value);
- }
-
- if (is_object($this->value)) {
- foreach ($other as $element) {
- if ($this->checkForObjectIdentity && $element === $this->value) {
- return true;
- } elseif (!$this->checkForObjectIdentity && $element == $this->value) {
- return true;
- }
- }
- } else {
- foreach ($other as $element) {
- if ($this->checkForNonObjectIdentity && $element === $this->value) {
- return true;
- } elseif (!$this->checkForNonObjectIdentity && $element == $this->value) {
- return true;
- }
- }
- }
-
- return false;
- }
-
- /**
- * Returns a string representation of the constraint.
- *
- * @return string
- */
- public function toString()
- {
- if (is_string($this->value) && strpos($this->value, "\n") !== false) {
- return 'contains "' . $this->value . '"';
- } else {
- return 'contains ' . $this->exporter->export($this->value);
- }
- }
-
- /**
- * Returns the description of the failure
- *
- * The beginning of failure messages is "Failed asserting that" in most
- * cases. This method should return the second part of that sentence.
- *
- * @param mixed $other Evaluated value or object.
- *
- * @return string
- */
- protected function failureDescription($other)
- {
- return sprintf(
- '%s %s',
- is_array($other) ? 'an array' : 'a traversable',
- $this->toString()
- );
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/TraversableContainsOnly.php b/vendor/phpunit/phpunit/src/Framework/Constraint/TraversableContainsOnly.php
deleted file mode 100644
index 1397b033..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/TraversableContainsOnly.php
+++ /dev/null
@@ -1,95 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Constraint that asserts that the Traversable it is applied to contains
- * only values of a given type.
- *
- * @since Class available since Release 3.1.4
- */
-class PHPUnit_Framework_Constraint_TraversableContainsOnly extends PHPUnit_Framework_Constraint
-{
- /**
- * @var PHPUnit_Framework_Constraint
- */
- protected $constraint;
-
- /**
- * @var string
- */
- protected $type;
-
- /**
- * @param string $type
- * @param bool $isNativeType
- */
- public function __construct($type, $isNativeType = true)
- {
- parent::__construct();
-
- if ($isNativeType) {
- $this->constraint = new PHPUnit_Framework_Constraint_IsType($type);
- } else {
- $this->constraint = new PHPUnit_Framework_Constraint_IsInstanceOf(
- $type
- );
- }
-
- $this->type = $type;
- }
-
- /**
- * Evaluates the constraint for parameter $other
- *
- * If $returnResult is set to false (the default), an exception is thrown
- * in case of a failure. null is returned otherwise.
- *
- * If $returnResult is true, the result of the evaluation is returned as
- * a boolean value instead: true in case of success, false in case of a
- * failure.
- *
- * @param mixed $other Value or object to evaluate.
- * @param string $description Additional information about the test
- * @param bool $returnResult Whether to return a result or throw an exception
- *
- * @return mixed
- *
- * @throws PHPUnit_Framework_ExpectationFailedException
- */
- public function evaluate($other, $description = '', $returnResult = false)
- {
- $success = true;
-
- foreach ($other as $item) {
- if (!$this->constraint->evaluate($item, '', true)) {
- $success = false;
- break;
- }
- }
-
- if ($returnResult) {
- return $success;
- }
-
- if (!$success) {
- $this->fail($other, $description);
- }
- }
-
- /**
- * Returns a string representation of the constraint.
- *
- * @return string
- */
- public function toString()
- {
- return 'contains only values of type "' . $this->type . '"';
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Xor.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Xor.php
deleted file mode 100644
index 79ecbfdb..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Constraint/Xor.php
+++ /dev/null
@@ -1,122 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Logical XOR.
- *
- * @since Class available since Release 3.0.0
- */
-class PHPUnit_Framework_Constraint_Xor extends PHPUnit_Framework_Constraint
-{
- /**
- * @var PHPUnit_Framework_Constraint[]
- */
- protected $constraints = array();
-
- /**
- * @param PHPUnit_Framework_Constraint[] $constraints
- */
- public function setConstraints(array $constraints)
- {
- $this->constraints = array();
-
- foreach ($constraints as $constraint) {
- if (!($constraint instanceof PHPUnit_Framework_Constraint)) {
- $constraint = new PHPUnit_Framework_Constraint_IsEqual(
- $constraint
- );
- }
-
- $this->constraints[] = $constraint;
- }
- }
-
- /**
- * Evaluates the constraint for parameter $other
- *
- * If $returnResult is set to false (the default), an exception is thrown
- * in case of a failure. null is returned otherwise.
- *
- * If $returnResult is true, the result of the evaluation is returned as
- * a boolean value instead: true in case of success, false in case of a
- * failure.
- *
- * @param mixed $other Value or object to evaluate.
- * @param string $description Additional information about the test
- * @param bool $returnResult Whether to return a result or throw an exception
- *
- * @return mixed
- *
- * @throws PHPUnit_Framework_ExpectationFailedException
- */
- public function evaluate($other, $description = '', $returnResult = false)
- {
- $success = true;
- $lastResult = null;
- $constraint = null;
-
- foreach ($this->constraints as $constraint) {
- $result = $constraint->evaluate($other, $description, true);
-
- if ($result === $lastResult) {
- $success = false;
- break;
- }
-
- $lastResult = $result;
- }
-
- if ($returnResult) {
- return $success;
- }
-
- if (!$success) {
- $this->fail($other, $description);
- }
- }
-
- /**
- * Returns a string representation of the constraint.
- *
- * @return string
- */
- public function toString()
- {
- $text = '';
-
- foreach ($this->constraints as $key => $constraint) {
- if ($key > 0) {
- $text .= ' xor ';
- }
-
- $text .= $constraint->toString();
- }
-
- return $text;
- }
-
- /**
- * Counts the number of constraint elements.
- *
- * @return int
- *
- * @since Method available since Release 3.4.0
- */
- public function count()
- {
- $count = 0;
-
- foreach ($this->constraints as $constraint) {
- $count += count($constraint);
- }
-
- return $count;
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Error.php b/vendor/phpunit/phpunit/src/Framework/Error.php
deleted file mode 100644
index 9e793fdd..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Error.php
+++ /dev/null
@@ -1,34 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Wrapper for PHP errors.
- *
- * @since Class available since Release 2.2.0
- */
-class PHPUnit_Framework_Error extends PHPUnit_Framework_Exception
-{
- /**
- * Constructor.
- *
- * @param string $message
- * @param int $code
- * @param string $file
- * @param int $line
- * @param Exception $previous
- */
- public function __construct($message, $code, $file, $line, Exception $previous = null)
- {
- parent::__construct($message, $code, $previous);
-
- $this->file = $file;
- $this->line = $line;
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Error/Deprecated.php b/vendor/phpunit/phpunit/src/Framework/Error/Deprecated.php
deleted file mode 100644
index 2ab5598a..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Error/Deprecated.php
+++ /dev/null
@@ -1,24 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Wrapper for PHP deprecated errors.
- * You can disable deprecated-to-exception conversion by setting
- *
- *
- * PHPUnit_Framework_Error_Deprecated::$enabled = false;
- *
- *
- * @since Class available since Release 3.3.0
- */
-class PHPUnit_Framework_Error_Deprecated extends PHPUnit_Framework_Error
-{
- public static $enabled = true;
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Error/Notice.php b/vendor/phpunit/phpunit/src/Framework/Error/Notice.php
deleted file mode 100644
index 477ad932..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Error/Notice.php
+++ /dev/null
@@ -1,24 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Wrapper for PHP notices.
- * You can disable notice-to-exception conversion by setting
- *
- *
- * PHPUnit_Framework_Error_Notice::$enabled = false;
- *
- *
- * @since Class available since Release 3.3.0
- */
-class PHPUnit_Framework_Error_Notice extends PHPUnit_Framework_Error
-{
- public static $enabled = true;
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Error/Warning.php b/vendor/phpunit/phpunit/src/Framework/Error/Warning.php
deleted file mode 100644
index 9240bcb7..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Error/Warning.php
+++ /dev/null
@@ -1,24 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Wrapper for PHP warnings.
- * You can disable notice-to-exception conversion by setting
- *
- *
- * PHPUnit_Framework_Error_Warning::$enabled = false;
- *
- *
- * @since Class available since Release 3.3.0
- */
-class PHPUnit_Framework_Error_Warning extends PHPUnit_Framework_Error
-{
- public static $enabled = true;
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Exception.php b/vendor/phpunit/phpunit/src/Framework/Exception.php
deleted file mode 100644
index 715c55e4..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Exception.php
+++ /dev/null
@@ -1,77 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Base class for all PHPUnit Framework exceptions.
- *
- * Ensures that exceptions thrown during a test run do not leave stray
- * references behind.
- *
- * Every Exception contains a stack trace. Each stack frame contains the 'args'
- * of the called function. The function arguments can contain references to
- * instantiated objects. The references prevent the objects from being
- * destructed (until test results are eventually printed), so memory cannot be
- * freed up.
- *
- * With enabled process isolation, test results are serialized in the child
- * process and unserialized in the parent process. The stack trace of Exceptions
- * may contain objects that cannot be serialized or unserialized (e.g., PDO
- * connections). Unserializing user-space objects from the child process into
- * the parent would break the intended encapsulation of process isolation.
- *
- * @see http://fabien.potencier.org/article/9/php-serialization-stack-traces-and-exceptions
- * @since Class available since Release 3.4.0
- */
-class PHPUnit_Framework_Exception extends RuntimeException implements PHPUnit_Exception
-{
- /**
- * @var array
- */
- protected $serializableTrace;
-
- public function __construct($message = '', $code = 0, Exception $previous = null)
- {
- parent::__construct($message, $code, $previous);
-
- $this->serializableTrace = $this->getTrace();
- foreach ($this->serializableTrace as $i => $call) {
- unset($this->serializableTrace[$i]['args']);
- }
- }
-
- /**
- * Returns the serializable trace (without 'args').
- *
- * @return array
- */
- public function getSerializableTrace()
- {
- return $this->serializableTrace;
- }
-
- /**
- * @return string
- */
- public function __toString()
- {
- $string = PHPUnit_Framework_TestFailure::exceptionToString($this);
-
- if ($trace = PHPUnit_Util_Filter::getFilteredStacktrace($this)) {
- $string .= "\n" . $trace;
- }
-
- return $string;
- }
-
- public function __sleep()
- {
- return array_keys(get_object_vars($this));
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/ExceptionWrapper.php b/vendor/phpunit/phpunit/src/Framework/ExceptionWrapper.php
deleted file mode 100644
index fa3e9ee1..00000000
--- a/vendor/phpunit/phpunit/src/Framework/ExceptionWrapper.php
+++ /dev/null
@@ -1,91 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Wraps Exceptions thrown by code under test.
- *
- * Re-instantiates Exceptions thrown by user-space code to retain their original
- * class names, properties, and stack traces (but without arguments).
- *
- * Unlike PHPUnit_Framework_Exception, the complete stack of previous Exceptions
- * is processed.
- *
- * @since Class available since Release 4.3.0
- */
-class PHPUnit_Framework_ExceptionWrapper extends PHPUnit_Framework_Exception
-{
- /**
- * @var string
- */
- protected $classname;
-
- /**
- * @var PHPUnit_Framework_ExceptionWrapper|null
- */
- protected $previous;
-
- /**
- * @param Throwable|Exception $e
- */
- public function __construct($e)
- {
- // PDOException::getCode() is a string.
- // @see http://php.net/manual/en/class.pdoexception.php#95812
- parent::__construct($e->getMessage(), (int) $e->getCode());
-
- $this->classname = get_class($e);
- $this->file = $e->getFile();
- $this->line = $e->getLine();
-
- $this->serializableTrace = $e->getTrace();
-
- foreach ($this->serializableTrace as $i => $call) {
- unset($this->serializableTrace[$i]['args']);
- }
-
- if ($e->getPrevious()) {
- $this->previous = new self($e->getPrevious());
- }
- }
-
- /**
- * @return string
- */
- public function getClassname()
- {
- return $this->classname;
- }
-
- /**
- * @return PHPUnit_Framework_ExceptionWrapper
- */
- public function getPreviousWrapped()
- {
- return $this->previous;
- }
-
- /**
- * @return string
- */
- public function __toString()
- {
- $string = PHPUnit_Framework_TestFailure::exceptionToString($this);
-
- if ($trace = PHPUnit_Util_Filter::getFilteredStacktrace($this)) {
- $string .= "\n" . $trace;
- }
-
- if ($this->previous) {
- $string .= "\nCaused by\n" . $this->previous;
- }
-
- return $string;
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/ExpectationFailedException.php b/vendor/phpunit/phpunit/src/Framework/ExpectationFailedException.php
deleted file mode 100644
index 60229a90..00000000
--- a/vendor/phpunit/phpunit/src/Framework/ExpectationFailedException.php
+++ /dev/null
@@ -1,41 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Exception for expectations which failed their check.
- *
- * The exception contains the error message and optionally a
- * SebastianBergmann\Comparator\ComparisonFailure which is used to
- * generate diff output of the failed expectations.
- *
- * @since Class available since Release 3.0.0
- */
-class PHPUnit_Framework_ExpectationFailedException extends PHPUnit_Framework_AssertionFailedError
-{
- /**
- * @var SebastianBergmann\Comparator\ComparisonFailure
- */
- protected $comparisonFailure;
-
- public function __construct($message, SebastianBergmann\Comparator\ComparisonFailure $comparisonFailure = null, Exception $previous = null)
- {
- $this->comparisonFailure = $comparisonFailure;
-
- parent::__construct($message, 0, $previous);
- }
-
- /**
- * @return SebastianBergmann\Comparator\ComparisonFailure
- */
- public function getComparisonFailure()
- {
- return $this->comparisonFailure;
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/IncompleteTest.php b/vendor/phpunit/phpunit/src/Framework/IncompleteTest.php
deleted file mode 100644
index 5bfeba76..00000000
--- a/vendor/phpunit/phpunit/src/Framework/IncompleteTest.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * A marker interface for marking any exception/error as result of an unit
- * test as incomplete implementation or currently not implemented.
- *
- * @since Interface available since Release 2.0.0
- */
-interface PHPUnit_Framework_IncompleteTest
-{
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/IncompleteTestCase.php b/vendor/phpunit/phpunit/src/Framework/IncompleteTestCase.php
deleted file mode 100644
index b2f393e3..00000000
--- a/vendor/phpunit/phpunit/src/Framework/IncompleteTestCase.php
+++ /dev/null
@@ -1,84 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * An incomplete test case
- *
- * @since Class available since Release 4.3.0
- */
-class PHPUnit_Framework_IncompleteTestCase extends PHPUnit_Framework_TestCase
-{
- /**
- * @var string
- */
- protected $message = '';
-
- /**
- * @var bool
- */
- protected $backupGlobals = false;
-
- /**
- * @var bool
- */
- protected $backupStaticAttributes = false;
-
- /**
- * @var bool
- */
- protected $runTestInSeparateProcess = false;
-
- /**
- * @var bool
- */
- protected $useErrorHandler = false;
-
- /**
- * @var bool
- */
- protected $useOutputBuffering = false;
-
- /**
- * @param string $className
- * @param string $methodName
- * @param string $message
- */
- public function __construct($className, $methodName, $message = '')
- {
- $this->message = $message;
- parent::__construct($className . '::' . $methodName);
- }
-
- /**
- * @throws PHPUnit_Framework_Exception
- */
- protected function runTest()
- {
- $this->markTestIncomplete($this->message);
- }
-
- /**
- * @return string
- */
- public function getMessage()
- {
- return $this->message;
- }
-
- /**
- * Returns a string representation of the test case.
- *
- * @return string
- */
- public function toString()
- {
- return $this->getName();
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/IncompleteTestError.php b/vendor/phpunit/phpunit/src/Framework/IncompleteTestError.php
deleted file mode 100644
index 03ffd2f8..00000000
--- a/vendor/phpunit/phpunit/src/Framework/IncompleteTestError.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Extension to PHPUnit_Framework_AssertionFailedError to mark the special
- * case of an incomplete test.
- *
- * @since Class available since Release 2.0.0
- */
-class PHPUnit_Framework_IncompleteTestError extends PHPUnit_Framework_AssertionFailedError implements PHPUnit_Framework_IncompleteTest
-{
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/InvalidCoversTargetError.php b/vendor/phpunit/phpunit/src/Framework/InvalidCoversTargetError.php
deleted file mode 100644
index a363ce1d..00000000
--- a/vendor/phpunit/phpunit/src/Framework/InvalidCoversTargetError.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Extension to PHPUnit_Framework_AssertionFailedError to mark the special
- * case of a test that is skipped because of an invalid @covers annotation.
- *
- * @since Class available since Release 4.0.0
- */
-class PHPUnit_Framework_InvalidCoversTargetError extends PHPUnit_Framework_AssertionFailedError implements PHPUnit_Framework_SkippedTest
-{
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/InvalidCoversTargetException.php b/vendor/phpunit/phpunit/src/Framework/InvalidCoversTargetException.php
deleted file mode 100644
index 324c76d3..00000000
--- a/vendor/phpunit/phpunit/src/Framework/InvalidCoversTargetException.php
+++ /dev/null
@@ -1,16 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 4.0.0
- */
-class PHPUnit_Framework_InvalidCoversTargetException extends PHPUnit_Framework_CodeCoverageException
-{
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/OutputError.php b/vendor/phpunit/phpunit/src/Framework/OutputError.php
deleted file mode 100644
index c3f5dcc7..00000000
--- a/vendor/phpunit/phpunit/src/Framework/OutputError.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Extension to PHPUnit_Framework_AssertionFailedError to mark the special
- * case of a test that printed output.
- *
- * @since Class available since Release 3.6.0
- */
-class PHPUnit_Framework_OutputError extends PHPUnit_Framework_AssertionFailedError
-{
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/RiskyTest.php b/vendor/phpunit/phpunit/src/Framework/RiskyTest.php
deleted file mode 100644
index d476eeda..00000000
--- a/vendor/phpunit/phpunit/src/Framework/RiskyTest.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * A marker interface for marking any exception/error as result of an unit
- * test as risky.
- *
- * @since Interface available since Release 4.0.0
- */
-interface PHPUnit_Framework_RiskyTest
-{
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/RiskyTestError.php b/vendor/phpunit/phpunit/src/Framework/RiskyTestError.php
deleted file mode 100644
index 781a50cb..00000000
--- a/vendor/phpunit/phpunit/src/Framework/RiskyTestError.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Extension to PHPUnit_Framework_AssertionFailedError to mark the special
- * case of a risky test.
- *
- * @since Class available since Release 4.0.0
- */
-class PHPUnit_Framework_RiskyTestError extends PHPUnit_Framework_AssertionFailedError implements PHPUnit_Framework_RiskyTest
-{
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/SelfDescribing.php b/vendor/phpunit/phpunit/src/Framework/SelfDescribing.php
deleted file mode 100644
index 9daffad3..00000000
--- a/vendor/phpunit/phpunit/src/Framework/SelfDescribing.php
+++ /dev/null
@@ -1,24 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Interface for classes that can return a description of itself.
- *
- * @since Interface available since Release 3.0.0
- */
-interface PHPUnit_Framework_SelfDescribing
-{
- /**
- * Returns a string representation of the object.
- *
- * @return string
- */
- public function toString();
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/SkippedTest.php b/vendor/phpunit/phpunit/src/Framework/SkippedTest.php
deleted file mode 100644
index bc9876a0..00000000
--- a/vendor/phpunit/phpunit/src/Framework/SkippedTest.php
+++ /dev/null
@@ -1,18 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * A marker interface for marking a unit test as being skipped.
- *
- * @since Interface available since Release 3.0.0
- */
-interface PHPUnit_Framework_SkippedTest
-{
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/SkippedTestCase.php b/vendor/phpunit/phpunit/src/Framework/SkippedTestCase.php
deleted file mode 100644
index 8a841dfd..00000000
--- a/vendor/phpunit/phpunit/src/Framework/SkippedTestCase.php
+++ /dev/null
@@ -1,82 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * A skipped test case
- *
- * @since Class available since Release 4.3.0
- */
-class PHPUnit_Framework_SkippedTestCase extends PHPUnit_Framework_TestCase
-{
- /**
- * @var string
- */
- protected $message = '';
-
- /**
- * @var bool
- */
- protected $backupGlobals = false;
-
- /**
- * @var bool
- */
- protected $backupStaticAttributes = false;
-
- /**
- * @var bool
- */
- protected $runTestInSeparateProcess = false;
-
- /**
- * @var bool
- */
- protected $useErrorHandler = false;
-
- /**
- * @var bool
- */
- protected $useOutputBuffering = false;
-
- /**
- * @param string $message
- */
- public function __construct($className, $methodName, $message = '')
- {
- $this->message = $message;
- parent::__construct($className . '::' . $methodName);
- }
-
- /**
- * @throws PHPUnit_Framework_Exception
- */
- protected function runTest()
- {
- $this->markTestSkipped($this->message);
- }
-
- /**
- * @return string
- */
- public function getMessage()
- {
- return $this->message;
- }
-
- /**
- * Returns a string representation of the test case.
- *
- * @return string
- */
- public function toString()
- {
- return $this->getName();
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/SkippedTestError.php b/vendor/phpunit/phpunit/src/Framework/SkippedTestError.php
deleted file mode 100644
index d8df860a..00000000
--- a/vendor/phpunit/phpunit/src/Framework/SkippedTestError.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Extension to PHPUnit_Framework_AssertionFailedError to mark the special
- * case of a skipped test.
- *
- * @since Class available since Release 3.0.0
- */
-class PHPUnit_Framework_SkippedTestError extends PHPUnit_Framework_AssertionFailedError implements PHPUnit_Framework_SkippedTest
-{
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/SkippedTestSuiteError.php b/vendor/phpunit/phpunit/src/Framework/SkippedTestSuiteError.php
deleted file mode 100644
index a57620bc..00000000
--- a/vendor/phpunit/phpunit/src/Framework/SkippedTestSuiteError.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Extension to PHPUnit_Framework_AssertionFailedError to mark the special
- * case of a skipped test suite.
- *
- * @since Class available since Release 3.1.0
- */
-class PHPUnit_Framework_SkippedTestSuiteError extends PHPUnit_Framework_AssertionFailedError implements PHPUnit_Framework_SkippedTest
-{
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/SyntheticError.php b/vendor/phpunit/phpunit/src/Framework/SyntheticError.php
deleted file mode 100644
index 235b046f..00000000
--- a/vendor/phpunit/phpunit/src/Framework/SyntheticError.php
+++ /dev/null
@@ -1,80 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Creates a synthetic failed assertion.
- *
- * @since Class available since Release 3.5.0
- */
-class PHPUnit_Framework_SyntheticError extends PHPUnit_Framework_AssertionFailedError
-{
- /**
- * The synthetic file.
- *
- * @var string
- */
- protected $syntheticFile = '';
-
- /**
- * The synthetic line number.
- *
- * @var int
- */
- protected $syntheticLine = 0;
-
- /**
- * The synthetic trace.
- *
- * @var array
- */
- protected $syntheticTrace = array();
-
- /**
- * Constructor.
- *
- * @param string $message
- * @param int $code
- * @param string $file
- * @param int $line
- * @param array $trace
- */
- public function __construct($message, $code, $file, $line, $trace)
- {
- parent::__construct($message, $code);
-
- $this->syntheticFile = $file;
- $this->syntheticLine = $line;
- $this->syntheticTrace = $trace;
- }
-
- /**
- * @return string
- */
- public function getSyntheticFile()
- {
- return $this->syntheticFile;
- }
-
- /**
- * @return int
- */
- public function getSyntheticLine()
- {
- return $this->syntheticLine;
- }
-
- /**
- * @return array
- */
- public function getSyntheticTrace()
- {
- return $this->syntheticTrace;
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Test.php b/vendor/phpunit/phpunit/src/Framework/Test.php
deleted file mode 100644
index 4ad11afa..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Test.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * A Test can be run and collect its results.
- *
- * @since Interface available since Release 2.0.0
- */
-interface PHPUnit_Framework_Test extends Countable
-{
- /**
- * Runs a test and collects its result in a TestResult instance.
- *
- * @param PHPUnit_Framework_TestResult $result
- *
- * @return PHPUnit_Framework_TestResult
- */
- public function run(PHPUnit_Framework_TestResult $result = null);
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/TestCase.php b/vendor/phpunit/phpunit/src/Framework/TestCase.php
deleted file mode 100644
index 638f4251..00000000
--- a/vendor/phpunit/phpunit/src/Framework/TestCase.php
+++ /dev/null
@@ -1,2206 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-use SebastianBergmann\GlobalState\Snapshot;
-use SebastianBergmann\GlobalState\Restorer;
-use SebastianBergmann\GlobalState\Blacklist;
-use SebastianBergmann\Diff\Differ;
-use SebastianBergmann\Exporter\Exporter;
-use Prophecy\Exception\Prediction\PredictionException;
-use Prophecy\Prophet;
-
-/**
- * A TestCase defines the fixture to run multiple tests.
- *
- * To define a TestCase
- *
- * 1) Implement a subclass of PHPUnit_Framework_TestCase.
- * 2) Define instance variables that store the state of the fixture.
- * 3) Initialize the fixture state by overriding setUp().
- * 4) Clean-up after a test by overriding tearDown().
- *
- * Each test runs in its own fixture so there can be no side effects
- * among test runs.
- *
- * Here is an example:
- *
- *
- * value1 = 2;
- * $this->value2 = 3;
- * }
- * }
- * ?>
- *
- *
- * For each test implement a method which interacts with the fixture.
- * Verify the expected results with assertions specified by calling
- * assert with a boolean.
- *
- *
- * assertTrue($this->value1 + $this->value2 == 5);
- * }
- * ?>
- *
- *
- * @since Class available since Release 2.0.0
- */
-abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert implements PHPUnit_Framework_Test, PHPUnit_Framework_SelfDescribing
-{
- /**
- * Enable or disable the backup and restoration of the $GLOBALS array.
- * Overwrite this attribute in a child class of TestCase.
- * Setting this attribute in setUp() has no effect!
- *
- * @var bool
- */
- protected $backupGlobals = null;
-
- /**
- * @var array
- */
- protected $backupGlobalsBlacklist = array();
-
- /**
- * Enable or disable the backup and restoration of static attributes.
- * Overwrite this attribute in a child class of TestCase.
- * Setting this attribute in setUp() has no effect!
- *
- * @var bool
- */
- protected $backupStaticAttributes = null;
-
- /**
- * @var array
- */
- protected $backupStaticAttributesBlacklist = array();
-
- /**
- * Whether or not this test is to be run in a separate PHP process.
- *
- * @var bool
- */
- protected $runTestInSeparateProcess = null;
-
- /**
- * Whether or not this test should preserve the global state when
- * running in a separate PHP process.
- *
- * @var bool
- */
- protected $preserveGlobalState = true;
-
- /**
- * Whether or not this test is running in a separate PHP process.
- *
- * @var bool
- */
- private $inIsolation = false;
-
- /**
- * @var array
- */
- private $data = array();
-
- /**
- * @var string
- */
- private $dataName = '';
-
- /**
- * @var bool
- */
- private $useErrorHandler = null;
-
- /**
- * The name of the expected Exception.
- *
- * @var mixed
- */
- private $expectedException = null;
-
- /**
- * The message of the expected Exception.
- *
- * @var string
- */
- private $expectedExceptionMessage = '';
-
- /**
- * The regex pattern to validate the expected Exception message.
- *
- * @var string
- */
- private $expectedExceptionMessageRegExp = '';
-
- /**
- * The code of the expected Exception.
- *
- * @var int
- */
- private $expectedExceptionCode;
-
- /**
- * The name of the test case.
- *
- * @var string
- */
- private $name = null;
-
- /**
- * @var array
- */
- private $dependencies = array();
-
- /**
- * @var array
- */
- private $dependencyInput = array();
-
- /**
- * @var array
- */
- private $iniSettings = array();
-
- /**
- * @var array
- */
- private $locale = array();
-
- /**
- * @var array
- */
- private $mockObjects = array();
-
- /**
- * @var array
- */
- private $mockObjectGenerator = null;
-
- /**
- * @var int
- */
- private $status;
-
- /**
- * @var string
- */
- private $statusMessage = '';
-
- /**
- * @var int
- */
- private $numAssertions = 0;
-
- /**
- * @var PHPUnit_Framework_TestResult
- */
- private $result;
-
- /**
- * @var mixed
- */
- private $testResult;
-
- /**
- * @var string
- */
- private $output = '';
-
- /**
- * @var string
- */
- private $outputExpectedRegex = null;
-
- /**
- * @var string
- */
- private $outputExpectedString = null;
-
- /**
- * @var mixed
- */
- private $outputCallback = false;
-
- /**
- * @var bool
- */
- private $outputBufferingActive = false;
-
- /**
- * @var int
- */
- private $outputBufferingLevel;
-
- /**
- * @var SebastianBergmann\GlobalState\Snapshot
- */
- private $snapshot;
-
- /**
- * @var Prophecy\Prophet
- */
- private $prophet;
-
- /**
- * @var bool
- */
- private $disallowChangesToGlobalState = false;
-
- /**
- * Constructs a test case with the given name.
- *
- * @param string $name
- * @param array $data
- * @param string $dataName
- */
- public function __construct($name = null, array $data = array(), $dataName = '')
- {
- if ($name !== null) {
- $this->setName($name);
- }
-
- $this->data = $data;
- $this->dataName = $dataName;
- }
-
- /**
- * Returns a string representation of the test case.
- *
- * @return string
- */
- public function toString()
- {
- $class = new ReflectionClass($this);
-
- $buffer = sprintf(
- '%s::%s',
- $class->name,
- $this->getName(false)
- );
-
- return $buffer . $this->getDataSetAsString();
- }
-
- /**
- * Counts the number of test cases executed by run(TestResult result).
- *
- * @return int
- */
- public function count()
- {
- return 1;
- }
-
- /**
- * Returns the annotations for this test.
- *
- * @return array
- *
- * @since Method available since Release 3.4.0
- */
- public function getAnnotations()
- {
- return PHPUnit_Util_Test::parseTestMethodAnnotations(
- get_class($this),
- $this->name
- );
- }
-
- /**
- * Gets the name of a TestCase.
- *
- * @param bool $withDataSet
- *
- * @return string
- */
- public function getName($withDataSet = true)
- {
- if ($withDataSet) {
- return $this->name . $this->getDataSetAsString(false);
- } else {
- return $this->name;
- }
- }
-
- /**
- * Returns the size of the test.
- *
- * @return int
- *
- * @since Method available since Release 3.6.0
- */
- public function getSize()
- {
- return PHPUnit_Util_Test::getSize(
- get_class($this),
- $this->getName(false)
- );
- }
-
- /**
- * @return string
- *
- * @since Method available since Release 3.6.0
- */
- public function getActualOutput()
- {
- if (!$this->outputBufferingActive) {
- return $this->output;
- } else {
- return ob_get_contents();
- }
- }
-
- /**
- * @return bool
- *
- * @since Method available since Release 3.6.0
- */
- public function hasOutput()
- {
- if (strlen($this->output) === 0) {
- return false;
- }
-
- if ($this->hasExpectationOnOutput()) {
- return false;
- }
-
- return true;
- }
-
- /**
- * @param string $expectedRegex
- *
- * @since Method available since Release 3.6.0
- *
- * @throws PHPUnit_Framework_Exception
- */
- public function expectOutputRegex($expectedRegex)
- {
- if ($this->outputExpectedString !== null) {
- throw new PHPUnit_Framework_Exception;
- }
-
- if (is_string($expectedRegex) || is_null($expectedRegex)) {
- $this->outputExpectedRegex = $expectedRegex;
- }
- }
-
- /**
- * @param string $expectedString
- *
- * @since Method available since Release 3.6.0
- */
- public function expectOutputString($expectedString)
- {
- if ($this->outputExpectedRegex !== null) {
- throw new PHPUnit_Framework_Exception;
- }
-
- if (is_string($expectedString) || is_null($expectedString)) {
- $this->outputExpectedString = $expectedString;
- }
- }
-
- /**
- * @return bool
- *
- * @since Method available since Release 3.6.5
- * @deprecated
- */
- public function hasPerformedExpectationsOnOutput()
- {
- return $this->hasExpectationOnOutput();
- }
-
- /**
- * @return bool
- *
- * @since Method available since Release 4.3.3
- */
- public function hasExpectationOnOutput()
- {
- return is_string($this->outputExpectedString) || is_string($this->outputExpectedRegex);
- }
-
- /**
- * @return string
- *
- * @since Method available since Release 3.2.0
- */
- public function getExpectedException()
- {
- return $this->expectedException;
- }
-
- /**
- * @param mixed $exceptionName
- * @param string $exceptionMessage
- * @param int $exceptionCode
- *
- * @since Method available since Release 3.2.0
- */
- public function setExpectedException($exceptionName, $exceptionMessage = '', $exceptionCode = null)
- {
- $this->expectedException = $exceptionName;
- $this->expectedExceptionMessage = $exceptionMessage;
- $this->expectedExceptionCode = $exceptionCode;
- }
-
- /**
- * @param mixed $exceptionName
- * @param string $exceptionMessageRegExp
- * @param int $exceptionCode
- *
- * @since Method available since Release 4.3.0
- */
- public function setExpectedExceptionRegExp($exceptionName, $exceptionMessageRegExp = '', $exceptionCode = null)
- {
- $this->expectedException = $exceptionName;
- $this->expectedExceptionMessageRegExp = $exceptionMessageRegExp;
- $this->expectedExceptionCode = $exceptionCode;
- }
-
- /**
- * @since Method available since Release 3.4.0
- */
- protected function setExpectedExceptionFromAnnotation()
- {
- try {
- $expectedException = PHPUnit_Util_Test::getExpectedException(
- get_class($this),
- $this->name
- );
-
- if ($expectedException !== false) {
- $this->setExpectedException(
- $expectedException['class'],
- $expectedException['message'],
- $expectedException['code']
- );
-
- if (!empty($expectedException['message_regex'])) {
- $this->setExpectedExceptionRegExp(
- $expectedException['class'],
- $expectedException['message_regex'],
- $expectedException['code']
- );
- }
- }
- } catch (ReflectionException $e) {
- }
- }
-
- /**
- * @param bool $useErrorHandler
- *
- * @since Method available since Release 3.4.0
- */
- public function setUseErrorHandler($useErrorHandler)
- {
- $this->useErrorHandler = $useErrorHandler;
- }
-
- /**
- * @since Method available since Release 3.4.0
- */
- protected function setUseErrorHandlerFromAnnotation()
- {
- try {
- $useErrorHandler = PHPUnit_Util_Test::getErrorHandlerSettings(
- get_class($this),
- $this->name
- );
-
- if ($useErrorHandler !== null) {
- $this->setUseErrorHandler($useErrorHandler);
- }
- } catch (ReflectionException $e) {
- }
- }
-
- /**
- * @since Method available since Release 3.6.0
- */
- protected function checkRequirements()
- {
- if (!$this->name || !method_exists($this, $this->name)) {
- return;
- }
-
- $missingRequirements = PHPUnit_Util_Test::getMissingRequirements(
- get_class($this),
- $this->name
- );
-
- if (!empty($missingRequirements)) {
- $this->markTestSkipped(implode(PHP_EOL, $missingRequirements));
- }
- }
-
- /**
- * Returns the status of this test.
- *
- * @return int
- *
- * @since Method available since Release 3.1.0
- */
- public function getStatus()
- {
- return $this->status;
- }
-
- /**
- * Returns the status message of this test.
- *
- * @return string
- *
- * @since Method available since Release 3.3.0
- */
- public function getStatusMessage()
- {
- return $this->statusMessage;
- }
-
- /**
- * Returns whether or not this test has failed.
- *
- * @return bool
- *
- * @since Method available since Release 3.0.0
- */
- public function hasFailed()
- {
- $status = $this->getStatus();
-
- return $status == PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE ||
- $status == PHPUnit_Runner_BaseTestRunner::STATUS_ERROR;
- }
-
- /**
- * Runs the test case and collects the results in a TestResult object.
- * If no TestResult object is passed a new one will be created.
- *
- * @param PHPUnit_Framework_TestResult $result
- *
- * @return PHPUnit_Framework_TestResult
- *
- * @throws PHPUnit_Framework_Exception
- */
- public function run(PHPUnit_Framework_TestResult $result = null)
- {
- if ($result === null) {
- $result = $this->createResult();
- }
-
- if (!$this instanceof PHPUnit_Framework_Warning) {
- $this->setTestResultObject($result);
- $this->setUseErrorHandlerFromAnnotation();
- }
-
- if ($this->useErrorHandler !== null) {
- $oldErrorHandlerSetting = $result->getConvertErrorsToExceptions();
- $result->convertErrorsToExceptions($this->useErrorHandler);
- }
-
- if (!$this instanceof PHPUnit_Framework_Warning && !$this->handleDependencies()) {
- return;
- }
-
- if ($this->runTestInSeparateProcess === true &&
- $this->inIsolation !== true &&
- !$this instanceof PHPUnit_Extensions_SeleniumTestCase &&
- !$this instanceof PHPUnit_Extensions_PhptTestCase) {
- $class = new ReflectionClass($this);
-
- $template = new Text_Template(
- __DIR__ . '/../Util/PHP/Template/TestCaseMethod.tpl'
- );
-
- if ($this->preserveGlobalState) {
- $constants = PHPUnit_Util_GlobalState::getConstantsAsString();
- $globals = PHPUnit_Util_GlobalState::getGlobalsAsString();
- $includedFiles = PHPUnit_Util_GlobalState::getIncludedFilesAsString();
- $iniSettings = PHPUnit_Util_GlobalState::getIniSettingsAsString();
- } else {
- $constants = '';
- if (!empty($GLOBALS['__PHPUNIT_BOOTSTRAP'])) {
- $globals = '$GLOBALS[\'__PHPUNIT_BOOTSTRAP\'] = ' . var_export($GLOBALS['__PHPUNIT_BOOTSTRAP'], true) . ";\n";
- } else {
- $globals = '';
- }
- $includedFiles = '';
- $iniSettings = '';
- }
-
- $coverage = $result->getCollectCodeCoverageInformation() ? 'true' : 'false';
- $isStrictAboutTestsThatDoNotTestAnything = $result->isStrictAboutTestsThatDoNotTestAnything() ? 'true' : 'false';
- $isStrictAboutOutputDuringTests = $result->isStrictAboutOutputDuringTests() ? 'true' : 'false';
- $isStrictAboutTestSize = $result->isStrictAboutTestSize() ? 'true' : 'false';
- $isStrictAboutTodoAnnotatedTests = $result->isStrictAboutTodoAnnotatedTests() ? 'true' : 'false';
-
- if (defined('PHPUNIT_COMPOSER_INSTALL')) {
- $composerAutoload = var_export(PHPUNIT_COMPOSER_INSTALL, true);
- } else {
- $composerAutoload = '\'\'';
- }
-
- if (defined('__PHPUNIT_PHAR__')) {
- $phar = var_export(__PHPUNIT_PHAR__, true);
- } else {
- $phar = '\'\'';
- }
-
- if ($result->getCodeCoverage()) {
- $codeCoverageFilter = $result->getCodeCoverage()->filter();
- } else {
- $codeCoverageFilter = null;
- }
-
- $data = var_export(serialize($this->data), true);
- $dataName = var_export($this->dataName, true);
- $dependencyInput = var_export(serialize($this->dependencyInput), true);
- $includePath = var_export(get_include_path(), true);
- $codeCoverageFilter = var_export(serialize($codeCoverageFilter), true);
- // must do these fixes because TestCaseMethod.tpl has unserialize('{data}') in it, and we can't break BC
- // the lines above used to use addcslashes() rather than var_export(), which breaks null byte escape sequences
- $data = "'." . $data . ".'";
- $dataName = "'.(" . $dataName . ").'";
- $dependencyInput = "'." . $dependencyInput . ".'";
- $includePath = "'." . $includePath . ".'";
- $codeCoverageFilter = "'." . $codeCoverageFilter . ".'";
-
- $configurationFilePath = (isset($GLOBALS['__PHPUNIT_CONFIGURATION_FILE']) ? $GLOBALS['__PHPUNIT_CONFIGURATION_FILE'] : '');
-
- $template->setVar(
- array(
- 'composerAutoload' => $composerAutoload,
- 'phar' => $phar,
- 'filename' => $class->getFileName(),
- 'className' => $class->getName(),
- 'methodName' => $this->name,
- 'collectCodeCoverageInformation' => $coverage,
- 'data' => $data,
- 'dataName' => $dataName,
- 'dependencyInput' => $dependencyInput,
- 'constants' => $constants,
- 'globals' => $globals,
- 'include_path' => $includePath,
- 'included_files' => $includedFiles,
- 'iniSettings' => $iniSettings,
- 'isStrictAboutTestsThatDoNotTestAnything' => $isStrictAboutTestsThatDoNotTestAnything,
- 'isStrictAboutOutputDuringTests' => $isStrictAboutOutputDuringTests,
- 'isStrictAboutTestSize' => $isStrictAboutTestSize,
- 'isStrictAboutTodoAnnotatedTests' => $isStrictAboutTodoAnnotatedTests,
- 'codeCoverageFilter' => $codeCoverageFilter,
- 'configurationFilePath' => $configurationFilePath
- )
- );
-
- $this->prepareTemplate($template);
-
- $php = PHPUnit_Util_PHP::factory();
- $php->runTestJob($template->render(), $this, $result);
- } else {
- $result->run($this);
- }
-
- if ($this->useErrorHandler !== null) {
- $result->convertErrorsToExceptions($oldErrorHandlerSetting);
- }
-
- $this->result = null;
-
- return $result;
- }
-
- /**
- * Runs the bare test sequence.
- */
- public function runBare()
- {
- $this->numAssertions = 0;
-
- $this->snapshotGlobalState();
- $this->startOutputBuffering();
- clearstatcache();
- $currentWorkingDirectory = getcwd();
-
- $hookMethods = PHPUnit_Util_Test::getHookMethods(get_class($this));
-
- try {
- $hasMetRequirements = false;
- $this->checkRequirements();
- $hasMetRequirements = true;
-
- if ($this->inIsolation) {
- foreach ($hookMethods['beforeClass'] as $method) {
- $this->$method();
- }
- }
-
- $this->setExpectedExceptionFromAnnotation();
-
- foreach ($hookMethods['before'] as $method) {
- $this->$method();
- }
-
- $this->assertPreConditions();
- $this->testResult = $this->runTest();
- $this->verifyMockObjects();
- $this->assertPostConditions();
-
- $this->status = PHPUnit_Runner_BaseTestRunner::STATUS_PASSED;
- } catch (PHPUnit_Framework_IncompleteTest $e) {
- $this->status = PHPUnit_Runner_BaseTestRunner::STATUS_INCOMPLETE;
- $this->statusMessage = $e->getMessage();
- } catch (PHPUnit_Framework_SkippedTest $e) {
- $this->status = PHPUnit_Runner_BaseTestRunner::STATUS_SKIPPED;
- $this->statusMessage = $e->getMessage();
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- $this->status = PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE;
- $this->statusMessage = $e->getMessage();
- } catch (PredictionException $e) {
- $this->status = PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE;
- $this->statusMessage = $e->getMessage();
- } catch (Throwable $_e) {
- $e = $_e;
- } catch (Exception $_e) {
- $e = $_e;
- }
-
- if (isset($_e)) {
- $this->status = PHPUnit_Runner_BaseTestRunner::STATUS_ERROR;
- $this->statusMessage = $_e->getMessage();
- }
-
- // Clean up the mock objects.
- $this->mockObjects = array();
- $this->prophet = null;
-
- // Tear down the fixture. An exception raised in tearDown() will be
- // caught and passed on when no exception was raised before.
- try {
- if ($hasMetRequirements) {
- foreach ($hookMethods['after'] as $method) {
- $this->$method();
- }
-
- if ($this->inIsolation) {
- foreach ($hookMethods['afterClass'] as $method) {
- $this->$method();
- }
- }
- }
- } catch (Throwable $_e) {
- if (!isset($e)) {
- $e = $_e;
- }
- } catch (Exception $_e) {
- if (!isset($e)) {
- $e = $_e;
- }
- }
-
- try {
- $this->stopOutputBuffering();
- } catch (PHPUnit_Framework_RiskyTestError $_e) {
- if (!isset($e)) {
- $e = $_e;
- }
- }
-
- clearstatcache();
-
- if ($currentWorkingDirectory != getcwd()) {
- chdir($currentWorkingDirectory);
- }
-
- $this->restoreGlobalState();
-
- // Clean up INI settings.
- foreach ($this->iniSettings as $varName => $oldValue) {
- ini_set($varName, $oldValue);
- }
-
- $this->iniSettings = array();
-
- // Clean up locale settings.
- foreach ($this->locale as $category => $locale) {
- setlocale($category, $locale);
- }
-
- // Perform assertion on output.
- if (!isset($e)) {
- try {
- if ($this->outputExpectedRegex !== null) {
- $this->assertRegExp($this->outputExpectedRegex, $this->output);
- } elseif ($this->outputExpectedString !== null) {
- $this->assertEquals($this->outputExpectedString, $this->output);
- }
- } catch (Throwable $_e) {
- $e = $_e;
- } catch (Exception $_e) {
- $e = $_e;
- }
- }
-
- // Workaround for missing "finally".
- if (isset($e)) {
- if ($e instanceof PredictionException) {
- $e = new PHPUnit_Framework_AssertionFailedError($e->getMessage());
- }
-
- if (!$e instanceof Exception) {
- // Rethrow Error directly on PHP 7 as onNotSuccessfulTest does not support it
- throw $e;
- }
-
- $this->onNotSuccessfulTest($e);
- }
- }
-
- /**
- * Override to run the test and assert its state.
- *
- * @return mixed
- *
- * @throws Exception|PHPUnit_Framework_Exception
- * @throws PHPUnit_Framework_Exception
- */
- protected function runTest()
- {
- if ($this->name === null) {
- throw new PHPUnit_Framework_Exception(
- 'PHPUnit_Framework_TestCase::$name must not be null.'
- );
- }
-
- try {
- $class = new ReflectionClass($this);
- $method = $class->getMethod($this->name);
- } catch (ReflectionException $e) {
- $this->fail($e->getMessage());
- }
-
- try {
- $testResult = $method->invokeArgs(
- $this,
- array_merge($this->data, $this->dependencyInput)
- );
- } catch (Throwable $_e) {
- $e = $_e;
- } catch (Exception $_e) {
- $e = $_e;
- }
-
- if (isset($e)) {
- $checkException = false;
-
- if (!($e instanceof PHPUnit_Framework_SkippedTestError) && is_string($this->expectedException)) {
- $checkException = true;
-
- if ($e instanceof PHPUnit_Framework_Exception) {
- $checkException = false;
- }
-
- $reflector = new ReflectionClass($this->expectedException);
-
- if ($this->expectedException === 'PHPUnit_Framework_Exception' ||
- $this->expectedException === '\PHPUnit_Framework_Exception' ||
- $reflector->isSubclassOf('PHPUnit_Framework_Exception')) {
- $checkException = true;
- }
- }
-
- if ($checkException) {
- $this->assertThat(
- $e,
- new PHPUnit_Framework_Constraint_Exception(
- $this->expectedException
- )
- );
-
- if (is_string($this->expectedExceptionMessage) &&
- !empty($this->expectedExceptionMessage)) {
- $this->assertThat(
- $e,
- new PHPUnit_Framework_Constraint_ExceptionMessage(
- $this->expectedExceptionMessage
- )
- );
- }
-
- if (is_string($this->expectedExceptionMessageRegExp) &&
- !empty($this->expectedExceptionMessageRegExp)) {
- $this->assertThat(
- $e,
- new PHPUnit_Framework_Constraint_ExceptionMessageRegExp(
- $this->expectedExceptionMessageRegExp
- )
- );
- }
-
- if ($this->expectedExceptionCode !== null) {
- $this->assertThat(
- $e,
- new PHPUnit_Framework_Constraint_ExceptionCode(
- $this->expectedExceptionCode
- )
- );
- }
-
- return;
- } else {
- throw $e;
- }
- }
-
- if ($this->expectedException !== null) {
- $this->assertThat(
- null,
- new PHPUnit_Framework_Constraint_Exception(
- $this->expectedException
- )
- );
- }
-
- return $testResult;
- }
-
- /**
- * Verifies the mock object expectations.
- *
- * @since Method available since Release 3.5.0
- */
- protected function verifyMockObjects()
- {
- foreach ($this->mockObjects as $mockObject) {
- if ($mockObject->__phpunit_hasMatchers()) {
- $this->numAssertions++;
- }
-
- $mockObject->__phpunit_verify();
- }
-
- if ($this->prophet !== null) {
- try {
- $this->prophet->checkPredictions();
- } catch (Throwable $e) {
- /* Intentionally left empty */
- } catch (Exception $e) {
- /* Intentionally left empty */
- }
-
- foreach ($this->prophet->getProphecies() as $objectProphecy) {
- foreach ($objectProphecy->getMethodProphecies() as $methodProphecies) {
- foreach ($methodProphecies as $methodProphecy) {
- $this->numAssertions += count($methodProphecy->getCheckedPredictions());
- }
- }
- }
-
- if (isset($e)) {
- throw $e;
- }
- }
- }
-
- /**
- * Sets the name of a TestCase.
- *
- * @param string
- */
- public function setName($name)
- {
- $this->name = $name;
- }
-
- /**
- * Sets the dependencies of a TestCase.
- *
- * @param array $dependencies
- *
- * @since Method available since Release 3.4.0
- */
- public function setDependencies(array $dependencies)
- {
- $this->dependencies = $dependencies;
- }
-
- /**
- * Returns true if the tests has dependencies
- *
- * @return bool
- *
- * @since Method available since Release 4.0.0
- */
- public function hasDependencies()
- {
- return count($this->dependencies) > 0;
- }
-
- /**
- * Sets
- *
- * @param array $dependencyInput
- *
- * @since Method available since Release 3.4.0
- */
- public function setDependencyInput(array $dependencyInput)
- {
- $this->dependencyInput = $dependencyInput;
- }
-
- /**
- * @param bool $disallowChangesToGlobalState
- *
- * @since Method available since Release 4.6.0
- */
- public function setDisallowChangesToGlobalState($disallowChangesToGlobalState)
- {
- $this->disallowChangesToGlobalState = $disallowChangesToGlobalState;
- }
-
- /**
- * Calling this method in setUp() has no effect!
- *
- * @param bool $backupGlobals
- *
- * @since Method available since Release 3.3.0
- */
- public function setBackupGlobals($backupGlobals)
- {
- if (is_null($this->backupGlobals) && is_bool($backupGlobals)) {
- $this->backupGlobals = $backupGlobals;
- }
- }
-
- /**
- * Calling this method in setUp() has no effect!
- *
- * @param bool $backupStaticAttributes
- *
- * @since Method available since Release 3.4.0
- */
- public function setBackupStaticAttributes($backupStaticAttributes)
- {
- if (is_null($this->backupStaticAttributes) &&
- is_bool($backupStaticAttributes)) {
- $this->backupStaticAttributes = $backupStaticAttributes;
- }
- }
-
- /**
- * @param bool $runTestInSeparateProcess
- *
- * @throws PHPUnit_Framework_Exception
- *
- * @since Method available since Release 3.4.0
- */
- public function setRunTestInSeparateProcess($runTestInSeparateProcess)
- {
- if (is_bool($runTestInSeparateProcess)) {
- if ($this->runTestInSeparateProcess === null) {
- $this->runTestInSeparateProcess = $runTestInSeparateProcess;
- }
- } else {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'boolean');
- }
- }
-
- /**
- * @param bool $preserveGlobalState
- *
- * @throws PHPUnit_Framework_Exception
- *
- * @since Method available since Release 3.4.0
- */
- public function setPreserveGlobalState($preserveGlobalState)
- {
- if (is_bool($preserveGlobalState)) {
- $this->preserveGlobalState = $preserveGlobalState;
- } else {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'boolean');
- }
- }
-
- /**
- * @param bool $inIsolation
- *
- * @throws PHPUnit_Framework_Exception
- *
- * @since Method available since Release 3.4.0
- */
- public function setInIsolation($inIsolation)
- {
- if (is_bool($inIsolation)) {
- $this->inIsolation = $inIsolation;
- } else {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'boolean');
- }
- }
-
- /**
- * @return bool
- *
- * @since Method available since Release 4.3.0
- */
- public function isInIsolation()
- {
- return $this->inIsolation;
- }
-
- /**
- * @return mixed
- *
- * @since Method available since Release 3.4.0
- */
- public function getResult()
- {
- return $this->testResult;
- }
-
- /**
- * @param mixed $result
- *
- * @since Method available since Release 3.4.0
- */
- public function setResult($result)
- {
- $this->testResult = $result;
- }
-
- /**
- * @param callable $callback
- *
- * @throws PHPUnit_Framework_Exception
- *
- * @since Method available since Release 3.6.0
- */
- public function setOutputCallback($callback)
- {
- if (!is_callable($callback)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'callback');
- }
-
- $this->outputCallback = $callback;
- }
-
- /**
- * @return PHPUnit_Framework_TestResult
- *
- * @since Method available since Release 3.5.7
- */
- public function getTestResultObject()
- {
- return $this->result;
- }
-
- /**
- * @param PHPUnit_Framework_TestResult $result
- *
- * @since Method available since Release 3.6.0
- */
- public function setTestResultObject(PHPUnit_Framework_TestResult $result)
- {
- $this->result = $result;
- }
-
- /**
- * This method is a wrapper for the ini_set() function that automatically
- * resets the modified php.ini setting to its original value after the
- * test is run.
- *
- * @param string $varName
- * @param string $newValue
- *
- * @throws PHPUnit_Framework_Exception
- *
- * @since Method available since Release 3.0.0
- */
- protected function iniSet($varName, $newValue)
- {
- if (!is_string($varName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
- }
-
- $currentValue = ini_set($varName, $newValue);
-
- if ($currentValue !== false) {
- $this->iniSettings[$varName] = $currentValue;
- } else {
- throw new PHPUnit_Framework_Exception(
- sprintf(
- 'INI setting "%s" could not be set to "%s".',
- $varName,
- $newValue
- )
- );
- }
- }
-
- /**
- * This method is a wrapper for the setlocale() function that automatically
- * resets the locale to its original value after the test is run.
- *
- * @param int $category
- * @param string $locale
- *
- * @throws PHPUnit_Framework_Exception
- *
- * @since Method available since Release 3.1.0
- */
- protected function setLocale()
- {
- $args = func_get_args();
-
- if (count($args) < 2) {
- throw new PHPUnit_Framework_Exception;
- }
-
- $category = $args[0];
- $locale = $args[1];
-
- $categories = array(
- LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, LC_TIME
- );
-
- if (defined('LC_MESSAGES')) {
- $categories[] = LC_MESSAGES;
- }
-
- if (!in_array($category, $categories)) {
- throw new PHPUnit_Framework_Exception;
- }
-
- if (!is_array($locale) && !is_string($locale)) {
- throw new PHPUnit_Framework_Exception;
- }
-
- $this->locale[$category] = setlocale($category, null);
-
- $result = call_user_func_array('setlocale', $args);
-
- if ($result === false) {
- throw new PHPUnit_Framework_Exception(
- 'The locale functionality is not implemented on your platform, ' .
- 'the specified locale does not exist or the category name is ' .
- 'invalid.'
- );
- }
- }
-
- /**
- * Returns a mock object for the specified class.
- *
- * @param string $originalClassName Name of the class to mock.
- * @param array|null $methods When provided, only methods whose names are in the array
- * are replaced with a configurable test double. The behavior
- * of the other methods is not changed.
- * Providing null means that no methods will be replaced.
- * @param array $arguments Parameters to pass to the original class' constructor.
- * @param string $mockClassName Class name for the generated test double class.
- * @param bool $callOriginalConstructor Can be used to disable the call to the original class' constructor.
- * @param bool $callOriginalClone Can be used to disable the call to the original class' clone constructor.
- * @param bool $callAutoload Can be used to disable __autoload() during the generation of the test double class.
- * @param bool $cloneArguments
- * @param bool $callOriginalMethods
- * @param object $proxyTarget
- *
- * @return PHPUnit_Framework_MockObject_MockObject
- *
- * @throws PHPUnit_Framework_Exception
- *
- * @since Method available since Release 3.0.0
- */
- public function getMock($originalClassName, $methods = array(), array $arguments = array(), $mockClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true, $cloneArguments = false, $callOriginalMethods = false, $proxyTarget = null)
- {
- $mockObject = $this->getMockObjectGenerator()->getMock(
- $originalClassName,
- $methods,
- $arguments,
- $mockClassName,
- $callOriginalConstructor,
- $callOriginalClone,
- $callAutoload,
- $cloneArguments,
- $callOriginalMethods,
- $proxyTarget
- );
-
- $this->mockObjects[] = $mockObject;
-
- return $mockObject;
- }
-
- /**
- * Returns a builder object to create mock objects using a fluent interface.
- *
- * @param string $className
- *
- * @return PHPUnit_Framework_MockObject_MockBuilder
- *
- * @since Method available since Release 3.5.0
- */
- public function getMockBuilder($className)
- {
- return new PHPUnit_Framework_MockObject_MockBuilder($this, $className);
- }
-
- /**
- * Mocks the specified class and returns the name of the mocked class.
- *
- * @param string $originalClassName
- * @param array $methods
- * @param array $arguments
- * @param string $mockClassName
- * @param bool $callOriginalConstructor
- * @param bool $callOriginalClone
- * @param bool $callAutoload
- * @param bool $cloneArguments
- *
- * @return string
- *
- * @throws PHPUnit_Framework_Exception
- *
- * @since Method available since Release 3.5.0
- */
- protected function getMockClass($originalClassName, $methods = array(), array $arguments = array(), $mockClassName = '', $callOriginalConstructor = false, $callOriginalClone = true, $callAutoload = true, $cloneArguments = false)
- {
- $mock = $this->getMock(
- $originalClassName,
- $methods,
- $arguments,
- $mockClassName,
- $callOriginalConstructor,
- $callOriginalClone,
- $callAutoload,
- $cloneArguments
- );
-
- return get_class($mock);
- }
-
- /**
- * Returns a mock object for the specified abstract class with all abstract
- * methods of the class mocked. Concrete methods are not mocked by default.
- * To mock concrete methods, use the 7th parameter ($mockedMethods).
- *
- * @param string $originalClassName
- * @param array $arguments
- * @param string $mockClassName
- * @param bool $callOriginalConstructor
- * @param bool $callOriginalClone
- * @param bool $callAutoload
- * @param array $mockedMethods
- * @param bool $cloneArguments
- *
- * @return PHPUnit_Framework_MockObject_MockObject
- *
- * @since Method available since Release 3.4.0
- *
- * @throws PHPUnit_Framework_Exception
- */
- public function getMockForAbstractClass($originalClassName, array $arguments = array(), $mockClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true, $mockedMethods = array(), $cloneArguments = false)
- {
- $mockObject = $this->getMockObjectGenerator()->getMockForAbstractClass(
- $originalClassName,
- $arguments,
- $mockClassName,
- $callOriginalConstructor,
- $callOriginalClone,
- $callAutoload,
- $mockedMethods,
- $cloneArguments
- );
-
- $this->mockObjects[] = $mockObject;
-
- return $mockObject;
- }
-
- /**
- * Returns a mock object based on the given WSDL file.
- *
- * @param string $wsdlFile
- * @param string $originalClassName
- * @param string $mockClassName
- * @param array $methods
- * @param bool $callOriginalConstructor
- * @param array $options An array of options passed to SOAPClient::_construct
- *
- * @return PHPUnit_Framework_MockObject_MockObject
- *
- * @since Method available since Release 3.4.0
- */
- protected function getMockFromWsdl($wsdlFile, $originalClassName = '', $mockClassName = '', array $methods = array(), $callOriginalConstructor = true, array $options = array())
- {
- if ($originalClassName === '') {
- $originalClassName = str_replace('.wsdl', '', basename($wsdlFile));
- }
-
- if (!class_exists($originalClassName)) {
- eval(
- $this->getMockObjectGenerator()->generateClassFromWsdl(
- $wsdlFile,
- $originalClassName,
- $methods,
- $options
- )
- );
- }
-
- return $this->getMock(
- $originalClassName,
- $methods,
- array('', $options),
- $mockClassName,
- $callOriginalConstructor,
- false,
- false
- );
- }
-
- /**
- * Returns a mock object for the specified trait with all abstract methods
- * of the trait mocked. Concrete methods to mock can be specified with the
- * `$mockedMethods` parameter.
- *
- * @param string $traitName
- * @param array $arguments
- * @param string $mockClassName
- * @param bool $callOriginalConstructor
- * @param bool $callOriginalClone
- * @param bool $callAutoload
- * @param array $mockedMethods
- * @param bool $cloneArguments
- *
- * @return PHPUnit_Framework_MockObject_MockObject
- *
- * @since Method available since Release 4.0.0
- *
- * @throws PHPUnit_Framework_Exception
- */
- public function getMockForTrait($traitName, array $arguments = array(), $mockClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true, $mockedMethods = array(), $cloneArguments = false)
- {
- $mockObject = $this->getMockObjectGenerator()->getMockForTrait(
- $traitName,
- $arguments,
- $mockClassName,
- $callOriginalConstructor,
- $callOriginalClone,
- $callAutoload,
- $mockedMethods,
- $cloneArguments
- );
-
- $this->mockObjects[] = $mockObject;
-
- return $mockObject;
- }
-
- /**
- * Returns an object for the specified trait.
- *
- * @param string $traitName
- * @param array $arguments
- * @param string $traitClassName
- * @param bool $callOriginalConstructor
- * @param bool $callOriginalClone
- * @param bool $callAutoload
- * @param bool $cloneArguments
- *
- * @return object
- *
- * @since Method available since Release 3.6.0
- *
- * @throws PHPUnit_Framework_Exception
- */
- protected function getObjectForTrait($traitName, array $arguments = array(), $traitClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true, $cloneArguments = false)
- {
- return $this->getMockObjectGenerator()->getObjectForTrait(
- $traitName,
- $arguments,
- $traitClassName,
- $callOriginalConstructor,
- $callOriginalClone,
- $callAutoload,
- $cloneArguments
- );
- }
-
- /**
- * @param string|null $classOrInterface
- *
- * @return \Prophecy\Prophecy\ObjectProphecy
- *
- * @throws \LogicException
- *
- * @since Method available since Release 4.5.0
- */
- protected function prophesize($classOrInterface = null)
- {
- return $this->getProphet()->prophesize($classOrInterface);
- }
-
- /**
- * Adds a value to the assertion counter.
- *
- * @param int $count
- *
- * @since Method available since Release 3.3.3
- */
- public function addToAssertionCount($count)
- {
- $this->numAssertions += $count;
- }
-
- /**
- * Returns the number of assertions performed by this test.
- *
- * @return int
- *
- * @since Method available since Release 3.3.0
- */
- public function getNumAssertions()
- {
- return $this->numAssertions;
- }
-
- /**
- * Returns a matcher that matches when the method is executed
- * zero or more times.
- *
- * @return PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount
- *
- * @since Method available since Release 3.0.0
- */
- public static function any()
- {
- return new PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount;
- }
-
- /**
- * Returns a matcher that matches when the method is never executed.
- *
- * @return PHPUnit_Framework_MockObject_Matcher_InvokedCount
- *
- * @since Method available since Release 3.0.0
- */
- public static function never()
- {
- return new PHPUnit_Framework_MockObject_Matcher_InvokedCount(0);
- }
-
- /**
- * Returns a matcher that matches when the method is executed
- * at least N times.
- *
- * @param int $requiredInvocations
- *
- * @return PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastCount
- *
- * @since Method available since Release 4.2.0
- */
- public static function atLeast($requiredInvocations)
- {
- return new PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastCount(
- $requiredInvocations
- );
- }
-
- /**
- * Returns a matcher that matches when the method is executed at least once.
- *
- * @return PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastOnce
- *
- * @since Method available since Release 3.0.0
- */
- public static function atLeastOnce()
- {
- return new PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastOnce;
- }
-
- /**
- * Returns a matcher that matches when the method is executed exactly once.
- *
- * @return PHPUnit_Framework_MockObject_Matcher_InvokedCount
- *
- * @since Method available since Release 3.0.0
- */
- public static function once()
- {
- return new PHPUnit_Framework_MockObject_Matcher_InvokedCount(1);
- }
-
- /**
- * Returns a matcher that matches when the method is executed
- * exactly $count times.
- *
- * @param int $count
- *
- * @return PHPUnit_Framework_MockObject_Matcher_InvokedCount
- *
- * @since Method available since Release 3.0.0
- */
- public static function exactly($count)
- {
- return new PHPUnit_Framework_MockObject_Matcher_InvokedCount($count);
- }
-
- /**
- * Returns a matcher that matches when the method is executed
- * at most N times.
- *
- * @param int $allowedInvocations
- *
- * @return PHPUnit_Framework_MockObject_Matcher_InvokedAtMostCount
- *
- * @since Method available since Release 4.2.0
- */
- public static function atMost($allowedInvocations)
- {
- return new PHPUnit_Framework_MockObject_Matcher_InvokedAtMostCount(
- $allowedInvocations
- );
- }
-
- /**
- * Returns a matcher that matches when the method is executed
- * at the given index.
- *
- * @param int $index
- *
- * @return PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex
- *
- * @since Method available since Release 3.0.0
- */
- public static function at($index)
- {
- return new PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex($index);
- }
-
- /**
- * @param mixed $value
- *
- * @return PHPUnit_Framework_MockObject_Stub_Return
- *
- * @since Method available since Release 3.0.0
- */
- public static function returnValue($value)
- {
- return new PHPUnit_Framework_MockObject_Stub_Return($value);
- }
-
- /**
- * @param array $valueMap
- *
- * @return PHPUnit_Framework_MockObject_Stub_ReturnValueMap
- *
- * @since Method available since Release 3.6.0
- */
- public static function returnValueMap(array $valueMap)
- {
- return new PHPUnit_Framework_MockObject_Stub_ReturnValueMap($valueMap);
- }
-
- /**
- * @param int $argumentIndex
- *
- * @return PHPUnit_Framework_MockObject_Stub_ReturnArgument
- *
- * @since Method available since Release 3.3.0
- */
- public static function returnArgument($argumentIndex)
- {
- return new PHPUnit_Framework_MockObject_Stub_ReturnArgument(
- $argumentIndex
- );
- }
-
- /**
- * @param mixed $callback
- *
- * @return PHPUnit_Framework_MockObject_Stub_ReturnCallback
- *
- * @since Method available since Release 3.3.0
- */
- public static function returnCallback($callback)
- {
- return new PHPUnit_Framework_MockObject_Stub_ReturnCallback($callback);
- }
-
- /**
- * Returns the current object.
- *
- * This method is useful when mocking a fluent interface.
- *
- * @return PHPUnit_Framework_MockObject_Stub_ReturnSelf
- *
- * @since Method available since Release 3.6.0
- */
- public static function returnSelf()
- {
- return new PHPUnit_Framework_MockObject_Stub_ReturnSelf();
- }
-
- /**
- * @param Exception $exception
- *
- * @return PHPUnit_Framework_MockObject_Stub_Exception
- *
- * @since Method available since Release 3.1.0
- */
- public static function throwException(Exception $exception)
- {
- return new PHPUnit_Framework_MockObject_Stub_Exception($exception);
- }
-
- /**
- * @param mixed $value, ...
- *
- * @return PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls
- *
- * @since Method available since Release 3.0.0
- */
- public static function onConsecutiveCalls()
- {
- $args = func_get_args();
-
- return new PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls($args);
- }
-
- /**
- * Gets the data set description of a TestCase.
- *
- * @param bool $includeData
- *
- * @return string
- *
- * @since Method available since Release 3.3.0
- */
- protected function getDataSetAsString($includeData = true)
- {
- $buffer = '';
-
- if (!empty($this->data)) {
- if (is_int($this->dataName)) {
- $buffer .= sprintf(' with data set #%d', $this->dataName);
- } else {
- $buffer .= sprintf(' with data set "%s"', $this->dataName);
- }
-
- $exporter = new Exporter;
-
- if ($includeData) {
- $buffer .= sprintf(' (%s)', $exporter->shortenedRecursiveExport($this->data));
- }
- }
-
- return $buffer;
- }
-
- /**
- * Creates a default TestResult object.
- *
- * @return PHPUnit_Framework_TestResult
- */
- protected function createResult()
- {
- return new PHPUnit_Framework_TestResult;
- }
-
- /**
- * @since Method available since Release 3.5.4
- */
- protected function handleDependencies()
- {
- if (!empty($this->dependencies) && !$this->inIsolation) {
- $className = get_class($this);
- $passed = $this->result->passed();
- $passedKeys = array_keys($passed);
- $numKeys = count($passedKeys);
-
- for ($i = 0; $i < $numKeys; $i++) {
- $pos = strpos($passedKeys[$i], ' with data set');
-
- if ($pos !== false) {
- $passedKeys[$i] = substr($passedKeys[$i], 0, $pos);
- }
- }
-
- $passedKeys = array_flip(array_unique($passedKeys));
-
- foreach ($this->dependencies as $dependency) {
- if (strpos($dependency, '::') === false) {
- $dependency = $className . '::' . $dependency;
- }
-
- if (!isset($passedKeys[$dependency])) {
- $this->result->addError(
- $this,
- new PHPUnit_Framework_SkippedTestError(
- sprintf(
- 'This test depends on "%s" to pass.',
- $dependency
- )
- ),
- 0
- );
-
- return false;
- }
-
- if (isset($passed[$dependency])) {
- if ($passed[$dependency]['size'] != PHPUnit_Util_Test::UNKNOWN &&
- $this->getSize() != PHPUnit_Util_Test::UNKNOWN &&
- $passed[$dependency]['size'] > $this->getSize()) {
- $this->result->addError(
- $this,
- new PHPUnit_Framework_SkippedTestError(
- 'This test depends on a test that is larger than itself.'
- ),
- 0
- );
-
- return false;
- }
-
- $this->dependencyInput[$dependency] = $passed[$dependency]['result'];
- } else {
- $this->dependencyInput[$dependency] = null;
- }
- }
- }
-
- return true;
- }
-
- /**
- * This method is called before the first test of this test class is run.
- *
- * @since Method available since Release 3.4.0
- */
- public static function setUpBeforeClass()
- {
- }
-
- /**
- * Sets up the fixture, for example, open a network connection.
- * This method is called before a test is executed.
- */
- protected function setUp()
- {
- }
-
- /**
- * Performs assertions shared by all tests of a test case.
- *
- * This method is called before the execution of a test starts
- * and after setUp() is called.
- *
- * @since Method available since Release 3.2.8
- */
- protected function assertPreConditions()
- {
- }
-
- /**
- * Performs assertions shared by all tests of a test case.
- *
- * This method is called before the execution of a test ends
- * and before tearDown() is called.
- *
- * @since Method available since Release 3.2.8
- */
- protected function assertPostConditions()
- {
- }
-
- /**
- * Tears down the fixture, for example, close a network connection.
- * This method is called after a test is executed.
- */
- protected function tearDown()
- {
- }
-
- /**
- * This method is called after the last test of this test class is run.
- *
- * @since Method available since Release 3.4.0
- */
- public static function tearDownAfterClass()
- {
- }
-
- /**
- * This method is called when a test method did not execute successfully.
- *
- * @param Exception $e
- *
- * @since Method available since Release 3.4.0
- *
- * @throws Exception
- */
- protected function onNotSuccessfulTest(Exception $e)
- {
- throw $e;
- }
-
- /**
- * Performs custom preparations on the process isolation template.
- *
- * @param Text_Template $template
- *
- * @since Method available since Release 3.4.0
- */
- protected function prepareTemplate(Text_Template $template)
- {
- }
-
- /**
- * Get the mock object generator, creating it if it doesn't exist.
- *
- * @return PHPUnit_Framework_MockObject_Generator
- */
- protected function getMockObjectGenerator()
- {
- if (null === $this->mockObjectGenerator) {
- $this->mockObjectGenerator = new PHPUnit_Framework_MockObject_Generator;
- }
-
- return $this->mockObjectGenerator;
- }
-
- /**
- * @since Method available since Release 4.2.0
- */
- private function startOutputBuffering()
- {
- while (!defined('PHPUNIT_TESTSUITE') && ob_get_level() > 0) {
- ob_end_clean();
- }
-
- ob_start();
-
- $this->outputBufferingActive = true;
- $this->outputBufferingLevel = ob_get_level();
- }
-
- /**
- * @since Method available since Release 4.2.0
- */
- private function stopOutputBuffering()
- {
- if (ob_get_level() != $this->outputBufferingLevel) {
- while (ob_get_level() > 0) {
- ob_end_clean();
- }
-
- throw new PHPUnit_Framework_RiskyTestError(
- 'Test code or tested code did not (only) close its own output buffers'
- );
- }
-
- $output = ob_get_contents();
-
- if ($this->outputCallback === false) {
- $this->output = $output;
- } else {
- $this->output = call_user_func_array(
- $this->outputCallback,
- array($output)
- );
- }
-
- ob_end_clean();
-
- $this->outputBufferingActive = false;
- $this->outputBufferingLevel = ob_get_level();
- }
-
- private function snapshotGlobalState()
- {
- $backupGlobals = $this->backupGlobals === null || $this->backupGlobals === true;
-
- if ($this->runTestInSeparateProcess || $this->inIsolation ||
- (!$backupGlobals && !$this->backupStaticAttributes)) {
- return;
- }
-
- $this->snapshot = $this->createGlobalStateSnapshot($backupGlobals);
- }
-
- private function restoreGlobalState()
- {
- if (!$this->snapshot instanceof Snapshot) {
- return;
- }
-
- $backupGlobals = $this->backupGlobals === null || $this->backupGlobals === true;
-
- if ($this->disallowChangesToGlobalState) {
- try {
- $this->compareGlobalStateSnapshots(
- $this->snapshot,
- $this->createGlobalStateSnapshot($backupGlobals)
- );
- } catch (PHPUnit_Framework_RiskyTestError $rte) {
- // Intentionally left empty
- }
- }
-
- $restorer = new Restorer;
-
- if ($backupGlobals) {
- $restorer->restoreGlobalVariables($this->snapshot);
- }
-
- if ($this->backupStaticAttributes) {
- $restorer->restoreStaticAttributes($this->snapshot);
- }
-
- $this->snapshot = null;
-
- if (isset($rte)) {
- throw $rte;
- }
- }
-
- /**
- * @param bool $backupGlobals
- *
- * @return Snapshot
- */
- private function createGlobalStateSnapshot($backupGlobals)
- {
- $blacklist = new Blacklist;
-
- foreach ($this->backupGlobalsBlacklist as $globalVariable) {
- $blacklist->addGlobalVariable($globalVariable);
- }
-
- if (!defined('PHPUNIT_TESTSUITE')) {
- $blacklist->addClassNamePrefix('PHPUnit');
- $blacklist->addClassNamePrefix('File_Iterator');
- $blacklist->addClassNamePrefix('PHP_CodeCoverage');
- $blacklist->addClassNamePrefix('PHP_Invoker');
- $blacklist->addClassNamePrefix('PHP_Timer');
- $blacklist->addClassNamePrefix('PHP_Token');
- $blacklist->addClassNamePrefix('Symfony');
- $blacklist->addClassNamePrefix('Text_Template');
- $blacklist->addClassNamePrefix('Doctrine\Instantiator');
-
- foreach ($this->backupStaticAttributesBlacklist as $class => $attributes) {
- foreach ($attributes as $attribute) {
- $blacklist->addStaticAttribute($class, $attribute);
- }
- }
- }
-
- return new Snapshot(
- $blacklist,
- $backupGlobals,
- $this->backupStaticAttributes,
- false,
- false,
- false,
- false,
- false,
- false,
- false
- );
- }
-
- /**
- * @param Snapshot $before
- * @param Snapshot $after
- *
- * @throws PHPUnit_Framework_RiskyTestError
- */
- private function compareGlobalStateSnapshots(Snapshot $before, Snapshot $after)
- {
- $backupGlobals = $this->backupGlobals === null || $this->backupGlobals === true;
-
- if ($backupGlobals) {
- $this->compareGlobalStateSnapshotPart(
- $before->globalVariables(),
- $after->globalVariables(),
- "--- Global variables before the test\n+++ Global variables after the test\n"
- );
-
- $this->compareGlobalStateSnapshotPart(
- $before->superGlobalVariables(),
- $after->superGlobalVariables(),
- "--- Super-global variables before the test\n+++ Super-global variables after the test\n"
- );
- }
-
- if ($this->backupStaticAttributes) {
- $this->compareGlobalStateSnapshotPart(
- $before->staticAttributes(),
- $after->staticAttributes(),
- "--- Static attributes before the test\n+++ Static attributes after the test\n"
- );
- }
- }
-
- /**
- * @param array $before
- * @param array $after
- * @param string $header
- *
- * @throws PHPUnit_Framework_RiskyTestError
- */
- private function compareGlobalStateSnapshotPart(array $before, array $after, $header)
- {
- if ($before != $after) {
- $differ = new Differ($header);
- $exporter = new Exporter;
-
- $diff = $differ->diff(
- $exporter->export($before),
- $exporter->export($after)
- );
-
- throw new PHPUnit_Framework_RiskyTestError(
- $diff
- );
- }
- }
-
- /**
- * @return Prophecy\Prophet
- *
- * @since Method available since Release 4.5.0
- */
- private function getProphet()
- {
- if ($this->prophet === null) {
- $this->prophet = new Prophet;
- }
-
- return $this->prophet;
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/TestFailure.php b/vendor/phpunit/phpunit/src/Framework/TestFailure.php
deleted file mode 100644
index ef3d9cbd..00000000
--- a/vendor/phpunit/phpunit/src/Framework/TestFailure.php
+++ /dev/null
@@ -1,167 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * A TestFailure collects a failed test together with the caught exception.
- *
- * @since Class available since Release 2.0.0
- */
-class PHPUnit_Framework_TestFailure
-{
- /**
- * @var string
- */
- private $testName;
-
- /**
- * @var PHPUnit_Framework_Test|null
- */
- protected $failedTest;
-
- /**
- * @var Exception
- */
- protected $thrownException;
-
- /**
- * Constructs a TestFailure with the given test and exception.
- *
- * @param PHPUnit_Framework_Test $failedTest
- * @param Exception $thrownException
- */
- public function __construct(PHPUnit_Framework_Test $failedTest, Exception $thrownException)
- {
- if ($failedTest instanceof PHPUnit_Framework_SelfDescribing) {
- $this->testName = $failedTest->toString();
- } else {
- $this->testName = get_class($failedTest);
- }
- if (!$failedTest instanceof PHPUnit_Framework_TestCase || !$failedTest->isInIsolation()) {
- $this->failedTest = $failedTest;
- }
- $this->thrownException = $thrownException;
- }
-
- /**
- * Returns a short description of the failure.
- *
- * @return string
- */
- public function toString()
- {
- return sprintf(
- '%s: %s',
- $this->testName,
- $this->thrownException->getMessage()
- );
- }
-
- /**
- * Returns a description for the thrown exception.
- *
- * @return string
- *
- * @since Method available since Release 3.4.0
- */
- public function getExceptionAsString()
- {
- return self::exceptionToString($this->thrownException);
- }
-
- /**
- * Returns a description for an exception.
- *
- * @param Exception $e
- *
- * @return string
- *
- * @since Method available since Release 3.2.0
- */
- public static function exceptionToString(Exception $e)
- {
- if ($e instanceof PHPUnit_Framework_SelfDescribing) {
- $buffer = $e->toString();
-
- if ($e instanceof PHPUnit_Framework_ExpectationFailedException && $e->getComparisonFailure()) {
- $buffer = $buffer . $e->getComparisonFailure()->getDiff();
- }
-
- if (!empty($buffer)) {
- $buffer = trim($buffer) . "\n";
- }
- } elseif ($e instanceof PHPUnit_Framework_Error) {
- $buffer = $e->getMessage() . "\n";
- } elseif ($e instanceof PHPUnit_Framework_ExceptionWrapper) {
- $buffer = $e->getClassname() . ': ' . $e->getMessage() . "\n";
- } else {
- $buffer = get_class($e) . ': ' . $e->getMessage() . "\n";
- }
-
- return $buffer;
- }
-
- /**
- * Returns the name of the failing test (including data set, if any).
- *
- * @return string
- *
- * @since Method available since Release 4.3.0
- */
- public function getTestName()
- {
- return $this->testName;
- }
-
- /**
- * Returns the failing test.
- *
- * Note: The test object is not set when the test is executed in process
- * isolation.
- *
- * @see PHPUnit_Framework_Exception
- *
- * @return PHPUnit_Framework_Test|null
- */
- public function failedTest()
- {
- return $this->failedTest;
- }
-
- /**
- * Gets the thrown exception.
- *
- * @return Exception
- */
- public function thrownException()
- {
- return $this->thrownException;
- }
-
- /**
- * Returns the exception's message.
- *
- * @return string
- */
- public function exceptionMessage()
- {
- return $this->thrownException()->getMessage();
- }
-
- /**
- * Returns true if the thrown exception
- * is of type AssertionFailedError.
- *
- * @return bool
- */
- public function isFailure()
- {
- return ($this->thrownException() instanceof PHPUnit_Framework_AssertionFailedError);
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/TestListener.php b/vendor/phpunit/phpunit/src/Framework/TestListener.php
deleted file mode 100644
index 8e5829be..00000000
--- a/vendor/phpunit/phpunit/src/Framework/TestListener.php
+++ /dev/null
@@ -1,99 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * A Listener for test progress.
- *
- * @since Interface available since Release 2.0.0
- */
-interface PHPUnit_Framework_TestListener
-{
- /**
- * An error occurred.
- *
- * @param PHPUnit_Framework_Test $test
- * @param Exception $e
- * @param float $time
- */
- public function addError(PHPUnit_Framework_Test $test, Exception $e, $time);
-
- /**
- * A failure occurred.
- *
- * @param PHPUnit_Framework_Test $test
- * @param PHPUnit_Framework_AssertionFailedError $e
- * @param float $time
- */
- public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time);
-
- /**
- * Incomplete test.
- *
- * @param PHPUnit_Framework_Test $test
- * @param Exception $e
- * @param float $time
- */
- public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time);
-
- /**
- * Risky test.
- *
- * @param PHPUnit_Framework_Test $test
- * @param Exception $e
- * @param float $time
- *
- * @since Method available since Release 4.0.0
- */
- public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time);
-
- /**
- * Skipped test.
- *
- * @param PHPUnit_Framework_Test $test
- * @param Exception $e
- * @param float $time
- *
- * @since Method available since Release 3.0.0
- */
- public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time);
-
- /**
- * A test suite started.
- *
- * @param PHPUnit_Framework_TestSuite $suite
- *
- * @since Method available since Release 2.2.0
- */
- public function startTestSuite(PHPUnit_Framework_TestSuite $suite);
-
- /**
- * A test suite ended.
- *
- * @param PHPUnit_Framework_TestSuite $suite
- *
- * @since Method available since Release 2.2.0
- */
- public function endTestSuite(PHPUnit_Framework_TestSuite $suite);
-
- /**
- * A test started.
- *
- * @param PHPUnit_Framework_Test $test
- */
- public function startTest(PHPUnit_Framework_Test $test);
-
- /**
- * A test ended.
- *
- * @param PHPUnit_Framework_Test $test
- * @param float $time
- */
- public function endTest(PHPUnit_Framework_Test $test, $time);
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/TestResult.php b/vendor/phpunit/phpunit/src/Framework/TestResult.php
deleted file mode 100644
index 8da7c35b..00000000
--- a/vendor/phpunit/phpunit/src/Framework/TestResult.php
+++ /dev/null
@@ -1,1128 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * A TestResult collects the results of executing a test case.
- *
- * @since Class available since Release 2.0.0
- */
-class PHPUnit_Framework_TestResult implements Countable
-{
- /**
- * @var array
- */
- protected $passed = array();
-
- /**
- * @var array
- */
- protected $errors = array();
-
- /**
- * @var array
- */
- protected $failures = array();
-
- /**
- * @var array
- */
- protected $notImplemented = array();
-
- /**
- * @var array
- */
- protected $risky = array();
-
- /**
- * @var array
- */
- protected $skipped = array();
-
- /**
- * @var array
- */
- protected $listeners = array();
-
- /**
- * @var int
- */
- protected $runTests = 0;
-
- /**
- * @var float
- */
- protected $time = 0;
-
- /**
- * @var PHPUnit_Framework_TestSuite
- */
- protected $topTestSuite = null;
-
- /**
- * Code Coverage information.
- *
- * @var PHP_CodeCoverage
- */
- protected $codeCoverage;
-
- /**
- * @var bool
- */
- protected $convertErrorsToExceptions = true;
-
- /**
- * @var bool
- */
- protected $stop = false;
-
- /**
- * @var bool
- */
- protected $stopOnError = false;
-
- /**
- * @var bool
- */
- protected $stopOnFailure = false;
-
- /**
- * @var bool
- */
- protected $beStrictAboutTestsThatDoNotTestAnything = false;
-
- /**
- * @var bool
- */
- protected $beStrictAboutOutputDuringTests = false;
-
- /**
- * @var bool
- */
- protected $beStrictAboutTestSize = false;
-
- /**
- * @var bool
- */
- protected $beStrictAboutTodoAnnotatedTests = false;
-
- /**
- * @var bool
- */
- protected $stopOnRisky = false;
-
- /**
- * @var bool
- */
- protected $stopOnIncomplete = false;
-
- /**
- * @var bool
- */
- protected $stopOnSkipped = false;
-
- /**
- * @var bool
- */
- protected $lastTestFailed = false;
-
- /**
- * @var int
- */
- protected $timeoutForSmallTests = 1;
-
- /**
- * @var int
- */
- protected $timeoutForMediumTests = 10;
-
- /**
- * @var int
- */
- protected $timeoutForLargeTests = 60;
-
- /**
- * Registers a TestListener.
- *
- * @param PHPUnit_Framework_TestListener
- */
- public function addListener(PHPUnit_Framework_TestListener $listener)
- {
- $this->listeners[] = $listener;
- }
-
- /**
- * Unregisters a TestListener.
- *
- * @param PHPUnit_Framework_TestListener $listener
- */
- public function removeListener(PHPUnit_Framework_TestListener $listener)
- {
- foreach ($this->listeners as $key => $_listener) {
- if ($listener === $_listener) {
- unset($this->listeners[$key]);
- }
- }
- }
-
- /**
- * Flushes all flushable TestListeners.
- *
- * @since Method available since Release 3.0.0
- */
- public function flushListeners()
- {
- foreach ($this->listeners as $listener) {
- if ($listener instanceof PHPUnit_Util_Printer) {
- $listener->flush();
- }
- }
- }
-
- /**
- * Adds an error to the list of errors.
- *
- * @param PHPUnit_Framework_Test $test
- * @param Exception $e
- * @param float $time
- */
- public function addError(PHPUnit_Framework_Test $test, Exception $e, $time)
- {
- if ($e instanceof PHPUnit_Framework_RiskyTest) {
- $this->risky[] = new PHPUnit_Framework_TestFailure($test, $e);
- $notifyMethod = 'addRiskyTest';
-
- if ($this->stopOnRisky) {
- $this->stop();
- }
- } elseif ($e instanceof PHPUnit_Framework_IncompleteTest) {
- $this->notImplemented[] = new PHPUnit_Framework_TestFailure($test, $e);
- $notifyMethod = 'addIncompleteTest';
-
- if ($this->stopOnIncomplete) {
- $this->stop();
- }
- } elseif ($e instanceof PHPUnit_Framework_SkippedTest) {
- $this->skipped[] = new PHPUnit_Framework_TestFailure($test, $e);
- $notifyMethod = 'addSkippedTest';
-
- if ($this->stopOnSkipped) {
- $this->stop();
- }
- } else {
- $this->errors[] = new PHPUnit_Framework_TestFailure($test, $e);
- $notifyMethod = 'addError';
-
- if ($this->stopOnError || $this->stopOnFailure) {
- $this->stop();
- }
- }
-
- foreach ($this->listeners as $listener) {
- $listener->$notifyMethod($test, $e, $time);
- }
-
- $this->lastTestFailed = true;
- $this->time += $time;
- }
-
- /**
- * Adds a failure to the list of failures.
- * The passed in exception caused the failure.
- *
- * @param PHPUnit_Framework_Test $test
- * @param PHPUnit_Framework_AssertionFailedError $e
- * @param float $time
- */
- public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time)
- {
- if ($e instanceof PHPUnit_Framework_RiskyTest ||
- $e instanceof PHPUnit_Framework_OutputError) {
- $this->risky[] = new PHPUnit_Framework_TestFailure($test, $e);
- $notifyMethod = 'addRiskyTest';
-
- if ($this->stopOnRisky) {
- $this->stop();
- }
- } elseif ($e instanceof PHPUnit_Framework_IncompleteTest) {
- $this->notImplemented[] = new PHPUnit_Framework_TestFailure($test, $e);
- $notifyMethod = 'addIncompleteTest';
-
- if ($this->stopOnIncomplete) {
- $this->stop();
- }
- } elseif ($e instanceof PHPUnit_Framework_SkippedTest) {
- $this->skipped[] = new PHPUnit_Framework_TestFailure($test, $e);
- $notifyMethod = 'addSkippedTest';
-
- if ($this->stopOnSkipped) {
- $this->stop();
- }
- } else {
- $this->failures[] = new PHPUnit_Framework_TestFailure($test, $e);
- $notifyMethod = 'addFailure';
-
- if ($this->stopOnFailure) {
- $this->stop();
- }
- }
-
- foreach ($this->listeners as $listener) {
- $listener->$notifyMethod($test, $e, $time);
- }
-
- $this->lastTestFailed = true;
- $this->time += $time;
- }
-
- /**
- * Informs the result that a testsuite will be started.
- *
- * @param PHPUnit_Framework_TestSuite $suite
- *
- * @since Method available since Release 2.2.0
- */
- public function startTestSuite(PHPUnit_Framework_TestSuite $suite)
- {
- if ($this->topTestSuite === null) {
- $this->topTestSuite = $suite;
- }
-
- foreach ($this->listeners as $listener) {
- $listener->startTestSuite($suite);
- }
- }
-
- /**
- * Informs the result that a testsuite was completed.
- *
- * @param PHPUnit_Framework_TestSuite $suite
- *
- * @since Method available since Release 2.2.0
- */
- public function endTestSuite(PHPUnit_Framework_TestSuite $suite)
- {
- foreach ($this->listeners as $listener) {
- $listener->endTestSuite($suite);
- }
- }
-
- /**
- * Informs the result that a test will be started.
- *
- * @param PHPUnit_Framework_Test $test
- */
- public function startTest(PHPUnit_Framework_Test $test)
- {
- $this->lastTestFailed = false;
- $this->runTests += count($test);
-
- foreach ($this->listeners as $listener) {
- $listener->startTest($test);
- }
- }
-
- /**
- * Informs the result that a test was completed.
- *
- * @param PHPUnit_Framework_Test $test
- * @param float $time
- */
- public function endTest(PHPUnit_Framework_Test $test, $time)
- {
- foreach ($this->listeners as $listener) {
- $listener->endTest($test, $time);
- }
-
- if (!$this->lastTestFailed && $test instanceof PHPUnit_Framework_TestCase) {
- $class = get_class($test);
- $key = $class . '::' . $test->getName();
-
- $this->passed[$key] = array(
- 'result' => $test->getResult(),
- 'size' => PHPUnit_Util_Test::getSize(
- $class,
- $test->getName(false)
- )
- );
-
- $this->time += $time;
- }
- }
-
- /**
- * Returns true if no risky test occurred.
- *
- * @return bool
- *
- * @since Method available since Release 4.0.0
- */
- public function allHarmless()
- {
- return $this->riskyCount() == 0;
- }
-
- /**
- * Gets the number of risky tests.
- *
- * @return int
- *
- * @since Method available since Release 4.0.0
- */
- public function riskyCount()
- {
- return count($this->risky);
- }
-
- /**
- * Returns true if no incomplete test occurred.
- *
- * @return bool
- */
- public function allCompletelyImplemented()
- {
- return $this->notImplementedCount() == 0;
- }
-
- /**
- * Gets the number of incomplete tests.
- *
- * @return int
- */
- public function notImplementedCount()
- {
- return count($this->notImplemented);
- }
-
- /**
- * Returns an Enumeration for the risky tests.
- *
- * @return array
- *
- * @since Method available since Release 4.0.0
- */
- public function risky()
- {
- return $this->risky;
- }
-
- /**
- * Returns an Enumeration for the incomplete tests.
- *
- * @return array
- */
- public function notImplemented()
- {
- return $this->notImplemented;
- }
-
- /**
- * Returns true if no test has been skipped.
- *
- * @return bool
- *
- * @since Method available since Release 3.0.0
- */
- public function noneSkipped()
- {
- return $this->skippedCount() == 0;
- }
-
- /**
- * Gets the number of skipped tests.
- *
- * @return int
- *
- * @since Method available since Release 3.0.0
- */
- public function skippedCount()
- {
- return count($this->skipped);
- }
-
- /**
- * Returns an Enumeration for the skipped tests.
- *
- * @return array
- *
- * @since Method available since Release 3.0.0
- */
- public function skipped()
- {
- return $this->skipped;
- }
-
- /**
- * Gets the number of detected errors.
- *
- * @return int
- */
- public function errorCount()
- {
- return count($this->errors);
- }
-
- /**
- * Returns an Enumeration for the errors.
- *
- * @return array
- */
- public function errors()
- {
- return $this->errors;
- }
-
- /**
- * Gets the number of detected failures.
- *
- * @return int
- */
- public function failureCount()
- {
- return count($this->failures);
- }
-
- /**
- * Returns an Enumeration for the failures.
- *
- * @return array
- */
- public function failures()
- {
- return $this->failures;
- }
-
- /**
- * Returns the names of the tests that have passed.
- *
- * @return array
- *
- * @since Method available since Release 3.4.0
- */
- public function passed()
- {
- return $this->passed;
- }
-
- /**
- * Returns the (top) test suite.
- *
- * @return PHPUnit_Framework_TestSuite
- *
- * @since Method available since Release 3.0.0
- */
- public function topTestSuite()
- {
- return $this->topTestSuite;
- }
-
- /**
- * Returns whether code coverage information should be collected.
- *
- * @return bool If code coverage should be collected
- *
- * @since Method available since Release 3.2.0
- */
- public function getCollectCodeCoverageInformation()
- {
- return $this->codeCoverage !== null;
- }
-
- /**
- * Runs a TestCase.
- *
- * @param PHPUnit_Framework_Test $test
- */
- public function run(PHPUnit_Framework_Test $test)
- {
- PHPUnit_Framework_Assert::resetCount();
-
- $error = false;
- $failure = false;
- $incomplete = false;
- $risky = false;
- $skipped = false;
-
- $this->startTest($test);
-
- $errorHandlerSet = false;
-
- if ($this->convertErrorsToExceptions) {
- $oldErrorHandler = set_error_handler(
- array('PHPUnit_Util_ErrorHandler', 'handleError'),
- E_ALL | E_STRICT
- );
-
- if ($oldErrorHandler === null) {
- $errorHandlerSet = true;
- } else {
- restore_error_handler();
- }
- }
-
- $collectCodeCoverage = $this->codeCoverage !== null &&
- !$test instanceof PHPUnit_Extensions_SeleniumTestCase &&
- !$test instanceof PHPUnit_Framework_Warning;
-
- if ($collectCodeCoverage) {
- // We need to blacklist test source files when no whitelist is used.
- if (!$this->codeCoverage->filter()->hasWhitelist()) {
- $classes = $this->getHierarchy(get_class($test), true);
-
- foreach ($classes as $class) {
- $this->codeCoverage->filter()->addFileToBlacklist(
- $class->getFileName()
- );
- }
- }
-
- $this->codeCoverage->start($test);
- }
-
- PHP_Timer::start();
-
- try {
- if (!$test instanceof PHPUnit_Framework_Warning &&
- $test->getSize() != PHPUnit_Util_Test::UNKNOWN &&
- $this->beStrictAboutTestSize &&
- extension_loaded('pcntl') && class_exists('PHP_Invoker')) {
- switch ($test->getSize()) {
- case PHPUnit_Util_Test::SMALL:
- $_timeout = $this->timeoutForSmallTests;
- break;
-
- case PHPUnit_Util_Test::MEDIUM:
- $_timeout = $this->timeoutForMediumTests;
- break;
-
- case PHPUnit_Util_Test::LARGE:
- $_timeout = $this->timeoutForLargeTests;
- break;
- }
-
- $invoker = new PHP_Invoker;
- $invoker->invoke(array($test, 'runBare'), array(), $_timeout);
- } else {
- $test->runBare();
- }
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- $failure = true;
-
- if ($e instanceof PHPUnit_Framework_RiskyTestError) {
- $risky = true;
- } elseif ($e instanceof PHPUnit_Framework_IncompleteTestError) {
- $incomplete = true;
- } elseif ($e instanceof PHPUnit_Framework_SkippedTestError) {
- $skipped = true;
- }
- } catch (PHPUnit_Framework_Exception $e) {
- $error = true;
- } catch (Throwable $e) {
- $e = new PHPUnit_Framework_ExceptionWrapper($e);
- $error = true;
- } catch (Exception $e) {
- $e = new PHPUnit_Framework_ExceptionWrapper($e);
- $error = true;
- }
-
- $time = PHP_Timer::stop();
- $test->addToAssertionCount(PHPUnit_Framework_Assert::getCount());
-
- if ($this->beStrictAboutTestsThatDoNotTestAnything &&
- $test->getNumAssertions() == 0) {
- $risky = true;
- }
-
- if ($collectCodeCoverage) {
- $append = !$risky && !$incomplete && !$skipped;
- $linesToBeCovered = array();
- $linesToBeUsed = array();
-
- if ($append && $test instanceof PHPUnit_Framework_TestCase) {
- $linesToBeCovered = PHPUnit_Util_Test::getLinesToBeCovered(
- get_class($test),
- $test->getName(false)
- );
-
- $linesToBeUsed = PHPUnit_Util_Test::getLinesToBeUsed(
- get_class($test),
- $test->getName(false)
- );
- }
-
- try {
- $this->codeCoverage->stop(
- $append,
- $linesToBeCovered,
- $linesToBeUsed
- );
- } catch (PHP_CodeCoverage_Exception_UnintentionallyCoveredCode $cce) {
- $this->addFailure(
- $test,
- new PHPUnit_Framework_UnintentionallyCoveredCodeError(
- 'This test executed code that is not listed as code to be covered or used:' .
- PHP_EOL . $cce->getMessage()
- ),
- $time
- );
- } catch (PHPUnit_Framework_InvalidCoversTargetException $cce) {
- $this->addFailure(
- $test,
- new PHPUnit_Framework_InvalidCoversTargetError(
- $cce->getMessage()
- ),
- $time
- );
- } catch (PHP_CodeCoverage_Exception $cce) {
- $error = true;
-
- if (!isset($e)) {
- $e = $cce;
- }
- }
- }
-
- if ($errorHandlerSet === true) {
- restore_error_handler();
- }
-
- if ($error === true) {
- $this->addError($test, $e, $time);
- } elseif ($failure === true) {
- $this->addFailure($test, $e, $time);
- } elseif ($this->beStrictAboutTestsThatDoNotTestAnything &&
- $test->getNumAssertions() == 0) {
- $this->addFailure(
- $test,
- new PHPUnit_Framework_RiskyTestError(
- 'This test did not perform any assertions'
- ),
- $time
- );
- } elseif ($this->beStrictAboutOutputDuringTests && $test->hasOutput()) {
- $this->addFailure(
- $test,
- new PHPUnit_Framework_OutputError(
- sprintf(
- 'This test printed output: %s',
- $test->getActualOutput()
- )
- ),
- $time
- );
- } elseif ($this->beStrictAboutTodoAnnotatedTests && $test instanceof PHPUnit_Framework_TestCase) {
- $annotations = $test->getAnnotations();
-
- if (isset($annotations['method']['todo'])) {
- $this->addFailure(
- $test,
- new PHPUnit_Framework_RiskyTestError(
- 'Test method is annotated with @todo'
- ),
- $time
- );
- }
- }
-
- $this->endTest($test, $time);
- }
-
- /**
- * Gets the number of run tests.
- *
- * @return int
- */
- public function count()
- {
- return $this->runTests;
- }
-
- /**
- * Checks whether the test run should stop.
- *
- * @return bool
- */
- public function shouldStop()
- {
- return $this->stop;
- }
-
- /**
- * Marks that the test run should stop.
- */
- public function stop()
- {
- $this->stop = true;
- }
-
- /**
- * Returns the PHP_CodeCoverage object.
- *
- * @return PHP_CodeCoverage
- *
- * @since Method available since Release 3.5.0
- */
- public function getCodeCoverage()
- {
- return $this->codeCoverage;
- }
-
- /**
- * Sets the PHP_CodeCoverage object.
- *
- * @param PHP_CodeCoverage $codeCoverage
- *
- * @since Method available since Release 3.6.0
- */
- public function setCodeCoverage(PHP_CodeCoverage $codeCoverage)
- {
- $this->codeCoverage = $codeCoverage;
- }
-
- /**
- * Enables or disables the error-to-exception conversion.
- *
- * @param bool $flag
- *
- * @throws PHPUnit_Framework_Exception
- *
- * @since Method available since Release 3.2.14
- */
- public function convertErrorsToExceptions($flag)
- {
- if (!is_bool($flag)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'boolean');
- }
-
- $this->convertErrorsToExceptions = $flag;
- }
-
- /**
- * Returns the error-to-exception conversion setting.
- *
- * @return bool
- *
- * @since Method available since Release 3.4.0
- */
- public function getConvertErrorsToExceptions()
- {
- return $this->convertErrorsToExceptions;
- }
-
- /**
- * Enables or disables the stopping when an error occurs.
- *
- * @param bool $flag
- *
- * @throws PHPUnit_Framework_Exception
- *
- * @since Method available since Release 3.5.0
- */
- public function stopOnError($flag)
- {
- if (!is_bool($flag)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'boolean');
- }
-
- $this->stopOnError = $flag;
- }
-
- /**
- * Enables or disables the stopping when a failure occurs.
- *
- * @param bool $flag
- *
- * @throws PHPUnit_Framework_Exception
- *
- * @since Method available since Release 3.1.0
- */
- public function stopOnFailure($flag)
- {
- if (!is_bool($flag)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'boolean');
- }
-
- $this->stopOnFailure = $flag;
- }
-
- /**
- * @param bool $flag
- *
- * @throws PHPUnit_Framework_Exception
- *
- * @since Method available since Release 4.0.0
- */
- public function beStrictAboutTestsThatDoNotTestAnything($flag)
- {
- if (!is_bool($flag)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'boolean');
- }
-
- $this->beStrictAboutTestsThatDoNotTestAnything = $flag;
- }
-
- /**
- * @return bool
- *
- * @since Method available since Release 4.0.0
- */
- public function isStrictAboutTestsThatDoNotTestAnything()
- {
- return $this->beStrictAboutTestsThatDoNotTestAnything;
- }
-
- /**
- * @param bool $flag
- *
- * @throws PHPUnit_Framework_Exception
- *
- * @since Method available since Release 4.0.0
- */
- public function beStrictAboutOutputDuringTests($flag)
- {
- if (!is_bool($flag)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'boolean');
- }
-
- $this->beStrictAboutOutputDuringTests = $flag;
- }
-
- /**
- * @return bool
- *
- * @since Method available since Release 4.0.0
- */
- public function isStrictAboutOutputDuringTests()
- {
- return $this->beStrictAboutOutputDuringTests;
- }
-
- /**
- * @param bool $flag
- *
- * @throws PHPUnit_Framework_Exception
- *
- * @since Method available since Release 4.0.0
- */
- public function beStrictAboutTestSize($flag)
- {
- if (!is_bool($flag)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'boolean');
- }
-
- $this->beStrictAboutTestSize = $flag;
- }
-
- /**
- * @return bool
- *
- * @since Method available since Release 4.0.0
- */
- public function isStrictAboutTestSize()
- {
- return $this->beStrictAboutTestSize;
- }
-
- /**
- * @param bool $flag
- *
- * @throws PHPUnit_Framework_Exception
- *
- * @since Method available since Release 4.2.0
- */
- public function beStrictAboutTodoAnnotatedTests($flag)
- {
- if (!is_bool($flag)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'boolean');
- }
-
- $this->beStrictAboutTodoAnnotatedTests = $flag;
- }
-
- /**
- * @return bool
- *
- * @since Method available since Release 4.2.0
- */
- public function isStrictAboutTodoAnnotatedTests()
- {
- return $this->beStrictAboutTodoAnnotatedTests;
- }
-
- /**
- * Enables or disables the stopping for risky tests.
- *
- * @param bool $flag
- *
- * @throws PHPUnit_Framework_Exception
- *
- * @since Method available since Release 4.0.0
- */
- public function stopOnRisky($flag)
- {
- if (!is_bool($flag)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'boolean');
- }
-
- $this->stopOnRisky = $flag;
- }
-
- /**
- * Enables or disables the stopping for incomplete tests.
- *
- * @param bool $flag
- *
- * @throws PHPUnit_Framework_Exception
- *
- * @since Method available since Release 3.5.0
- */
- public function stopOnIncomplete($flag)
- {
- if (!is_bool($flag)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'boolean');
- }
-
- $this->stopOnIncomplete = $flag;
- }
-
- /**
- * Enables or disables the stopping for skipped tests.
- *
- * @param bool $flag
- *
- * @throws PHPUnit_Framework_Exception
- *
- * @since Method available since Release 3.1.0
- */
- public function stopOnSkipped($flag)
- {
- if (!is_bool($flag)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'boolean');
- }
-
- $this->stopOnSkipped = $flag;
- }
-
- /**
- * Returns the time spent running the tests.
- *
- * @return float
- */
- public function time()
- {
- return $this->time;
- }
-
- /**
- * Returns whether the entire test was successful or not.
- *
- * @return bool
- */
- public function wasSuccessful()
- {
- return empty($this->errors) && empty($this->failures);
- }
-
- /**
- * Sets the timeout for small tests.
- *
- * @param int $timeout
- *
- * @throws PHPUnit_Framework_Exception
- *
- * @since Method available since Release 3.6.0
- */
- public function setTimeoutForSmallTests($timeout)
- {
- if (!is_integer($timeout)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'integer');
- }
-
- $this->timeoutForSmallTests = $timeout;
- }
-
- /**
- * Sets the timeout for medium tests.
- *
- * @param int $timeout
- *
- * @throws PHPUnit_Framework_Exception
- *
- * @since Method available since Release 3.6.0
- */
- public function setTimeoutForMediumTests($timeout)
- {
- if (!is_integer($timeout)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'integer');
- }
-
- $this->timeoutForMediumTests = $timeout;
- }
-
- /**
- * Sets the timeout for large tests.
- *
- * @param int $timeout
- *
- * @throws PHPUnit_Framework_Exception
- *
- * @since Method available since Release 3.6.0
- */
- public function setTimeoutForLargeTests($timeout)
- {
- if (!is_integer($timeout)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'integer');
- }
-
- $this->timeoutForLargeTests = $timeout;
- }
-
- /**
- * Returns the class hierarchy for a given class.
- *
- * @param string $className
- * @param bool $asReflectionObjects
- *
- * @return array
- */
- protected function getHierarchy($className, $asReflectionObjects = false)
- {
- if ($asReflectionObjects) {
- $classes = array(new ReflectionClass($className));
- } else {
- $classes = array($className);
- }
-
- $done = false;
-
- while (!$done) {
- if ($asReflectionObjects) {
- $class = new ReflectionClass(
- $classes[count($classes) - 1]->getName()
- );
- } else {
- $class = new ReflectionClass($classes[count($classes) - 1]);
- }
-
- $parent = $class->getParentClass();
-
- if ($parent !== false) {
- if ($asReflectionObjects) {
- $classes[] = $parent;
- } else {
- $classes[] = $parent->getName();
- }
- } else {
- $done = true;
- }
- }
-
- return $classes;
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/TestSuite.php b/vendor/phpunit/phpunit/src/Framework/TestSuite.php
deleted file mode 100644
index 2a01e2ca..00000000
--- a/vendor/phpunit/phpunit/src/Framework/TestSuite.php
+++ /dev/null
@@ -1,1011 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * A TestSuite is a composite of Tests. It runs a collection of test cases.
- *
- * @since Class available since Release 2.0.0
- */
-class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Framework_SelfDescribing, IteratorAggregate
-{
- /**
- * Last count of tests in this suite.
- *
- * @var int|null
- */
- private $cachedNumTests;
-
- /**
- * Enable or disable the backup and restoration of the $GLOBALS array.
- *
- * @var bool
- */
- protected $backupGlobals = null;
-
- /**
- * Enable or disable the backup and restoration of static attributes.
- *
- * @var bool
- */
- protected $backupStaticAttributes = null;
-
- /**
- * @var bool
- */
- private $disallowChangesToGlobalState = null;
-
- /**
- * @var bool
- */
- protected $runTestInSeparateProcess = false;
-
- /**
- * The name of the test suite.
- *
- * @var string
- */
- protected $name = '';
-
- /**
- * The test groups of the test suite.
- *
- * @var array
- */
- protected $groups = array();
-
- /**
- * The tests in the test suite.
- *
- * @var array
- */
- protected $tests = array();
-
- /**
- * The number of tests in the test suite.
- *
- * @var int
- */
- protected $numTests = -1;
-
- /**
- * @var bool
- */
- protected $testCase = false;
-
- /**
- * @var array
- */
- protected $foundClasses = array();
-
- /**
- * @var PHPUnit_Runner_Filter_Factory
- */
- private $iteratorFilter = null;
-
- /**
- * Constructs a new TestSuite:
- *
- * - PHPUnit_Framework_TestSuite() constructs an empty TestSuite.
- *
- * - PHPUnit_Framework_TestSuite(ReflectionClass) constructs a
- * TestSuite from the given class.
- *
- * - PHPUnit_Framework_TestSuite(ReflectionClass, String)
- * constructs a TestSuite from the given class with the given
- * name.
- *
- * - PHPUnit_Framework_TestSuite(String) either constructs a
- * TestSuite from the given class (if the passed string is the
- * name of an existing class) or constructs an empty TestSuite
- * with the given name.
- *
- * @param mixed $theClass
- * @param string $name
- *
- * @throws PHPUnit_Framework_Exception
- */
- public function __construct($theClass = '', $name = '')
- {
- $argumentsValid = false;
-
- if (is_object($theClass) &&
- $theClass instanceof ReflectionClass) {
- $argumentsValid = true;
- } elseif (is_string($theClass) &&
- $theClass !== '' &&
- class_exists($theClass, false)) {
- $argumentsValid = true;
-
- if ($name == '') {
- $name = $theClass;
- }
-
- $theClass = new ReflectionClass($theClass);
- } elseif (is_string($theClass)) {
- $this->setName($theClass);
-
- return;
- }
-
- if (!$argumentsValid) {
- throw new PHPUnit_Framework_Exception;
- }
-
- if (!$theClass->isSubclassOf('PHPUnit_Framework_TestCase')) {
- throw new PHPUnit_Framework_Exception(
- 'Class "' . $theClass->name . '" does not extend PHPUnit_Framework_TestCase.'
- );
- }
-
- if ($name != '') {
- $this->setName($name);
- } else {
- $this->setName($theClass->getName());
- }
-
- $constructor = $theClass->getConstructor();
-
- if ($constructor !== null &&
- !$constructor->isPublic()) {
- $this->addTest(
- self::warning(
- sprintf(
- 'Class "%s" has no public constructor.',
- $theClass->getName()
- )
- )
- );
-
- return;
- }
-
- foreach ($theClass->getMethods() as $method) {
- $this->addTestMethod($theClass, $method);
- }
-
- if (empty($this->tests)) {
- $this->addTest(
- self::warning(
- sprintf(
- 'No tests found in class "%s".',
- $theClass->getName()
- )
- )
- );
- }
-
- $this->testCase = true;
- }
-
- /**
- * Returns a string representation of the test suite.
- *
- * @return string
- */
- public function toString()
- {
- return $this->getName();
- }
-
- /**
- * Adds a test to the suite.
- *
- * @param PHPUnit_Framework_Test $test
- * @param array $groups
- */
- public function addTest(PHPUnit_Framework_Test $test, $groups = array())
- {
- $class = new ReflectionClass($test);
-
- if (!$class->isAbstract()) {
- $this->tests[] = $test;
- $this->numTests = -1;
-
- if ($test instanceof self &&
- empty($groups)) {
- $groups = $test->getGroups();
- }
-
- if (empty($groups)) {
- $groups = array('default');
- }
-
- foreach ($groups as $group) {
- if (!isset($this->groups[$group])) {
- $this->groups[$group] = array($test);
- } else {
- $this->groups[$group][] = $test;
- }
- }
- }
- }
-
- /**
- * Adds the tests from the given class to the suite.
- *
- * @param mixed $testClass
- *
- * @throws PHPUnit_Framework_Exception
- */
- public function addTestSuite($testClass)
- {
- if (is_string($testClass) && class_exists($testClass)) {
- $testClass = new ReflectionClass($testClass);
- }
-
- if (!is_object($testClass)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(
- 1,
- 'class name or object'
- );
- }
-
- if ($testClass instanceof self) {
- $this->addTest($testClass);
- } elseif ($testClass instanceof ReflectionClass) {
- $suiteMethod = false;
-
- if (!$testClass->isAbstract()) {
- if ($testClass->hasMethod(PHPUnit_Runner_BaseTestRunner::SUITE_METHODNAME)) {
- $method = $testClass->getMethod(
- PHPUnit_Runner_BaseTestRunner::SUITE_METHODNAME
- );
-
- if ($method->isStatic()) {
- $this->addTest(
- $method->invoke(null, $testClass->getName())
- );
-
- $suiteMethod = true;
- }
- }
- }
-
- if (!$suiteMethod && !$testClass->isAbstract()) {
- $this->addTest(new self($testClass));
- }
- } else {
- throw new PHPUnit_Framework_Exception;
- }
- }
-
- /**
- * Wraps both addTest() and addTestSuite
- * as well as the separate import statements for the user's convenience.
- *
- * If the named file cannot be read or there are no new tests that can be
- * added, a PHPUnit_Framework_Warning will be created instead,
- * leaving the current test run untouched.
- *
- * @param string $filename
- *
- * @throws PHPUnit_Framework_Exception
- *
- * @since Method available since Release 2.3.0
- */
- public function addTestFile($filename)
- {
- if (!is_string($filename)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
- }
-
- if (file_exists($filename) && substr($filename, -5) == '.phpt') {
- $this->addTest(
- new PHPUnit_Extensions_PhptTestCase($filename)
- );
-
- return;
- }
-
- // The given file may contain further stub classes in addition to the
- // test class itself. Figure out the actual test class.
- $classes = get_declared_classes();
- $filename = PHPUnit_Util_Fileloader::checkAndLoad($filename);
- $newClasses = array_diff(get_declared_classes(), $classes);
-
- // The diff is empty in case a parent class (with test methods) is added
- // AFTER a child class that inherited from it. To account for that case,
- // cumulate all discovered classes, so the parent class may be found in
- // a later invocation.
- if ($newClasses) {
- // On the assumption that test classes are defined first in files,
- // process discovered classes in approximate LIFO order, so as to
- // avoid unnecessary reflection.
- $this->foundClasses = array_merge($newClasses, $this->foundClasses);
- }
-
- // The test class's name must match the filename, either in full, or as
- // a PEAR/PSR-0 prefixed shortname ('NameSpace_ShortName'), or as a
- // PSR-1 local shortname ('NameSpace\ShortName'). The comparison must be
- // anchored to prevent false-positive matches (e.g., 'OtherShortName').
- $shortname = basename($filename, '.php');
- $shortnameRegEx = '/(?:^|_|\\\\)' . preg_quote($shortname, '/') . '$/';
-
- foreach ($this->foundClasses as $i => $className) {
- if (preg_match($shortnameRegEx, $className)) {
- $class = new ReflectionClass($className);
-
- if ($class->getFileName() == $filename) {
- $newClasses = array($className);
- unset($this->foundClasses[$i]);
- break;
- }
- }
- }
-
- foreach ($newClasses as $className) {
- $class = new ReflectionClass($className);
-
- if (!$class->isAbstract()) {
- if ($class->hasMethod(PHPUnit_Runner_BaseTestRunner::SUITE_METHODNAME)) {
- $method = $class->getMethod(
- PHPUnit_Runner_BaseTestRunner::SUITE_METHODNAME
- );
-
- if ($method->isStatic()) {
- $this->addTest($method->invoke(null, $className));
- }
- } elseif ($class->implementsInterface('PHPUnit_Framework_Test')) {
- $this->addTestSuite($class);
- }
- }
- }
-
- $this->numTests = -1;
- }
-
- /**
- * Wrapper for addTestFile() that adds multiple test files.
- *
- * @param array|Iterator $filenames
- *
- * @throws PHPUnit_Framework_Exception
- *
- * @since Method available since Release 2.3.0
- */
- public function addTestFiles($filenames)
- {
- if (!(is_array($filenames) ||
- (is_object($filenames) && $filenames instanceof Iterator))) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(
- 1,
- 'array or iterator'
- );
- }
-
- foreach ($filenames as $filename) {
- $this->addTestFile((string) $filename);
- }
- }
-
- /**
- * Counts the number of test cases that will be run by this test.
- *
- * @param bool $preferCache Indicates if cache is preferred.
- *
- * @return int
- */
- public function count($preferCache = false)
- {
- if ($preferCache && $this->cachedNumTests != null) {
- $numTests = $this->cachedNumTests;
- } else {
- $numTests = 0;
- foreach ($this as $test) {
- $numTests += count($test);
- }
- $this->cachedNumTests = $numTests;
- }
-
- return $numTests;
- }
-
- /**
- * @param ReflectionClass $theClass
- * @param string $name
- *
- * @return PHPUnit_Framework_Test
- *
- * @throws PHPUnit_Framework_Exception
- */
- public static function createTest(ReflectionClass $theClass, $name)
- {
- $className = $theClass->getName();
-
- if (!$theClass->isInstantiable()) {
- return self::warning(
- sprintf('Cannot instantiate class "%s".', $className)
- );
- }
-
- $backupSettings = PHPUnit_Util_Test::getBackupSettings(
- $className,
- $name
- );
-
- $preserveGlobalState = PHPUnit_Util_Test::getPreserveGlobalStateSettings(
- $className,
- $name
- );
-
- $runTestInSeparateProcess = PHPUnit_Util_Test::getProcessIsolationSettings(
- $className,
- $name
- );
-
- $constructor = $theClass->getConstructor();
-
- if ($constructor !== null) {
- $parameters = $constructor->getParameters();
-
- // TestCase() or TestCase($name)
- if (count($parameters) < 2) {
- $test = new $className;
- } // TestCase($name, $data)
- else {
- try {
- $data = PHPUnit_Util_Test::getProvidedData(
- $className,
- $name
- );
- } catch (PHPUnit_Framework_IncompleteTestError $e) {
- $message = sprintf(
- 'Test for %s::%s marked incomplete by data provider',
- $className,
- $name
- );
-
- $_message = $e->getMessage();
-
- if (!empty($_message)) {
- $message .= "\n" . $_message;
- }
-
- $data = self::incompleteTest($className, $name, $message);
- } catch (PHPUnit_Framework_SkippedTestError $e) {
- $message = sprintf(
- 'Test for %s::%s skipped by data provider',
- $className,
- $name
- );
-
- $_message = $e->getMessage();
-
- if (!empty($_message)) {
- $message .= "\n" . $_message;
- }
-
- $data = self::skipTest($className, $name, $message);
- } catch (Throwable $_t) {
- $t = $_t;
- } catch (Exception $_t) {
- $t = $_t;
- }
-
- if (isset($t)) {
- $message = sprintf(
- 'The data provider specified for %s::%s is invalid.',
- $className,
- $name
- );
-
- $_message = $t->getMessage();
-
- if (!empty($_message)) {
- $message .= "\n" . $_message;
- }
-
- $data = self::warning($message);
- }
-
- // Test method with @dataProvider.
- if (isset($data)) {
- $test = new PHPUnit_Framework_TestSuite_DataProvider(
- $className . '::' . $name
- );
-
- if (empty($data)) {
- $data = self::warning(
- sprintf(
- 'No tests found in suite "%s".',
- $test->getName()
- )
- );
- }
-
- $groups = PHPUnit_Util_Test::getGroups($className, $name);
-
- if ($data instanceof PHPUnit_Framework_Warning ||
- $data instanceof PHPUnit_Framework_SkippedTestCase ||
- $data instanceof PHPUnit_Framework_IncompleteTestCase) {
- $test->addTest($data, $groups);
- } else {
- foreach ($data as $_dataName => $_data) {
- $_test = new $className($name, $_data, $_dataName);
-
- if ($runTestInSeparateProcess) {
- $_test->setRunTestInSeparateProcess(true);
-
- if ($preserveGlobalState !== null) {
- $_test->setPreserveGlobalState($preserveGlobalState);
- }
- }
-
- if ($backupSettings['backupGlobals'] !== null) {
- $_test->setBackupGlobals(
- $backupSettings['backupGlobals']
- );
- }
-
- if ($backupSettings['backupStaticAttributes'] !== null) {
- $_test->setBackupStaticAttributes(
- $backupSettings['backupStaticAttributes']
- );
- }
-
- $test->addTest($_test, $groups);
- }
- }
- } else {
- $test = new $className;
- }
- }
- }
-
- if (!isset($test)) {
- throw new PHPUnit_Framework_Exception('No valid test provided.');
- }
-
- if ($test instanceof PHPUnit_Framework_TestCase) {
- $test->setName($name);
-
- if ($runTestInSeparateProcess) {
- $test->setRunTestInSeparateProcess(true);
-
- if ($preserveGlobalState !== null) {
- $test->setPreserveGlobalState($preserveGlobalState);
- }
- }
-
- if ($backupSettings['backupGlobals'] !== null) {
- $test->setBackupGlobals($backupSettings['backupGlobals']);
- }
-
- if ($backupSettings['backupStaticAttributes'] !== null) {
- $test->setBackupStaticAttributes(
- $backupSettings['backupStaticAttributes']
- );
- }
- }
-
- return $test;
- }
-
- /**
- * Creates a default TestResult object.
- *
- * @return PHPUnit_Framework_TestResult
- */
- protected function createResult()
- {
- return new PHPUnit_Framework_TestResult;
- }
-
- /**
- * Returns the name of the suite.
- *
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Returns the test groups of the suite.
- *
- * @return array
- *
- * @since Method available since Release 3.2.0
- */
- public function getGroups()
- {
- return array_keys($this->groups);
- }
-
- public function getGroupDetails()
- {
- return $this->groups;
- }
-
- /**
- * Set tests groups of the test case
- *
- * @param array $groups
- *
- * @since Method available since Release 4.0.0
- */
- public function setGroupDetails(array $groups)
- {
- $this->groups = $groups;
- }
-
- /**
- * Runs the tests and collects their result in a TestResult.
- *
- * @param PHPUnit_Framework_TestResult $result
- *
- * @return PHPUnit_Framework_TestResult
- */
- public function run(PHPUnit_Framework_TestResult $result = null)
- {
- if ($result === null) {
- $result = $this->createResult();
- }
-
- if (count($this) == 0) {
- return $result;
- }
-
- $hookMethods = PHPUnit_Util_Test::getHookMethods($this->name);
-
- $result->startTestSuite($this);
-
- try {
- $this->setUp();
-
- foreach ($hookMethods['beforeClass'] as $beforeClassMethod) {
- if ($this->testCase === true &&
- class_exists($this->name, false) &&
- method_exists($this->name, $beforeClassMethod)) {
- if ($missingRequirements = PHPUnit_Util_Test::getMissingRequirements($this->name, $beforeClassMethod)) {
- $this->markTestSuiteSkipped(implode(PHP_EOL, $missingRequirements));
- }
-
- call_user_func(array($this->name, $beforeClassMethod));
- }
- }
- } catch (PHPUnit_Framework_SkippedTestSuiteError $e) {
- $numTests = count($this);
-
- for ($i = 0; $i < $numTests; $i++) {
- $result->startTest($this);
- $result->addFailure($this, $e, 0);
- $result->endTest($this, 0);
- }
-
- $this->tearDown();
- $result->endTestSuite($this);
-
- return $result;
- } catch (Throwable $_t) {
- $t = $_t;
- } catch (Exception $_t) {
- $t = $_t;
- }
-
- if (isset($t)) {
- $numTests = count($this);
-
- for ($i = 0; $i < $numTests; $i++) {
- $result->startTest($this);
- $result->addError($this, $t, 0);
- $result->endTest($this, 0);
- }
-
- $this->tearDown();
- $result->endTestSuite($this);
-
- return $result;
- }
-
- foreach ($this as $test) {
- if ($result->shouldStop()) {
- break;
- }
-
- if ($test instanceof PHPUnit_Framework_TestCase ||
- $test instanceof self) {
- $test->setDisallowChangesToGlobalState($this->disallowChangesToGlobalState);
- $test->setBackupGlobals($this->backupGlobals);
- $test->setBackupStaticAttributes($this->backupStaticAttributes);
- $test->setRunTestInSeparateProcess($this->runTestInSeparateProcess);
- }
-
- $test->run($result);
- }
-
- foreach ($hookMethods['afterClass'] as $afterClassMethod) {
- if ($this->testCase === true && class_exists($this->name, false) && method_exists($this->name, $afterClassMethod)) {
- call_user_func(array($this->name, $afterClassMethod));
- }
- }
-
- $this->tearDown();
-
- $result->endTestSuite($this);
-
- return $result;
- }
-
- /**
- * @param bool $runTestInSeparateProcess
- *
- * @throws PHPUnit_Framework_Exception
- *
- * @since Method available since Release 3.7.0
- */
- public function setRunTestInSeparateProcess($runTestInSeparateProcess)
- {
- if (is_bool($runTestInSeparateProcess)) {
- $this->runTestInSeparateProcess = $runTestInSeparateProcess;
- } else {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'boolean');
- }
- }
-
- /**
- * Runs a test.
- *
- * @deprecated
- *
- * @param PHPUnit_Framework_Test $test
- * @param PHPUnit_Framework_TestResult $result
- */
- public function runTest(PHPUnit_Framework_Test $test, PHPUnit_Framework_TestResult $result)
- {
- $test->run($result);
- }
-
- /**
- * Sets the name of the suite.
- *
- * @param string
- */
- public function setName($name)
- {
- $this->name = $name;
- }
-
- /**
- * Returns the test at the given index.
- *
- * @param int
- *
- * @return PHPUnit_Framework_Test
- */
- public function testAt($index)
- {
- if (isset($this->tests[$index])) {
- return $this->tests[$index];
- } else {
- return false;
- }
- }
-
- /**
- * Returns the tests as an enumeration.
- *
- * @return array
- */
- public function tests()
- {
- return $this->tests;
- }
-
- /**
- * Set tests of the test suite
- *
- * @param array $tests
- *
- * @since Method available since Release 4.0.0
- */
- public function setTests(array $tests)
- {
- $this->tests = $tests;
- }
-
- /**
- * Mark the test suite as skipped.
- *
- * @param string $message
- *
- * @throws PHPUnit_Framework_SkippedTestSuiteError
- *
- * @since Method available since Release 3.0.0
- */
- public function markTestSuiteSkipped($message = '')
- {
- throw new PHPUnit_Framework_SkippedTestSuiteError($message);
- }
-
- /**
- * @param ReflectionClass $class
- * @param ReflectionMethod $method
- */
- protected function addTestMethod(ReflectionClass $class, ReflectionMethod $method)
- {
- if (!$this->isTestMethod($method)) {
- return;
- }
-
- $name = $method->getName();
-
- if (!$method->isPublic()) {
- $this->addTest(
- self::warning(
- sprintf(
- 'Test method "%s" in test class "%s" is not public.',
- $name,
- $class->getName()
- )
- )
- );
-
- return;
- }
-
- $test = self::createTest($class, $name);
-
- if ($test instanceof PHPUnit_Framework_TestCase ||
- $test instanceof PHPUnit_Framework_TestSuite_DataProvider) {
- $test->setDependencies(
- PHPUnit_Util_Test::getDependencies($class->getName(), $name)
- );
- }
-
- $this->addTest(
- $test,
- PHPUnit_Util_Test::getGroups($class->getName(), $name)
- );
- }
-
- /**
- * @param ReflectionMethod $method
- *
- * @return bool
- */
- public static function isTestMethod(ReflectionMethod $method)
- {
- if (strpos($method->name, 'test') === 0) {
- return true;
- }
-
- // @scenario on TestCase::testMethod()
- // @test on TestCase::testMethod()
- $doc_comment = $method->getDocComment();
-
- return strpos($doc_comment, '@test') !== false ||
- strpos($doc_comment, '@scenario') !== false;
- }
-
- /**
- * @param string $message
- *
- * @return PHPUnit_Framework_Warning
- */
- protected static function warning($message)
- {
- return new PHPUnit_Framework_Warning($message);
- }
-
- /**
- * @param string $class
- * @param string $methodName
- * @param string $message
- *
- * @return PHPUnit_Framework_SkippedTestCase
- *
- * @since Method available since Release 4.3.0
- */
- protected static function skipTest($class, $methodName, $message)
- {
- return new PHPUnit_Framework_SkippedTestCase($class, $methodName, $message);
- }
-
- /**
- * @param string $class
- * @param string $methodName
- * @param string $message
- *
- * @return PHPUnit_Framework_IncompleteTestCase
- *
- * @since Method available since Release 4.3.0
- */
- protected static function incompleteTest($class, $methodName, $message)
- {
- return new PHPUnit_Framework_IncompleteTestCase($class, $methodName, $message);
- }
-
- /**
- * @param bool $disallowChangesToGlobalState
- *
- * @since Method available since Release 4.6.0
- */
- public function setDisallowChangesToGlobalState($disallowChangesToGlobalState)
- {
- if (is_null($this->disallowChangesToGlobalState) && is_bool($disallowChangesToGlobalState)) {
- $this->disallowChangesToGlobalState = $disallowChangesToGlobalState;
- }
- }
-
- /**
- * @param bool $backupGlobals
- *
- * @since Method available since Release 3.3.0
- */
- public function setBackupGlobals($backupGlobals)
- {
- if (is_null($this->backupGlobals) && is_bool($backupGlobals)) {
- $this->backupGlobals = $backupGlobals;
- }
- }
-
- /**
- * @param bool $backupStaticAttributes
- *
- * @since Method available since Release 3.4.0
- */
- public function setBackupStaticAttributes($backupStaticAttributes)
- {
- if (is_null($this->backupStaticAttributes) &&
- is_bool($backupStaticAttributes)) {
- $this->backupStaticAttributes = $backupStaticAttributes;
- }
- }
-
- /**
- * Returns an iterator for this test suite.
- *
- * @return RecursiveIteratorIterator
- *
- * @since Method available since Release 3.1.0
- */
- public function getIterator()
- {
- $iterator = new PHPUnit_Util_TestSuiteIterator($this);
-
- if ($this->iteratorFilter !== null) {
- $iterator = $this->iteratorFilter->factory($iterator, $this);
- }
-
- return $iterator;
- }
-
- public function injectFilter(PHPUnit_Runner_Filter_Factory $filter)
- {
- $this->iteratorFilter = $filter;
- foreach ($this as $test) {
- if ($test instanceof self) {
- $test->injectFilter($filter);
- }
- }
- }
-
- /**
- * Template Method that is called before the tests
- * of this test suite are run.
- *
- * @since Method available since Release 3.1.0
- */
- protected function setUp()
- {
- }
-
- /**
- * Template Method that is called after the tests
- * of this test suite have finished running.
- *
- * @since Method available since Release 3.1.0
- */
- protected function tearDown()
- {
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/TestSuite/DataProvider.php b/vendor/phpunit/phpunit/src/Framework/TestSuite/DataProvider.php
deleted file mode 100644
index 61062035..00000000
--- a/vendor/phpunit/phpunit/src/Framework/TestSuite/DataProvider.php
+++ /dev/null
@@ -1,27 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 3.4.0
- */
-class PHPUnit_Framework_TestSuite_DataProvider extends PHPUnit_Framework_TestSuite
-{
- /**
- * Sets the dependencies of a TestCase.
- *
- * @param array $dependencies
- */
- public function setDependencies(array $dependencies)
- {
- foreach ($this->tests as $test) {
- $test->setDependencies($dependencies);
- }
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/UnintentionallyCoveredCodeError.php b/vendor/phpunit/phpunit/src/Framework/UnintentionallyCoveredCodeError.php
deleted file mode 100644
index b24c041a..00000000
--- a/vendor/phpunit/phpunit/src/Framework/UnintentionallyCoveredCodeError.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Extension to PHPUnit_Framework_AssertionFailedError to mark the special
- * case of a test test that unintentionally covers code.
- *
- * @since Class available since Release 4.0.0
- */
-class PHPUnit_Framework_UnintentionallyCoveredCodeError extends PHPUnit_Framework_RiskyTestError
-{
-}
diff --git a/vendor/phpunit/phpunit/src/Framework/Warning.php b/vendor/phpunit/phpunit/src/Framework/Warning.php
deleted file mode 100644
index 8c7cef60..00000000
--- a/vendor/phpunit/phpunit/src/Framework/Warning.php
+++ /dev/null
@@ -1,81 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * A warning.
- *
- * @since Class available since Release 2.0.0
- */
-class PHPUnit_Framework_Warning extends PHPUnit_Framework_TestCase
-{
- /**
- * @var string
- */
- protected $message = '';
-
- /**
- * @var bool
- */
- protected $backupGlobals = false;
-
- /**
- * @var bool
- */
- protected $backupStaticAttributes = false;
-
- /**
- * @var bool
- */
- protected $runTestInSeparateProcess = false;
-
- /**
- * @var bool
- */
- protected $useErrorHandler = false;
-
- /**
- * @param string $message
- */
- public function __construct($message = '')
- {
- $this->message = $message;
- parent::__construct('Warning');
- }
-
- /**
- * @throws PHPUnit_Framework_Exception
- */
- protected function runTest()
- {
- $this->fail($this->message);
- }
-
- /**
- * @return string
- *
- * @since Method available since Release 3.0.0
- */
- public function getMessage()
- {
- return $this->message;
- }
-
- /**
- * Returns a string representation of the test case.
- *
- * @return string
- *
- * @since Method available since Release 3.4.0
- */
- public function toString()
- {
- return 'Warning';
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Runner/BaseTestRunner.php b/vendor/phpunit/phpunit/src/Runner/BaseTestRunner.php
deleted file mode 100644
index 15805dc7..00000000
--- a/vendor/phpunit/phpunit/src/Runner/BaseTestRunner.php
+++ /dev/null
@@ -1,140 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Base class for all test runners.
- *
- * @since Class available since Release 2.0.0
- */
-abstract class PHPUnit_Runner_BaseTestRunner
-{
- const STATUS_PASSED = 0;
- const STATUS_SKIPPED = 1;
- const STATUS_INCOMPLETE = 2;
- const STATUS_FAILURE = 3;
- const STATUS_ERROR = 4;
- const STATUS_RISKY = 5;
- const SUITE_METHODNAME = 'suite';
-
- /**
- * Returns the loader to be used.
- *
- * @return PHPUnit_Runner_TestSuiteLoader
- */
- public function getLoader()
- {
- return new PHPUnit_Runner_StandardTestSuiteLoader;
- }
-
- /**
- * Returns the Test corresponding to the given suite.
- * This is a template method, subclasses override
- * the runFailed() and clearStatus() methods.
- *
- * @param string $suiteClassName
- * @param string $suiteClassFile
- * @param mixed $suffixes
- *
- * @return PHPUnit_Framework_Test
- */
- public function getTest($suiteClassName, $suiteClassFile = '', $suffixes = '')
- {
- if (is_dir($suiteClassName) &&
- !is_file($suiteClassName . '.php') && empty($suiteClassFile)) {
- $facade = new File_Iterator_Facade;
- $files = $facade->getFilesAsArray(
- $suiteClassName,
- $suffixes
- );
-
- $suite = new PHPUnit_Framework_TestSuite($suiteClassName);
- $suite->addTestFiles($files);
-
- return $suite;
- }
-
- try {
- $testClass = $this->loadSuiteClass(
- $suiteClassName,
- $suiteClassFile
- );
- } catch (PHPUnit_Framework_Exception $e) {
- $this->runFailed($e->getMessage());
-
- return;
- }
-
- try {
- $suiteMethod = $testClass->getMethod(self::SUITE_METHODNAME);
-
- if (!$suiteMethod->isStatic()) {
- $this->runFailed(
- 'suite() method must be static.'
- );
-
- return;
- }
-
- try {
- $test = $suiteMethod->invoke(null, $testClass->getName());
- } catch (ReflectionException $e) {
- $this->runFailed(
- sprintf(
- "Failed to invoke suite() method.\n%s",
- $e->getMessage()
- )
- );
-
- return;
- }
- } catch (ReflectionException $e) {
- try {
- $test = new PHPUnit_Framework_TestSuite($testClass);
- } catch (PHPUnit_Framework_Exception $e) {
- $test = new PHPUnit_Framework_TestSuite;
- $test->setName($suiteClassName);
- }
- }
-
- $this->clearStatus();
-
- return $test;
- }
-
- /**
- * Returns the loaded ReflectionClass for a suite name.
- *
- * @param string $suiteClassName
- * @param string $suiteClassFile
- *
- * @return ReflectionClass
- */
- protected function loadSuiteClass($suiteClassName, $suiteClassFile = '')
- {
- $loader = $this->getLoader();
-
- return $loader->load($suiteClassName, $suiteClassFile);
- }
-
- /**
- * Clears the status message.
- */
- protected function clearStatus()
- {
- }
-
- /**
- * Override to define how to handle a failed loading of
- * a test suite.
- *
- * @param string $message
- */
- abstract protected function runFailed($message);
-}
diff --git a/vendor/phpunit/phpunit/src/Runner/Exception.php b/vendor/phpunit/phpunit/src/Runner/Exception.php
deleted file mode 100644
index 4b239afe..00000000
--- a/vendor/phpunit/phpunit/src/Runner/Exception.php
+++ /dev/null
@@ -1,16 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 4.0.0
- */
-class PHPUnit_Runner_Exception extends RuntimeException implements PHPUnit_Exception
-{
-}
diff --git a/vendor/phpunit/phpunit/src/Runner/Filter/Factory.php b/vendor/phpunit/phpunit/src/Runner/Filter/Factory.php
deleted file mode 100644
index f4fa9d99..00000000
--- a/vendor/phpunit/phpunit/src/Runner/Filter/Factory.php
+++ /dev/null
@@ -1,51 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 4.0.0
- */
-class PHPUnit_Runner_Filter_Factory
-{
- /**
- * @var array
- */
- private $filters = array();
-
- /**
- * @param ReflectionClass $filter
- * @param mixed $args
- */
- public function addFilter(ReflectionClass $filter, $args)
- {
- if (!$filter->isSubclassOf('RecursiveFilterIterator')) {
- throw new InvalidArgumentException(
- sprintf(
- 'Class "%s" does not extend RecursiveFilterIterator',
- $filter->name
- )
- );
- }
-
- $this->filters[] = array($filter, $args);
- }
-
- /**
- * @return FilterIterator
- */
- public function factory(Iterator $iterator, PHPUnit_Framework_TestSuite $suite)
- {
- foreach ($this->filters as $filter) {
- list($class, $args) = $filter;
- $iterator = $class->newInstance($iterator, $args, $suite);
- }
-
- return $iterator;
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Runner/Filter/Group.php b/vendor/phpunit/phpunit/src/Runner/Filter/Group.php
deleted file mode 100644
index 9257b3bd..00000000
--- a/vendor/phpunit/phpunit/src/Runner/Filter/Group.php
+++ /dev/null
@@ -1,59 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 4.0.0
- */
-abstract class PHPUnit_Runner_Filter_GroupFilterIterator extends RecursiveFilterIterator
-{
- /**
- * @var array
- */
- protected $groupTests = array();
-
- /**
- * @param RecursiveIterator $iterator
- * @param array $groups
- * @param PHPUnit_Framework_TestSuite $suite
- */
- public function __construct(RecursiveIterator $iterator, array $groups, PHPUnit_Framework_TestSuite $suite)
- {
- parent::__construct($iterator);
-
- foreach ($suite->getGroupDetails() as $group => $tests) {
- if (in_array($group, $groups)) {
- $testHashes = array_map(
- function ($test) {
- return spl_object_hash($test);
- },
- $tests
- );
-
- $this->groupTests = array_merge($this->groupTests, $testHashes);
- }
- }
- }
-
- /**
- * @return bool
- */
- public function accept()
- {
- $test = $this->getInnerIterator()->current();
-
- if ($test instanceof PHPUnit_Framework_TestSuite) {
- return true;
- }
-
- return $this->doAccept(spl_object_hash($test));
- }
-
- abstract protected function doAccept($hash);
-}
diff --git a/vendor/phpunit/phpunit/src/Runner/Filter/Group/Exclude.php b/vendor/phpunit/phpunit/src/Runner/Filter/Group/Exclude.php
deleted file mode 100644
index 9fe4b690..00000000
--- a/vendor/phpunit/phpunit/src/Runner/Filter/Group/Exclude.php
+++ /dev/null
@@ -1,20 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 4.0.0
- */
-class PHPUnit_Runner_Filter_Group_Exclude extends PHPUnit_Runner_Filter_GroupFilterIterator
-{
- protected function doAccept($hash)
- {
- return !in_array($hash, $this->groupTests);
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Runner/Filter/Group/Include.php b/vendor/phpunit/phpunit/src/Runner/Filter/Group/Include.php
deleted file mode 100644
index 49d2506e..00000000
--- a/vendor/phpunit/phpunit/src/Runner/Filter/Group/Include.php
+++ /dev/null
@@ -1,20 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 4.0.0
- */
-class PHPUnit_Runner_Filter_Group_Include extends PHPUnit_Runner_Filter_GroupFilterIterator
-{
- protected function doAccept($hash)
- {
- return in_array($hash, $this->groupTests);
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Runner/Filter/Test.php b/vendor/phpunit/phpunit/src/Runner/Filter/Test.php
deleted file mode 100644
index bae4a5c9..00000000
--- a/vendor/phpunit/phpunit/src/Runner/Filter/Test.php
+++ /dev/null
@@ -1,116 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 4.0.0
- */
-class PHPUnit_Runner_Filter_Test extends RecursiveFilterIterator
-{
- /**
- * @var string
- */
- protected $filter = null;
-
- /**
- * @var int
- */
- protected $filterMin;
- /**
- * @var int
- */
- protected $filterMax;
-
- /**
- * @param RecursiveIterator $iterator
- * @param string $filter
- */
- public function __construct(RecursiveIterator $iterator, $filter)
- {
- parent::__construct($iterator);
- $this->setFilter($filter);
- }
-
- /**
- * @param string $filter
- */
- protected function setFilter($filter)
- {
- if (PHPUnit_Util_Regex::pregMatchSafe($filter, '') === false) {
- // Handles:
- // * testAssertEqualsSucceeds#4
- // * testAssertEqualsSucceeds#4-8
- if (preg_match('/^(.*?)#(\d+)(?:-(\d+))?$/', $filter, $matches)) {
- if (isset($matches[3]) && $matches[2] < $matches[3]) {
- $filter = sprintf(
- '%s.*with data set #(\d+)$',
- $matches[1]
- );
-
- $this->filterMin = $matches[2];
- $this->filterMax = $matches[3];
- } else {
- $filter = sprintf(
- '%s.*with data set #%s$',
- $matches[1],
- $matches[2]
- );
- }
- } // Handles:
- // * testDetermineJsonError@JSON_ERROR_NONE
- // * testDetermineJsonError@JSON.*
- elseif (preg_match('/^(.*?)@(.+)$/', $filter, $matches)) {
- $filter = sprintf(
- '%s.*with data set "%s"$',
- $matches[1],
- $matches[2]
- );
- }
-
- // Escape delimiters in regular expression. Do NOT use preg_quote,
- // to keep magic characters.
- $filter = sprintf('/%s/', str_replace(
- '/',
- '\\/',
- $filter
- ));
- }
-
- $this->filter = $filter;
- }
-
- /**
- * @return bool
- */
- public function accept()
- {
- $test = $this->getInnerIterator()->current();
-
- if ($test instanceof PHPUnit_Framework_TestSuite) {
- return true;
- }
-
- $tmp = PHPUnit_Util_Test::describe($test, false);
-
- if ($tmp[0] != '') {
- $name = implode('::', $tmp);
- } else {
- $name = $tmp[1];
- }
-
- $accepted = @preg_match($this->filter, $name, $matches);
-
- if ($accepted && isset($this->filterMax)) {
- $set = end($matches);
- $accepted = $set >= $this->filterMin && $set <= $this->filterMax;
- }
-
- return $accepted;
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php b/vendor/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php
deleted file mode 100644
index 3338a73c..00000000
--- a/vendor/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php
+++ /dev/null
@@ -1,118 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * The standard test suite loader.
- *
- * @since Class available since Release 2.0.0
- */
-class PHPUnit_Runner_StandardTestSuiteLoader implements PHPUnit_Runner_TestSuiteLoader
-{
- /**
- * @param string $suiteClassName
- * @param string $suiteClassFile
- *
- * @return ReflectionClass
- *
- * @throws PHPUnit_Framework_Exception
- */
- public function load($suiteClassName, $suiteClassFile = '')
- {
- $suiteClassName = str_replace('.php', '', $suiteClassName);
-
- if (empty($suiteClassFile)) {
- $suiteClassFile = PHPUnit_Util_Filesystem::classNameToFilename(
- $suiteClassName
- );
- }
-
- if (!class_exists($suiteClassName, false)) {
- $loadedClasses = get_declared_classes();
-
- $filename = PHPUnit_Util_Fileloader::checkAndLoad($suiteClassFile);
-
- $loadedClasses = array_values(
- array_diff(get_declared_classes(), $loadedClasses)
- );
- }
-
- if (!class_exists($suiteClassName, false) && !empty($loadedClasses)) {
- $offset = 0 - strlen($suiteClassName);
-
- foreach ($loadedClasses as $loadedClass) {
- $class = new ReflectionClass($loadedClass);
- if (substr($loadedClass, $offset) === $suiteClassName &&
- $class->getFileName() == $filename) {
- $suiteClassName = $loadedClass;
- break;
- }
- }
- }
-
- if (!class_exists($suiteClassName, false) && !empty($loadedClasses)) {
- $testCaseClass = 'PHPUnit_Framework_TestCase';
-
- foreach ($loadedClasses as $loadedClass) {
- $class = new ReflectionClass($loadedClass);
- $classFile = $class->getFileName();
-
- if ($class->isSubclassOf($testCaseClass) &&
- !$class->isAbstract()) {
- $suiteClassName = $loadedClass;
- $testCaseClass = $loadedClass;
-
- if ($classFile == realpath($suiteClassFile)) {
- break;
- }
- }
-
- if ($class->hasMethod('suite')) {
- $method = $class->getMethod('suite');
-
- if (!$method->isAbstract() &&
- $method->isPublic() &&
- $method->isStatic()) {
- $suiteClassName = $loadedClass;
-
- if ($classFile == realpath($suiteClassFile)) {
- break;
- }
- }
- }
- }
- }
-
- if (class_exists($suiteClassName, false)) {
- $class = new ReflectionClass($suiteClassName);
-
- if ($class->getFileName() == realpath($suiteClassFile)) {
- return $class;
- }
- }
-
- throw new PHPUnit_Framework_Exception(
- sprintf(
- "Class '%s' could not be found in '%s'.",
- $suiteClassName,
- $suiteClassFile
- )
- );
- }
-
- /**
- * @param ReflectionClass $aClass
- *
- * @return ReflectionClass
- */
- public function reload(ReflectionClass $aClass)
- {
- return $aClass;
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Runner/TestSuiteLoader.php b/vendor/phpunit/phpunit/src/Runner/TestSuiteLoader.php
deleted file mode 100644
index 3eea6e09..00000000
--- a/vendor/phpunit/phpunit/src/Runner/TestSuiteLoader.php
+++ /dev/null
@@ -1,32 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * An interface to define how a test suite should be loaded.
- *
- * @since Interface available since Release 2.0.0
- */
-interface PHPUnit_Runner_TestSuiteLoader
-{
- /**
- * @param string $suiteClassName
- * @param string $suiteClassFile
- *
- * @return ReflectionClass
- */
- public function load($suiteClassName, $suiteClassFile = '');
-
- /**
- * @param ReflectionClass $aClass
- *
- * @return ReflectionClass
- */
- public function reload(ReflectionClass $aClass);
-}
diff --git a/vendor/phpunit/phpunit/src/Runner/Version.php b/vendor/phpunit/phpunit/src/Runner/Version.php
deleted file mode 100644
index 45a79fc8..00000000
--- a/vendor/phpunit/phpunit/src/Runner/Version.php
+++ /dev/null
@@ -1,80 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-use SebastianBergmann\Version;
-
-/**
- * This class defines the current version of PHPUnit.
- *
- * @since Class available since Release 2.0.0
- */
-class PHPUnit_Runner_Version
-{
- private static $pharVersion;
- private static $version;
-
- /**
- * Returns the current version of PHPUnit.
- *
- * @return string
- */
- public static function id()
- {
- if (self::$pharVersion !== null) {
- return self::$pharVersion;
- }
-
- if (self::$version === null) {
- $version = new Version('4.8.36', dirname(dirname(__DIR__)));
- self::$version = $version->getVersion();
- }
-
- return self::$version;
- }
-
- /**
- * @return string
- *
- * @since Method available since Release 4.8.13
- */
- public static function series()
- {
- if (strpos(self::id(), '-')) {
- $tmp = explode('-', self::id());
- $version = $tmp[0];
- } else {
- $version = self::id();
- }
-
- return implode('.', array_slice(explode('.', $version), 0, 2));
- }
-
- /**
- * @return string
- */
- public static function getVersionString()
- {
- return 'PHPUnit ' . self::id() . ' by Sebastian Bergmann and contributors.';
- }
-
- /**
- * @return string
- *
- * @since Method available since Release 4.0.0
- */
- public static function getReleaseChannel()
- {
- if (strpos(self::$pharVersion, '-') !== false) {
- return '-nightly';
- }
-
- return '';
- }
-}
diff --git a/vendor/phpunit/phpunit/src/TextUI/Command.php b/vendor/phpunit/phpunit/src/TextUI/Command.php
deleted file mode 100644
index d67d261f..00000000
--- a/vendor/phpunit/phpunit/src/TextUI/Command.php
+++ /dev/null
@@ -1,1016 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * A TestRunner for the Command Line Interface (CLI)
- * PHP SAPI Module.
- *
- * @since Class available since Release 3.0.0
- */
-class PHPUnit_TextUI_Command
-{
- /**
- * @var array
- */
- protected $arguments = array(
- 'listGroups' => false,
- 'loader' => null,
- 'useDefaultConfiguration' => true
- );
-
- /**
- * @var array
- */
- protected $options = array();
-
- /**
- * @var array
- */
- protected $longOptions = array(
- 'colors==' => null,
- 'bootstrap=' => null,
- 'columns=' => null,
- 'configuration=' => null,
- 'coverage-clover=' => null,
- 'coverage-crap4j=' => null,
- 'coverage-html=' => null,
- 'coverage-php=' => null,
- 'coverage-text==' => null,
- 'coverage-xml=' => null,
- 'debug' => null,
- 'exclude-group=' => null,
- 'filter=' => null,
- 'testsuite=' => null,
- 'group=' => null,
- 'help' => null,
- 'include-path=' => null,
- 'list-groups' => null,
- 'loader=' => null,
- 'log-json=' => null,
- 'log-junit=' => null,
- 'log-tap=' => null,
- 'process-isolation' => null,
- 'repeat=' => null,
- 'stderr' => null,
- 'stop-on-error' => null,
- 'stop-on-failure' => null,
- 'stop-on-incomplete' => null,
- 'stop-on-risky' => null,
- 'stop-on-skipped' => null,
- 'report-useless-tests' => null,
- 'strict-coverage' => null,
- 'disallow-test-output' => null,
- 'enforce-time-limit' => null,
- 'disallow-todo-tests' => null,
- 'strict-global-state' => null,
- 'strict' => null,
- 'tap' => null,
- 'testdox' => null,
- 'testdox-html=' => null,
- 'testdox-text=' => null,
- 'test-suffix=' => null,
- 'no-configuration' => null,
- 'no-coverage' => null,
- 'no-globals-backup' => null,
- 'printer=' => null,
- 'static-backup' => null,
- 'verbose' => null,
- 'version' => null
- );
-
- /**
- * @var bool
- */
- private $versionStringPrinted = false;
-
- /**
- * @param bool $exit
- */
- public static function main($exit = true)
- {
- $command = new static;
-
- return $command->run($_SERVER['argv'], $exit);
- }
-
- /**
- * @param array $argv
- * @param bool $exit
- *
- * @return int
- */
- public function run(array $argv, $exit = true)
- {
- $this->handleArguments($argv);
-
- $runner = $this->createRunner();
-
- if (is_object($this->arguments['test']) &&
- $this->arguments['test'] instanceof PHPUnit_Framework_Test) {
- $suite = $this->arguments['test'];
- } else {
- $suite = $runner->getTest(
- $this->arguments['test'],
- $this->arguments['testFile'],
- $this->arguments['testSuffixes']
- );
- }
-
- if ($this->arguments['listGroups']) {
- $this->printVersionString();
-
- print "Available test group(s):\n";
-
- $groups = $suite->getGroups();
- sort($groups);
-
- foreach ($groups as $group) {
- print " - $group\n";
- }
-
- if ($exit) {
- exit(PHPUnit_TextUI_TestRunner::SUCCESS_EXIT);
- } else {
- return PHPUnit_TextUI_TestRunner::SUCCESS_EXIT;
- }
- }
-
- unset($this->arguments['test']);
- unset($this->arguments['testFile']);
-
- try {
- $result = $runner->doRun($suite, $this->arguments);
- } catch (PHPUnit_Framework_Exception $e) {
- print $e->getMessage() . "\n";
- }
-
- $ret = PHPUnit_TextUI_TestRunner::FAILURE_EXIT;
-
- if (isset($result) && $result->wasSuccessful()) {
- $ret = PHPUnit_TextUI_TestRunner::SUCCESS_EXIT;
- } elseif (!isset($result) || $result->errorCount() > 0) {
- $ret = PHPUnit_TextUI_TestRunner::EXCEPTION_EXIT;
- }
-
- if ($exit) {
- exit($ret);
- } else {
- return $ret;
- }
- }
-
- /**
- * Create a TestRunner, override in subclasses.
- *
- * @return PHPUnit_TextUI_TestRunner
- *
- * @since Method available since Release 3.6.0
- */
- protected function createRunner()
- {
- return new PHPUnit_TextUI_TestRunner($this->arguments['loader']);
- }
-
- /**
- * Handles the command-line arguments.
- *
- * A child class of PHPUnit_TextUI_Command can hook into the argument
- * parsing by adding the switch(es) to the $longOptions array and point to a
- * callback method that handles the switch(es) in the child class like this
- *
- *
- * longOptions['my-switch'] = 'myHandler';
- * // my-secondswitch will accept a value - note the equals sign
- * $this->longOptions['my-secondswitch='] = 'myOtherHandler';
- * }
- *
- * // --my-switch -> myHandler()
- * protected function myHandler()
- * {
- * }
- *
- * // --my-secondswitch foo -> myOtherHandler('foo')
- * protected function myOtherHandler ($value)
- * {
- * }
- *
- * // You will also need this - the static keyword in the
- * // PHPUnit_TextUI_Command will mean that it'll be
- * // PHPUnit_TextUI_Command that gets instantiated,
- * // not MyCommand
- * public static function main($exit = true)
- * {
- * $command = new static;
- *
- * return $command->run($_SERVER['argv'], $exit);
- * }
- *
- * }
- *
- *
- * @param array $argv
- */
- protected function handleArguments(array $argv)
- {
- if (defined('__PHPUNIT_PHAR__')) {
- $this->longOptions['check-version'] = null;
- $this->longOptions['selfupdate'] = null;
- $this->longOptions['self-update'] = null;
- $this->longOptions['selfupgrade'] = null;
- $this->longOptions['self-upgrade'] = null;
- }
-
- try {
- $this->options = PHPUnit_Util_Getopt::getopt(
- $argv,
- 'd:c:hv',
- array_keys($this->longOptions)
- );
- } catch (PHPUnit_Framework_Exception $e) {
- $this->showError($e->getMessage());
- }
-
- foreach ($this->options[0] as $option) {
- switch ($option[0]) {
- case '--colors':
- $this->arguments['colors'] = $option[1] ?: PHPUnit_TextUI_ResultPrinter::COLOR_AUTO;
- break;
-
- case '--bootstrap':
- $this->arguments['bootstrap'] = $option[1];
- break;
-
- case '--columns':
- if (is_numeric($option[1])) {
- $this->arguments['columns'] = (int) $option[1];
- } elseif ($option[1] == 'max') {
- $this->arguments['columns'] = 'max';
- }
- break;
-
- case 'c':
- case '--configuration':
- $this->arguments['configuration'] = $option[1];
- break;
-
- case '--coverage-clover':
- $this->arguments['coverageClover'] = $option[1];
- break;
-
- case '--coverage-crap4j':
- $this->arguments['coverageCrap4J'] = $option[1];
- break;
-
- case '--coverage-html':
- $this->arguments['coverageHtml'] = $option[1];
- break;
-
- case '--coverage-php':
- $this->arguments['coveragePHP'] = $option[1];
- break;
-
- case '--coverage-text':
- if ($option[1] === null) {
- $option[1] = 'php://stdout';
- }
-
- $this->arguments['coverageText'] = $option[1];
- $this->arguments['coverageTextShowUncoveredFiles'] = false;
- $this->arguments['coverageTextShowOnlySummary'] = false;
- break;
-
- case '--coverage-xml':
- $this->arguments['coverageXml'] = $option[1];
- break;
-
- case 'd':
- $ini = explode('=', $option[1]);
-
- if (isset($ini[0])) {
- if (isset($ini[1])) {
- ini_set($ini[0], $ini[1]);
- } else {
- ini_set($ini[0], true);
- }
- }
- break;
-
- case '--debug':
- $this->arguments['debug'] = true;
- break;
-
- case 'h':
- case '--help':
- $this->showHelp();
- exit(PHPUnit_TextUI_TestRunner::SUCCESS_EXIT);
- break;
-
- case '--filter':
- $this->arguments['filter'] = $option[1];
- break;
-
- case '--testsuite':
- $this->arguments['testsuite'] = $option[1];
- break;
-
- case '--group':
- $this->arguments['groups'] = explode(',', $option[1]);
- break;
-
- case '--exclude-group':
- $this->arguments['excludeGroups'] = explode(
- ',',
- $option[1]
- );
- break;
-
- case '--test-suffix':
- $this->arguments['testSuffixes'] = explode(
- ',',
- $option[1]
- );
- break;
-
- case '--include-path':
- $includePath = $option[1];
- break;
-
- case '--list-groups':
- $this->arguments['listGroups'] = true;
- break;
-
- case '--printer':
- $this->arguments['printer'] = $option[1];
- break;
-
- case '--loader':
- $this->arguments['loader'] = $option[1];
- break;
-
- case '--log-json':
- $this->arguments['jsonLogfile'] = $option[1];
- break;
-
- case '--log-junit':
- $this->arguments['junitLogfile'] = $option[1];
- break;
-
- case '--log-tap':
- $this->arguments['tapLogfile'] = $option[1];
- break;
-
- case '--process-isolation':
- $this->arguments['processIsolation'] = true;
- break;
-
- case '--repeat':
- $this->arguments['repeat'] = (int) $option[1];
- break;
-
- case '--stderr':
- $this->arguments['stderr'] = true;
- break;
-
- case '--stop-on-error':
- $this->arguments['stopOnError'] = true;
- break;
-
- case '--stop-on-failure':
- $this->arguments['stopOnFailure'] = true;
- break;
-
- case '--stop-on-incomplete':
- $this->arguments['stopOnIncomplete'] = true;
- break;
-
- case '--stop-on-risky':
- $this->arguments['stopOnRisky'] = true;
- break;
-
- case '--stop-on-skipped':
- $this->arguments['stopOnSkipped'] = true;
- break;
-
- case '--tap':
- $this->arguments['printer'] = 'PHPUnit_Util_Log_TAP';
- break;
-
- case '--testdox':
- $this->arguments['printer'] = 'PHPUnit_Util_TestDox_ResultPrinter_Text';
- break;
-
- case '--testdox-html':
- $this->arguments['testdoxHTMLFile'] = $option[1];
- break;
-
- case '--testdox-text':
- $this->arguments['testdoxTextFile'] = $option[1];
- break;
-
- case '--no-configuration':
- $this->arguments['useDefaultConfiguration'] = false;
- break;
-
- case '--no-coverage':
- $this->arguments['noCoverage'] = true;
- break;
-
- case '--no-globals-backup':
- $this->arguments['backupGlobals'] = false;
- break;
-
- case '--static-backup':
- $this->arguments['backupStaticAttributes'] = true;
- break;
-
- case 'v':
- case '--verbose':
- $this->arguments['verbose'] = true;
- break;
-
- case '--version':
- $this->printVersionString();
- exit(PHPUnit_TextUI_TestRunner::SUCCESS_EXIT);
- break;
-
- case '--report-useless-tests':
- $this->arguments['reportUselessTests'] = true;
- break;
-
- case '--strict-coverage':
- $this->arguments['strictCoverage'] = true;
- break;
-
- case '--strict-global-state':
- $this->arguments['disallowChangesToGlobalState'] = true;
- break;
-
- case '--disallow-test-output':
- $this->arguments['disallowTestOutput'] = true;
- break;
-
- case '--enforce-time-limit':
- $this->arguments['enforceTimeLimit'] = true;
- break;
-
- case '--disallow-todo-tests':
- $this->arguments['disallowTodoAnnotatedTests'] = true;
- break;
-
- case '--strict':
- $this->arguments['reportUselessTests'] = true;
- $this->arguments['strictCoverage'] = true;
- $this->arguments['disallowTestOutput'] = true;
- $this->arguments['enforceTimeLimit'] = true;
- $this->arguments['disallowTodoAnnotatedTests'] = true;
- $this->arguments['deprecatedStrictModeOption'] = true;
- break;
-
- case '--check-version':
- $this->handleVersionCheck();
- break;
-
- case '--selfupdate':
- case '--self-update':
- $this->handleSelfUpdate();
- break;
-
- case '--selfupgrade':
- case '--self-upgrade':
- $this->handleSelfUpdate(true);
- break;
-
- case '--whitelist':
- $this->arguments['whitelist'] = $option[1];
- break;
-
- default:
- $optionName = str_replace('--', '', $option[0]);
-
- if (isset($this->longOptions[$optionName])) {
- $handler = $this->longOptions[$optionName];
- } elseif (isset($this->longOptions[$optionName . '='])) {
- $handler = $this->longOptions[$optionName . '='];
- }
-
- if (isset($handler) && is_callable(array($this, $handler))) {
- $this->$handler($option[1]);
- }
- }
- }
-
- $this->handleCustomTestSuite();
-
- if (!isset($this->arguments['test'])) {
- if (isset($this->options[1][0])) {
- $this->arguments['test'] = $this->options[1][0];
- }
-
- if (isset($this->options[1][1])) {
- $this->arguments['testFile'] = realpath($this->options[1][1]);
- } else {
- $this->arguments['testFile'] = '';
- }
-
- if (isset($this->arguments['test']) &&
- is_file($this->arguments['test']) &&
- substr($this->arguments['test'], -5, 5) != '.phpt') {
- $this->arguments['testFile'] = realpath($this->arguments['test']);
- $this->arguments['test'] = substr($this->arguments['test'], 0, strrpos($this->arguments['test'], '.'));
- }
- }
-
- if (!isset($this->arguments['testSuffixes'])) {
- $this->arguments['testSuffixes'] = array('Test.php', '.phpt');
- }
-
- if (isset($includePath)) {
- ini_set(
- 'include_path',
- $includePath . PATH_SEPARATOR . ini_get('include_path')
- );
- }
-
- if ($this->arguments['loader'] !== null) {
- $this->arguments['loader'] = $this->handleLoader($this->arguments['loader']);
- }
-
- if (isset($this->arguments['configuration']) &&
- is_dir($this->arguments['configuration'])) {
- $configurationFile = $this->arguments['configuration'] . '/phpunit.xml';
-
- if (file_exists($configurationFile)) {
- $this->arguments['configuration'] = realpath(
- $configurationFile
- );
- } elseif (file_exists($configurationFile . '.dist')) {
- $this->arguments['configuration'] = realpath(
- $configurationFile . '.dist'
- );
- }
- } elseif (!isset($this->arguments['configuration']) &&
- $this->arguments['useDefaultConfiguration']) {
- if (file_exists('phpunit.xml')) {
- $this->arguments['configuration'] = realpath('phpunit.xml');
- } elseif (file_exists('phpunit.xml.dist')) {
- $this->arguments['configuration'] = realpath(
- 'phpunit.xml.dist'
- );
- }
- }
-
- if (isset($this->arguments['configuration'])) {
- try {
- $configuration = PHPUnit_Util_Configuration::getInstance(
- $this->arguments['configuration']
- );
- } catch (Throwable $e) {
- print $e->getMessage() . "\n";
- exit(PHPUnit_TextUI_TestRunner::FAILURE_EXIT);
- } catch (Exception $e) {
- print $e->getMessage() . "\n";
- exit(PHPUnit_TextUI_TestRunner::FAILURE_EXIT);
- }
-
- $phpunit = $configuration->getPHPUnitConfiguration();
-
- $configuration->handlePHPConfiguration();
-
- /*
- * Issue #1216
- */
- if (isset($this->arguments['bootstrap'])) {
- $this->handleBootstrap($this->arguments['bootstrap']);
- } elseif (isset($phpunit['bootstrap'])) {
- $this->handleBootstrap($phpunit['bootstrap']);
- }
-
- /*
- * Issue #657
- */
- if (isset($phpunit['stderr']) && ! isset($this->arguments['stderr'])) {
- $this->arguments['stderr'] = $phpunit['stderr'];
- }
-
- if (isset($phpunit['columns']) && ! isset($this->arguments['columns'])) {
- $this->arguments['columns'] = $phpunit['columns'];
- }
-
- if (isset($phpunit['printerClass'])) {
- if (isset($phpunit['printerFile'])) {
- $file = $phpunit['printerFile'];
- } else {
- $file = '';
- }
-
- $this->arguments['printer'] = $this->handlePrinter(
- $phpunit['printerClass'],
- $file
- );
- }
-
- if (isset($phpunit['testSuiteLoaderClass'])) {
- if (isset($phpunit['testSuiteLoaderFile'])) {
- $file = $phpunit['testSuiteLoaderFile'];
- } else {
- $file = '';
- }
-
- $this->arguments['loader'] = $this->handleLoader(
- $phpunit['testSuiteLoaderClass'],
- $file
- );
- }
-
- $browsers = $configuration->getSeleniumBrowserConfiguration();
-
- if (!empty($browsers)) {
- $this->arguments['deprecatedSeleniumConfiguration'] = true;
-
- if (class_exists('PHPUnit_Extensions_SeleniumTestCase')) {
- PHPUnit_Extensions_SeleniumTestCase::$browsers = $browsers;
- }
- }
-
- if (!isset($this->arguments['test'])) {
- $testSuite = $configuration->getTestSuiteConfiguration(isset($this->arguments['testsuite']) ? $this->arguments['testsuite'] : null);
-
- if ($testSuite !== null) {
- $this->arguments['test'] = $testSuite;
- }
- }
- } elseif (isset($this->arguments['bootstrap'])) {
- $this->handleBootstrap($this->arguments['bootstrap']);
- }
-
- if (isset($this->arguments['printer']) &&
- is_string($this->arguments['printer'])) {
- $this->arguments['printer'] = $this->handlePrinter($this->arguments['printer']);
- }
-
- if (isset($this->arguments['test']) && is_string($this->arguments['test']) && substr($this->arguments['test'], -5, 5) == '.phpt') {
- $test = new PHPUnit_Extensions_PhptTestCase($this->arguments['test']);
-
- $this->arguments['test'] = new PHPUnit_Framework_TestSuite;
- $this->arguments['test']->addTest($test);
- }
-
- if (!isset($this->arguments['test']) ||
- (isset($this->arguments['testDatabaseLogRevision']) && !isset($this->arguments['testDatabaseDSN']))) {
- $this->showHelp();
- exit(PHPUnit_TextUI_TestRunner::EXCEPTION_EXIT);
- }
- }
-
- /**
- * Handles the loading of the PHPUnit_Runner_TestSuiteLoader implementation.
- *
- * @param string $loaderClass
- * @param string $loaderFile
- *
- * @return PHPUnit_Runner_TestSuiteLoader
- */
- protected function handleLoader($loaderClass, $loaderFile = '')
- {
- if (!class_exists($loaderClass, false)) {
- if ($loaderFile == '') {
- $loaderFile = PHPUnit_Util_Filesystem::classNameToFilename(
- $loaderClass
- );
- }
-
- $loaderFile = stream_resolve_include_path($loaderFile);
-
- if ($loaderFile) {
- require $loaderFile;
- }
- }
-
- if (class_exists($loaderClass, false)) {
- $class = new ReflectionClass($loaderClass);
-
- if ($class->implementsInterface('PHPUnit_Runner_TestSuiteLoader') &&
- $class->isInstantiable()) {
- return $class->newInstance();
- }
- }
-
- if ($loaderClass == 'PHPUnit_Runner_StandardTestSuiteLoader') {
- return;
- }
-
- $this->showError(
- sprintf(
- 'Could not use "%s" as loader.',
- $loaderClass
- )
- );
- }
-
- /**
- * Handles the loading of the PHPUnit_Util_Printer implementation.
- *
- * @param string $printerClass
- * @param string $printerFile
- *
- * @return PHPUnit_Util_Printer|string
- */
- protected function handlePrinter($printerClass, $printerFile = '')
- {
- if (!class_exists($printerClass, false)) {
- if ($printerFile == '') {
- $printerFile = PHPUnit_Util_Filesystem::classNameToFilename(
- $printerClass
- );
- }
-
- $printerFile = stream_resolve_include_path($printerFile);
-
- if ($printerFile) {
- require $printerFile;
- }
- }
-
- if (class_exists($printerClass)) {
- $class = new ReflectionClass($printerClass);
-
- if ($class->implementsInterface('PHPUnit_Framework_TestListener') &&
- $class->isSubclassOf('PHPUnit_Util_Printer') &&
- $class->isInstantiable()) {
- if ($class->isSubclassOf('PHPUnit_TextUI_ResultPrinter')) {
- return $printerClass;
- }
-
- $outputStream = isset($this->arguments['stderr']) ? 'php://stderr' : null;
-
- return $class->newInstance($outputStream);
- }
- }
-
- $this->showError(
- sprintf(
- 'Could not use "%s" as printer.',
- $printerClass
- )
- );
- }
-
- /**
- * Loads a bootstrap file.
- *
- * @param string $filename
- */
- protected function handleBootstrap($filename)
- {
- try {
- PHPUnit_Util_Fileloader::checkAndLoad($filename);
- } catch (PHPUnit_Framework_Exception $e) {
- $this->showError($e->getMessage());
- }
- }
-
- /**
- * @since Method available since Release 4.0.0
- */
- protected function handleSelfUpdate($upgrade = false)
- {
- $this->printVersionString();
-
- $localFilename = realpath($_SERVER['argv'][0]);
-
- if (!is_writable($localFilename)) {
- print 'No write permission to update ' . $localFilename . "\n";
- exit(PHPUnit_TextUI_TestRunner::EXCEPTION_EXIT);
- }
-
- if (!extension_loaded('openssl')) {
- print "The OpenSSL extension is not loaded.\n";
- exit(PHPUnit_TextUI_TestRunner::EXCEPTION_EXIT);
- }
-
- if (!$upgrade) {
- $remoteFilename = sprintf(
- 'https://phar.phpunit.de/phpunit-%s.phar',
- file_get_contents(
- sprintf(
- 'https://phar.phpunit.de/latest-version-of/phpunit-%s',
- PHPUnit_Runner_Version::series()
- )
- )
- );
- } else {
- $remoteFilename = sprintf(
- 'https://phar.phpunit.de/phpunit%s.phar',
- PHPUnit_Runner_Version::getReleaseChannel()
- );
- }
-
- $tempFilename = tempnam(sys_get_temp_dir(), 'phpunit') . '.phar';
-
- // Workaround for https://bugs.php.net/bug.php?id=65538
- $caFile = dirname($tempFilename) . '/ca.pem';
- copy(__PHPUNIT_PHAR_ROOT__ . '/ca.pem', $caFile);
-
- print 'Updating the PHPUnit PHAR ... ';
-
- $options = array(
- 'ssl' => array(
- 'allow_self_signed' => false,
- 'cafile' => $caFile,
- 'verify_peer' => true
- )
- );
-
- if (PHP_VERSION_ID < 50600) {
- $options['ssl']['CN_match'] = 'phar.phpunit.de';
- $options['ssl']['SNI_server_name'] = 'phar.phpunit.de';
- }
-
- file_put_contents(
- $tempFilename,
- file_get_contents(
- $remoteFilename,
- false,
- stream_context_create($options)
- )
- );
-
- chmod($tempFilename, 0777 & ~umask());
-
- try {
- $phar = new Phar($tempFilename);
- unset($phar);
- rename($tempFilename, $localFilename);
- unlink($caFile);
- } catch (Throwable $_e) {
- $e = $_e;
- } catch (Exception $_e) {
- $e = $_e;
- }
-
- if (isset($e)) {
- unlink($caFile);
- unlink($tempFilename);
- print " done\n\n" . $e->getMessage() . "\n";
- exit(2);
- }
-
- print " done\n";
- exit(PHPUnit_TextUI_TestRunner::SUCCESS_EXIT);
- }
-
- /**
- * @since Method available since Release 4.8.0
- */
- protected function handleVersionCheck()
- {
- $this->printVersionString();
-
- $latestVersion = file_get_contents('https://phar.phpunit.de/latest-version-of/phpunit');
- $isOutdated = version_compare($latestVersion, PHPUnit_Runner_Version::id(), '>');
-
- if ($isOutdated) {
- print "You are not using the latest version of PHPUnit.\n";
- print 'Use "phpunit --self-upgrade" to install PHPUnit ' . $latestVersion . "\n";
- } else {
- print "You are using the latest version of PHPUnit.\n";
- }
-
- exit(PHPUnit_TextUI_TestRunner::SUCCESS_EXIT);
- }
-
- /**
- * Show the help message.
- */
- protected function showHelp()
- {
- $this->printVersionString();
-
- print <<
-
-Code Coverage Options:
-
- --coverage-clover Generate code coverage report in Clover XML format.
- --coverage-crap4j Generate code coverage report in Crap4J XML format.
- --coverage-html Generate code coverage report in HTML format.
- --coverage-php Export PHP_CodeCoverage object to file.
- --coverage-text= Generate code coverage report in text format.
- Default: Standard output.
- --coverage-xml Generate code coverage report in PHPUnit XML format.
-
-Logging Options:
-
- --log-junit Log test execution in JUnit XML format to file.
- --log-tap Log test execution in TAP format to file.
- --log-json Log test execution in JSON format.
- --testdox-html Write agile documentation in HTML format to file.
- --testdox-text Write agile documentation in Text format to file.
-
-Test Selection Options:
-
- --filter Filter which tests to run.
- --testsuite Filter which testsuite to run.
- --group ... Only runs tests from the specified group(s).
- --exclude-group ... Exclude tests from the specified group(s).
- --list-groups List available test groups.
- --test-suffix ... Only search for test in files with specified
- suffix(es). Default: Test.php,.phpt
-
-Test Execution Options:
-
- --report-useless-tests Be strict about tests that do not test anything.
- --strict-coverage Be strict about unintentionally covered code.
- --strict-global-state Be strict about changes to global state
- --disallow-test-output Be strict about output during tests.
- --enforce-time-limit Enforce time limit based on test size.
- --disallow-todo-tests Disallow @todo-annotated tests.
-
- --process-isolation Run each test in a separate PHP process.
- --no-globals-backup Do not backup and restore \$GLOBALS for each test.
- --static-backup Backup and restore static attributes for each test.
-
- --colors= Use colors in output ("never", "auto" or "always").
- --columns Number of columns to use for progress output.
- --columns max Use maximum number of columns for progress output.
- --stderr Write to STDERR instead of STDOUT.
- --stop-on-error Stop execution upon first error.
- --stop-on-failure Stop execution upon first error or failure.
- --stop-on-risky Stop execution upon first risky test.
- --stop-on-skipped Stop execution upon first skipped test.
- --stop-on-incomplete Stop execution upon first incomplete test.
- -v|--verbose Output more verbose information.
- --debug Display debugging information during test execution.
-
- --loader TestSuiteLoader implementation to use.
- --repeat Runs the test(s) repeatedly.
- --tap Report test execution progress in TAP format.
- --testdox Report test execution progress in TestDox format.
- --printer TestListener implementation to use.
-
-Configuration Options:
-
- --bootstrap A "bootstrap" PHP file that is run before the tests.
- -c|--configuration Read configuration from XML file.
- --no-configuration Ignore default configuration file (phpunit.xml).
- --no-coverage Ignore code coverage configuration.
- --include-path Prepend PHP's include_path with given path(s).
- -d key[=value] Sets a php.ini value.
-
-Miscellaneous Options:
-
- -h|--help Prints this usage information.
- --version Prints the version and exits.
-
-EOT;
-
- if (defined('__PHPUNIT_PHAR__')) {
- print "\n --check-version Check whether PHPUnit is the latest version.";
- print "\n --self-update Update PHPUnit to the latest version within the same\n release series.\n";
- print "\n --self-upgrade Upgrade PHPUnit to the latest version.\n";
- }
- }
-
- /**
- * Custom callback for test suite discovery.
- */
- protected function handleCustomTestSuite()
- {
- }
-
- private function printVersionString()
- {
- if ($this->versionStringPrinted) {
- return;
- }
-
- print PHPUnit_Runner_Version::getVersionString() . "\n\n";
-
- $this->versionStringPrinted = true;
- }
-
- /**
- */
- private function showError($message)
- {
- $this->printVersionString();
-
- print $message . "\n";
-
- exit(PHPUnit_TextUI_TestRunner::FAILURE_EXIT);
- }
-}
diff --git a/vendor/phpunit/phpunit/src/TextUI/ResultPrinter.php b/vendor/phpunit/phpunit/src/TextUI/ResultPrinter.php
deleted file mode 100644
index e4f02cde..00000000
--- a/vendor/phpunit/phpunit/src/TextUI/ResultPrinter.php
+++ /dev/null
@@ -1,653 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-use SebastianBergmann\Environment\Console;
-
-/**
- * Prints the result of a TextUI TestRunner run.
- *
- * @since Class available since Release 2.0.0
- */
-class PHPUnit_TextUI_ResultPrinter extends PHPUnit_Util_Printer implements PHPUnit_Framework_TestListener
-{
- const EVENT_TEST_START = 0;
- const EVENT_TEST_END = 1;
- const EVENT_TESTSUITE_START = 2;
- const EVENT_TESTSUITE_END = 3;
-
- const COLOR_NEVER = 'never';
- const COLOR_AUTO = 'auto';
- const COLOR_ALWAYS = 'always';
- const COLOR_DEFAULT = self::COLOR_NEVER;
-
- /**
- * @var array
- */
- private static $ansiCodes = array(
- 'bold' => 1,
- 'fg-black' => 30,
- 'fg-red' => 31,
- 'fg-green' => 32,
- 'fg-yellow' => 33,
- 'fg-blue' => 34,
- 'fg-magenta' => 35,
- 'fg-cyan' => 36,
- 'fg-white' => 37,
- 'bg-black' => 40,
- 'bg-red' => 41,
- 'bg-green' => 42,
- 'bg-yellow' => 43,
- 'bg-blue' => 44,
- 'bg-magenta' => 45,
- 'bg-cyan' => 46,
- 'bg-white' => 47
- );
-
- /**
- * @var int
- */
- protected $column = 0;
-
- /**
- * @var int
- */
- protected $maxColumn;
-
- /**
- * @var bool
- */
- protected $lastTestFailed = false;
-
- /**
- * @var int
- */
- protected $numAssertions = 0;
-
- /**
- * @var int
- */
- protected $numTests = -1;
-
- /**
- * @var int
- */
- protected $numTestsRun = 0;
-
- /**
- * @var int
- */
- protected $numTestsWidth;
-
- /**
- * @var bool
- */
- protected $colors = false;
-
- /**
- * @var bool
- */
- protected $debug = false;
-
- /**
- * @var bool
- */
- protected $verbose = false;
-
- /**
- * @var int
- */
- private $numberOfColumns;
-
- /**
- * Constructor.
- *
- * @param mixed $out
- * @param bool $verbose
- * @param string $colors
- * @param bool $debug
- * @param int|string $numberOfColumns
- *
- * @throws PHPUnit_Framework_Exception
- *
- * @since Method available since Release 3.0.0
- */
- public function __construct($out = null, $verbose = false, $colors = self::COLOR_DEFAULT, $debug = false, $numberOfColumns = 80)
- {
- parent::__construct($out);
-
- if (!is_bool($verbose)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'boolean');
- }
-
- $availableColors = array(self::COLOR_NEVER, self::COLOR_AUTO, self::COLOR_ALWAYS);
-
- if (!in_array($colors, $availableColors)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(
- 3,
- vsprintf('value from "%s", "%s" or "%s"', $availableColors)
- );
- }
-
- if (!is_bool($debug)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(4, 'boolean');
- }
-
- if (!is_int($numberOfColumns) && $numberOfColumns != 'max') {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(5, 'integer or "max"');
- }
-
- $console = new Console;
- $maxNumberOfColumns = $console->getNumberOfColumns();
-
- if ($numberOfColumns == 'max' || $numberOfColumns > $maxNumberOfColumns) {
- $numberOfColumns = $maxNumberOfColumns;
- }
-
- $this->numberOfColumns = $numberOfColumns;
- $this->verbose = $verbose;
- $this->debug = $debug;
-
- if ($colors === self::COLOR_AUTO && $console->hasColorSupport()) {
- $this->colors = true;
- } else {
- $this->colors = (self::COLOR_ALWAYS === $colors);
- }
- }
-
- /**
- * @param PHPUnit_Framework_TestResult $result
- */
- public function printResult(PHPUnit_Framework_TestResult $result)
- {
- $this->printHeader();
-
- $this->printErrors($result);
- $printSeparator = $result->errorCount() > 0;
-
- if ($printSeparator && $result->failureCount() > 0) {
- $this->write("\n--\n\n");
- }
-
- $printSeparator = $printSeparator || $result->failureCount() > 0;
- $this->printFailures($result);
-
- if ($this->verbose) {
- if ($printSeparator && $result->riskyCount() > 0) {
- $this->write("\n--\n\n");
- }
-
- $printSeparator = $printSeparator ||
- $result->riskyCount() > 0;
-
- $this->printRisky($result);
-
- if ($printSeparator && $result->notImplementedCount() > 0) {
- $this->write("\n--\n\n");
- }
-
- $printSeparator = $printSeparator ||
- $result->notImplementedCount() > 0;
-
- $this->printIncompletes($result);
-
- if ($printSeparator && $result->skippedCount() > 0) {
- $this->write("\n--\n\n");
- }
-
- $this->printSkipped($result);
- }
-
- $this->printFooter($result);
- }
-
- /**
- * @param array $defects
- * @param string $type
- */
- protected function printDefects(array $defects, $type)
- {
- $count = count($defects);
-
- if ($count == 0) {
- return;
- }
-
- $this->write(
- sprintf(
- "There %s %d %s%s:\n",
- ($count == 1) ? 'was' : 'were',
- $count,
- $type,
- ($count == 1) ? '' : 's'
- )
- );
-
- $i = 1;
-
- foreach ($defects as $defect) {
- $this->printDefect($defect, $i++);
- }
- }
-
- /**
- * @param PHPUnit_Framework_TestFailure $defect
- * @param int $count
- */
- protected function printDefect(PHPUnit_Framework_TestFailure $defect, $count)
- {
- $this->printDefectHeader($defect, $count);
- $this->printDefectTrace($defect);
- }
-
- /**
- * @param PHPUnit_Framework_TestFailure $defect
- * @param int $count
- */
- protected function printDefectHeader(PHPUnit_Framework_TestFailure $defect, $count)
- {
- $this->write(
- sprintf(
- "\n%d) %s\n",
- $count,
- $defect->getTestName()
- )
- );
- }
-
- /**
- * @param PHPUnit_Framework_TestFailure $defect
- */
- protected function printDefectTrace(PHPUnit_Framework_TestFailure $defect)
- {
- $e = $defect->thrownException();
- $this->write((string) $e);
-
- while ($e = $e->getPrevious()) {
- $this->write("\nCaused by\n" . $e);
- }
- }
-
- /**
- * @param PHPUnit_Framework_TestResult $result
- */
- protected function printErrors(PHPUnit_Framework_TestResult $result)
- {
- $this->printDefects($result->errors(), 'error');
- }
-
- /**
- * @param PHPUnit_Framework_TestResult $result
- */
- protected function printFailures(PHPUnit_Framework_TestResult $result)
- {
- $this->printDefects($result->failures(), 'failure');
- }
-
- /**
- * @param PHPUnit_Framework_TestResult $result
- */
- protected function printIncompletes(PHPUnit_Framework_TestResult $result)
- {
- $this->printDefects($result->notImplemented(), 'incomplete test');
- }
-
- /**
- * @param PHPUnit_Framework_TestResult $result
- *
- * @since Method available since Release 4.0.0
- */
- protected function printRisky(PHPUnit_Framework_TestResult $result)
- {
- $this->printDefects($result->risky(), 'risky test');
- }
-
- /**
- * @param PHPUnit_Framework_TestResult $result
- *
- * @since Method available since Release 3.0.0
- */
- protected function printSkipped(PHPUnit_Framework_TestResult $result)
- {
- $this->printDefects($result->skipped(), 'skipped test');
- }
-
- protected function printHeader()
- {
- $this->write("\n\n" . PHP_Timer::resourceUsage() . "\n\n");
- }
-
- /**
- * @param PHPUnit_Framework_TestResult $result
- */
- protected function printFooter(PHPUnit_Framework_TestResult $result)
- {
- if (count($result) === 0) {
- $this->writeWithColor(
- 'fg-black, bg-yellow',
- 'No tests executed!'
- );
- } elseif ($result->wasSuccessful() &&
- $result->allHarmless() &&
- $result->allCompletelyImplemented() &&
- $result->noneSkipped()) {
- $this->writeWithColor(
- 'fg-black, bg-green',
- sprintf(
- 'OK (%d test%s, %d assertion%s)',
- count($result),
- (count($result) == 1) ? '' : 's',
- $this->numAssertions,
- ($this->numAssertions == 1) ? '' : 's'
- )
- );
- } else {
- if ($result->wasSuccessful()) {
- $color = 'fg-black, bg-yellow';
-
- if ($this->verbose) {
- $this->write("\n");
- }
-
- $this->writeWithColor(
- $color,
- 'OK, but incomplete, skipped, or risky tests!'
- );
- } else {
- $color = 'fg-white, bg-red';
-
- $this->write("\n");
- $this->writeWithColor($color, 'FAILURES!');
- }
-
- $this->writeCountString(count($result), 'Tests', $color, true);
- $this->writeCountString($this->numAssertions, 'Assertions', $color, true);
- $this->writeCountString($result->errorCount(), 'Errors', $color);
- $this->writeCountString($result->failureCount(), 'Failures', $color);
- $this->writeCountString($result->skippedCount(), 'Skipped', $color);
- $this->writeCountString($result->notImplementedCount(), 'Incomplete', $color);
- $this->writeCountString($result->riskyCount(), 'Risky', $color);
- $this->writeWithColor($color, '.', true);
- }
- }
-
- /**
- */
- public function printWaitPrompt()
- {
- $this->write("\n to continue\n");
- }
-
- /**
- * An error occurred.
- *
- * @param PHPUnit_Framework_Test $test
- * @param Exception $e
- * @param float $time
- */
- public function addError(PHPUnit_Framework_Test $test, Exception $e, $time)
- {
- $this->writeProgressWithColor('fg-red, bold', 'E');
- $this->lastTestFailed = true;
- }
-
- /**
- * A failure occurred.
- *
- * @param PHPUnit_Framework_Test $test
- * @param PHPUnit_Framework_AssertionFailedError $e
- * @param float $time
- */
- public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time)
- {
- $this->writeProgressWithColor('bg-red, fg-white', 'F');
- $this->lastTestFailed = true;
- }
-
- /**
- * Incomplete test.
- *
- * @param PHPUnit_Framework_Test $test
- * @param Exception $e
- * @param float $time
- */
- public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time)
- {
- $this->writeProgressWithColor('fg-yellow, bold', 'I');
- $this->lastTestFailed = true;
- }
-
- /**
- * Risky test.
- *
- * @param PHPUnit_Framework_Test $test
- * @param Exception $e
- * @param float $time
- *
- * @since Method available since Release 4.0.0
- */
- public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time)
- {
- $this->writeProgressWithColor('fg-yellow, bold', 'R');
- $this->lastTestFailed = true;
- }
-
- /**
- * Skipped test.
- *
- * @param PHPUnit_Framework_Test $test
- * @param Exception $e
- * @param float $time
- *
- * @since Method available since Release 3.0.0
- */
- public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time)
- {
- $this->writeProgressWithColor('fg-cyan, bold', 'S');
- $this->lastTestFailed = true;
- }
-
- /**
- * A testsuite started.
- *
- * @param PHPUnit_Framework_TestSuite $suite
- *
- * @since Method available since Release 2.2.0
- */
- public function startTestSuite(PHPUnit_Framework_TestSuite $suite)
- {
- if ($this->numTests == -1) {
- $this->numTests = count($suite);
- $this->numTestsWidth = strlen((string) $this->numTests);
- $this->maxColumn = $this->numberOfColumns - strlen(' / (XXX%)') - (2 * $this->numTestsWidth);
- }
- }
-
- /**
- * A testsuite ended.
- *
- * @param PHPUnit_Framework_TestSuite $suite
- *
- * @since Method available since Release 2.2.0
- */
- public function endTestSuite(PHPUnit_Framework_TestSuite $suite)
- {
- }
-
- /**
- * A test started.
- *
- * @param PHPUnit_Framework_Test $test
- */
- public function startTest(PHPUnit_Framework_Test $test)
- {
- if ($this->debug) {
- $this->write(
- sprintf(
- "\nStarting test '%s'.\n",
- PHPUnit_Util_Test::describe($test)
- )
- );
- }
- }
-
- /**
- * A test ended.
- *
- * @param PHPUnit_Framework_Test $test
- * @param float $time
- */
- public function endTest(PHPUnit_Framework_Test $test, $time)
- {
- if (!$this->lastTestFailed) {
- $this->writeProgress('.');
- }
-
- if ($test instanceof PHPUnit_Framework_TestCase) {
- $this->numAssertions += $test->getNumAssertions();
- } elseif ($test instanceof PHPUnit_Extensions_PhptTestCase) {
- $this->numAssertions++;
- }
-
- $this->lastTestFailed = false;
-
- if ($test instanceof PHPUnit_Framework_TestCase) {
- if (!$test->hasExpectationOnOutput()) {
- $this->write($test->getActualOutput());
- }
- }
- }
-
- /**
- * @param string $progress
- */
- protected function writeProgress($progress)
- {
- $this->write($progress);
- $this->column++;
- $this->numTestsRun++;
-
- if ($this->column == $this->maxColumn) {
- $this->write(
- sprintf(
- ' %' . $this->numTestsWidth . 'd / %' .
- $this->numTestsWidth . 'd (%3s%%)',
- $this->numTestsRun,
- $this->numTests,
- floor(($this->numTestsRun / $this->numTests) * 100)
- )
- );
-
- $this->writeNewLine();
- }
- }
-
- protected function writeNewLine()
- {
- $this->column = 0;
- $this->write("\n");
- }
-
- /**
- * Formats a buffer with a specified ANSI color sequence if colors are
- * enabled.
- *
- * @param string $color
- * @param string $buffer
- *
- * @return string
- *
- * @since Method available since Release 4.0.0
- */
- protected function formatWithColor($color, $buffer)
- {
- if (!$this->colors) {
- return $buffer;
- }
-
- $codes = array_map('trim', explode(',', $color));
- $lines = explode("\n", $buffer);
- $padding = max(array_map('strlen', $lines));
- $styles = array();
-
- foreach ($codes as $code) {
- $styles[] = self::$ansiCodes[$code];
- }
-
- $style = sprintf("\x1b[%sm", implode(';', $styles));
-
- $styledLines = array();
-
- foreach ($lines as $line) {
- $styledLines[] = $style . str_pad($line, $padding) . "\x1b[0m";
- }
-
- return implode("\n", $styledLines);
- }
-
- /**
- * Writes a buffer out with a color sequence if colors are enabled.
- *
- * @param string $color
- * @param string $buffer
- * @param bool $lf
- *
- * @since Method available since Release 4.0.0
- */
- protected function writeWithColor($color, $buffer, $lf = true)
- {
- $this->write($this->formatWithColor($color, $buffer));
-
- if ($lf) {
- $this->write("\n");
- }
- }
-
- /**
- * Writes progress with a color sequence if colors are enabled.
- *
- * @param string $color
- * @param string $buffer
- *
- * @since Method available since Release 4.0.0
- */
- protected function writeProgressWithColor($color, $buffer)
- {
- $buffer = $this->formatWithColor($color, $buffer);
- $this->writeProgress($buffer);
- }
-
- /**
- * @param int $count
- * @param string $name
- * @param string $color
- * @param bool $always
- *
- * @since Method available since Release 4.6.5
- */
- private function writeCountString($count, $name, $color, $always = false)
- {
- static $first = true;
-
- if ($always || $count > 0) {
- $this->writeWithColor(
- $color,
- sprintf(
- '%s%s: %d',
- !$first ? ', ' : '',
- $name,
- $count
- ),
- false
- );
-
- $first = false;
- }
- }
-}
diff --git a/vendor/phpunit/phpunit/src/TextUI/TestRunner.php b/vendor/phpunit/phpunit/src/TextUI/TestRunner.php
deleted file mode 100644
index bb07ea7e..00000000
--- a/vendor/phpunit/phpunit/src/TextUI/TestRunner.php
+++ /dev/null
@@ -1,1061 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-use SebastianBergmann\Environment\Runtime;
-
-/**
- * A TestRunner for the Command Line Interface (CLI)
- * PHP SAPI Module.
- *
- * @since Class available since Release 2.0.0
- */
-class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner
-{
- const SUCCESS_EXIT = 0;
- const FAILURE_EXIT = 1;
- const EXCEPTION_EXIT = 2;
-
- /**
- * @var PHP_CodeCoverage_Filter
- */
- protected $codeCoverageFilter;
-
- /**
- * @var PHPUnit_Runner_TestSuiteLoader
- */
- protected $loader = null;
-
- /**
- * @var PHPUnit_TextUI_ResultPrinter
- */
- protected $printer = null;
-
- /**
- * @var bool
- */
- protected static $versionStringPrinted = false;
-
- /**
- * @var array
- */
- private $missingExtensions = array();
-
- /**
- * @var Runtime
- */
- private $runtime;
-
- /**
- * @param PHPUnit_Runner_TestSuiteLoader $loader
- * @param PHP_CodeCoverage_Filter $filter
- *
- * @since Method available since Release 3.4.0
- */
- public function __construct(PHPUnit_Runner_TestSuiteLoader $loader = null, PHP_CodeCoverage_Filter $filter = null)
- {
- if ($filter === null) {
- $filter = $this->getCodeCoverageFilter();
- }
-
- $this->codeCoverageFilter = $filter;
- $this->loader = $loader;
- $this->runtime = new Runtime;
- }
-
- /**
- * @param PHPUnit_Framework_Test|ReflectionClass $test
- * @param array $arguments
- *
- * @return PHPUnit_Framework_TestResult
- *
- * @throws PHPUnit_Framework_Exception
- */
- public static function run($test, array $arguments = array())
- {
- if ($test instanceof ReflectionClass) {
- $test = new PHPUnit_Framework_TestSuite($test);
- }
-
- if ($test instanceof PHPUnit_Framework_Test) {
- $aTestRunner = new self;
-
- return $aTestRunner->doRun(
- $test,
- $arguments
- );
- } else {
- throw new PHPUnit_Framework_Exception(
- 'No test case or test suite found.'
- );
- }
- }
-
- /**
- * @return PHPUnit_Framework_TestResult
- */
- protected function createTestResult()
- {
- return new PHPUnit_Framework_TestResult;
- }
-
- private function processSuiteFilters(PHPUnit_Framework_TestSuite $suite, array $arguments)
- {
- if (!$arguments['filter'] &&
- empty($arguments['groups']) &&
- empty($arguments['excludeGroups'])) {
- return;
- }
-
- $filterFactory = new PHPUnit_Runner_Filter_Factory();
-
- if (!empty($arguments['excludeGroups'])) {
- $filterFactory->addFilter(
- new ReflectionClass('PHPUnit_Runner_Filter_Group_Exclude'),
- $arguments['excludeGroups']
- );
- }
-
- if (!empty($arguments['groups'])) {
- $filterFactory->addFilter(
- new ReflectionClass('PHPUnit_Runner_Filter_Group_Include'),
- $arguments['groups']
- );
- }
-
- if ($arguments['filter']) {
- $filterFactory->addFilter(
- new ReflectionClass('PHPUnit_Runner_Filter_Test'),
- $arguments['filter']
- );
- }
- $suite->injectFilter($filterFactory);
- }
-
- /**
- * @param PHPUnit_Framework_Test $suite
- * @param array $arguments
- *
- * @return PHPUnit_Framework_TestResult
- */
- public function doRun(PHPUnit_Framework_Test $suite, array $arguments = array())
- {
- if (isset($arguments['configuration'])) {
- $GLOBALS['__PHPUNIT_CONFIGURATION_FILE'] = $arguments['configuration'];
- }
-
- $this->handleConfiguration($arguments);
-
- $this->processSuiteFilters($suite, $arguments);
-
- if (isset($arguments['bootstrap'])) {
- $GLOBALS['__PHPUNIT_BOOTSTRAP'] = $arguments['bootstrap'];
- }
-
- if ($arguments['backupGlobals'] === false) {
- $suite->setBackupGlobals(false);
- }
-
- if ($arguments['backupStaticAttributes'] === true) {
- $suite->setBackupStaticAttributes(true);
- }
-
- if ($arguments['disallowChangesToGlobalState'] === true) {
- $suite->setDisallowChangesToGlobalState(true);
- }
-
- if (is_integer($arguments['repeat'])) {
- $test = new PHPUnit_Extensions_RepeatedTest(
- $suite,
- $arguments['repeat'],
- $arguments['processIsolation']
- );
-
- $suite = new PHPUnit_Framework_TestSuite();
- $suite->addTest($test);
- }
-
- $result = $this->createTestResult();
-
- if (!$arguments['convertErrorsToExceptions']) {
- $result->convertErrorsToExceptions(false);
- }
-
- if (!$arguments['convertNoticesToExceptions']) {
- PHPUnit_Framework_Error_Notice::$enabled = false;
- }
-
- if (!$arguments['convertWarningsToExceptions']) {
- PHPUnit_Framework_Error_Warning::$enabled = false;
- }
-
- if ($arguments['stopOnError']) {
- $result->stopOnError(true);
- }
-
- if ($arguments['stopOnFailure']) {
- $result->stopOnFailure(true);
- }
-
- if ($arguments['stopOnIncomplete']) {
- $result->stopOnIncomplete(true);
- }
-
- if ($arguments['stopOnRisky']) {
- $result->stopOnRisky(true);
- }
-
- if ($arguments['stopOnSkipped']) {
- $result->stopOnSkipped(true);
- }
-
- if ($this->printer === null) {
- if (isset($arguments['printer']) &&
- $arguments['printer'] instanceof PHPUnit_Util_Printer) {
- $this->printer = $arguments['printer'];
- } else {
- $printerClass = 'PHPUnit_TextUI_ResultPrinter';
-
- if (isset($arguments['printer']) &&
- is_string($arguments['printer']) &&
- class_exists($arguments['printer'], false)) {
- $class = new ReflectionClass($arguments['printer']);
-
- if ($class->isSubclassOf('PHPUnit_TextUI_ResultPrinter')) {
- $printerClass = $arguments['printer'];
- }
- }
-
- $this->printer = new $printerClass(
- isset($arguments['stderr']) ? 'php://stderr' : null,
- $arguments['verbose'],
- $arguments['colors'],
- $arguments['debug'],
- $arguments['columns']
- );
- }
- }
-
- if (!$this->printer instanceof PHPUnit_Util_Log_TAP) {
- $this->printer->write(
- PHPUnit_Runner_Version::getVersionString() . "\n"
- );
-
- self::$versionStringPrinted = true;
-
- if ($arguments['verbose']) {
- $this->printer->write(
- sprintf(
- "\nRuntime:\t%s",
- $this->runtime->getNameWithVersion()
- )
- );
-
- if ($this->runtime->hasXdebug()) {
- $this->printer->write(
- sprintf(
- ' with Xdebug %s',
- phpversion('xdebug')
- )
- );
- }
-
- if (isset($arguments['configuration'])) {
- $this->printer->write(
- sprintf(
- "\nConfiguration:\t%s",
- $arguments['configuration']->getFilename()
- )
- );
- }
-
- $this->printer->write("\n");
- }
-
- if (isset($arguments['deprecatedStrictModeOption'])) {
- print "Warning:\tDeprecated option \"--strict\" used\n";
- } elseif (isset($arguments['deprecatedStrictModeSetting'])) {
- print "Warning:\tDeprecated configuration setting \"strict\" used\n";
- }
-
- if (isset($arguments['deprecatedSeleniumConfiguration'])) {
- print "Warning:\tDeprecated configuration setting \"selenium\" used\n";
- }
- }
-
- foreach ($arguments['listeners'] as $listener) {
- $result->addListener($listener);
- }
-
- $result->addListener($this->printer);
-
- if (isset($arguments['testdoxHTMLFile'])) {
- $result->addListener(
- new PHPUnit_Util_TestDox_ResultPrinter_HTML(
- $arguments['testdoxHTMLFile']
- )
- );
- }
-
- if (isset($arguments['testdoxTextFile'])) {
- $result->addListener(
- new PHPUnit_Util_TestDox_ResultPrinter_Text(
- $arguments['testdoxTextFile']
- )
- );
- }
-
- $codeCoverageReports = 0;
-
- if (isset($arguments['coverageClover'])) {
- $codeCoverageReports++;
- }
-
- if (isset($arguments['coverageCrap4J'])) {
- $codeCoverageReports++;
- }
-
- if (isset($arguments['coverageHtml'])) {
- $codeCoverageReports++;
- }
-
- if (isset($arguments['coveragePHP'])) {
- $codeCoverageReports++;
- }
-
- if (isset($arguments['coverageText'])) {
- $codeCoverageReports++;
- }
-
- if (isset($arguments['coverageXml'])) {
- $codeCoverageReports++;
- }
-
- if (isset($arguments['noCoverage'])) {
- $codeCoverageReports = 0;
- }
-
- if ($codeCoverageReports > 0 && (!extension_loaded('tokenizer') || !$this->runtime->canCollectCodeCoverage())) {
- if (!extension_loaded('tokenizer')) {
- $this->showExtensionNotLoadedWarning(
- 'tokenizer',
- 'No code coverage will be generated.'
- );
- } elseif (!extension_loaded('Xdebug')) {
- $this->showExtensionNotLoadedWarning(
- 'Xdebug',
- 'No code coverage will be generated.'
- );
- }
-
- $codeCoverageReports = 0;
- }
-
- if (!$this->printer instanceof PHPUnit_Util_Log_TAP) {
- if ($codeCoverageReports > 0 && !$this->codeCoverageFilter->hasWhitelist()) {
- $this->printer->write("Warning:\tNo whitelist configured for code coverage\n");
- }
-
- $this->printer->write("\n");
- }
-
- if ($codeCoverageReports > 0) {
- $codeCoverage = new PHP_CodeCoverage(
- null,
- $this->codeCoverageFilter
- );
-
- $codeCoverage->setAddUncoveredFilesFromWhitelist(
- $arguments['addUncoveredFilesFromWhitelist']
- );
-
- $codeCoverage->setCheckForUnintentionallyCoveredCode(
- $arguments['strictCoverage']
- );
-
- $codeCoverage->setProcessUncoveredFilesFromWhitelist(
- $arguments['processUncoveredFilesFromWhitelist']
- );
-
- if (isset($arguments['forceCoversAnnotation'])) {
- $codeCoverage->setForceCoversAnnotation(
- $arguments['forceCoversAnnotation']
- );
- }
-
- if (isset($arguments['mapTestClassNameToCoveredClassName'])) {
- $codeCoverage->setMapTestClassNameToCoveredClassName(
- $arguments['mapTestClassNameToCoveredClassName']
- );
- }
-
- $result->setCodeCoverage($codeCoverage);
- }
-
- if ($codeCoverageReports > 1) {
- if (isset($arguments['cacheTokens'])) {
- $codeCoverage->setCacheTokens($arguments['cacheTokens']);
- }
- }
-
- if (isset($arguments['jsonLogfile'])) {
- $result->addListener(
- new PHPUnit_Util_Log_JSON($arguments['jsonLogfile'])
- );
- }
-
- if (isset($arguments['tapLogfile'])) {
- $result->addListener(
- new PHPUnit_Util_Log_TAP($arguments['tapLogfile'])
- );
- }
-
- if (isset($arguments['junitLogfile'])) {
- $result->addListener(
- new PHPUnit_Util_Log_JUnit(
- $arguments['junitLogfile'],
- $arguments['logIncompleteSkipped']
- )
- );
- }
-
- $result->beStrictAboutTestsThatDoNotTestAnything($arguments['reportUselessTests']);
- $result->beStrictAboutOutputDuringTests($arguments['disallowTestOutput']);
- $result->beStrictAboutTodoAnnotatedTests($arguments['disallowTodoAnnotatedTests']);
- $result->beStrictAboutTestSize($arguments['enforceTimeLimit']);
- $result->setTimeoutForSmallTests($arguments['timeoutForSmallTests']);
- $result->setTimeoutForMediumTests($arguments['timeoutForMediumTests']);
- $result->setTimeoutForLargeTests($arguments['timeoutForLargeTests']);
-
- if ($suite instanceof PHPUnit_Framework_TestSuite) {
- $suite->setRunTestInSeparateProcess($arguments['processIsolation']);
- }
-
- $suite->run($result);
-
- unset($suite);
- $result->flushListeners();
-
- if ($this->printer instanceof PHPUnit_TextUI_ResultPrinter) {
- $this->printer->printResult($result);
- }
-
- if (isset($codeCoverage)) {
- if (isset($arguments['coverageClover'])) {
- $this->printer->write(
- "\nGenerating code coverage report in Clover XML format ..."
- );
-
- try {
- $writer = new PHP_CodeCoverage_Report_Clover;
- $writer->process($codeCoverage, $arguments['coverageClover']);
-
- $this->printer->write(" done\n");
- unset($writer);
- } catch (PHP_CodeCoverage_Exception $e) {
- $this->printer->write(
- " failed\n" . $e->getMessage() . "\n"
- );
- }
- }
-
- if (isset($arguments['coverageCrap4J'])) {
- $this->printer->write(
- "\nGenerating Crap4J report XML file ..."
- );
-
- try {
- $writer = new PHP_CodeCoverage_Report_Crap4j($arguments['crap4jThreshold']);
- $writer->process($codeCoverage, $arguments['coverageCrap4J']);
-
- $this->printer->write(" done\n");
- unset($writer);
- } catch (PHP_CodeCoverage_Exception $e) {
- $this->printer->write(
- " failed\n" . $e->getMessage() . "\n"
- );
- }
- }
-
- if (isset($arguments['coverageHtml'])) {
- $this->printer->write(
- "\nGenerating code coverage report in HTML format ..."
- );
-
- try {
- $writer = new PHP_CodeCoverage_Report_HTML(
- $arguments['reportLowUpperBound'],
- $arguments['reportHighLowerBound'],
- sprintf(
- ' and PHPUnit %s',
- PHPUnit_Runner_Version::id()
- )
- );
-
- $writer->process($codeCoverage, $arguments['coverageHtml']);
-
- $this->printer->write(" done\n");
- unset($writer);
- } catch (PHP_CodeCoverage_Exception $e) {
- $this->printer->write(
- " failed\n" . $e->getMessage() . "\n"
- );
- }
- }
-
- if (isset($arguments['coveragePHP'])) {
- $this->printer->write(
- "\nGenerating code coverage report in PHP format ..."
- );
-
- try {
- $writer = new PHP_CodeCoverage_Report_PHP;
- $writer->process($codeCoverage, $arguments['coveragePHP']);
-
- $this->printer->write(" done\n");
- unset($writer);
- } catch (PHP_CodeCoverage_Exception $e) {
- $this->printer->write(
- " failed\n" . $e->getMessage() . "\n"
- );
- }
- }
-
- if (isset($arguments['coverageText'])) {
- if ($arguments['coverageText'] == 'php://stdout') {
- $outputStream = $this->printer;
- $colors = $arguments['colors'] && $arguments['colors'] != PHPUnit_TextUI_ResultPrinter::COLOR_NEVER;
- } else {
- $outputStream = new PHPUnit_Util_Printer($arguments['coverageText']);
- $colors = false;
- }
-
- $processor = new PHP_CodeCoverage_Report_Text(
- $arguments['reportLowUpperBound'],
- $arguments['reportHighLowerBound'],
- $arguments['coverageTextShowUncoveredFiles'],
- $arguments['coverageTextShowOnlySummary']
- );
-
- $outputStream->write(
- $processor->process($codeCoverage, $colors)
- );
- }
-
- if (isset($arguments['coverageXml'])) {
- $this->printer->write(
- "\nGenerating code coverage report in PHPUnit XML format ..."
- );
-
- try {
- $writer = new PHP_CodeCoverage_Report_XML;
- $writer->process($codeCoverage, $arguments['coverageXml']);
-
- $this->printer->write(" done\n");
- unset($writer);
- } catch (PHP_CodeCoverage_Exception $e) {
- $this->printer->write(
- " failed\n" . $e->getMessage() . "\n"
- );
- }
- }
- }
-
- return $result;
- }
-
- /**
- * @param PHPUnit_TextUI_ResultPrinter $resultPrinter
- */
- public function setPrinter(PHPUnit_TextUI_ResultPrinter $resultPrinter)
- {
- $this->printer = $resultPrinter;
- }
-
- /**
- * Override to define how to handle a failed loading of
- * a test suite.
- *
- * @param string $message
- */
- protected function runFailed($message)
- {
- $this->write($message . PHP_EOL);
- exit(self::FAILURE_EXIT);
- }
-
- /**
- * @param string $buffer
- *
- * @since Method available since Release 3.1.0
- */
- protected function write($buffer)
- {
- if (PHP_SAPI != 'cli' && PHP_SAPI != 'phpdbg') {
- $buffer = htmlspecialchars($buffer);
- }
-
- if ($this->printer !== null) {
- $this->printer->write($buffer);
- } else {
- print $buffer;
- }
- }
-
- /**
- * Returns the loader to be used.
- *
- * @return PHPUnit_Runner_TestSuiteLoader
- *
- * @since Method available since Release 2.2.0
- */
- public function getLoader()
- {
- if ($this->loader === null) {
- $this->loader = new PHPUnit_Runner_StandardTestSuiteLoader;
- }
-
- return $this->loader;
- }
-
- /**
- * @param array $arguments
- *
- * @since Method available since Release 3.2.1
- */
- protected function handleConfiguration(array &$arguments)
- {
- if (isset($arguments['configuration']) &&
- !$arguments['configuration'] instanceof PHPUnit_Util_Configuration) {
- $arguments['configuration'] = PHPUnit_Util_Configuration::getInstance(
- $arguments['configuration']
- );
- }
-
- $arguments['debug'] = isset($arguments['debug']) ? $arguments['debug'] : false;
- $arguments['filter'] = isset($arguments['filter']) ? $arguments['filter'] : false;
- $arguments['listeners'] = isset($arguments['listeners']) ? $arguments['listeners'] : array();
-
- if (isset($arguments['configuration'])) {
- $arguments['configuration']->handlePHPConfiguration();
-
- $phpunitConfiguration = $arguments['configuration']->getPHPUnitConfiguration();
-
- if (isset($phpunitConfiguration['deprecatedStrictModeSetting'])) {
- $arguments['deprecatedStrictModeSetting'] = true;
- }
-
- if (isset($phpunitConfiguration['backupGlobals']) &&
- !isset($arguments['backupGlobals'])) {
- $arguments['backupGlobals'] = $phpunitConfiguration['backupGlobals'];
- }
-
- if (isset($phpunitConfiguration['backupStaticAttributes']) &&
- !isset($arguments['backupStaticAttributes'])) {
- $arguments['backupStaticAttributes'] = $phpunitConfiguration['backupStaticAttributes'];
- }
-
- if (isset($phpunitConfiguration['disallowChangesToGlobalState']) &&
- !isset($arguments['disallowChangesToGlobalState'])) {
- $arguments['disallowChangesToGlobalState'] = $phpunitConfiguration['disallowChangesToGlobalState'];
- }
-
- if (isset($phpunitConfiguration['bootstrap']) &&
- !isset($arguments['bootstrap'])) {
- $arguments['bootstrap'] = $phpunitConfiguration['bootstrap'];
- }
-
- if (isset($phpunitConfiguration['cacheTokens']) &&
- !isset($arguments['cacheTokens'])) {
- $arguments['cacheTokens'] = $phpunitConfiguration['cacheTokens'];
- }
-
- if (isset($phpunitConfiguration['colors']) &&
- !isset($arguments['colors'])) {
- $arguments['colors'] = $phpunitConfiguration['colors'];
- }
-
- if (isset($phpunitConfiguration['convertErrorsToExceptions']) &&
- !isset($arguments['convertErrorsToExceptions'])) {
- $arguments['convertErrorsToExceptions'] = $phpunitConfiguration['convertErrorsToExceptions'];
- }
-
- if (isset($phpunitConfiguration['convertNoticesToExceptions']) &&
- !isset($arguments['convertNoticesToExceptions'])) {
- $arguments['convertNoticesToExceptions'] = $phpunitConfiguration['convertNoticesToExceptions'];
- }
-
- if (isset($phpunitConfiguration['convertWarningsToExceptions']) &&
- !isset($arguments['convertWarningsToExceptions'])) {
- $arguments['convertWarningsToExceptions'] = $phpunitConfiguration['convertWarningsToExceptions'];
- }
-
- if (isset($phpunitConfiguration['processIsolation']) &&
- !isset($arguments['processIsolation'])) {
- $arguments['processIsolation'] = $phpunitConfiguration['processIsolation'];
- }
-
- if (isset($phpunitConfiguration['stopOnError']) &&
- !isset($arguments['stopOnError'])) {
- $arguments['stopOnError'] = $phpunitConfiguration['stopOnError'];
- }
-
- if (isset($phpunitConfiguration['stopOnFailure']) &&
- !isset($arguments['stopOnFailure'])) {
- $arguments['stopOnFailure'] = $phpunitConfiguration['stopOnFailure'];
- }
-
- if (isset($phpunitConfiguration['stopOnIncomplete']) &&
- !isset($arguments['stopOnIncomplete'])) {
- $arguments['stopOnIncomplete'] = $phpunitConfiguration['stopOnIncomplete'];
- }
-
- if (isset($phpunitConfiguration['stopOnRisky']) &&
- !isset($arguments['stopOnRisky'])) {
- $arguments['stopOnRisky'] = $phpunitConfiguration['stopOnRisky'];
- }
-
- if (isset($phpunitConfiguration['stopOnSkipped']) &&
- !isset($arguments['stopOnSkipped'])) {
- $arguments['stopOnSkipped'] = $phpunitConfiguration['stopOnSkipped'];
- }
-
- if (isset($phpunitConfiguration['timeoutForSmallTests']) &&
- !isset($arguments['timeoutForSmallTests'])) {
- $arguments['timeoutForSmallTests'] = $phpunitConfiguration['timeoutForSmallTests'];
- }
-
- if (isset($phpunitConfiguration['timeoutForMediumTests']) &&
- !isset($arguments['timeoutForMediumTests'])) {
- $arguments['timeoutForMediumTests'] = $phpunitConfiguration['timeoutForMediumTests'];
- }
-
- if (isset($phpunitConfiguration['timeoutForLargeTests']) &&
- !isset($arguments['timeoutForLargeTests'])) {
- $arguments['timeoutForLargeTests'] = $phpunitConfiguration['timeoutForLargeTests'];
- }
-
- if (isset($phpunitConfiguration['reportUselessTests']) &&
- !isset($arguments['reportUselessTests'])) {
- $arguments['reportUselessTests'] = $phpunitConfiguration['reportUselessTests'];
- }
-
- if (isset($phpunitConfiguration['strictCoverage']) &&
- !isset($arguments['strictCoverage'])) {
- $arguments['strictCoverage'] = $phpunitConfiguration['strictCoverage'];
- }
-
- if (isset($phpunitConfiguration['disallowTestOutput']) &&
- !isset($arguments['disallowTestOutput'])) {
- $arguments['disallowTestOutput'] = $phpunitConfiguration['disallowTestOutput'];
- }
-
- if (isset($phpunitConfiguration['enforceTimeLimit']) &&
- !isset($arguments['enforceTimeLimit'])) {
- $arguments['enforceTimeLimit'] = $phpunitConfiguration['enforceTimeLimit'];
- }
-
- if (isset($phpunitConfiguration['disallowTodoAnnotatedTests']) &&
- !isset($arguments['disallowTodoAnnotatedTests'])) {
- $arguments['disallowTodoAnnotatedTests'] = $phpunitConfiguration['disallowTodoAnnotatedTests'];
- }
-
- if (isset($phpunitConfiguration['verbose']) &&
- !isset($arguments['verbose'])) {
- $arguments['verbose'] = $phpunitConfiguration['verbose'];
- }
-
- if (isset($phpunitConfiguration['forceCoversAnnotation']) &&
- !isset($arguments['forceCoversAnnotation'])) {
- $arguments['forceCoversAnnotation'] = $phpunitConfiguration['forceCoversAnnotation'];
- }
-
- if (isset($phpunitConfiguration['mapTestClassNameToCoveredClassName']) &&
- !isset($arguments['mapTestClassNameToCoveredClassName'])) {
- $arguments['mapTestClassNameToCoveredClassName'] = $phpunitConfiguration['mapTestClassNameToCoveredClassName'];
- }
-
- $groupCliArgs = array();
-
- if (!empty($arguments['groups'])) {
- $groupCliArgs = $arguments['groups'];
- }
-
- $groupConfiguration = $arguments['configuration']->getGroupConfiguration();
-
- if (!empty($groupConfiguration['include']) &&
- !isset($arguments['groups'])) {
- $arguments['groups'] = $groupConfiguration['include'];
- }
-
- if (!empty($groupConfiguration['exclude']) &&
- !isset($arguments['excludeGroups'])) {
- $arguments['excludeGroups'] = array_diff($groupConfiguration['exclude'], $groupCliArgs);
- }
-
- foreach ($arguments['configuration']->getListenerConfiguration() as $listener) {
- if (!class_exists($listener['class'], false) &&
- $listener['file'] !== '') {
- require_once $listener['file'];
- }
-
- if (class_exists($listener['class'])) {
- if (count($listener['arguments']) == 0) {
- $listener = new $listener['class'];
- } else {
- $listenerClass = new ReflectionClass(
- $listener['class']
- );
- $listener = $listenerClass->newInstanceArgs(
- $listener['arguments']
- );
- }
-
- if ($listener instanceof PHPUnit_Framework_TestListener) {
- $arguments['listeners'][] = $listener;
- }
- }
- }
-
- $loggingConfiguration = $arguments['configuration']->getLoggingConfiguration();
-
- if (isset($loggingConfiguration['coverage-clover']) &&
- !isset($arguments['coverageClover'])) {
- $arguments['coverageClover'] = $loggingConfiguration['coverage-clover'];
- }
-
- if (isset($loggingConfiguration['coverage-crap4j']) &&
- !isset($arguments['coverageCrap4J'])) {
- $arguments['coverageCrap4J'] = $loggingConfiguration['coverage-crap4j'];
-
- if (isset($loggingConfiguration['crap4jThreshold']) &&
- !isset($arguments['crap4jThreshold'])) {
- $arguments['crap4jThreshold'] = $loggingConfiguration['crap4jThreshold'];
- }
- }
-
- if (isset($loggingConfiguration['coverage-html']) &&
- !isset($arguments['coverageHtml'])) {
- if (isset($loggingConfiguration['lowUpperBound']) &&
- !isset($arguments['reportLowUpperBound'])) {
- $arguments['reportLowUpperBound'] = $loggingConfiguration['lowUpperBound'];
- }
-
- if (isset($loggingConfiguration['highLowerBound']) &&
- !isset($arguments['reportHighLowerBound'])) {
- $arguments['reportHighLowerBound'] = $loggingConfiguration['highLowerBound'];
- }
-
- $arguments['coverageHtml'] = $loggingConfiguration['coverage-html'];
- }
-
- if (isset($loggingConfiguration['coverage-php']) &&
- !isset($arguments['coveragePHP'])) {
- $arguments['coveragePHP'] = $loggingConfiguration['coverage-php'];
- }
-
- if (isset($loggingConfiguration['coverage-text']) &&
- !isset($arguments['coverageText'])) {
- $arguments['coverageText'] = $loggingConfiguration['coverage-text'];
- if (isset($loggingConfiguration['coverageTextShowUncoveredFiles'])) {
- $arguments['coverageTextShowUncoveredFiles'] = $loggingConfiguration['coverageTextShowUncoveredFiles'];
- } else {
- $arguments['coverageTextShowUncoveredFiles'] = false;
- }
- if (isset($loggingConfiguration['coverageTextShowOnlySummary'])) {
- $arguments['coverageTextShowOnlySummary'] = $loggingConfiguration['coverageTextShowOnlySummary'];
- } else {
- $arguments['coverageTextShowOnlySummary'] = false;
- }
- }
-
- if (isset($loggingConfiguration['coverage-xml']) &&
- !isset($arguments['coverageXml'])) {
- $arguments['coverageXml'] = $loggingConfiguration['coverage-xml'];
- }
-
- if (isset($loggingConfiguration['json']) &&
- !isset($arguments['jsonLogfile'])) {
- $arguments['jsonLogfile'] = $loggingConfiguration['json'];
- }
-
- if (isset($loggingConfiguration['plain'])) {
- $arguments['listeners'][] = new PHPUnit_TextUI_ResultPrinter(
- $loggingConfiguration['plain'],
- true
- );
- }
-
- if (isset($loggingConfiguration['tap']) &&
- !isset($arguments['tapLogfile'])) {
- $arguments['tapLogfile'] = $loggingConfiguration['tap'];
- }
-
- if (isset($loggingConfiguration['junit']) &&
- !isset($arguments['junitLogfile'])) {
- $arguments['junitLogfile'] = $loggingConfiguration['junit'];
-
- if (isset($loggingConfiguration['logIncompleteSkipped']) &&
- !isset($arguments['logIncompleteSkipped'])) {
- $arguments['logIncompleteSkipped'] = $loggingConfiguration['logIncompleteSkipped'];
- }
- }
-
- if (isset($loggingConfiguration['testdox-html']) &&
- !isset($arguments['testdoxHTMLFile'])) {
- $arguments['testdoxHTMLFile'] = $loggingConfiguration['testdox-html'];
- }
-
- if (isset($loggingConfiguration['testdox-text']) &&
- !isset($arguments['testdoxTextFile'])) {
- $arguments['testdoxTextFile'] = $loggingConfiguration['testdox-text'];
- }
-
- if ((isset($arguments['coverageClover']) ||
- isset($arguments['coverageCrap4J']) ||
- isset($arguments['coverageHtml']) ||
- isset($arguments['coveragePHP']) ||
- isset($arguments['coverageText']) ||
- isset($arguments['coverageXml'])) &&
- $this->runtime->canCollectCodeCoverage()) {
- $filterConfiguration = $arguments['configuration']->getFilterConfiguration();
- $arguments['addUncoveredFilesFromWhitelist'] = $filterConfiguration['whitelist']['addUncoveredFilesFromWhitelist'];
- $arguments['processUncoveredFilesFromWhitelist'] = $filterConfiguration['whitelist']['processUncoveredFilesFromWhitelist'];
-
- if (empty($filterConfiguration['whitelist']['include']['directory']) &&
- empty($filterConfiguration['whitelist']['include']['file'])) {
- foreach ($filterConfiguration['blacklist']['include']['directory'] as $dir) {
- $this->codeCoverageFilter->addDirectoryToBlacklist(
- $dir['path'],
- $dir['suffix'],
- $dir['prefix'],
- $dir['group']
- );
- }
-
- foreach ($filterConfiguration['blacklist']['include']['file'] as $file) {
- $this->codeCoverageFilter->addFileToBlacklist($file);
- }
-
- foreach ($filterConfiguration['blacklist']['exclude']['directory'] as $dir) {
- $this->codeCoverageFilter->removeDirectoryFromBlacklist(
- $dir['path'],
- $dir['suffix'],
- $dir['prefix'],
- $dir['group']
- );
- }
-
- foreach ($filterConfiguration['blacklist']['exclude']['file'] as $file) {
- $this->codeCoverageFilter->removeFileFromBlacklist($file);
- }
- }
-
- foreach ($filterConfiguration['whitelist']['include']['directory'] as $dir) {
- $this->codeCoverageFilter->addDirectoryToWhitelist(
- $dir['path'],
- $dir['suffix'],
- $dir['prefix']
- );
- }
-
- foreach ($filterConfiguration['whitelist']['include']['file'] as $file) {
- $this->codeCoverageFilter->addFileToWhitelist($file);
- }
-
- foreach ($filterConfiguration['whitelist']['exclude']['directory'] as $dir) {
- $this->codeCoverageFilter->removeDirectoryFromWhitelist(
- $dir['path'],
- $dir['suffix'],
- $dir['prefix']
- );
- }
-
- foreach ($filterConfiguration['whitelist']['exclude']['file'] as $file) {
- $this->codeCoverageFilter->removeFileFromWhitelist($file);
- }
- }
- }
-
- $arguments['addUncoveredFilesFromWhitelist'] = isset($arguments['addUncoveredFilesFromWhitelist']) ? $arguments['addUncoveredFilesFromWhitelist'] : true;
- $arguments['processUncoveredFilesFromWhitelist'] = isset($arguments['processUncoveredFilesFromWhitelist']) ? $arguments['processUncoveredFilesFromWhitelist'] : false;
- $arguments['backupGlobals'] = isset($arguments['backupGlobals']) ? $arguments['backupGlobals'] : null;
- $arguments['backupStaticAttributes'] = isset($arguments['backupStaticAttributes']) ? $arguments['backupStaticAttributes'] : null;
- $arguments['disallowChangesToGlobalState'] = isset($arguments['disallowChangesToGlobalState']) ? $arguments['disallowChangesToGlobalState'] : null;
- $arguments['cacheTokens'] = isset($arguments['cacheTokens']) ? $arguments['cacheTokens'] : false;
- $arguments['columns'] = isset($arguments['columns']) ? $arguments['columns'] : 80;
- $arguments['colors'] = isset($arguments['colors']) ? $arguments['colors'] : PHPUnit_TextUI_ResultPrinter::COLOR_DEFAULT;
- $arguments['convertErrorsToExceptions'] = isset($arguments['convertErrorsToExceptions']) ? $arguments['convertErrorsToExceptions'] : true;
- $arguments['convertNoticesToExceptions'] = isset($arguments['convertNoticesToExceptions']) ? $arguments['convertNoticesToExceptions'] : true;
- $arguments['convertWarningsToExceptions'] = isset($arguments['convertWarningsToExceptions']) ? $arguments['convertWarningsToExceptions'] : true;
- $arguments['excludeGroups'] = isset($arguments['excludeGroups']) ? $arguments['excludeGroups'] : array();
- $arguments['groups'] = isset($arguments['groups']) ? $arguments['groups'] : array();
- $arguments['logIncompleteSkipped'] = isset($arguments['logIncompleteSkipped']) ? $arguments['logIncompleteSkipped'] : false;
- $arguments['processIsolation'] = isset($arguments['processIsolation']) ? $arguments['processIsolation'] : false;
- $arguments['repeat'] = isset($arguments['repeat']) ? $arguments['repeat'] : false;
- $arguments['reportHighLowerBound'] = isset($arguments['reportHighLowerBound']) ? $arguments['reportHighLowerBound'] : 90;
- $arguments['reportLowUpperBound'] = isset($arguments['reportLowUpperBound']) ? $arguments['reportLowUpperBound'] : 50;
- $arguments['crap4jThreshold'] = isset($arguments['crap4jThreshold']) ? $arguments['crap4jThreshold'] : 30;
- $arguments['stopOnError'] = isset($arguments['stopOnError']) ? $arguments['stopOnError'] : false;
- $arguments['stopOnFailure'] = isset($arguments['stopOnFailure']) ? $arguments['stopOnFailure'] : false;
- $arguments['stopOnIncomplete'] = isset($arguments['stopOnIncomplete']) ? $arguments['stopOnIncomplete'] : false;
- $arguments['stopOnRisky'] = isset($arguments['stopOnRisky']) ? $arguments['stopOnRisky'] : false;
- $arguments['stopOnSkipped'] = isset($arguments['stopOnSkipped']) ? $arguments['stopOnSkipped'] : false;
- $arguments['timeoutForSmallTests'] = isset($arguments['timeoutForSmallTests']) ? $arguments['timeoutForSmallTests'] : 1;
- $arguments['timeoutForMediumTests'] = isset($arguments['timeoutForMediumTests']) ? $arguments['timeoutForMediumTests'] : 10;
- $arguments['timeoutForLargeTests'] = isset($arguments['timeoutForLargeTests']) ? $arguments['timeoutForLargeTests'] : 60;
- $arguments['reportUselessTests'] = isset($arguments['reportUselessTests']) ? $arguments['reportUselessTests'] : false;
- $arguments['strictCoverage'] = isset($arguments['strictCoverage']) ? $arguments['strictCoverage'] : false;
- $arguments['disallowTestOutput'] = isset($arguments['disallowTestOutput']) ? $arguments['disallowTestOutput'] : false;
- $arguments['enforceTimeLimit'] = isset($arguments['enforceTimeLimit']) ? $arguments['enforceTimeLimit'] : false;
- $arguments['disallowTodoAnnotatedTests'] = isset($arguments['disallowTodoAnnotatedTests']) ? $arguments['disallowTodoAnnotatedTests'] : false;
- $arguments['verbose'] = isset($arguments['verbose']) ? $arguments['verbose'] : false;
- }
-
- /**
- * @param $extension
- * @param string $message
- *
- * @since Method available since Release 4.7.3
- */
- private function showExtensionNotLoadedWarning($extension, $message = '')
- {
- if (isset($this->missingExtensions[$extension])) {
- return;
- }
-
- $this->write("Warning:\t" . 'The ' . $extension . ' extension is not loaded' . "\n");
-
- if (!empty($message)) {
- $this->write("\t\t" . $message . "\n");
- }
-
- $this->missingExtensions[$extension] = true;
- }
-
- /**
- * @return PHP_CodeCoverage_Filter
- */
- private function getCodeCoverageFilter()
- {
- $filter = new PHP_CodeCoverage_Filter;
-
- if (defined('__PHPUNIT_PHAR__')) {
- $filter->addFileToBlacklist(__PHPUNIT_PHAR__);
- }
-
- $blacklist = new PHPUnit_Util_Blacklist;
-
- foreach ($blacklist->getBlacklistedDirectories() as $directory) {
- $filter->addDirectoryToBlacklist($directory);
- }
-
- return $filter;
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Util/Blacklist.php b/vendor/phpunit/phpunit/src/Util/Blacklist.php
deleted file mode 100644
index a4839ee5..00000000
--- a/vendor/phpunit/phpunit/src/Util/Blacklist.php
+++ /dev/null
@@ -1,115 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Utility class for blacklisting PHPUnit's own source code files.
- *
- * @since Class available since Release 4.0.0
- */
-class PHPUnit_Util_Blacklist
-{
- /**
- * @var array
- */
- public static $blacklistedClassNames = array(
- 'File_Iterator' => 1,
- 'PHP_CodeCoverage' => 1,
- 'PHP_Invoker' => 1,
- 'PHP_Timer' => 1,
- 'PHP_Token' => 1,
- 'PHPUnit_Framework_TestCase' => 2,
- 'PHPUnit_Extensions_Database_TestCase' => 2,
- 'PHPUnit_Framework_MockObject_Generator' => 2,
- 'PHPUnit_Extensions_SeleniumTestCase' => 2,
- 'Text_Template' => 1,
- 'Symfony\Component\Yaml\Yaml' => 1,
- 'SebastianBergmann\Diff\Diff' => 1,
- 'SebastianBergmann\Environment\Runtime' => 1,
- 'SebastianBergmann\Comparator\Comparator' => 1,
- 'SebastianBergmann\Exporter\Exporter' => 1,
- 'SebastianBergmann\GlobalState\Snapshot' => 1,
- 'SebastianBergmann\RecursionContext\Context' => 1,
- 'SebastianBergmann\Version' => 1,
- 'Composer\Autoload\ClassLoader' => 1,
- 'Doctrine\Instantiator\Instantiator' => 1,
- 'phpDocumentor\Reflection\DocBlock' => 1,
- 'Prophecy\Prophet' => 1
- );
-
- /**
- * @var array
- */
- private static $directories;
-
- /**
- * @return array
- *
- * @since Method available since Release 4.1.0
- */
- public function getBlacklistedDirectories()
- {
- $this->initialize();
-
- return self::$directories;
- }
-
- /**
- * @param string $file
- *
- * @return bool
- */
- public function isBlacklisted($file)
- {
- if (defined('PHPUNIT_TESTSUITE')) {
- return false;
- }
-
- $this->initialize();
-
- foreach (self::$directories as $directory) {
- if (strpos($file, $directory) === 0) {
- return true;
- }
- }
-
- return false;
- }
-
- private function initialize()
- {
- if (self::$directories === null) {
- self::$directories = array();
-
- foreach (self::$blacklistedClassNames as $className => $parent) {
- if (!class_exists($className)) {
- continue;
- }
-
- $reflector = new ReflectionClass($className);
- $directory = $reflector->getFileName();
-
- for ($i = 0; $i < $parent; $i++) {
- $directory = dirname($directory);
- }
-
- self::$directories[] = $directory;
- }
-
- // Hide process isolation workaround on Windows.
- // @see PHPUnit_Util_PHP::factory()
- // @see PHPUnit_Util_PHP_Windows::process()
- if (DIRECTORY_SEPARATOR === '\\') {
- // tempnam() prefix is limited to first 3 chars.
- // @see http://php.net/manual/en/function.tempnam.php
- self::$directories[] = sys_get_temp_dir() . '\\PHP';
- }
- }
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Util/Configuration.php b/vendor/phpunit/phpunit/src/Util/Configuration.php
deleted file mode 100644
index 5c104160..00000000
--- a/vendor/phpunit/phpunit/src/Util/Configuration.php
+++ /dev/null
@@ -1,1158 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Wrapper for the PHPUnit XML configuration file.
- *
- * Example XML configuration file:
- *
- *
- *
- *
- *
- *
- * /path/to/files
- * /path/to/MyTest.php
- * /path/to/files/exclude
- *
- *
- *
- *
- *
- * name
- *
- *
- * name
- *
- *
- *
- *
- *
- * /path/to/files
- * /path/to/file
- *
- * /path/to/files
- * /path/to/file
- *
- *
- *
- * /path/to/files
- * /path/to/file
- *
- * /path/to/files
- * /path/to/file
- *
- *
- *
- *
- *
- *
- *
- *
- *
- * Sebastian
- *
- *
- * 22
- * April
- * 19.78
- *
- *
- * MyRelativeFile.php
- * MyRelativeDir
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- * .
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- * @since Class available since Release 3.2.0
- */
-class PHPUnit_Util_Configuration
-{
- private static $instances = array();
-
- protected $document;
- protected $xpath;
- protected $filename;
-
- /**
- * Loads a PHPUnit configuration file.
- *
- * @param string $filename
- */
- protected function __construct($filename)
- {
- $this->filename = $filename;
- $this->document = PHPUnit_Util_XML::loadFile($filename, false, true, true);
- $this->xpath = new DOMXPath($this->document);
- }
-
- /**
- * @since Method available since Release 3.4.0
- */
- final private function __clone()
- {
- }
-
- /**
- * Returns a PHPUnit configuration object.
- *
- * @param string $filename
- *
- * @return PHPUnit_Util_Configuration
- *
- * @since Method available since Release 3.4.0
- */
- public static function getInstance($filename)
- {
- $realpath = realpath($filename);
-
- if ($realpath === false) {
- throw new PHPUnit_Framework_Exception(
- sprintf(
- 'Could not read "%s".',
- $filename
- )
- );
- }
-
- if (!isset(self::$instances[$realpath])) {
- self::$instances[$realpath] = new self($realpath);
- }
-
- return self::$instances[$realpath];
- }
-
- /**
- * Returns the realpath to the configuration file.
- *
- * @return string
- *
- * @since Method available since Release 3.6.0
- */
- public function getFilename()
- {
- return $this->filename;
- }
-
- /**
- * Returns the configuration for SUT filtering.
- *
- * @return array
- *
- * @since Method available since Release 3.2.1
- */
- public function getFilterConfiguration()
- {
- $addUncoveredFilesFromWhitelist = true;
- $processUncoveredFilesFromWhitelist = false;
-
- $tmp = $this->xpath->query('filter/whitelist');
-
- if ($tmp->length == 1) {
- if ($tmp->item(0)->hasAttribute('addUncoveredFilesFromWhitelist')) {
- $addUncoveredFilesFromWhitelist = $this->getBoolean(
- (string) $tmp->item(0)->getAttribute(
- 'addUncoveredFilesFromWhitelist'
- ),
- true
- );
- }
-
- if ($tmp->item(0)->hasAttribute('processUncoveredFilesFromWhitelist')) {
- $processUncoveredFilesFromWhitelist = $this->getBoolean(
- (string) $tmp->item(0)->getAttribute(
- 'processUncoveredFilesFromWhitelist'
- ),
- false
- );
- }
- }
-
- return array(
- 'blacklist' => array(
- 'include' => array(
- 'directory' => $this->readFilterDirectories(
- 'filter/blacklist/directory'
- ),
- 'file' => $this->readFilterFiles(
- 'filter/blacklist/file'
- )
- ),
- 'exclude' => array(
- 'directory' => $this->readFilterDirectories(
- 'filter/blacklist/exclude/directory'
- ),
- 'file' => $this->readFilterFiles(
- 'filter/blacklist/exclude/file'
- )
- )
- ),
- 'whitelist' => array(
- 'addUncoveredFilesFromWhitelist' => $addUncoveredFilesFromWhitelist,
- 'processUncoveredFilesFromWhitelist' => $processUncoveredFilesFromWhitelist,
- 'include' => array(
- 'directory' => $this->readFilterDirectories(
- 'filter/whitelist/directory'
- ),
- 'file' => $this->readFilterFiles(
- 'filter/whitelist/file'
- )
- ),
- 'exclude' => array(
- 'directory' => $this->readFilterDirectories(
- 'filter/whitelist/exclude/directory'
- ),
- 'file' => $this->readFilterFiles(
- 'filter/whitelist/exclude/file'
- )
- )
- )
- );
- }
-
- /**
- * Returns the configuration for groups.
- *
- * @return array
- *
- * @since Method available since Release 3.2.1
- */
- public function getGroupConfiguration()
- {
- $groups = array(
- 'include' => array(),
- 'exclude' => array()
- );
-
- foreach ($this->xpath->query('groups/include/group') as $group) {
- $groups['include'][] = (string) $group->textContent;
- }
-
- foreach ($this->xpath->query('groups/exclude/group') as $group) {
- $groups['exclude'][] = (string) $group->textContent;
- }
-
- return $groups;
- }
-
- /**
- * Returns the configuration for listeners.
- *
- * @return array
- *
- * @since Method available since Release 3.4.0
- */
- public function getListenerConfiguration()
- {
- $result = array();
-
- foreach ($this->xpath->query('listeners/listener') as $listener) {
- $class = (string) $listener->getAttribute('class');
- $file = '';
- $arguments = array();
-
- if ($listener->getAttribute('file')) {
- $file = $this->toAbsolutePath(
- (string) $listener->getAttribute('file'),
- true
- );
- }
-
- foreach ($listener->childNodes as $node) {
- if ($node instanceof DOMElement && $node->tagName == 'arguments') {
- foreach ($node->childNodes as $argument) {
- if ($argument instanceof DOMElement) {
- if ($argument->tagName == 'file' ||
- $argument->tagName == 'directory') {
- $arguments[] = $this->toAbsolutePath((string) $argument->textContent);
- } else {
- $arguments[] = PHPUnit_Util_XML::xmlToVariable($argument);
- }
- }
- }
- }
- }
-
- $result[] = array(
- 'class' => $class,
- 'file' => $file,
- 'arguments' => $arguments
- );
- }
-
- return $result;
- }
-
- /**
- * Returns the logging configuration.
- *
- * @return array
- */
- public function getLoggingConfiguration()
- {
- $result = array();
-
- foreach ($this->xpath->query('logging/log') as $log) {
- $type = (string) $log->getAttribute('type');
- $target = (string) $log->getAttribute('target');
-
- if (!$target) {
- continue;
- }
-
- $target = $this->toAbsolutePath($target);
-
- if ($type == 'coverage-html') {
- if ($log->hasAttribute('lowUpperBound')) {
- $result['lowUpperBound'] = $this->getInteger(
- (string) $log->getAttribute('lowUpperBound'),
- 50
- );
- }
-
- if ($log->hasAttribute('highLowerBound')) {
- $result['highLowerBound'] = $this->getInteger(
- (string) $log->getAttribute('highLowerBound'),
- 90
- );
- }
- } elseif ($type == 'coverage-crap4j') {
- if ($log->hasAttribute('threshold')) {
- $result['crap4jThreshold'] = $this->getInteger(
- (string) $log->getAttribute('threshold'),
- 30
- );
- }
- } elseif ($type == 'junit') {
- if ($log->hasAttribute('logIncompleteSkipped')) {
- $result['logIncompleteSkipped'] = $this->getBoolean(
- (string) $log->getAttribute('logIncompleteSkipped'),
- false
- );
- }
- } elseif ($type == 'coverage-text') {
- if ($log->hasAttribute('showUncoveredFiles')) {
- $result['coverageTextShowUncoveredFiles'] = $this->getBoolean(
- (string) $log->getAttribute('showUncoveredFiles'),
- false
- );
- }
- if ($log->hasAttribute('showOnlySummary')) {
- $result['coverageTextShowOnlySummary'] = $this->getBoolean(
- (string) $log->getAttribute('showOnlySummary'),
- false
- );
- }
- }
-
- $result[$type] = $target;
- }
-
- return $result;
- }
-
- /**
- * Returns the PHP configuration.
- *
- * @return array
- *
- * @since Method available since Release 3.2.1
- */
- public function getPHPConfiguration()
- {
- $result = array(
- 'include_path' => array(),
- 'ini' => array(),
- 'const' => array(),
- 'var' => array(),
- 'env' => array(),
- 'post' => array(),
- 'get' => array(),
- 'cookie' => array(),
- 'server' => array(),
- 'files' => array(),
- 'request' => array()
- );
-
- foreach ($this->xpath->query('php/includePath') as $includePath) {
- $path = (string) $includePath->textContent;
- if ($path) {
- $result['include_path'][] = $this->toAbsolutePath($path);
- }
- }
-
- foreach ($this->xpath->query('php/ini') as $ini) {
- $name = (string) $ini->getAttribute('name');
- $value = (string) $ini->getAttribute('value');
-
- $result['ini'][$name] = $value;
- }
-
- foreach ($this->xpath->query('php/const') as $const) {
- $name = (string) $const->getAttribute('name');
- $value = (string) $const->getAttribute('value');
-
- $result['const'][$name] = $this->getBoolean($value, $value);
- }
-
- foreach (array('var', 'env', 'post', 'get', 'cookie', 'server', 'files', 'request') as $array) {
- foreach ($this->xpath->query('php/' . $array) as $var) {
- $name = (string) $var->getAttribute('name');
- $value = (string) $var->getAttribute('value');
-
- $result[$array][$name] = $this->getBoolean($value, $value);
- }
- }
-
- return $result;
- }
-
- /**
- * Handles the PHP configuration.
- *
- * @since Method available since Release 3.2.20
- */
- public function handlePHPConfiguration()
- {
- $configuration = $this->getPHPConfiguration();
-
- if (! empty($configuration['include_path'])) {
- ini_set(
- 'include_path',
- implode(PATH_SEPARATOR, $configuration['include_path']) .
- PATH_SEPARATOR .
- ini_get('include_path')
- );
- }
-
- foreach ($configuration['ini'] as $name => $value) {
- if (defined($value)) {
- $value = constant($value);
- }
-
- ini_set($name, $value);
- }
-
- foreach ($configuration['const'] as $name => $value) {
- if (!defined($name)) {
- define($name, $value);
- }
- }
-
- foreach (array('var', 'post', 'get', 'cookie', 'server', 'files', 'request') as $array) {
- // See https://github.com/sebastianbergmann/phpunit/issues/277
- switch ($array) {
- case 'var':
- $target = &$GLOBALS;
- break;
-
- case 'server':
- $target = &$_SERVER;
- break;
-
- default:
- $target = &$GLOBALS['_' . strtoupper($array)];
- break;
- }
-
- foreach ($configuration[$array] as $name => $value) {
- $target[$name] = $value;
- }
- }
-
- foreach ($configuration['env'] as $name => $value) {
- if (false === getenv($name)) {
- putenv("{$name}={$value}");
- }
- if (!isset($_ENV[$name])) {
- $_ENV[$name] = $value;
- }
- }
- }
-
- /**
- * Returns the PHPUnit configuration.
- *
- * @return array
- *
- * @since Method available since Release 3.2.14
- */
- public function getPHPUnitConfiguration()
- {
- $result = array();
- $root = $this->document->documentElement;
-
- if ($root->hasAttribute('cacheTokens')) {
- $result['cacheTokens'] = $this->getBoolean(
- (string) $root->getAttribute('cacheTokens'),
- false
- );
- }
-
- if ($root->hasAttribute('columns')) {
- $columns = (string) $root->getAttribute('columns');
-
- if ($columns == 'max') {
- $result['columns'] = 'max';
- } else {
- $result['columns'] = $this->getInteger($columns, 80);
- }
- }
-
- if ($root->hasAttribute('colors')) {
- /* only allow boolean for compatibility with previous versions
- 'always' only allowed from command line */
- if ($this->getBoolean($root->getAttribute('colors'), false)) {
- $result['colors'] = PHPUnit_TextUI_ResultPrinter::COLOR_AUTO;
- } else {
- $result['colors'] = PHPUnit_TextUI_ResultPrinter::COLOR_NEVER;
- }
- }
-
- /*
- * Issue #657
- */
- if ($root->hasAttribute('stderr')) {
- $result['stderr'] = $this->getBoolean(
- (string) $root->getAttribute('stderr'),
- false
- );
- }
-
- if ($root->hasAttribute('backupGlobals')) {
- $result['backupGlobals'] = $this->getBoolean(
- (string) $root->getAttribute('backupGlobals'),
- true
- );
- }
-
- if ($root->hasAttribute('backupStaticAttributes')) {
- $result['backupStaticAttributes'] = $this->getBoolean(
- (string) $root->getAttribute('backupStaticAttributes'),
- false
- );
- }
-
- if ($root->getAttribute('bootstrap')) {
- $result['bootstrap'] = $this->toAbsolutePath(
- (string) $root->getAttribute('bootstrap')
- );
- }
-
- if ($root->hasAttribute('convertErrorsToExceptions')) {
- $result['convertErrorsToExceptions'] = $this->getBoolean(
- (string) $root->getAttribute('convertErrorsToExceptions'),
- true
- );
- }
-
- if ($root->hasAttribute('convertNoticesToExceptions')) {
- $result['convertNoticesToExceptions'] = $this->getBoolean(
- (string) $root->getAttribute('convertNoticesToExceptions'),
- true
- );
- }
-
- if ($root->hasAttribute('convertWarningsToExceptions')) {
- $result['convertWarningsToExceptions'] = $this->getBoolean(
- (string) $root->getAttribute('convertWarningsToExceptions'),
- true
- );
- }
-
- if ($root->hasAttribute('forceCoversAnnotation')) {
- $result['forceCoversAnnotation'] = $this->getBoolean(
- (string) $root->getAttribute('forceCoversAnnotation'),
- false
- );
- }
-
- if ($root->hasAttribute('mapTestClassNameToCoveredClassName')) {
- $result['mapTestClassNameToCoveredClassName'] = $this->getBoolean(
- (string) $root->getAttribute('mapTestClassNameToCoveredClassName'),
- false
- );
- }
-
- if ($root->hasAttribute('processIsolation')) {
- $result['processIsolation'] = $this->getBoolean(
- (string) $root->getAttribute('processIsolation'),
- false
- );
- }
-
- if ($root->hasAttribute('stopOnError')) {
- $result['stopOnError'] = $this->getBoolean(
- (string) $root->getAttribute('stopOnError'),
- false
- );
- }
-
- if ($root->hasAttribute('stopOnFailure')) {
- $result['stopOnFailure'] = $this->getBoolean(
- (string) $root->getAttribute('stopOnFailure'),
- false
- );
- }
-
- if ($root->hasAttribute('stopOnIncomplete')) {
- $result['stopOnIncomplete'] = $this->getBoolean(
- (string) $root->getAttribute('stopOnIncomplete'),
- false
- );
- }
-
- if ($root->hasAttribute('stopOnRisky')) {
- $result['stopOnRisky'] = $this->getBoolean(
- (string) $root->getAttribute('stopOnRisky'),
- false
- );
- }
-
- if ($root->hasAttribute('stopOnSkipped')) {
- $result['stopOnSkipped'] = $this->getBoolean(
- (string) $root->getAttribute('stopOnSkipped'),
- false
- );
- }
-
- if ($root->hasAttribute('testSuiteLoaderClass')) {
- $result['testSuiteLoaderClass'] = (string) $root->getAttribute(
- 'testSuiteLoaderClass'
- );
- }
-
- if ($root->getAttribute('testSuiteLoaderFile')) {
- $result['testSuiteLoaderFile'] = $this->toAbsolutePath(
- (string) $root->getAttribute('testSuiteLoaderFile')
- );
- }
-
- if ($root->hasAttribute('printerClass')) {
- $result['printerClass'] = (string) $root->getAttribute(
- 'printerClass'
- );
- }
-
- if ($root->getAttribute('printerFile')) {
- $result['printerFile'] = $this->toAbsolutePath(
- (string) $root->getAttribute('printerFile')
- );
- }
-
- if ($root->hasAttribute('timeoutForSmallTests')) {
- $result['timeoutForSmallTests'] = $this->getInteger(
- (string) $root->getAttribute('timeoutForSmallTests'),
- 1
- );
- }
-
- if ($root->hasAttribute('timeoutForMediumTests')) {
- $result['timeoutForMediumTests'] = $this->getInteger(
- (string) $root->getAttribute('timeoutForMediumTests'),
- 10
- );
- }
-
- if ($root->hasAttribute('timeoutForLargeTests')) {
- $result['timeoutForLargeTests'] = $this->getInteger(
- (string) $root->getAttribute('timeoutForLargeTests'),
- 60
- );
- }
-
- if ($root->hasAttribute('beStrictAboutTestsThatDoNotTestAnything')) {
- $result['reportUselessTests'] = $this->getBoolean(
- (string) $root->getAttribute('beStrictAboutTestsThatDoNotTestAnything'),
- false
- );
- }
-
- if ($root->hasAttribute('checkForUnintentionallyCoveredCode')) {
- $result['strictCoverage'] = $this->getBoolean(
- (string) $root->getAttribute('checkForUnintentionallyCoveredCode'),
- false
- );
- }
-
- if ($root->hasAttribute('beStrictAboutOutputDuringTests')) {
- $result['disallowTestOutput'] = $this->getBoolean(
- (string) $root->getAttribute('beStrictAboutOutputDuringTests'),
- false
- );
- }
-
- if ($root->hasAttribute('beStrictAboutChangesToGlobalState')) {
- $result['disallowChangesToGlobalState'] = $this->getBoolean(
- (string) $root->getAttribute('beStrictAboutChangesToGlobalState'),
- false
- );
- }
-
- if ($root->hasAttribute('beStrictAboutTestSize')) {
- $result['enforceTimeLimit'] = $this->getBoolean(
- (string) $root->getAttribute('beStrictAboutTestSize'),
- false
- );
- }
-
- if ($root->hasAttribute('beStrictAboutTodoAnnotatedTests')) {
- $result['disallowTodoAnnotatedTests'] = $this->getBoolean(
- (string) $root->getAttribute('beStrictAboutTodoAnnotatedTests'),
- false
- );
- }
-
- if ($root->hasAttribute('strict')) {
- $flag = $this->getBoolean(
- (string) $root->getAttribute('strict'),
- false
- );
-
- $result['reportUselessTests'] = $flag;
- $result['strictCoverage'] = $flag;
- $result['disallowTestOutput'] = $flag;
- $result['enforceTimeLimit'] = $flag;
- $result['disallowTodoAnnotatedTests'] = $flag;
- $result['deprecatedStrictModeSetting'] = true;
- }
-
- if ($root->hasAttribute('verbose')) {
- $result['verbose'] = $this->getBoolean(
- (string) $root->getAttribute('verbose'),
- false
- );
- }
-
- return $result;
- }
-
- /**
- * Returns the SeleniumTestCase browser configuration.
- *
- * @return array
- *
- * @since Method available since Release 3.2.9
- */
- public function getSeleniumBrowserConfiguration()
- {
- $result = array();
-
- foreach ($this->xpath->query('selenium/browser') as $config) {
- $name = (string) $config->getAttribute('name');
- $browser = (string) $config->getAttribute('browser');
-
- if ($config->hasAttribute('host')) {
- $host = (string) $config->getAttribute('host');
- } else {
- $host = 'localhost';
- }
-
- if ($config->hasAttribute('port')) {
- $port = $this->getInteger(
- (string) $config->getAttribute('port'),
- 4444
- );
- } else {
- $port = 4444;
- }
-
- if ($config->hasAttribute('timeout')) {
- $timeout = $this->getInteger(
- (string) $config->getAttribute('timeout'),
- 30000
- );
- } else {
- $timeout = 30000;
- }
-
- $result[] = array(
- 'name' => $name,
- 'browser' => $browser,
- 'host' => $host,
- 'port' => $port,
- 'timeout' => $timeout
- );
- }
-
- return $result;
- }
-
- /**
- * Returns the test suite configuration.
- *
- * @return PHPUnit_Framework_TestSuite
- *
- * @since Method available since Release 3.2.1
- */
- public function getTestSuiteConfiguration($testSuiteFilter = null)
- {
- $testSuiteNodes = $this->xpath->query('testsuites/testsuite');
-
- if ($testSuiteNodes->length == 0) {
- $testSuiteNodes = $this->xpath->query('testsuite');
- }
-
- if ($testSuiteNodes->length == 1) {
- return $this->getTestSuite($testSuiteNodes->item(0), $testSuiteFilter);
- }
-
- if ($testSuiteNodes->length > 1) {
- $suite = new PHPUnit_Framework_TestSuite;
-
- foreach ($testSuiteNodes as $testSuiteNode) {
- $suite->addTestSuite(
- $this->getTestSuite($testSuiteNode, $testSuiteFilter)
- );
- }
-
- return $suite;
- }
- }
-
- /**
- * @param DOMElement $testSuiteNode
- *
- * @return PHPUnit_Framework_TestSuite
- *
- * @since Method available since Release 3.4.0
- */
- protected function getTestSuite(DOMElement $testSuiteNode, $testSuiteFilter = null)
- {
- if ($testSuiteNode->hasAttribute('name')) {
- $suite = new PHPUnit_Framework_TestSuite(
- (string) $testSuiteNode->getAttribute('name')
- );
- } else {
- $suite = new PHPUnit_Framework_TestSuite;
- }
-
- $exclude = array();
-
- foreach ($testSuiteNode->getElementsByTagName('exclude') as $excludeNode) {
- $excludeFile = (string) $excludeNode->textContent;
- if ($excludeFile) {
- $exclude[] = $this->toAbsolutePath($excludeFile);
- }
- }
-
- $fileIteratorFacade = new File_Iterator_Facade;
-
- foreach ($testSuiteNode->getElementsByTagName('directory') as $directoryNode) {
- if ($testSuiteFilter && $directoryNode->parentNode->getAttribute('name') != $testSuiteFilter) {
- continue;
- }
-
- $directory = (string) $directoryNode->textContent;
-
- if (empty($directory)) {
- continue;
- }
-
- if ($directoryNode->hasAttribute('phpVersion')) {
- $phpVersion = (string) $directoryNode->getAttribute('phpVersion');
- } else {
- $phpVersion = PHP_VERSION;
- }
-
- if ($directoryNode->hasAttribute('phpVersionOperator')) {
- $phpVersionOperator = (string) $directoryNode->getAttribute('phpVersionOperator');
- } else {
- $phpVersionOperator = '>=';
- }
-
- if (!version_compare(PHP_VERSION, $phpVersion, $phpVersionOperator)) {
- continue;
- }
-
- if ($directoryNode->hasAttribute('prefix')) {
- $prefix = (string) $directoryNode->getAttribute('prefix');
- } else {
- $prefix = '';
- }
-
- if ($directoryNode->hasAttribute('suffix')) {
- $suffix = (string) $directoryNode->getAttribute('suffix');
- } else {
- $suffix = 'Test.php';
- }
-
- $files = $fileIteratorFacade->getFilesAsArray(
- $this->toAbsolutePath($directory),
- $suffix,
- $prefix,
- $exclude
- );
- $suite->addTestFiles($files);
- }
-
- foreach ($testSuiteNode->getElementsByTagName('file') as $fileNode) {
- if ($testSuiteFilter && $fileNode->parentNode->getAttribute('name') != $testSuiteFilter) {
- continue;
- }
-
- $file = (string) $fileNode->textContent;
-
- if (empty($file)) {
- continue;
- }
-
- // Get the absolute path to the file
- $file = $fileIteratorFacade->getFilesAsArray(
- $this->toAbsolutePath($file)
- );
-
- if (!isset($file[0])) {
- continue;
- }
-
- $file = $file[0];
-
- if ($fileNode->hasAttribute('phpVersion')) {
- $phpVersion = (string) $fileNode->getAttribute('phpVersion');
- } else {
- $phpVersion = PHP_VERSION;
- }
-
- if ($fileNode->hasAttribute('phpVersionOperator')) {
- $phpVersionOperator = (string) $fileNode->getAttribute('phpVersionOperator');
- } else {
- $phpVersionOperator = '>=';
- }
-
- if (!version_compare(PHP_VERSION, $phpVersion, $phpVersionOperator)) {
- continue;
- }
-
- $suite->addTestFile($file);
- }
-
- return $suite;
- }
-
- /**
- * @param string $value
- * @param bool $default
- *
- * @return bool
- *
- * @since Method available since Release 3.2.3
- */
- protected function getBoolean($value, $default)
- {
- if (strtolower($value) == 'false') {
- return false;
- } elseif (strtolower($value) == 'true') {
- return true;
- }
-
- return $default;
- }
-
- /**
- * @param string $value
- * @param bool $default
- *
- * @return bool
- *
- * @since Method available since Release 3.6.0
- */
- protected function getInteger($value, $default)
- {
- if (is_numeric($value)) {
- return (int) $value;
- }
-
- return $default;
- }
-
- /**
- * @param string $query
- *
- * @return array
- *
- * @since Method available since Release 3.2.3
- */
- protected function readFilterDirectories($query)
- {
- $directories = array();
-
- foreach ($this->xpath->query($query) as $directory) {
- $directoryPath = (string) $directory->textContent;
-
- if (!$directoryPath) {
- continue;
- }
-
- if ($directory->hasAttribute('prefix')) {
- $prefix = (string) $directory->getAttribute('prefix');
- } else {
- $prefix = '';
- }
-
- if ($directory->hasAttribute('suffix')) {
- $suffix = (string) $directory->getAttribute('suffix');
- } else {
- $suffix = '.php';
- }
-
- if ($directory->hasAttribute('group')) {
- $group = (string) $directory->getAttribute('group');
- } else {
- $group = 'DEFAULT';
- }
-
- $directories[] = array(
- 'path' => $this->toAbsolutePath($directoryPath),
- 'prefix' => $prefix,
- 'suffix' => $suffix,
- 'group' => $group
- );
- }
-
- return $directories;
- }
-
- /**
- * @param string $query
- *
- * @return array
- *
- * @since Method available since Release 3.2.3
- */
- protected function readFilterFiles($query)
- {
- $files = array();
-
- foreach ($this->xpath->query($query) as $file) {
- $filePath = (string) $file->textContent;
-
- if ($filePath) {
- $files[] = $this->toAbsolutePath($filePath);
- }
- }
-
- return $files;
- }
-
- /**
- * @param string $path
- * @param bool $useIncludePath
- *
- * @return string
- *
- * @since Method available since Release 3.5.0
- */
- protected function toAbsolutePath($path, $useIncludePath = false)
- {
- $path = trim($path);
-
- if ($path[0] === '/') {
- return $path;
- }
-
- // Matches the following on Windows:
- // - \\NetworkComputer\Path
- // - \\.\D:
- // - \\.\c:
- // - C:\Windows
- // - C:\windows
- // - C:/windows
- // - c:/windows
- if (defined('PHP_WINDOWS_VERSION_BUILD') &&
- ($path[0] === '\\' ||
- (strlen($path) >= 3 && preg_match('#^[A-Z]\:[/\\\]#i', substr($path, 0, 3))))) {
- return $path;
- }
-
- // Stream
- if (strpos($path, '://') !== false) {
- return $path;
- }
-
- $file = dirname($this->filename) . DIRECTORY_SEPARATOR . $path;
-
- if ($useIncludePath && !file_exists($file)) {
- $includePathFile = stream_resolve_include_path($path);
-
- if ($includePathFile) {
- $file = $includePathFile;
- }
- }
-
- return $file;
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Util/ErrorHandler.php b/vendor/phpunit/phpunit/src/Util/ErrorHandler.php
deleted file mode 100644
index d75d1be7..00000000
--- a/vendor/phpunit/phpunit/src/Util/ErrorHandler.php
+++ /dev/null
@@ -1,117 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-// Workaround for http://bugs.php.net/bug.php?id=47987,
-// see https://github.com/sebastianbergmann/phpunit/issues#issue/125 for details
-// Use dirname(__DIR__) instead of using /../ because of https://github.com/facebook/hhvm/issues/5215
-require_once dirname(__DIR__) . '/Framework/Error.php';
-require_once dirname(__DIR__) . '/Framework/Error/Notice.php';
-require_once dirname(__DIR__) . '/Framework/Error/Warning.php';
-require_once dirname(__DIR__) . '/Framework/Error/Deprecated.php';
-
-/**
- * Error handler that converts PHP errors and warnings to exceptions.
- *
- * @since Class available since Release 3.3.0
- */
-class PHPUnit_Util_ErrorHandler
-{
- protected static $errorStack = array();
-
- /**
- * Returns the error stack.
- *
- * @return array
- */
- public static function getErrorStack()
- {
- return self::$errorStack;
- }
-
- /**
- * @param int $errno
- * @param string $errstr
- * @param string $errfile
- * @param int $errline
- *
- * @throws PHPUnit_Framework_Error
- */
- public static function handleError($errno, $errstr, $errfile, $errline)
- {
- if (!($errno & error_reporting())) {
- return false;
- }
-
- self::$errorStack[] = array($errno, $errstr, $errfile, $errline);
-
- $trace = debug_backtrace(false);
- array_shift($trace);
-
- foreach ($trace as $frame) {
- if ($frame['function'] == '__toString') {
- return false;
- }
- }
-
- if ($errno == E_NOTICE || $errno == E_USER_NOTICE || $errno == E_STRICT) {
- if (PHPUnit_Framework_Error_Notice::$enabled !== true) {
- return false;
- }
-
- $exception = 'PHPUnit_Framework_Error_Notice';
- } elseif ($errno == E_WARNING || $errno == E_USER_WARNING) {
- if (PHPUnit_Framework_Error_Warning::$enabled !== true) {
- return false;
- }
-
- $exception = 'PHPUnit_Framework_Error_Warning';
- } elseif ($errno == E_DEPRECATED || $errno == E_USER_DEPRECATED) {
- if (PHPUnit_Framework_Error_Deprecated::$enabled !== true) {
- return false;
- }
-
- $exception = 'PHPUnit_Framework_Error_Deprecated';
- } else {
- $exception = 'PHPUnit_Framework_Error';
- }
-
- throw new $exception($errstr, $errno, $errfile, $errline);
- }
-
- /**
- * Registers an error handler and returns a function that will restore
- * the previous handler when invoked
- *
- * @param int $severity PHP predefined error constant
- *
- * @throws Exception if event of specified severity is emitted
- */
- public static function handleErrorOnce($severity = E_WARNING)
- {
- $terminator = function () {
- static $expired = false;
- if (!$expired) {
- $expired = true;
- // cleans temporary error handler
- return restore_error_handler();
- }
- };
-
- set_error_handler(function ($errno, $errstr) use ($severity) {
- if ($errno === $severity) {
- return;
- }
-
- return false;
- });
-
- return $terminator;
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Util/Fileloader.php b/vendor/phpunit/phpunit/src/Util/Fileloader.php
deleted file mode 100644
index 7fc787fe..00000000
--- a/vendor/phpunit/phpunit/src/Util/Fileloader.php
+++ /dev/null
@@ -1,72 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Utility methods to load PHP sourcefiles.
- *
- * @since Class available since Release 2.3.0
- */
-class PHPUnit_Util_Fileloader
-{
- /**
- * Checks if a PHP sourcefile is readable.
- * The sourcefile is loaded through the load() method.
- *
- * @param string $filename
- *
- * @return string
- *
- * @throws PHPUnit_Framework_Exception
- */
- public static function checkAndLoad($filename)
- {
- $includePathFilename = stream_resolve_include_path($filename);
-
- if (!$includePathFilename || !is_readable($includePathFilename)) {
- throw new PHPUnit_Framework_Exception(
- sprintf('Cannot open file "%s".' . "\n", $filename)
- );
- }
-
- self::load($includePathFilename);
-
- return $includePathFilename;
- }
-
- /**
- * Loads a PHP sourcefile.
- *
- * @param string $filename
- *
- * @return mixed
- *
- * @since Method available since Release 3.0.0
- */
- public static function load($filename)
- {
- $oldVariableNames = array_keys(get_defined_vars());
-
- include_once $filename;
-
- $newVariables = get_defined_vars();
- $newVariableNames = array_diff(
- array_keys($newVariables),
- $oldVariableNames
- );
-
- foreach ($newVariableNames as $variableName) {
- if ($variableName != 'oldVariableNames') {
- $GLOBALS[$variableName] = $newVariables[$variableName];
- }
- }
-
- return $filename;
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Util/Filesystem.php b/vendor/phpunit/phpunit/src/Util/Filesystem.php
deleted file mode 100644
index aca601a3..00000000
--- a/vendor/phpunit/phpunit/src/Util/Filesystem.php
+++ /dev/null
@@ -1,42 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Filesystem helpers.
- *
- * @since Class available since Release 3.0.0
- */
-class PHPUnit_Util_Filesystem
-{
- /**
- * @var array
- */
- protected static $buffer = array();
-
- /**
- * Maps class names to source file names:
- * - PEAR CS: Foo_Bar_Baz -> Foo/Bar/Baz.php
- * - Namespace: Foo\Bar\Baz -> Foo/Bar/Baz.php
- *
- * @param string $className
- *
- * @return string
- *
- * @since Method available since Release 3.4.0
- */
- public static function classNameToFilename($className)
- {
- return str_replace(
- array('_', '\\'),
- DIRECTORY_SEPARATOR,
- $className
- ) . '.php';
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Util/Filter.php b/vendor/phpunit/phpunit/src/Util/Filter.php
deleted file mode 100644
index 8e81b598..00000000
--- a/vendor/phpunit/phpunit/src/Util/Filter.php
+++ /dev/null
@@ -1,107 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Utility class for code filtering.
- *
- * @since Class available since Release 2.0.0
- */
-class PHPUnit_Util_Filter
-{
- /**
- * Filters stack frames from PHPUnit classes.
- *
- * @param Exception $e
- * @param bool $asString
- *
- * @return string
- */
- public static function getFilteredStacktrace(Exception $e, $asString = true)
- {
- $prefix = false;
- $script = realpath($GLOBALS['_SERVER']['SCRIPT_NAME']);
-
- if (defined('__PHPUNIT_PHAR_ROOT__')) {
- $prefix = __PHPUNIT_PHAR_ROOT__;
- }
-
- if ($asString === true) {
- $filteredStacktrace = '';
- } else {
- $filteredStacktrace = array();
- }
-
- if ($e instanceof PHPUnit_Framework_SyntheticError) {
- $eTrace = $e->getSyntheticTrace();
- $eFile = $e->getSyntheticFile();
- $eLine = $e->getSyntheticLine();
- } elseif ($e instanceof PHPUnit_Framework_Exception) {
- $eTrace = $e->getSerializableTrace();
- $eFile = $e->getFile();
- $eLine = $e->getLine();
- } else {
- if ($e->getPrevious()) {
- $e = $e->getPrevious();
- }
- $eTrace = $e->getTrace();
- $eFile = $e->getFile();
- $eLine = $e->getLine();
- }
-
- if (!self::frameExists($eTrace, $eFile, $eLine)) {
- array_unshift(
- $eTrace,
- array('file' => $eFile, 'line' => $eLine)
- );
- }
-
- $blacklist = new PHPUnit_Util_Blacklist;
-
- foreach ($eTrace as $frame) {
- if (isset($frame['file']) && is_file($frame['file']) &&
- !$blacklist->isBlacklisted($frame['file']) &&
- ($prefix === false || strpos($frame['file'], $prefix) !== 0) &&
- $frame['file'] !== $script) {
- if ($asString === true) {
- $filteredStacktrace .= sprintf(
- "%s:%s\n",
- $frame['file'],
- isset($frame['line']) ? $frame['line'] : '?'
- );
- } else {
- $filteredStacktrace[] = $frame;
- }
- }
- }
-
- return $filteredStacktrace;
- }
-
- /**
- * @param array $trace
- * @param string $file
- * @param int $line
- *
- * @return bool
- *
- * @since Method available since Release 3.3.2
- */
- private static function frameExists(array $trace, $file, $line)
- {
- foreach ($trace as $frame) {
- if (isset($frame['file']) && $frame['file'] == $file &&
- isset($frame['line']) && $frame['line'] == $line) {
- return true;
- }
- }
-
- return false;
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Util/Getopt.php b/vendor/phpunit/phpunit/src/Util/Getopt.php
deleted file mode 100644
index ba21be3f..00000000
--- a/vendor/phpunit/phpunit/src/Util/Getopt.php
+++ /dev/null
@@ -1,163 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Command-line options parsing class.
- *
- * @since Class available since Release 3.0.0
- */
-class PHPUnit_Util_Getopt
-{
- public static function getopt(array $args, $short_options, $long_options = null)
- {
- if (empty($args)) {
- return array(array(), array());
- }
-
- $opts = array();
- $non_opts = array();
-
- if ($long_options) {
- sort($long_options);
- }
-
- if (isset($args[0][0]) && $args[0][0] != '-') {
- array_shift($args);
- }
-
- reset($args);
- array_map('trim', $args);
-
- while (list($i, $arg) = each($args)) {
- if ($arg == '') {
- continue;
- }
-
- if ($arg == '--') {
- $non_opts = array_merge($non_opts, array_slice($args, $i + 1));
- break;
- }
-
- if ($arg[0] != '-' ||
- (strlen($arg) > 1 && $arg[1] == '-' && !$long_options)) {
- $non_opts[] = $args[$i];
- continue;
- } elseif (strlen($arg) > 1 && $arg[1] == '-') {
- self::parseLongOption(
- substr($arg, 2),
- $long_options,
- $opts,
- $args
- );
- } else {
- self::parseShortOption(
- substr($arg, 1),
- $short_options,
- $opts,
- $args
- );
- }
- }
-
- return array($opts, $non_opts);
- }
-
- protected static function parseShortOption($arg, $short_options, &$opts, &$args)
- {
- $argLen = strlen($arg);
-
- for ($i = 0; $i < $argLen; $i++) {
- $opt = $arg[$i];
- $opt_arg = null;
-
- if (($spec = strstr($short_options, $opt)) === false ||
- $arg[$i] == ':') {
- throw new PHPUnit_Framework_Exception(
- "unrecognized option -- $opt"
- );
- }
-
- if (strlen($spec) > 1 && $spec[1] == ':') {
- if (strlen($spec) > 2 && $spec[2] == ':') {
- if ($i + 1 < $argLen) {
- $opts[] = array($opt, substr($arg, $i + 1));
- break;
- }
- } else {
- if ($i + 1 < $argLen) {
- $opts[] = array($opt, substr($arg, $i + 1));
- break;
- } elseif (list(, $opt_arg) = each($args)) {
- } else {
- throw new PHPUnit_Framework_Exception(
- "option requires an argument -- $opt"
- );
- }
- }
- }
-
- $opts[] = array($opt, $opt_arg);
- }
- }
-
- protected static function parseLongOption($arg, $long_options, &$opts, &$args)
- {
- $count = count($long_options);
- $list = explode('=', $arg);
- $opt = $list[0];
- $opt_arg = null;
-
- if (count($list) > 1) {
- $opt_arg = $list[1];
- }
-
- $opt_len = strlen($opt);
-
- for ($i = 0; $i < $count; $i++) {
- $long_opt = $long_options[$i];
- $opt_start = substr($long_opt, 0, $opt_len);
-
- if ($opt_start != $opt) {
- continue;
- }
-
- $opt_rest = substr($long_opt, $opt_len);
-
- if ($opt_rest != '' && $opt[0] != '=' && $i + 1 < $count &&
- $opt == substr($long_options[$i+1], 0, $opt_len)) {
- throw new PHPUnit_Framework_Exception(
- "option --$opt is ambiguous"
- );
- }
-
- if (substr($long_opt, -1) == '=') {
- if (substr($long_opt, -2) != '==') {
- if (!strlen($opt_arg) &&
- !(list(, $opt_arg) = each($args))) {
- throw new PHPUnit_Framework_Exception(
- "option --$opt requires an argument"
- );
- }
- }
- } elseif ($opt_arg) {
- throw new PHPUnit_Framework_Exception(
- "option --$opt doesn't allow an argument"
- );
- }
-
- $full_option = '--' . preg_replace('/={1,2}$/', '', $long_opt);
- $opts[] = array($full_option, $opt_arg);
-
- return;
- }
-
- throw new PHPUnit_Framework_Exception("unrecognized option --$opt");
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Util/GlobalState.php b/vendor/phpunit/phpunit/src/Util/GlobalState.php
deleted file mode 100644
index 35af703b..00000000
--- a/vendor/phpunit/phpunit/src/Util/GlobalState.php
+++ /dev/null
@@ -1,192 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 3.4.0
- */
-class PHPUnit_Util_GlobalState
-{
- /**
- * @var array
- */
- protected static $superGlobalArrays = array(
- '_ENV',
- '_POST',
- '_GET',
- '_COOKIE',
- '_SERVER',
- '_FILES',
- '_REQUEST'
- );
-
- /**
- * @var array
- */
- protected static $superGlobalArraysLong = array(
- 'HTTP_ENV_VARS',
- 'HTTP_POST_VARS',
- 'HTTP_GET_VARS',
- 'HTTP_COOKIE_VARS',
- 'HTTP_SERVER_VARS',
- 'HTTP_POST_FILES'
- );
-
- public static function getIncludedFilesAsString()
- {
- return static::processIncludedFilesAsString(get_included_files());
- }
-
- public static function processIncludedFilesAsString(array $files)
- {
- $blacklist = new PHPUnit_Util_Blacklist;
- $prefix = false;
- $result = '';
-
- if (defined('__PHPUNIT_PHAR__')) {
- $prefix = 'phar://' . __PHPUNIT_PHAR__ . '/';
- }
-
- for ($i = count($files) - 1; $i > 0; $i--) {
- $file = $files[$i];
-
- if ($prefix !== false && strpos($file, $prefix) === 0) {
- continue;
- }
-
- // Skip virtual file system protocols
- if (preg_match('/^(vfs|phpvfs[a-z0-9]+):/', $file)) {
- continue;
- }
-
- if (!$blacklist->isBlacklisted($file) && is_file($file)) {
- $result = 'require_once \'' . $file . "';\n" . $result;
- }
- }
-
- return $result;
- }
-
- public static function getIniSettingsAsString()
- {
- $result = '';
- $iniSettings = ini_get_all(null, false);
-
- foreach ($iniSettings as $key => $value) {
- $result .= sprintf(
- '@ini_set(%s, %s);' . "\n",
- self::exportVariable($key),
- self::exportVariable($value)
- );
- }
-
- return $result;
- }
-
- public static function getConstantsAsString()
- {
- $constants = get_defined_constants(true);
- $result = '';
-
- if (isset($constants['user'])) {
- foreach ($constants['user'] as $name => $value) {
- $result .= sprintf(
- 'if (!defined(\'%s\')) define(\'%s\', %s);' . "\n",
- $name,
- $name,
- self::exportVariable($value)
- );
- }
- }
-
- return $result;
- }
-
- public static function getGlobalsAsString()
- {
- $result = '';
- $superGlobalArrays = self::getSuperGlobalArrays();
-
- foreach ($superGlobalArrays as $superGlobalArray) {
- if (isset($GLOBALS[$superGlobalArray]) &&
- is_array($GLOBALS[$superGlobalArray])) {
- foreach (array_keys($GLOBALS[$superGlobalArray]) as $key) {
- if ($GLOBALS[$superGlobalArray][$key] instanceof Closure) {
- continue;
- }
-
- $result .= sprintf(
- '$GLOBALS[\'%s\'][\'%s\'] = %s;' . "\n",
- $superGlobalArray,
- $key,
- self::exportVariable($GLOBALS[$superGlobalArray][$key])
- );
- }
- }
- }
-
- $blacklist = $superGlobalArrays;
- $blacklist[] = 'GLOBALS';
-
- foreach (array_keys($GLOBALS) as $key) {
- if (!in_array($key, $blacklist) && !$GLOBALS[$key] instanceof Closure) {
- $result .= sprintf(
- '$GLOBALS[\'%s\'] = %s;' . "\n",
- $key,
- self::exportVariable($GLOBALS[$key])
- );
- }
- }
-
- return $result;
- }
-
- protected static function getSuperGlobalArrays()
- {
- if (ini_get('register_long_arrays') == '1') {
- return array_merge(
- self::$superGlobalArrays,
- self::$superGlobalArraysLong
- );
- } else {
- return self::$superGlobalArrays;
- }
- }
-
- protected static function exportVariable($variable)
- {
- if (is_scalar($variable) || is_null($variable) ||
- (is_array($variable) && self::arrayOnlyContainsScalars($variable))) {
- return var_export($variable, true);
- }
-
- return 'unserialize(' .
- var_export(serialize($variable), true) .
- ')';
- }
-
- protected static function arrayOnlyContainsScalars(array $array)
- {
- $result = true;
-
- foreach ($array as $element) {
- if (is_array($element)) {
- $result = self::arrayOnlyContainsScalars($element);
- } elseif (!is_scalar($element) && !is_null($element)) {
- $result = false;
- }
-
- if ($result === false) {
- break;
- }
- }
-
- return $result;
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Util/InvalidArgumentHelper.php b/vendor/phpunit/phpunit/src/Util/InvalidArgumentHelper.php
deleted file mode 100644
index 80410a8b..00000000
--- a/vendor/phpunit/phpunit/src/Util/InvalidArgumentHelper.php
+++ /dev/null
@@ -1,41 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Factory for PHPUnit_Framework_Exception objects that are used to describe
- * invalid arguments passed to a function or method.
- *
- * @since Class available since Release 3.4.0
- */
-class PHPUnit_Util_InvalidArgumentHelper
-{
- /**
- * @param int $argument
- * @param string $type
- * @param mixed $value
- *
- * @return PHPUnit_Framework_Exception
- */
- public static function factory($argument, $type, $value = null)
- {
- $stack = debug_backtrace(false);
-
- return new PHPUnit_Framework_Exception(
- sprintf(
- 'Argument #%d%sof %s::%s() must be a %s',
- $argument,
- $value !== null ? ' (' . gettype($value) . '#' . $value . ')' : ' (No Value) ',
- $stack[1]['class'],
- $stack[1]['function'],
- $type
- )
- );
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Util/Log/JSON.php b/vendor/phpunit/phpunit/src/Util/Log/JSON.php
deleted file mode 100644
index 776bad97..00000000
--- a/vendor/phpunit/phpunit/src/Util/Log/JSON.php
+++ /dev/null
@@ -1,244 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * A TestListener that generates JSON messages.
- *
- * @since Class available since Release 3.0.0
- */
-class PHPUnit_Util_Log_JSON extends PHPUnit_Util_Printer implements PHPUnit_Framework_TestListener
-{
- /**
- * @var string
- */
- protected $currentTestSuiteName = '';
-
- /**
- * @var string
- */
- protected $currentTestName = '';
-
- /**
- * @var bool
- */
- protected $currentTestPass = true;
-
- /**
- * An error occurred.
- *
- * @param PHPUnit_Framework_Test $test
- * @param Exception $e
- * @param float $time
- */
- public function addError(PHPUnit_Framework_Test $test, Exception $e, $time)
- {
- $this->writeCase(
- 'error',
- $time,
- PHPUnit_Util_Filter::getFilteredStacktrace($e, false),
- $e->getMessage(),
- $test
- );
-
- $this->currentTestPass = false;
- }
-
- /**
- * A failure occurred.
- *
- * @param PHPUnit_Framework_Test $test
- * @param PHPUnit_Framework_AssertionFailedError $e
- * @param float $time
- */
- public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time)
- {
- $this->writeCase(
- 'fail',
- $time,
- PHPUnit_Util_Filter::getFilteredStacktrace($e, false),
- $e->getMessage(),
- $test
- );
-
- $this->currentTestPass = false;
- }
-
- /**
- * Incomplete test.
- *
- * @param PHPUnit_Framework_Test $test
- * @param Exception $e
- * @param float $time
- */
- public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time)
- {
- $this->writeCase(
- 'error',
- $time,
- PHPUnit_Util_Filter::getFilteredStacktrace($e, false),
- 'Incomplete Test: ' . $e->getMessage(),
- $test
- );
-
- $this->currentTestPass = false;
- }
-
- /**
- * Risky test.
- *
- * @param PHPUnit_Framework_Test $test
- * @param Exception $e
- * @param float $time
- *
- * @since Method available since Release 4.0.0
- */
- public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time)
- {
- $this->writeCase(
- 'error',
- $time,
- PHPUnit_Util_Filter::getFilteredStacktrace($e, false),
- 'Risky Test: ' . $e->getMessage(),
- $test
- );
-
- $this->currentTestPass = false;
- }
-
- /**
- * Skipped test.
- *
- * @param PHPUnit_Framework_Test $test
- * @param Exception $e
- * @param float $time
- */
- public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time)
- {
- $this->writeCase(
- 'error',
- $time,
- PHPUnit_Util_Filter::getFilteredStacktrace($e, false),
- 'Skipped Test: ' . $e->getMessage(),
- $test
- );
-
- $this->currentTestPass = false;
- }
-
- /**
- * A testsuite started.
- *
- * @param PHPUnit_Framework_TestSuite $suite
- */
- public function startTestSuite(PHPUnit_Framework_TestSuite $suite)
- {
- $this->currentTestSuiteName = $suite->getName();
- $this->currentTestName = '';
-
- $this->write(
- array(
- 'event' => 'suiteStart',
- 'suite' => $this->currentTestSuiteName,
- 'tests' => count($suite)
- )
- );
- }
-
- /**
- * A testsuite ended.
- *
- * @param PHPUnit_Framework_TestSuite $suite
- */
- public function endTestSuite(PHPUnit_Framework_TestSuite $suite)
- {
- $this->currentTestSuiteName = '';
- $this->currentTestName = '';
- }
-
- /**
- * A test started.
- *
- * @param PHPUnit_Framework_Test $test
- */
- public function startTest(PHPUnit_Framework_Test $test)
- {
- $this->currentTestName = PHPUnit_Util_Test::describe($test);
- $this->currentTestPass = true;
-
- $this->write(
- array(
- 'event' => 'testStart',
- 'suite' => $this->currentTestSuiteName,
- 'test' => $this->currentTestName
- )
- );
- }
-
- /**
- * A test ended.
- *
- * @param PHPUnit_Framework_Test $test
- * @param float $time
- */
- public function endTest(PHPUnit_Framework_Test $test, $time)
- {
- if ($this->currentTestPass) {
- $this->writeCase('pass', $time, array(), '', $test);
- }
- }
-
- /**
- * @param string $status
- * @param float $time
- * @param array $trace
- * @param string $message
- * @param PHPUnit_Framework_TestCase|null $test
- */
- protected function writeCase($status, $time, array $trace = array(), $message = '', $test = null)
- {
- $output = '';
- // take care of TestSuite producing error (e.g. by running into exception) as TestSuite doesn't have hasOutput
- if ($test !== null && method_exists($test, 'hasOutput') && $test->hasOutput()) {
- $output = $test->getActualOutput();
- }
- $this->write(
- array(
- 'event' => 'test',
- 'suite' => $this->currentTestSuiteName,
- 'test' => $this->currentTestName,
- 'status' => $status,
- 'time' => $time,
- 'trace' => $trace,
- 'message' => PHPUnit_Util_String::convertToUtf8($message),
- 'output' => $output,
- )
- );
- }
-
- /**
- * @param string $buffer
- */
- public function write($buffer)
- {
- array_walk_recursive($buffer, function (&$input) {
- if (is_string($input)) {
- $input = PHPUnit_Util_String::convertToUtf8($input);
- }
- });
-
- $flags = 0;
-
- if (defined('JSON_PRETTY_PRINT')) {
- $flags |= JSON_PRETTY_PRINT;
- }
-
- parent::write(json_encode($buffer, $flags));
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Util/Log/JUnit.php b/vendor/phpunit/phpunit/src/Util/Log/JUnit.php
deleted file mode 100644
index 6b68405b..00000000
--- a/vendor/phpunit/phpunit/src/Util/Log/JUnit.php
+++ /dev/null
@@ -1,459 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * A TestListener that generates a logfile of the test execution in XML markup.
- *
- * The XML markup used is the same as the one that is used by the JUnit Ant task.
- *
- * @since Class available since Release 2.1.0
- */
-class PHPUnit_Util_Log_JUnit extends PHPUnit_Util_Printer implements PHPUnit_Framework_TestListener
-{
- /**
- * @var DOMDocument
- */
- protected $document;
-
- /**
- * @var DOMElement
- */
- protected $root;
-
- /**
- * @var bool
- */
- protected $logIncompleteSkipped = false;
-
- /**
- * @var bool
- */
- protected $writeDocument = true;
-
- /**
- * @var DOMElement[]
- */
- protected $testSuites = array();
-
- /**
- * @var int[]
- */
- protected $testSuiteTests = array(0);
-
- /**
- * @var int[]
- */
- protected $testSuiteAssertions = array(0);
-
- /**
- * @var int[]
- */
- protected $testSuiteErrors = array(0);
-
- /**
- * @var int[]
- */
- protected $testSuiteFailures = array(0);
-
- /**
- * @var int[]
- */
- protected $testSuiteTimes = array(0);
-
- /**
- * @var int
- */
- protected $testSuiteLevel = 0;
-
- /**
- * @var DOMElement
- */
- protected $currentTestCase = null;
-
- /**
- * @var bool
- */
- protected $attachCurrentTestCase = true;
-
- /**
- * Constructor.
- *
- * @param mixed $out
- * @param bool $logIncompleteSkipped
- */
- public function __construct($out = null, $logIncompleteSkipped = false)
- {
- $this->document = new DOMDocument('1.0', 'UTF-8');
- $this->document->formatOutput = true;
-
- $this->root = $this->document->createElement('testsuites');
- $this->document->appendChild($this->root);
-
- parent::__construct($out);
-
- $this->logIncompleteSkipped = $logIncompleteSkipped;
- }
-
- /**
- * Flush buffer and close output.
- */
- public function flush()
- {
- if ($this->writeDocument === true) {
- $this->write($this->getXML());
- }
-
- parent::flush();
- }
-
- /**
- * An error occurred.
- *
- * @param PHPUnit_Framework_Test $test
- * @param Exception $e
- * @param float $time
- */
- public function addError(PHPUnit_Framework_Test $test, Exception $e, $time)
- {
- if ($this->currentTestCase === null) {
- return;
- }
-
- if ($test instanceof PHPUnit_Framework_SelfDescribing) {
- $buffer = $test->toString() . PHP_EOL;
- } else {
- $buffer = '';
- }
-
- if ($e instanceof PHPUnit_Framework_ExceptionWrapper) {
- $type = $e->getClassname();
- $buffer .= (string) $e;
- } else {
- $type = get_class($e);
- $buffer .= PHPUnit_Framework_TestFailure::exceptionToString($e) . PHP_EOL .
- PHPUnit_Util_Filter::getFilteredStacktrace($e);
- }
-
- $error = $this->document->createElement(
- 'error',
- PHPUnit_Util_XML::prepareString($buffer)
- );
-
- $error->setAttribute('type', $type);
-
- $this->currentTestCase->appendChild($error);
-
- $this->testSuiteErrors[$this->testSuiteLevel]++;
- }
-
- /**
- * A failure occurred.
- *
- * @param PHPUnit_Framework_Test $test
- * @param PHPUnit_Framework_AssertionFailedError $e
- * @param float $time
- */
- public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time)
- {
- if ($this->currentTestCase === null) {
- return;
- }
-
- if ($test instanceof PHPUnit_Framework_SelfDescribing) {
- $buffer = $test->toString() . "\n";
- } else {
- $buffer = '';
- }
-
- $buffer .= PHPUnit_Framework_TestFailure::exceptionToString($e) .
- "\n" .
- PHPUnit_Util_Filter::getFilteredStacktrace($e);
-
- $failure = $this->document->createElement(
- 'failure',
- PHPUnit_Util_XML::prepareString($buffer)
- );
-
- $failure->setAttribute('type', get_class($e));
-
- $this->currentTestCase->appendChild($failure);
-
- $this->testSuiteFailures[$this->testSuiteLevel]++;
- }
-
- /**
- * Incomplete test.
- *
- * @param PHPUnit_Framework_Test $test
- * @param Exception $e
- * @param float $time
- */
- public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time)
- {
- if ($this->logIncompleteSkipped && $this->currentTestCase !== null) {
- $error = $this->document->createElement(
- 'error',
- PHPUnit_Util_XML::prepareString(
- "Incomplete Test\n" .
- PHPUnit_Util_Filter::getFilteredStacktrace($e)
- )
- );
-
- $error->setAttribute('type', get_class($e));
-
- $this->currentTestCase->appendChild($error);
-
- $this->testSuiteErrors[$this->testSuiteLevel]++;
- } else {
- $this->attachCurrentTestCase = false;
- }
- }
-
- /**
- * Risky test.
- *
- * @param PHPUnit_Framework_Test $test
- * @param Exception $e
- * @param float $time
- *
- * @since Method available since Release 4.0.0
- */
- public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time)
- {
- if ($this->logIncompleteSkipped && $this->currentTestCase !== null) {
- $error = $this->document->createElement(
- 'error',
- PHPUnit_Util_XML::prepareString(
- "Risky Test\n" .
- PHPUnit_Util_Filter::getFilteredStacktrace($e)
- )
- );
-
- $error->setAttribute('type', get_class($e));
-
- $this->currentTestCase->appendChild($error);
-
- $this->testSuiteErrors[$this->testSuiteLevel]++;
- } else {
- $this->attachCurrentTestCase = false;
- }
- }
-
- /**
- * Skipped test.
- *
- * @param PHPUnit_Framework_Test $test
- * @param Exception $e
- * @param float $time
- *
- * @since Method available since Release 3.0.0
- */
- public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time)
- {
- if ($this->logIncompleteSkipped && $this->currentTestCase !== null) {
- $error = $this->document->createElement(
- 'error',
- PHPUnit_Util_XML::prepareString(
- "Skipped Test\n" .
- PHPUnit_Util_Filter::getFilteredStacktrace($e)
- )
- );
-
- $error->setAttribute('type', get_class($e));
-
- $this->currentTestCase->appendChild($error);
-
- $this->testSuiteErrors[$this->testSuiteLevel]++;
- } else {
- $this->attachCurrentTestCase = false;
- }
- }
-
- /**
- * A testsuite started.
- *
- * @param PHPUnit_Framework_TestSuite $suite
- *
- * @since Method available since Release 2.2.0
- */
- public function startTestSuite(PHPUnit_Framework_TestSuite $suite)
- {
- $testSuite = $this->document->createElement('testsuite');
- $testSuite->setAttribute('name', $suite->getName());
-
- if (class_exists($suite->getName(), false)) {
- try {
- $class = new ReflectionClass($suite->getName());
-
- $testSuite->setAttribute('file', $class->getFileName());
- } catch (ReflectionException $e) {
- }
- }
-
- if ($this->testSuiteLevel > 0) {
- $this->testSuites[$this->testSuiteLevel]->appendChild($testSuite);
- } else {
- $this->root->appendChild($testSuite);
- }
-
- $this->testSuiteLevel++;
- $this->testSuites[$this->testSuiteLevel] = $testSuite;
- $this->testSuiteTests[$this->testSuiteLevel] = 0;
- $this->testSuiteAssertions[$this->testSuiteLevel] = 0;
- $this->testSuiteErrors[$this->testSuiteLevel] = 0;
- $this->testSuiteFailures[$this->testSuiteLevel] = 0;
- $this->testSuiteTimes[$this->testSuiteLevel] = 0;
- }
-
- /**
- * A testsuite ended.
- *
- * @param PHPUnit_Framework_TestSuite $suite
- *
- * @since Method available since Release 2.2.0
- */
- public function endTestSuite(PHPUnit_Framework_TestSuite $suite)
- {
- $this->testSuites[$this->testSuiteLevel]->setAttribute(
- 'tests',
- $this->testSuiteTests[$this->testSuiteLevel]
- );
-
- $this->testSuites[$this->testSuiteLevel]->setAttribute(
- 'assertions',
- $this->testSuiteAssertions[$this->testSuiteLevel]
- );
-
- $this->testSuites[$this->testSuiteLevel]->setAttribute(
- 'failures',
- $this->testSuiteFailures[$this->testSuiteLevel]
- );
-
- $this->testSuites[$this->testSuiteLevel]->setAttribute(
- 'errors',
- $this->testSuiteErrors[$this->testSuiteLevel]
- );
-
- $this->testSuites[$this->testSuiteLevel]->setAttribute(
- 'time',
- sprintf('%F', $this->testSuiteTimes[$this->testSuiteLevel])
- );
-
- if ($this->testSuiteLevel > 1) {
- $this->testSuiteTests[$this->testSuiteLevel - 1] += $this->testSuiteTests[$this->testSuiteLevel];
- $this->testSuiteAssertions[$this->testSuiteLevel - 1] += $this->testSuiteAssertions[$this->testSuiteLevel];
- $this->testSuiteErrors[$this->testSuiteLevel - 1] += $this->testSuiteErrors[$this->testSuiteLevel];
- $this->testSuiteFailures[$this->testSuiteLevel - 1] += $this->testSuiteFailures[$this->testSuiteLevel];
- $this->testSuiteTimes[$this->testSuiteLevel - 1] += $this->testSuiteTimes[$this->testSuiteLevel];
- }
-
- $this->testSuiteLevel--;
- }
-
- /**
- * A test started.
- *
- * @param PHPUnit_Framework_Test $test
- */
- public function startTest(PHPUnit_Framework_Test $test)
- {
- $testCase = $this->document->createElement('testcase');
- $testCase->setAttribute('name', $test->getName());
-
- if ($test instanceof PHPUnit_Framework_TestCase) {
- $class = new ReflectionClass($test);
- $methodName = $test->getName();
-
- if ($class->hasMethod($methodName)) {
- $method = $class->getMethod($test->getName());
-
- $testCase->setAttribute('class', $class->getName());
- $testCase->setAttribute('file', $class->getFileName());
- $testCase->setAttribute('line', $method->getStartLine());
- }
- }
-
- $this->currentTestCase = $testCase;
- }
-
- /**
- * A test ended.
- *
- * @param PHPUnit_Framework_Test $test
- * @param float $time
- */
- public function endTest(PHPUnit_Framework_Test $test, $time)
- {
- if ($this->attachCurrentTestCase) {
- if ($test instanceof PHPUnit_Framework_TestCase) {
- $numAssertions = $test->getNumAssertions();
- $this->testSuiteAssertions[$this->testSuiteLevel] += $numAssertions;
-
- $this->currentTestCase->setAttribute(
- 'assertions',
- $numAssertions
- );
- }
-
- $this->currentTestCase->setAttribute(
- 'time',
- sprintf('%F', $time)
- );
-
- $this->testSuites[$this->testSuiteLevel]->appendChild(
- $this->currentTestCase
- );
-
- $this->testSuiteTests[$this->testSuiteLevel]++;
- $this->testSuiteTimes[$this->testSuiteLevel] += $time;
-
- if (method_exists($test, 'hasOutput') && $test->hasOutput()) {
- $systemOut = $this->document->createElement('system-out');
- $systemOut->appendChild(
- $this->document->createTextNode($test->getActualOutput())
- );
- $this->currentTestCase->appendChild($systemOut);
- }
- }
-
- $this->attachCurrentTestCase = true;
- $this->currentTestCase = null;
- }
-
- /**
- * Returns the XML as a string.
- *
- * @return string
- *
- * @since Method available since Release 2.2.0
- */
- public function getXML()
- {
- return $this->document->saveXML();
- }
-
- /**
- * Enables or disables the writing of the document
- * in flush().
- *
- * This is a "hack" needed for the integration of
- * PHPUnit with Phing.
- *
- * @return string
- *
- * @since Method available since Release 2.2.0
- */
- public function setWriteDocument($flag)
- {
- if (is_bool($flag)) {
- $this->writeDocument = $flag;
- }
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Util/Log/TAP.php b/vendor/phpunit/phpunit/src/Util/Log/TAP.php
deleted file mode 100644
index bcd587f4..00000000
--- a/vendor/phpunit/phpunit/src/Util/Log/TAP.php
+++ /dev/null
@@ -1,257 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * A TestListener that generates a logfile of the
- * test execution using the Test Anything Protocol (TAP).
- *
- * @since Class available since Release 3.0.0
- */
-class PHPUnit_Util_Log_TAP extends PHPUnit_Util_Printer implements PHPUnit_Framework_TestListener
-{
- /**
- * @var int
- */
- protected $testNumber = 0;
-
- /**
- * @var int
- */
- protected $testSuiteLevel = 0;
-
- /**
- * @var bool
- */
- protected $testSuccessful = true;
-
- /**
- * Constructor.
- *
- * @param mixed $out
- *
- * @throws PHPUnit_Framework_Exception
- *
- * @since Method available since Release 3.3.4
- */
- public function __construct($out = null)
- {
- parent::__construct($out);
- $this->write("TAP version 13\n");
- }
-
- /**
- * An error occurred.
- *
- * @param PHPUnit_Framework_Test $test
- * @param Exception $e
- * @param float $time
- */
- public function addError(PHPUnit_Framework_Test $test, Exception $e, $time)
- {
- $this->writeNotOk($test, 'Error');
- }
-
- /**
- * A failure occurred.
- *
- * @param PHPUnit_Framework_Test $test
- * @param PHPUnit_Framework_AssertionFailedError $e
- * @param float $time
- */
- public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time)
- {
- $this->writeNotOk($test, 'Failure');
-
- $message = explode(
- "\n",
- PHPUnit_Framework_TestFailure::exceptionToString($e)
- );
-
- $diagnostic = array(
- 'message' => $message[0],
- 'severity' => 'fail'
- );
-
- if ($e instanceof PHPUnit_Framework_ExpectationFailedException) {
- $cf = $e->getComparisonFailure();
-
- if ($cf !== null) {
- $diagnostic['data'] = array(
- 'got' => $cf->getActual(),
- 'expected' => $cf->getExpected()
- );
- }
- }
-
- $yaml = new Symfony\Component\Yaml\Dumper;
-
- $this->write(
- sprintf(
- " ---\n%s ...\n",
- $yaml->dump($diagnostic, 2, 2)
- )
- );
- }
-
- /**
- * Incomplete test.
- *
- * @param PHPUnit_Framework_Test $test
- * @param Exception $e
- * @param float $time
- */
- public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time)
- {
- $this->writeNotOk($test, '', 'TODO Incomplete Test');
- }
-
- /**
- * Risky test.
- *
- * @param PHPUnit_Framework_Test $test
- * @param Exception $e
- * @param float $time
- *
- * @since Method available since Release 4.0.0
- */
- public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time)
- {
- $this->write(
- sprintf(
- "ok %d - # RISKY%s\n",
- $this->testNumber,
- $e->getMessage() != '' ? ' ' . $e->getMessage() : ''
- )
- );
-
- $this->testSuccessful = false;
- }
-
- /**
- * Skipped test.
- *
- * @param PHPUnit_Framework_Test $test
- * @param Exception $e
- * @param float $time
- *
- * @since Method available since Release 3.0.0
- */
- public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time)
- {
- $this->write(
- sprintf(
- "ok %d - # SKIP%s\n",
- $this->testNumber,
- $e->getMessage() != '' ? ' ' . $e->getMessage() : ''
- )
- );
-
- $this->testSuccessful = false;
- }
-
- /**
- * A testsuite started.
- *
- * @param PHPUnit_Framework_TestSuite $suite
- */
- public function startTestSuite(PHPUnit_Framework_TestSuite $suite)
- {
- $this->testSuiteLevel++;
- }
-
- /**
- * A testsuite ended.
- *
- * @param PHPUnit_Framework_TestSuite $suite
- */
- public function endTestSuite(PHPUnit_Framework_TestSuite $suite)
- {
- $this->testSuiteLevel--;
-
- if ($this->testSuiteLevel == 0) {
- $this->write(sprintf("1..%d\n", $this->testNumber));
- }
- }
-
- /**
- * A test started.
- *
- * @param PHPUnit_Framework_Test $test
- */
- public function startTest(PHPUnit_Framework_Test $test)
- {
- $this->testNumber++;
- $this->testSuccessful = true;
- }
-
- /**
- * A test ended.
- *
- * @param PHPUnit_Framework_Test $test
- * @param float $time
- */
- public function endTest(PHPUnit_Framework_Test $test, $time)
- {
- if ($this->testSuccessful === true) {
- $this->write(
- sprintf(
- "ok %d - %s\n",
- $this->testNumber,
- PHPUnit_Util_Test::describe($test)
- )
- );
- }
-
- $this->writeDiagnostics($test);
- }
-
- /**
- * @param PHPUnit_Framework_Test $test
- * @param string $prefix
- * @param string $directive
- */
- protected function writeNotOk(PHPUnit_Framework_Test $test, $prefix = '', $directive = '')
- {
- $this->write(
- sprintf(
- "not ok %d - %s%s%s\n",
- $this->testNumber,
- $prefix != '' ? $prefix . ': ' : '',
- PHPUnit_Util_Test::describe($test),
- $directive != '' ? ' # ' . $directive : ''
- )
- );
-
- $this->testSuccessful = false;
- }
-
- /**
- * @param PHPUnit_Framework_Test $test
- */
- private function writeDiagnostics(PHPUnit_Framework_Test $test)
- {
- if (!$test instanceof PHPUnit_Framework_TestCase) {
- return;
- }
-
- if (!$test->hasOutput()) {
- return;
- }
-
- foreach (explode("\n", trim($test->getActualOutput())) as $line) {
- $this->write(
- sprintf(
- "# %s\n",
- $line
- )
- );
- }
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Util/PHP.php b/vendor/phpunit/phpunit/src/Util/PHP.php
deleted file mode 100644
index 84c2ead7..00000000
--- a/vendor/phpunit/phpunit/src/Util/PHP.php
+++ /dev/null
@@ -1,227 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Utility methods for PHP sub-processes.
- *
- * @since Class available since Release 3.4.0
- */
-abstract class PHPUnit_Util_PHP
-{
- /**
- * @return PHPUnit_Util_PHP
- *
- * @since Method available since Release 3.5.12
- */
- public static function factory()
- {
- if (DIRECTORY_SEPARATOR == '\\') {
- return new PHPUnit_Util_PHP_Windows;
- }
-
- return new PHPUnit_Util_PHP_Default;
- }
-
- /**
- * Runs a single test in a separate PHP process.
- *
- * @param string $job
- * @param PHPUnit_Framework_Test $test
- * @param PHPUnit_Framework_TestResult $result
- *
- * @throws PHPUnit_Framework_Exception
- */
- public function runTestJob($job, PHPUnit_Framework_Test $test, PHPUnit_Framework_TestResult $result)
- {
- $result->startTest($test);
-
- $_result = $this->runJob($job);
-
- $this->processChildResult(
- $test,
- $result,
- $_result['stdout'],
- $_result['stderr']
- );
- }
-
- /**
- * Runs a single job (PHP code) using a separate PHP process.
- *
- * @param string $job
- * @param array $settings
- *
- * @return array
- *
- * @throws PHPUnit_Framework_Exception
- */
- abstract public function runJob($job, array $settings = array());
-
- /**
- * @param array $settings
- *
- * @return string
- *
- * @since Method available since Release 4.0.0
- */
- protected function settingsToParameters(array $settings)
- {
- $buffer = '';
-
- foreach ($settings as $setting) {
- $buffer .= ' -d ' . $setting;
- }
-
- return $buffer;
- }
-
- /**
- * Processes the TestResult object from an isolated process.
- *
- * @param PHPUnit_Framework_Test $test
- * @param PHPUnit_Framework_TestResult $result
- * @param string $stdout
- * @param string $stderr
- *
- * @since Method available since Release 3.5.0
- */
- private function processChildResult(PHPUnit_Framework_Test $test, PHPUnit_Framework_TestResult $result, $stdout, $stderr)
- {
- $time = 0;
-
- if (!empty($stderr)) {
- $result->addError(
- $test,
- new PHPUnit_Framework_Exception(trim($stderr)),
- $time
- );
- } else {
- set_error_handler(function ($errno, $errstr, $errfile, $errline) {
- throw new ErrorException($errstr, $errno, $errno, $errfile, $errline);
- });
- try {
- if (strpos($stdout, "#!/usr/bin/env php\n") === 0) {
- $stdout = substr($stdout, 19);
- }
-
- $childResult = unserialize(str_replace("#!/usr/bin/env php\n", '', $stdout));
- restore_error_handler();
- } catch (ErrorException $e) {
- restore_error_handler();
- $childResult = false;
-
- $result->addError(
- $test,
- new PHPUnit_Framework_Exception(trim($stdout), 0, $e),
- $time
- );
- }
-
- if ($childResult !== false) {
- if (!empty($childResult['output'])) {
- $output = $childResult['output'];
- }
-
- $test->setResult($childResult['testResult']);
- $test->addToAssertionCount($childResult['numAssertions']);
-
- $childResult = $childResult['result'];
-
- if ($result->getCollectCodeCoverageInformation()) {
- $result->getCodeCoverage()->merge(
- $childResult->getCodeCoverage()
- );
- }
-
- $time = $childResult->time();
- $notImplemented = $childResult->notImplemented();
- $risky = $childResult->risky();
- $skipped = $childResult->skipped();
- $errors = $childResult->errors();
- $failures = $childResult->failures();
-
- if (!empty($notImplemented)) {
- $result->addError(
- $test,
- $this->getException($notImplemented[0]),
- $time
- );
- } elseif (!empty($risky)) {
- $result->addError(
- $test,
- $this->getException($risky[0]),
- $time
- );
- } elseif (!empty($skipped)) {
- $result->addError(
- $test,
- $this->getException($skipped[0]),
- $time
- );
- } elseif (!empty($errors)) {
- $result->addError(
- $test,
- $this->getException($errors[0]),
- $time
- );
- } elseif (!empty($failures)) {
- $result->addFailure(
- $test,
- $this->getException($failures[0]),
- $time
- );
- }
- }
- }
-
- $result->endTest($test, $time);
-
- if (!empty($output)) {
- print $output;
- }
- }
-
- /**
- * Gets the thrown exception from a PHPUnit_Framework_TestFailure.
- *
- * @param PHPUnit_Framework_TestFailure $error
- *
- * @return Exception
- *
- * @since Method available since Release 3.6.0
- * @see https://github.com/sebastianbergmann/phpunit/issues/74
- */
- private function getException(PHPUnit_Framework_TestFailure $error)
- {
- $exception = $error->thrownException();
-
- if ($exception instanceof __PHP_Incomplete_Class) {
- $exceptionArray = array();
- foreach ((array) $exception as $key => $value) {
- $key = substr($key, strrpos($key, "\0") + 1);
- $exceptionArray[$key] = $value;
- }
-
- $exception = new PHPUnit_Framework_SyntheticError(
- sprintf(
- '%s: %s',
- $exceptionArray['_PHP_Incomplete_Class_Name'],
- $exceptionArray['message']
- ),
- $exceptionArray['code'],
- $exceptionArray['file'],
- $exceptionArray['line'],
- $exceptionArray['trace']
- );
- }
-
- return $exception;
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Util/PHP/Default.php b/vendor/phpunit/phpunit/src/Util/PHP/Default.php
deleted file mode 100644
index 658cf5dd..00000000
--- a/vendor/phpunit/phpunit/src/Util/PHP/Default.php
+++ /dev/null
@@ -1,89 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-use SebastianBergmann\Environment\Runtime;
-
-/**
- * Default utility for PHP sub-processes.
- *
- * @since Class available since Release 3.5.12
- */
-class PHPUnit_Util_PHP_Default extends PHPUnit_Util_PHP
-{
- /**
- * Runs a single job (PHP code) using a separate PHP process.
- *
- * @param string $job
- * @param array $settings
- *
- * @return array
- *
- * @throws PHPUnit_Framework_Exception
- */
- public function runJob($job, array $settings = array())
- {
- $runtime = new Runtime;
- $runtime = $runtime->getBinary() . $this->settingsToParameters($settings);
-
- if ('phpdbg' === PHP_SAPI) {
- $runtime .= ' -qrr ' . escapeshellarg(__DIR__ . '/eval-stdin.php');
- }
-
- $process = proc_open(
- $runtime,
- array(
- 0 => array('pipe', 'r'),
- 1 => array('pipe', 'w'),
- 2 => array('pipe', 'w')
- ),
- $pipes
- );
-
- if (!is_resource($process)) {
- throw new PHPUnit_Framework_Exception(
- 'Unable to spawn worker process'
- );
- }
-
- $this->process($pipes[0], $job);
- fclose($pipes[0]);
-
- $stdout = stream_get_contents($pipes[1]);
- fclose($pipes[1]);
-
- $stderr = stream_get_contents($pipes[2]);
- fclose($pipes[2]);
-
- proc_close($process);
- $this->cleanup();
-
- return array('stdout' => $stdout, 'stderr' => $stderr);
- }
-
- /**
- * @param resource $pipe
- * @param string $job
- *
- * @throws PHPUnit_Framework_Exception
- *
- * @since Method available since Release 3.5.12
- */
- protected function process($pipe, $job)
- {
- fwrite($pipe, $job);
- }
-
- /**
- * @since Method available since Release 3.5.12
- */
- protected function cleanup()
- {
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Util/PHP/Template/TestCaseMethod.tpl.dist b/vendor/phpunit/phpunit/src/Util/PHP/Template/TestCaseMethod.tpl.dist
deleted file mode 100644
index b48f354c..00000000
--- a/vendor/phpunit/phpunit/src/Util/PHP/Template/TestCaseMethod.tpl.dist
+++ /dev/null
@@ -1,99 +0,0 @@
-setCodeCoverage(
- new PHP_CodeCoverage(
- null,
- unserialize('{codeCoverageFilter}')
- )
- );
- }
-
- $result->beStrictAboutTestsThatDoNotTestAnything({isStrictAboutTestsThatDoNotTestAnything});
- $result->beStrictAboutOutputDuringTests({isStrictAboutOutputDuringTests});
- $result->beStrictAboutTestSize({isStrictAboutTestSize});
- $result->beStrictAboutTodoAnnotatedTests({isStrictAboutTodoAnnotatedTests});
-
- $test = new {className}('{methodName}', unserialize('{data}'), '{dataName}');
- $test->setDependencyInput(unserialize('{dependencyInput}'));
- $test->setInIsolation(TRUE);
-
- ob_end_clean();
- $test->run($result);
- $output = '';
- if (!$test->hasExpectationOnOutput()) {
- $output = $test->getActualOutput();
- }
-
- @rewind(STDOUT); /* @ as not every STDOUT target stream is rewindable */
- if ($stdout = stream_get_contents(STDOUT)) {
- $output = $stdout . $output;
- }
-
- print serialize(
- array(
- 'testResult' => $test->getResult(),
- 'numAssertions' => $test->getNumAssertions(),
- 'result' => $result,
- 'output' => $output
- )
- );
-}
-
-$configurationFilePath = '{configurationFilePath}';
-
-if ('' !== $configurationFilePath) {
- $configuration = PHPUnit_Util_Configuration::getInstance($configurationFilePath);
- $configuration->handlePHPConfiguration();
- unset($configuration);
-}
-
-function __phpunit_error_handler($errno, $errstr, $errfile, $errline, $errcontext)
-{
- return true;
-}
-
-set_error_handler("__phpunit_error_handler");
-
-{constants}
-{included_files}
-{globals}
-
-restore_error_handler();
-
-if (isset($GLOBALS['__PHPUNIT_BOOTSTRAP'])) {
- require_once $GLOBALS['__PHPUNIT_BOOTSTRAP'];
- unset($GLOBALS['__PHPUNIT_BOOTSTRAP']);
-}
-
-__phpunit_run_isolated_test();
diff --git a/vendor/phpunit/phpunit/src/Util/PHP/Windows.php b/vendor/phpunit/phpunit/src/Util/PHP/Windows.php
deleted file mode 100644
index 6587aae8..00000000
--- a/vendor/phpunit/phpunit/src/Util/PHP/Windows.php
+++ /dev/null
@@ -1,106 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-use SebastianBergmann\Environment\Runtime;
-
-/**
- * Windows utility for PHP sub-processes.
- *
- * @since Class available since Release 3.5.12
- */
-class PHPUnit_Util_PHP_Windows extends PHPUnit_Util_PHP_Default
-{
- /**
- * @var string
- */
- private $tempFile;
-
- /**
- * {@inheritdoc}
- *
- * Reading from STDOUT or STDERR hangs forever on Windows if the output is
- * too large.
- *
- * @see https://bugs.php.net/bug.php?id=51800
- */
- public function runJob($job, array $settings = array())
- {
- $runtime = new Runtime;
-
- if (false === $stdout_handle = tmpfile()) {
- throw new PHPUnit_Framework_Exception(
- 'A temporary file could not be created; verify that your TEMP environment variable is writable'
- );
- }
-
- $process = proc_open(
- $runtime->getBinary() . $this->settingsToParameters($settings),
- array(
- 0 => array('pipe', 'r'),
- 1 => $stdout_handle,
- 2 => array('pipe', 'w')
- ),
- $pipes
- );
-
- if (!is_resource($process)) {
- throw new PHPUnit_Framework_Exception(
- 'Unable to spawn worker process'
- );
- }
-
- $this->process($pipes[0], $job);
- fclose($pipes[0]);
-
- $stderr = stream_get_contents($pipes[2]);
- fclose($pipes[2]);
-
- proc_close($process);
-
- rewind($stdout_handle);
- $stdout = stream_get_contents($stdout_handle);
- fclose($stdout_handle);
-
- $this->cleanup();
-
- return array('stdout' => $stdout, 'stderr' => $stderr);
- }
-
- /**
- * @param resource $pipe
- * @param string $job
- *
- * @throws PHPUnit_Framework_Exception
- *
- * @since Method available since Release 3.5.12
- */
- protected function process($pipe, $job)
- {
- if (!($this->tempFile = tempnam(sys_get_temp_dir(), 'PHPUnit')) ||
- file_put_contents($this->tempFile, $job) === false) {
- throw new PHPUnit_Framework_Exception(
- 'Unable to write temporary file'
- );
- }
-
- fwrite(
- $pipe,
- 'tempFile, true) . '; ?>'
- );
- }
-
- /**
- * @since Method available since Release 3.5.12
- */
- protected function cleanup()
- {
- unlink($this->tempFile);
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php b/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php
deleted file mode 100644
index 3b3a6d03..00000000
--- a/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php
+++ /dev/null
@@ -1,3 +0,0 @@
-' . file_get_contents('php://stdin'));
diff --git a/vendor/phpunit/phpunit/src/Util/Printer.php b/vendor/phpunit/phpunit/src/Util/Printer.php
deleted file mode 100644
index a22f8622..00000000
--- a/vendor/phpunit/phpunit/src/Util/Printer.php
+++ /dev/null
@@ -1,172 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Utility class that can print to STDOUT or write to a file.
- *
- * @since Class available since Release 2.0.0
- */
-class PHPUnit_Util_Printer
-{
- /**
- * If true, flush output after every write.
- *
- * @var bool
- */
- protected $autoFlush = false;
-
- /**
- * @var resource
- */
- protected $out;
-
- /**
- * @var string
- */
- protected $outTarget;
-
- /**
- * @var bool
- */
- protected $printsHTML = false;
-
- /**
- * Constructor.
- *
- * @param mixed $out
- *
- * @throws PHPUnit_Framework_Exception
- */
- public function __construct($out = null)
- {
- if ($out !== null) {
- if (is_string($out)) {
- if (strpos($out, 'socket://') === 0) {
- $out = explode(':', str_replace('socket://', '', $out));
-
- if (sizeof($out) != 2) {
- throw new PHPUnit_Framework_Exception;
- }
-
- $this->out = fsockopen($out[0], $out[1]);
- } else {
- if (strpos($out, 'php://') === false &&
- !is_dir(dirname($out))) {
- mkdir(dirname($out), 0777, true);
- }
-
- $this->out = fopen($out, 'wt');
- }
-
- $this->outTarget = $out;
- } else {
- $this->out = $out;
- }
- }
- }
-
- /**
- * Flush buffer, optionally tidy up HTML, and close output if it's not to a php stream
- */
- public function flush()
- {
- if ($this->out && strncmp($this->outTarget, 'php://', 6) !== 0) {
- fclose($this->out);
- }
-
- if ($this->printsHTML === true &&
- $this->outTarget !== null &&
- strpos($this->outTarget, 'php://') !== 0 &&
- strpos($this->outTarget, 'socket://') !== 0 &&
- extension_loaded('tidy')) {
- file_put_contents(
- $this->outTarget,
- tidy_repair_file(
- $this->outTarget,
- array('indent' => true, 'wrap' => 0),
- 'utf8'
- )
- );
- }
- }
-
- /**
- * Performs a safe, incremental flush.
- *
- * Do not confuse this function with the flush() function of this class,
- * since the flush() function may close the file being written to, rendering
- * the current object no longer usable.
- *
- * @since Method available since Release 3.3.0
- */
- public function incrementalFlush()
- {
- if ($this->out) {
- fflush($this->out);
- } else {
- flush();
- }
- }
-
- /**
- * @param string $buffer
- */
- public function write($buffer)
- {
- if ($this->out) {
- fwrite($this->out, $buffer);
-
- if ($this->autoFlush) {
- $this->incrementalFlush();
- }
- } else {
- if (PHP_SAPI != 'cli' && PHP_SAPI != 'phpdbg') {
- $buffer = htmlspecialchars($buffer, ENT_SUBSTITUTE);
- }
-
- print $buffer;
-
- if ($this->autoFlush) {
- $this->incrementalFlush();
- }
- }
- }
-
- /**
- * Check auto-flush mode.
- *
- * @return bool
- *
- * @since Method available since Release 3.3.0
- */
- public function getAutoFlush()
- {
- return $this->autoFlush;
- }
-
- /**
- * Set auto-flushing mode.
- *
- * If set, *incremental* flushes will be done after each write. This should
- * not be confused with the different effects of this class' flush() method.
- *
- * @param bool $autoFlush
- *
- * @since Method available since Release 3.3.0
- */
- public function setAutoFlush($autoFlush)
- {
- if (is_bool($autoFlush)) {
- $this->autoFlush = $autoFlush;
- } else {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'boolean');
- }
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Util/Regex.php b/vendor/phpunit/phpunit/src/Util/Regex.php
deleted file mode 100644
index 3624de15..00000000
--- a/vendor/phpunit/phpunit/src/Util/Regex.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Error handler that converts PHP errors and warnings to exceptions.
- *
- * @since Class available since Release 4.2.0
- */
-class PHPUnit_Util_Regex
-{
- public static function pregMatchSafe($pattern, $subject, $matches = null, $flags = 0, $offset = 0)
- {
- $handler_terminator = PHPUnit_Util_ErrorHandler::handleErrorOnce(E_WARNING);
- $match = preg_match($pattern, $subject, $matches, $flags, $offset);
- $handler_terminator(); // cleaning
-
- return $match;
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Util/String.php b/vendor/phpunit/phpunit/src/Util/String.php
deleted file mode 100644
index 18f85938..00000000
--- a/vendor/phpunit/phpunit/src/Util/String.php
+++ /dev/null
@@ -1,71 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * String helpers.
- *
- * @since Class available since Release 3.6.0
- */
-class PHPUnit_Util_String
-{
- /**
- * Converts a string to UTF-8 encoding.
- *
- * @param string $string
- *
- * @return string
- */
- public static function convertToUtf8($string)
- {
- if (!self::isUtf8($string)) {
- if (function_exists('mb_convert_encoding')) {
- $string = mb_convert_encoding($string, 'UTF-8');
- } else {
- $string = utf8_encode($string);
- }
- }
-
- return $string;
- }
-
- /**
- * Checks a string for UTF-8 encoding.
- *
- * @param string $string
- *
- * @return bool
- */
- protected static function isUtf8($string)
- {
- $length = strlen($string);
-
- for ($i = 0; $i < $length; $i++) {
- if (ord($string[$i]) < 0x80) {
- $n = 0;
- } elseif ((ord($string[$i]) & 0xE0) == 0xC0) {
- $n = 1;
- } elseif ((ord($string[$i]) & 0xF0) == 0xE0) {
- $n = 2;
- } elseif ((ord($string[$i]) & 0xF0) == 0xF0) {
- $n = 3;
- } else {
- return false;
- }
-
- for ($j = 0; $j < $n; $j++) {
- if ((++$i == $length) || ((ord($string[$i]) & 0xC0) != 0x80)) {
- return false;
- }
- }
- }
-
- return true;
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Util/Test.php b/vendor/phpunit/phpunit/src/Util/Test.php
deleted file mode 100644
index 74203b76..00000000
--- a/vendor/phpunit/phpunit/src/Util/Test.php
+++ /dev/null
@@ -1,1098 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-if (!function_exists('trait_exists')) {
- function trait_exists($traitname, $autoload = true)
- {
- return false;
- }
-}
-
-/**
- * Test helpers.
- *
- * @since Class available since Release 3.0.0
- */
-class PHPUnit_Util_Test
-{
- const REGEX_DATA_PROVIDER = '/@dataProvider\s+([a-zA-Z0-9._:-\\\\x7f-\xff]+)/';
- const REGEX_TEST_WITH = '/@testWith\s+/';
- const REGEX_EXPECTED_EXCEPTION = '(@expectedException\s+([:.\w\\\\x7f-\xff]+)(?:[\t ]+(\S*))?(?:[\t ]+(\S*))?\s*$)m';
- const REGEX_REQUIRES_VERSION = '/@requires\s+(?PPHP(?:Unit)?)\s+(?P[\d\.-]+(dev|(RC|alpha|beta)[\d\.])?)[ \t]*\r?$/m';
- const REGEX_REQUIRES_OS = '/@requires\s+OS\s+(?P.+?)[ \t]*\r?$/m';
- const REGEX_REQUIRES = '/@requires\s+(?Pfunction|extension)\s+(?P([^ ]+?))[ \t]*\r?$/m';
-
- const UNKNOWN = -1;
- const SMALL = 0;
- const MEDIUM = 1;
- const LARGE = 2;
-
- private static $annotationCache = array();
-
- private static $hookMethods = array();
-
- /**
- * @param PHPUnit_Framework_Test $test
- * @param bool $asString
- *
- * @return mixed
- */
- public static function describe(PHPUnit_Framework_Test $test, $asString = true)
- {
- if ($asString) {
- if ($test instanceof PHPUnit_Framework_SelfDescribing) {
- return $test->toString();
- } else {
- return get_class($test);
- }
- } else {
- if ($test instanceof PHPUnit_Framework_TestCase) {
- return array(
- get_class($test), $test->getName()
- );
- } elseif ($test instanceof PHPUnit_Framework_SelfDescribing) {
- return array('', $test->toString());
- } else {
- return array('', get_class($test));
- }
- }
- }
-
- /**
- * @param string $className
- * @param string $methodName
- *
- * @return array|bool
- *
- * @throws PHPUnit_Framework_CodeCoverageException
- *
- * @since Method available since Release 4.0.0
- */
- public static function getLinesToBeCovered($className, $methodName)
- {
- $annotations = self::parseTestMethodAnnotations(
- $className,
- $methodName
- );
-
- if (isset($annotations['class']['coversNothing']) || isset($annotations['method']['coversNothing'])) {
- return false;
- }
-
- return self::getLinesToBeCoveredOrUsed($className, $methodName, 'covers');
- }
-
- /**
- * Returns lines of code specified with the @uses annotation.
- *
- * @param string $className
- * @param string $methodName
- *
- * @return array
- *
- * @since Method available since Release 4.0.0
- */
- public static function getLinesToBeUsed($className, $methodName)
- {
- return self::getLinesToBeCoveredOrUsed($className, $methodName, 'uses');
- }
-
- /**
- * @param string $className
- * @param string $methodName
- * @param string $mode
- *
- * @return array
- *
- * @throws PHPUnit_Framework_CodeCoverageException
- *
- * @since Method available since Release 4.2.0
- */
- private static function getLinesToBeCoveredOrUsed($className, $methodName, $mode)
- {
- $annotations = self::parseTestMethodAnnotations(
- $className,
- $methodName
- );
-
- $classShortcut = null;
-
- if (!empty($annotations['class'][$mode . 'DefaultClass'])) {
- if (count($annotations['class'][$mode . 'DefaultClass']) > 1) {
- throw new PHPUnit_Framework_CodeCoverageException(
- sprintf(
- 'More than one @%sClass annotation in class or interface "%s".',
- $mode,
- $className
- )
- );
- }
-
- $classShortcut = $annotations['class'][$mode . 'DefaultClass'][0];
- }
-
- $list = array();
-
- if (isset($annotations['class'][$mode])) {
- $list = $annotations['class'][$mode];
- }
-
- if (isset($annotations['method'][$mode])) {
- $list = array_merge($list, $annotations['method'][$mode]);
- }
-
- $codeList = array();
-
- foreach (array_unique($list) as $element) {
- if ($classShortcut && strncmp($element, '::', 2) === 0) {
- $element = $classShortcut . $element;
- }
-
- $element = preg_replace('/[\s()]+$/', '', $element);
- $element = explode(' ', $element);
- $element = $element[0];
-
- $codeList = array_merge(
- $codeList,
- self::resolveElementToReflectionObjects($element)
- );
- }
-
- return self::resolveReflectionObjectsToLines($codeList);
- }
-
- /**
- * Returns the requirements for a test.
- *
- * @param string $className
- * @param string $methodName
- *
- * @return array
- *
- * @since Method available since Release 3.6.0
- */
- public static function getRequirements($className, $methodName)
- {
- $reflector = new ReflectionClass($className);
- $docComment = $reflector->getDocComment();
- $reflector = new ReflectionMethod($className, $methodName);
- $docComment .= "\n" . $reflector->getDocComment();
- $requires = array();
-
- if ($count = preg_match_all(self::REGEX_REQUIRES_OS, $docComment, $matches)) {
- $requires['OS'] = sprintf(
- '/%s/i',
- addcslashes($matches['value'][$count - 1], '/')
- );
- }
- if ($count = preg_match_all(self::REGEX_REQUIRES_VERSION, $docComment, $matches)) {
- for ($i = 0; $i < $count; $i++) {
- $requires[$matches['name'][$i]] = $matches['value'][$i];
- }
- }
-
- // https://bugs.php.net/bug.php?id=63055
- $matches = array();
-
- if ($count = preg_match_all(self::REGEX_REQUIRES, $docComment, $matches)) {
- for ($i = 0; $i < $count; $i++) {
- $name = $matches['name'][$i] . 's';
- if (!isset($requires[$name])) {
- $requires[$name] = array();
- }
- $requires[$name][] = $matches['value'][$i];
- }
- }
-
- return $requires;
- }
-
- /**
- * Returns the missing requirements for a test.
- *
- * @param string $className
- * @param string $methodName
- *
- * @return array
- *
- * @since Method available since Release 4.3.0
- */
- public static function getMissingRequirements($className, $methodName)
- {
- $required = static::getRequirements($className, $methodName);
- $missing = array();
-
- if (!empty($required['PHP']) && version_compare(PHP_VERSION, $required['PHP'], '<')) {
- $missing[] = sprintf('PHP %s (or later) is required.', $required['PHP']);
- }
-
- if (!empty($required['PHPUnit'])) {
- $phpunitVersion = PHPUnit_Runner_Version::id();
- if (version_compare($phpunitVersion, $required['PHPUnit'], '<')) {
- $missing[] = sprintf('PHPUnit %s (or later) is required.', $required['PHPUnit']);
- }
- }
-
- if (!empty($required['OS']) && !preg_match($required['OS'], PHP_OS)) {
- $missing[] = sprintf('Operating system matching %s is required.', $required['OS']);
- }
-
- if (!empty($required['functions'])) {
- foreach ($required['functions'] as $function) {
- $pieces = explode('::', $function);
- if (2 === count($pieces) && method_exists($pieces[0], $pieces[1])) {
- continue;
- }
- if (function_exists($function)) {
- continue;
- }
- $missing[] = sprintf('Function %s is required.', $function);
- }
- }
-
- if (!empty($required['extensions'])) {
- foreach ($required['extensions'] as $extension) {
- if (!extension_loaded($extension)) {
- $missing[] = sprintf('Extension %s is required.', $extension);
- }
- }
- }
-
- return $missing;
- }
-
- /**
- * Returns the expected exception for a test.
- *
- * @param string $className
- * @param string $methodName
- *
- * @return array
- *
- * @since Method available since Release 3.3.6
- */
- public static function getExpectedException($className, $methodName)
- {
- $reflector = new ReflectionMethod($className, $methodName);
- $docComment = $reflector->getDocComment();
- $docComment = substr($docComment, 3, -2);
-
- if (preg_match(self::REGEX_EXPECTED_EXCEPTION, $docComment, $matches)) {
- $annotations = self::parseTestMethodAnnotations(
- $className,
- $methodName
- );
-
- $class = $matches[1];
- $code = null;
- $message = '';
- $messageRegExp = '';
-
- if (isset($matches[2])) {
- $message = trim($matches[2]);
- } elseif (isset($annotations['method']['expectedExceptionMessage'])) {
- $message = self::parseAnnotationContent(
- $annotations['method']['expectedExceptionMessage'][0]
- );
- }
-
- if (isset($annotations['method']['expectedExceptionMessageRegExp'])) {
- $messageRegExp = self::parseAnnotationContent(
- $annotations['method']['expectedExceptionMessageRegExp'][0]
- );
- }
-
- if (isset($matches[3])) {
- $code = $matches[3];
- } elseif (isset($annotations['method']['expectedExceptionCode'])) {
- $code = self::parseAnnotationContent(
- $annotations['method']['expectedExceptionCode'][0]
- );
- }
-
- if (is_numeric($code)) {
- $code = (int) $code;
- } elseif (is_string($code) && defined($code)) {
- $code = (int) constant($code);
- }
-
- return array(
- 'class' => $class, 'code' => $code, 'message' => $message, 'message_regex' => $messageRegExp
- );
- }
-
- return false;
- }
-
- /**
- * Parse annotation content to use constant/class constant values
- *
- * Constants are specified using a starting '@'. For example: @ClassName::CONST_NAME
- *
- * If the constant is not found the string is used as is to ensure maximum BC.
- *
- * @param string $message
- *
- * @return string
- */
- private static function parseAnnotationContent($message)
- {
- if (strpos($message, '::') !== false && count(explode('::', $message)) == 2) {
- if (defined($message)) {
- $message = constant($message);
- }
- }
-
- return $message;
- }
-
- /**
- * Returns the provided data for a method.
- *
- * @param string $className
- * @param string $methodName
- *
- * @return array|Iterator when a data provider is specified and exists
- * null when no data provider is specified
- *
- * @throws PHPUnit_Framework_Exception
- *
- * @since Method available since Release 3.2.0
- */
- public static function getProvidedData($className, $methodName)
- {
- $reflector = new ReflectionMethod($className, $methodName);
- $docComment = $reflector->getDocComment();
-
- $data = self::getDataFromDataProviderAnnotation($docComment, $className, $methodName);
-
- if ($data === null) {
- $data = self::getDataFromTestWithAnnotation($docComment);
- }
-
- if (is_array($data) && empty($data)) {
- throw new PHPUnit_Framework_SkippedTestError;
- }
-
- if ($data !== null) {
- if (is_object($data)) {
- $data = iterator_to_array($data);
- }
-
- foreach ($data as $key => $value) {
- if (!is_array($value)) {
- throw new PHPUnit_Framework_Exception(
- sprintf(
- 'Data set %s is invalid.',
- is_int($key) ? '#' . $key : '"' . $key . '"'
- )
- );
- }
- }
- }
-
- return $data;
- }
-
- /**
- * Returns the provided data for a method.
- *
- * @param string $docComment
- * @param string $className
- * @param string $methodName
- *
- * @return array|Iterator when a data provider is specified and exists
- * null when no data provider is specified
- *
- * @throws PHPUnit_Framework_Exception
- */
- private static function getDataFromDataProviderAnnotation($docComment, $className, $methodName)
- {
- if (preg_match(self::REGEX_DATA_PROVIDER, $docComment, $matches)) {
- $dataProviderMethodNameNamespace = explode('\\', $matches[1]);
- $leaf = explode('::', array_pop($dataProviderMethodNameNamespace));
- $dataProviderMethodName = array_pop($leaf);
-
- if (!empty($dataProviderMethodNameNamespace)) {
- $dataProviderMethodNameNamespace = implode('\\', $dataProviderMethodNameNamespace) . '\\';
- } else {
- $dataProviderMethodNameNamespace = '';
- }
-
- if (!empty($leaf)) {
- $dataProviderClassName = $dataProviderMethodNameNamespace . array_pop($leaf);
- } else {
- $dataProviderClassName = $className;
- }
-
- $dataProviderClass = new ReflectionClass($dataProviderClassName);
- $dataProviderMethod = $dataProviderClass->getMethod(
- $dataProviderMethodName
- );
-
- if ($dataProviderMethod->isStatic()) {
- $object = null;
- } else {
- $object = $dataProviderClass->newInstance();
- }
-
- if ($dataProviderMethod->getNumberOfParameters() == 0) {
- $data = $dataProviderMethod->invoke($object);
- } else {
- $data = $dataProviderMethod->invoke($object, $methodName);
- }
-
- return $data;
- }
- }
-
- /**
- * @param string $docComment full docComment string
- *
- * @return array when @testWith annotation is defined
- * null when @testWith annotation is omitted
- *
- * @throws PHPUnit_Framework_Exception when @testWith annotation is defined but cannot be parsed
- */
- public static function getDataFromTestWithAnnotation($docComment)
- {
- $docComment = self::cleanUpMultiLineAnnotation($docComment);
-
- if (preg_match(self::REGEX_TEST_WITH, $docComment, $matches, PREG_OFFSET_CAPTURE)) {
- $offset = strlen($matches[0][0]) + $matches[0][1];
- $annotationContent = substr($docComment, $offset);
- $data = array();
-
- foreach (explode("\n", $annotationContent) as $candidateRow) {
- $candidateRow = trim($candidateRow);
-
- if ($candidateRow[0] !== '[') {
- break;
- }
-
- $dataSet = json_decode($candidateRow, true);
-
- if (json_last_error() != JSON_ERROR_NONE) {
- $error = function_exists('json_last_error_msg') ? json_last_error_msg() : json_last_error();
-
- throw new PHPUnit_Framework_Exception(
- 'The dataset for the @testWith annotation cannot be parsed: ' . $error
- );
- }
-
- $data[] = $dataSet;
- }
-
- if (!$data) {
- throw new PHPUnit_Framework_Exception('The dataset for the @testWith annotation cannot be parsed.');
- }
-
- return $data;
- }
- }
-
- private static function cleanUpMultiLineAnnotation($docComment)
- {
- //removing initial ' * ' for docComment
- $docComment = preg_replace('/' . '\n' . '\s*' . '\*' . '\s?' . '/', "\n", $docComment);
- $docComment = substr($docComment, 0, -1);
- $docComment = rtrim($docComment, "\n");
-
- return $docComment;
- }
-
- /**
- * @param string $className
- * @param string $methodName
- *
- * @return array
- *
- * @throws ReflectionException
- *
- * @since Method available since Release 3.4.0
- */
- public static function parseTestMethodAnnotations($className, $methodName = '')
- {
- if (!isset(self::$annotationCache[$className])) {
- $class = new ReflectionClass($className);
- self::$annotationCache[$className] = self::parseAnnotations($class->getDocComment());
- }
-
- if (!empty($methodName) && !isset(self::$annotationCache[$className . '::' . $methodName])) {
- try {
- $method = new ReflectionMethod($className, $methodName);
- $annotations = self::parseAnnotations($method->getDocComment());
- } catch (ReflectionException $e) {
- $annotations = array();
- }
- self::$annotationCache[$className . '::' . $methodName] = $annotations;
- }
-
- return array(
- 'class' => self::$annotationCache[$className],
- 'method' => !empty($methodName) ? self::$annotationCache[$className . '::' . $methodName] : array()
- );
- }
-
- /**
- * @param string $docblock
- *
- * @return array
- *
- * @since Method available since Release 3.4.0
- */
- private static function parseAnnotations($docblock)
- {
- $annotations = array();
- // Strip away the docblock header and footer to ease parsing of one line annotations
- $docblock = substr($docblock, 3, -2);
-
- if (preg_match_all('/@(?P[A-Za-z_-]+)(?:[ \t]+(?P.*?))?[ \t]*\r?$/m', $docblock, $matches)) {
- $numMatches = count($matches[0]);
-
- for ($i = 0; $i < $numMatches; ++$i) {
- $annotations[$matches['name'][$i]][] = $matches['value'][$i];
- }
- }
-
- return $annotations;
- }
-
- /**
- * Returns the backup settings for a test.
- *
- * @param string $className
- * @param string $methodName
- *
- * @return array
- *
- * @since Method available since Release 3.4.0
- */
- public static function getBackupSettings($className, $methodName)
- {
- return array(
- 'backupGlobals' => self::getBooleanAnnotationSetting(
- $className,
- $methodName,
- 'backupGlobals'
- ),
- 'backupStaticAttributes' => self::getBooleanAnnotationSetting(
- $className,
- $methodName,
- 'backupStaticAttributes'
- )
- );
- }
-
- /**
- * Returns the dependencies for a test class or method.
- *
- * @param string $className
- * @param string $methodName
- *
- * @return array
- *
- * @since Method available since Release 3.4.0
- */
- public static function getDependencies($className, $methodName)
- {
- $annotations = self::parseTestMethodAnnotations(
- $className,
- $methodName
- );
-
- $dependencies = array();
-
- if (isset($annotations['class']['depends'])) {
- $dependencies = $annotations['class']['depends'];
- }
-
- if (isset($annotations['method']['depends'])) {
- $dependencies = array_merge(
- $dependencies,
- $annotations['method']['depends']
- );
- }
-
- return array_unique($dependencies);
- }
-
- /**
- * Returns the error handler settings for a test.
- *
- * @param string $className
- * @param string $methodName
- *
- * @return bool
- *
- * @since Method available since Release 3.4.0
- */
- public static function getErrorHandlerSettings($className, $methodName)
- {
- return self::getBooleanAnnotationSetting(
- $className,
- $methodName,
- 'errorHandler'
- );
- }
-
- /**
- * Returns the groups for a test class or method.
- *
- * @param string $className
- * @param string $methodName
- *
- * @return array
- *
- * @since Method available since Release 3.2.0
- */
- public static function getGroups($className, $methodName = '')
- {
- $annotations = self::parseTestMethodAnnotations(
- $className,
- $methodName
- );
-
- $groups = array();
-
- if (isset($annotations['method']['author'])) {
- $groups = $annotations['method']['author'];
- } elseif (isset($annotations['class']['author'])) {
- $groups = $annotations['class']['author'];
- }
-
- if (isset($annotations['class']['group'])) {
- $groups = array_merge($groups, $annotations['class']['group']);
- }
-
- if (isset($annotations['method']['group'])) {
- $groups = array_merge($groups, $annotations['method']['group']);
- }
-
- if (isset($annotations['class']['ticket'])) {
- $groups = array_merge($groups, $annotations['class']['ticket']);
- }
-
- if (isset($annotations['method']['ticket'])) {
- $groups = array_merge($groups, $annotations['method']['ticket']);
- }
-
- foreach (array('method', 'class') as $element) {
- foreach (array('small', 'medium', 'large') as $size) {
- if (isset($annotations[$element][$size])) {
- $groups[] = $size;
- break 2;
- }
-
- if (isset($annotations[$element][$size])) {
- $groups[] = $size;
- break 2;
- }
- }
- }
-
- return array_unique($groups);
- }
-
- /**
- * Returns the size of the test.
- *
- * @param string $className
- * @param string $methodName
- *
- * @return int
- *
- * @since Method available since Release 3.6.0
- */
- public static function getSize($className, $methodName)
- {
- $groups = array_flip(self::getGroups($className, $methodName));
- $size = self::UNKNOWN;
- $class = new ReflectionClass($className);
-
- if (isset($groups['large']) ||
- (class_exists('PHPUnit_Extensions_Database_TestCase', false) &&
- $class->isSubclassOf('PHPUnit_Extensions_Database_TestCase')) ||
- (class_exists('PHPUnit_Extensions_SeleniumTestCase', false) &&
- $class->isSubclassOf('PHPUnit_Extensions_SeleniumTestCase'))) {
- $size = self::LARGE;
- } elseif (isset($groups['medium'])) {
- $size = self::MEDIUM;
- } elseif (isset($groups['small'])) {
- $size = self::SMALL;
- }
-
- return $size;
- }
-
- /**
- * Returns the tickets for a test class or method.
- *
- * @param string $className
- * @param string $methodName
- *
- * @return array
- *
- * @since Method available since Release 3.4.0
- */
- public static function getTickets($className, $methodName)
- {
- $annotations = self::parseTestMethodAnnotations(
- $className,
- $methodName
- );
-
- $tickets = array();
-
- if (isset($annotations['class']['ticket'])) {
- $tickets = $annotations['class']['ticket'];
- }
-
- if (isset($annotations['method']['ticket'])) {
- $tickets = array_merge($tickets, $annotations['method']['ticket']);
- }
-
- return array_unique($tickets);
- }
-
- /**
- * Returns the process isolation settings for a test.
- *
- * @param string $className
- * @param string $methodName
- *
- * @return bool
- *
- * @since Method available since Release 3.4.1
- */
- public static function getProcessIsolationSettings($className, $methodName)
- {
- $annotations = self::parseTestMethodAnnotations(
- $className,
- $methodName
- );
-
- if (isset($annotations['class']['runTestsInSeparateProcesses']) ||
- isset($annotations['method']['runInSeparateProcess'])) {
- return true;
- } else {
- return false;
- }
- }
-
- /**
- * Returns the preserve global state settings for a test.
- *
- * @param string $className
- * @param string $methodName
- *
- * @return bool
- *
- * @since Method available since Release 3.4.0
- */
- public static function getPreserveGlobalStateSettings($className, $methodName)
- {
- return self::getBooleanAnnotationSetting(
- $className,
- $methodName,
- 'preserveGlobalState'
- );
- }
-
- /**
- * @param string $className
- *
- * @return array
- *
- * @since Method available since Release 4.0.8
- */
- public static function getHookMethods($className)
- {
- if (!class_exists($className, false)) {
- return self::emptyHookMethodsArray();
- }
-
- if (!isset(self::$hookMethods[$className])) {
- self::$hookMethods[$className] = self::emptyHookMethodsArray();
-
- try {
- $class = new ReflectionClass($className);
-
- foreach ($class->getMethods() as $method) {
- if (self::isBeforeClassMethod($method)) {
- self::$hookMethods[$className]['beforeClass'][] = $method->getName();
- }
-
- if (self::isBeforeMethod($method)) {
- self::$hookMethods[$className]['before'][] = $method->getName();
- }
-
- if (self::isAfterMethod($method)) {
- self::$hookMethods[$className]['after'][] = $method->getName();
- }
-
- if (self::isAfterClassMethod($method)) {
- self::$hookMethods[$className]['afterClass'][] = $method->getName();
- }
- }
- } catch (ReflectionException $e) {
- }
- }
-
- return self::$hookMethods[$className];
- }
-
- /**
- * @return array
- *
- * @since Method available since Release 4.0.9
- */
- private static function emptyHookMethodsArray()
- {
- return array(
- 'beforeClass' => array('setUpBeforeClass'),
- 'before' => array('setUp'),
- 'after' => array('tearDown'),
- 'afterClass' => array('tearDownAfterClass')
- );
- }
-
- /**
- * @param string $className
- * @param string $methodName
- * @param string $settingName
- *
- * @return bool
- *
- * @since Method available since Release 3.4.0
- */
- private static function getBooleanAnnotationSetting($className, $methodName, $settingName)
- {
- $annotations = self::parseTestMethodAnnotations(
- $className,
- $methodName
- );
-
- $result = null;
-
- if (isset($annotations['class'][$settingName])) {
- if ($annotations['class'][$settingName][0] == 'enabled') {
- $result = true;
- } elseif ($annotations['class'][$settingName][0] == 'disabled') {
- $result = false;
- }
- }
-
- if (isset($annotations['method'][$settingName])) {
- if ($annotations['method'][$settingName][0] == 'enabled') {
- $result = true;
- } elseif ($annotations['method'][$settingName][0] == 'disabled') {
- $result = false;
- }
- }
-
- return $result;
- }
-
- /**
- * @param string $element
- *
- * @return array
- *
- * @throws PHPUnit_Framework_InvalidCoversTargetException
- *
- * @since Method available since Release 4.0.0
- */
- private static function resolveElementToReflectionObjects($element)
- {
- $codeToCoverList = array();
-
- if (strpos($element, '\\') !== false && function_exists($element)) {
- $codeToCoverList[] = new ReflectionFunction($element);
- } elseif (strpos($element, '::') !== false) {
- list($className, $methodName) = explode('::', $element);
-
- if (isset($methodName[0]) && $methodName[0] == '<') {
- $classes = array($className);
-
- foreach ($classes as $className) {
- if (!class_exists($className) &&
- !interface_exists($className)) {
- throw new PHPUnit_Framework_InvalidCoversTargetException(
- sprintf(
- 'Trying to @cover or @use not existing class or ' .
- 'interface "%s".',
- $className
- )
- );
- }
-
- $class = new ReflectionClass($className);
- $methods = $class->getMethods();
- $inverse = isset($methodName[1]) && $methodName[1] == '!';
-
- if (strpos($methodName, 'protected')) {
- $visibility = 'isProtected';
- } elseif (strpos($methodName, 'private')) {
- $visibility = 'isPrivate';
- } elseif (strpos($methodName, 'public')) {
- $visibility = 'isPublic';
- }
-
- foreach ($methods as $method) {
- if ($inverse && !$method->$visibility()) {
- $codeToCoverList[] = $method;
- } elseif (!$inverse && $method->$visibility()) {
- $codeToCoverList[] = $method;
- }
- }
- }
- } else {
- $classes = array($className);
-
- foreach ($classes as $className) {
- if ($className == '' && function_exists($methodName)) {
- $codeToCoverList[] = new ReflectionFunction(
- $methodName
- );
- } else {
- if (!((class_exists($className) ||
- interface_exists($className) ||
- trait_exists($className)) &&
- method_exists($className, $methodName))) {
- throw new PHPUnit_Framework_InvalidCoversTargetException(
- sprintf(
- 'Trying to @cover or @use not existing method "%s::%s".',
- $className,
- $methodName
- )
- );
- }
-
- $codeToCoverList[] = new ReflectionMethod(
- $className,
- $methodName
- );
- }
- }
- }
- } else {
- $extended = false;
-
- if (strpos($element, '') !== false) {
- $element = str_replace('', '', $element);
- $extended = true;
- }
-
- $classes = array($element);
-
- if ($extended) {
- $classes = array_merge(
- $classes,
- class_implements($element),
- class_parents($element)
- );
- }
-
- foreach ($classes as $className) {
- if (!class_exists($className) &&
- !interface_exists($className) &&
- !trait_exists($className)) {
- throw new PHPUnit_Framework_InvalidCoversTargetException(
- sprintf(
- 'Trying to @cover or @use not existing class or ' .
- 'interface "%s".',
- $className
- )
- );
- }
-
- $codeToCoverList[] = new ReflectionClass($className);
- }
- }
-
- return $codeToCoverList;
- }
-
- /**
- * @param array $reflectors
- *
- * @return array
- */
- private static function resolveReflectionObjectsToLines(array $reflectors)
- {
- $result = array();
-
- foreach ($reflectors as $reflector) {
- $filename = $reflector->getFileName();
-
- if (!isset($result[$filename])) {
- $result[$filename] = array();
- }
-
- $result[$filename] = array_unique(
- array_merge(
- $result[$filename],
- range($reflector->getStartLine(), $reflector->getEndLine())
- )
- );
- }
-
- return $result;
- }
-
- /**
- * @param ReflectionMethod $method
- *
- * @return bool
- *
- * @since Method available since Release 4.0.8
- */
- private static function isBeforeClassMethod(ReflectionMethod $method)
- {
- return $method->isStatic() && strpos($method->getDocComment(), '@beforeClass') !== false;
- }
-
- /**
- * @param ReflectionMethod $method
- *
- * @return bool
- *
- * @since Method available since Release 4.0.8
- */
- private static function isBeforeMethod(ReflectionMethod $method)
- {
- return preg_match('/@before\b/', $method->getDocComment());
- }
-
- /**
- * @param ReflectionMethod $method
- *
- * @return bool
- *
- * @since Method available since Release 4.0.8
- */
- private static function isAfterClassMethod(ReflectionMethod $method)
- {
- return $method->isStatic() && strpos($method->getDocComment(), '@afterClass') !== false;
- }
-
- /**
- * @param ReflectionMethod $method
- *
- * @return bool
- *
- * @since Method available since Release 4.0.8
- */
- private static function isAfterMethod(ReflectionMethod $method)
- {
- return preg_match('/@after\b/', $method->getDocComment());
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php b/vendor/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php
deleted file mode 100644
index e452ef99..00000000
--- a/vendor/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php
+++ /dev/null
@@ -1,140 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Prettifies class and method names for use in TestDox documentation.
- *
- * @since Class available since Release 2.1.0
- */
-class PHPUnit_Util_TestDox_NamePrettifier
-{
- /**
- * @var string
- */
- protected $prefix = 'Test';
-
- /**
- * @var string
- */
- protected $suffix = 'Test';
-
- /**
- * @var array
- */
- protected $strings = array();
-
- /**
- * Prettifies the name of a test class.
- *
- * @param string $name
- *
- * @return string
- */
- public function prettifyTestClass($name)
- {
- $title = $name;
-
- if ($this->suffix !== null &&
- $this->suffix == substr($name, -1 * strlen($this->suffix))) {
- $title = substr($title, 0, strripos($title, $this->suffix));
- }
-
- if ($this->prefix !== null &&
- $this->prefix == substr($name, 0, strlen($this->prefix))) {
- $title = substr($title, strlen($this->prefix));
- }
-
- if (substr($title, 0, 1) == '\\') {
- $title = substr($title, 1);
- }
-
- return $title;
- }
-
- /**
- * Prettifies the name of a test method.
- *
- * @param string $name
- *
- * @return string
- */
- public function prettifyTestMethod($name)
- {
- $buffer = '';
-
- if (!is_string($name) || strlen($name) == 0) {
- return $buffer;
- }
-
- $string = preg_replace('#\d+$#', '', $name, -1, $count);
-
- if (in_array($string, $this->strings)) {
- $name = $string;
- } elseif ($count == 0) {
- $this->strings[] = $string;
- }
-
- if (substr($name, 0, 4) == 'test') {
- $name = substr($name, 4);
- }
-
- $name[0] = strtoupper($name[0]);
-
- if (strpos($name, '_') !== false) {
- return trim(str_replace('_', ' ', $name));
- }
-
- $max = strlen($name);
- $wasNumeric = false;
-
- for ($i = 0; $i < $max; $i++) {
- if ($i > 0 &&
- ord($name[$i]) >= 65 &&
- ord($name[$i]) <= 90) {
- $buffer .= ' ' . strtolower($name[$i]);
- } else {
- $isNumeric = is_numeric($name[$i]);
-
- if (!$wasNumeric && $isNumeric) {
- $buffer .= ' ';
- $wasNumeric = true;
- }
-
- if ($wasNumeric && !$isNumeric) {
- $wasNumeric = false;
- }
-
- $buffer .= $name[$i];
- }
- }
-
- return $buffer;
- }
-
- /**
- * Sets the prefix of test names.
- *
- * @param string $prefix
- */
- public function setPrefix($prefix)
- {
- $this->prefix = $prefix;
- }
-
- /**
- * Sets the suffix of test names.
- *
- * @param string $suffix
- */
- public function setSuffix($suffix)
- {
- $this->suffix = $suffix;
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php b/vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php
deleted file mode 100644
index 8511c2da..00000000
--- a/vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php
+++ /dev/null
@@ -1,339 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Base class for printers of TestDox documentation.
- *
- * @since Class available since Release 2.1.0
- */
-abstract class PHPUnit_Util_TestDox_ResultPrinter extends PHPUnit_Util_Printer implements PHPUnit_Framework_TestListener
-{
- /**
- * @var PHPUnit_Util_TestDox_NamePrettifier
- */
- protected $prettifier;
-
- /**
- * @var string
- */
- protected $testClass = '';
-
- /**
- * @var int
- */
- protected $testStatus = false;
-
- /**
- * @var array
- */
- protected $tests = array();
-
- /**
- * @var int
- */
- protected $successful = 0;
-
- /**
- * @var int
- */
- protected $failed = 0;
-
- /**
- * @var int
- */
- protected $risky = 0;
-
- /**
- * @var int
- */
- protected $skipped = 0;
-
- /**
- * @var int
- */
- protected $incomplete = 0;
-
- /**
- * @var string
- */
- protected $currentTestClassPrettified;
-
- /**
- * @var string
- */
- protected $currentTestMethodPrettified;
-
- /**
- * Constructor.
- *
- * @param resource $out
- */
- public function __construct($out = null)
- {
- parent::__construct($out);
-
- $this->prettifier = new PHPUnit_Util_TestDox_NamePrettifier;
- $this->startRun();
- }
-
- /**
- * Flush buffer and close output.
- */
- public function flush()
- {
- $this->doEndClass();
- $this->endRun();
-
- parent::flush();
- }
-
- /**
- * An error occurred.
- *
- * @param PHPUnit_Framework_Test $test
- * @param Exception $e
- * @param float $time
- */
- public function addError(PHPUnit_Framework_Test $test, Exception $e, $time)
- {
- if (!$this->isOfInterest($test)) {
- return;
- }
-
- $this->testStatus = PHPUnit_Runner_BaseTestRunner::STATUS_ERROR;
- $this->failed++;
- }
-
- /**
- * A failure occurred.
- *
- * @param PHPUnit_Framework_Test $test
- * @param PHPUnit_Framework_AssertionFailedError $e
- * @param float $time
- */
- public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time)
- {
- if (!$this->isOfInterest($test)) {
- return;
- }
-
- $this->testStatus = PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE;
- $this->failed++;
- }
-
- /**
- * Incomplete test.
- *
- * @param PHPUnit_Framework_Test $test
- * @param Exception $e
- * @param float $time
- */
- public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time)
- {
- if (!$this->isOfInterest($test)) {
- return;
- }
-
- $this->testStatus = PHPUnit_Runner_BaseTestRunner::STATUS_INCOMPLETE;
- $this->incomplete++;
- }
-
- /**
- * Risky test.
- *
- * @param PHPUnit_Framework_Test $test
- * @param Exception $e
- * @param float $time
- *
- * @since Method available since Release 4.0.0
- */
- public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time)
- {
- if (!$this->isOfInterest($test)) {
- return;
- }
-
- $this->testStatus = PHPUnit_Runner_BaseTestRunner::STATUS_RISKY;
- $this->risky++;
- }
-
- /**
- * Skipped test.
- *
- * @param PHPUnit_Framework_Test $test
- * @param Exception $e
- * @param float $time
- *
- * @since Method available since Release 3.0.0
- */
- public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time)
- {
- if (!$this->isOfInterest($test)) {
- return;
- }
-
- $this->testStatus = PHPUnit_Runner_BaseTestRunner::STATUS_SKIPPED;
- $this->skipped++;
- }
-
- /**
- * A testsuite started.
- *
- * @param PHPUnit_Framework_TestSuite $suite
- *
- * @since Method available since Release 2.2.0
- */
- public function startTestSuite(PHPUnit_Framework_TestSuite $suite)
- {
- }
-
- /**
- * A testsuite ended.
- *
- * @param PHPUnit_Framework_TestSuite $suite
- *
- * @since Method available since Release 2.2.0
- */
- public function endTestSuite(PHPUnit_Framework_TestSuite $suite)
- {
- }
-
- /**
- * A test started.
- *
- * @param PHPUnit_Framework_Test $test
- */
- public function startTest(PHPUnit_Framework_Test $test)
- {
- if (!$this->isOfInterest($test)) {
- return;
- }
-
- $class = get_class($test);
-
- if ($this->testClass != $class) {
- if ($this->testClass != '') {
- $this->doEndClass();
- }
-
- $this->currentTestClassPrettified = $this->prettifier->prettifyTestClass($class);
- $this->startClass($class);
-
- $this->testClass = $class;
- $this->tests = array();
- }
-
- $prettified = false;
-
- $annotations = $test->getAnnotations();
-
- if (isset($annotations['method']['testdox'][0])) {
- $this->currentTestMethodPrettified = $annotations['method']['testdox'][0];
- $prettified = true;
- }
-
- if (!$prettified) {
- $this->currentTestMethodPrettified = $this->prettifier->prettifyTestMethod($test->getName(false));
- }
-
- $this->testStatus = PHPUnit_Runner_BaseTestRunner::STATUS_PASSED;
- }
-
- /**
- * A test ended.
- *
- * @param PHPUnit_Framework_Test $test
- * @param float $time
- */
- public function endTest(PHPUnit_Framework_Test $test, $time)
- {
- if (!$this->isOfInterest($test)) {
- return;
- }
-
- if (!isset($this->tests[$this->currentTestMethodPrettified])) {
- if ($this->testStatus == PHPUnit_Runner_BaseTestRunner::STATUS_PASSED) {
- $this->tests[$this->currentTestMethodPrettified]['success'] = 1;
- $this->tests[$this->currentTestMethodPrettified]['failure'] = 0;
- } else {
- $this->tests[$this->currentTestMethodPrettified]['success'] = 0;
- $this->tests[$this->currentTestMethodPrettified]['failure'] = 1;
- }
- } else {
- if ($this->testStatus == PHPUnit_Runner_BaseTestRunner::STATUS_PASSED) {
- $this->tests[$this->currentTestMethodPrettified]['success']++;
- } else {
- $this->tests[$this->currentTestMethodPrettified]['failure']++;
- }
- }
-
- $this->currentTestClassPrettified = null;
- $this->currentTestMethodPrettified = null;
- }
-
- /**
- * @since Method available since Release 2.3.0
- */
- protected function doEndClass()
- {
- foreach ($this->tests as $name => $data) {
- $this->onTest($name, $data['failure'] == 0);
- }
-
- $this->endClass($this->testClass);
- }
-
- /**
- * Handler for 'start run' event.
- */
- protected function startRun()
- {
- }
-
- /**
- * Handler for 'start class' event.
- *
- * @param string $name
- */
- protected function startClass($name)
- {
- }
-
- /**
- * Handler for 'on test' event.
- *
- * @param string $name
- * @param bool $success
- */
- protected function onTest($name, $success = true)
- {
- }
-
- /**
- * Handler for 'end class' event.
- *
- * @param string $name
- */
- protected function endClass($name)
- {
- }
-
- /**
- * Handler for 'end run' event.
- */
- protected function endRun()
- {
- }
-
- private function isOfInterest(PHPUnit_Framework_Test $test)
- {
- return $test instanceof PHPUnit_Framework_TestCase && get_class($test) != 'PHPUnit_Framework_Warning';
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter/HTML.php b/vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter/HTML.php
deleted file mode 100644
index 6919eafe..00000000
--- a/vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter/HTML.php
+++ /dev/null
@@ -1,80 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Prints TestDox documentation in HTML format.
- *
- * @since Class available since Release 2.1.0
- */
-class PHPUnit_Util_TestDox_ResultPrinter_HTML extends PHPUnit_Util_TestDox_ResultPrinter
-{
- /**
- * @var bool
- */
- protected $printsHTML = true;
-
- /**
- * Handler for 'start run' event.
- */
- protected function startRun()
- {
- $this->write('');
- }
-
- /**
- * Handler for 'start class' event.
- *
- * @param string $name
- */
- protected function startClass($name)
- {
- $this->write(
- '' . $this->currentTestClassPrettified .
- '
'
- );
- }
-
- /**
- * Handler for 'on test' event.
- *
- * @param string $name
- * @param bool $success
- */
- protected function onTest($name, $success = true)
- {
- if (!$success) {
- $strikeOpen = '';
- $strikeClose = '';
- } else {
- $strikeOpen = '';
- $strikeClose = '';
- }
-
- $this->write('- ' . $strikeOpen . $name . $strikeClose . '
');
- }
-
- /**
- * Handler for 'end class' event.
- *
- * @param string $name
- */
- protected function endClass($name)
- {
- $this->write('
');
- }
-
- /**
- * Handler for 'end run' event.
- */
- protected function endRun()
- {
- $this->write('');
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter/Text.php b/vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter/Text.php
deleted file mode 100644
index 0ea48b19..00000000
--- a/vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter/Text.php
+++ /dev/null
@@ -1,54 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Prints TestDox documentation in text format.
- *
- * @since Class available since Release 2.1.0
- */
-class PHPUnit_Util_TestDox_ResultPrinter_Text extends PHPUnit_Util_TestDox_ResultPrinter
-{
- /**
- * Handler for 'start class' event.
- *
- * @param string $name
- */
- protected function startClass($name)
- {
- $this->write($this->currentTestClassPrettified . "\n");
- }
-
- /**
- * Handler for 'on test' event.
- *
- * @param string $name
- * @param bool $success
- */
- protected function onTest($name, $success = true)
- {
- if ($success) {
- $this->write(' [x] ');
- } else {
- $this->write(' [ ] ');
- }
-
- $this->write($name . "\n");
- }
-
- /**
- * Handler for 'end class' event.
- *
- * @param string $name
- */
- protected function endClass($name)
- {
- $this->write("\n");
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Util/TestSuiteIterator.php b/vendor/phpunit/phpunit/src/Util/TestSuiteIterator.php
deleted file mode 100644
index edf7b951..00000000
--- a/vendor/phpunit/phpunit/src/Util/TestSuiteIterator.php
+++ /dev/null
@@ -1,103 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Iterator for test suites.
- *
- * @since Class available since Release 3.1.0
- */
-class PHPUnit_Util_TestSuiteIterator implements RecursiveIterator
-{
- /**
- * @var int
- */
- protected $position;
-
- /**
- * @var PHPUnit_Framework_Test[]
- */
- protected $tests;
-
- /**
- * @param PHPUnit_Framework_TestSuite $testSuite
- */
- public function __construct(PHPUnit_Framework_TestSuite $testSuite)
- {
- $this->tests = $testSuite->tests();
- }
-
- /**
- * Rewinds the Iterator to the first element.
- */
- public function rewind()
- {
- $this->position = 0;
- }
-
- /**
- * Checks if there is a current element after calls to rewind() or next().
- *
- * @return bool
- */
- public function valid()
- {
- return $this->position < count($this->tests);
- }
-
- /**
- * Returns the key of the current element.
- *
- * @return int
- */
- public function key()
- {
- return $this->position;
- }
-
- /**
- * Returns the current element.
- *
- * @return PHPUnit_Framework_Test
- */
- public function current()
- {
- return $this->valid() ? $this->tests[$this->position] : null;
- }
-
- /**
- * Moves forward to next element.
- */
- public function next()
- {
- $this->position++;
- }
-
- /**
- * Returns the sub iterator for the current element.
- *
- * @return PHPUnit_Util_TestSuiteIterator
- */
- public function getChildren()
- {
- return new self(
- $this->tests[$this->position]
- );
- }
-
- /**
- * Checks whether the current element has children.
- *
- * @return bool
- */
- public function hasChildren()
- {
- return $this->tests[$this->position] instanceof PHPUnit_Framework_TestSuite;
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Util/Type.php b/vendor/phpunit/phpunit/src/Util/Type.php
deleted file mode 100644
index 1eb851a5..00000000
--- a/vendor/phpunit/phpunit/src/Util/Type.php
+++ /dev/null
@@ -1,38 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Utility class for textual type (and value) representation.
- *
- * @since Class available since Release 3.0.0
- */
-class PHPUnit_Util_Type
-{
- public static function isType($type)
- {
- return in_array(
- $type,
- array(
- 'numeric',
- 'integer',
- 'int',
- 'float',
- 'string',
- 'boolean',
- 'bool',
- 'null',
- 'array',
- 'object',
- 'resource',
- 'scalar'
- )
- );
- }
-}
diff --git a/vendor/phpunit/phpunit/src/Util/XML.php b/vendor/phpunit/phpunit/src/Util/XML.php
deleted file mode 100644
index c73438f2..00000000
--- a/vendor/phpunit/phpunit/src/Util/XML.php
+++ /dev/null
@@ -1,946 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * XML helpers.
- *
- * @since Class available since Release 3.2.0
- */
-class PHPUnit_Util_XML
-{
- /**
- * Escapes a string for the use in XML documents
- * Any Unicode character is allowed, excluding the surrogate blocks, FFFE,
- * and FFFF (not even as character reference).
- * See http://www.w3.org/TR/xml/#charsets
- *
- * @param string $string
- *
- * @return string
- *
- * @since Method available since Release 3.4.6
- */
- public static function prepareString($string)
- {
- return preg_replace(
- '/[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]/',
- '',
- htmlspecialchars(
- PHPUnit_Util_String::convertToUtf8($string),
- ENT_QUOTES,
- 'UTF-8'
- )
- );
- }
-
- /**
- * Loads an XML (or HTML) file into a DOMDocument object.
- *
- * @param string $filename
- * @param bool $isHtml
- * @param bool $xinclude
- * @param bool $strict
- *
- * @return DOMDocument
- *
- * @since Method available since Release 3.3.0
- */
- public static function loadFile($filename, $isHtml = false, $xinclude = false, $strict = false)
- {
- $reporting = error_reporting(0);
- $contents = file_get_contents($filename);
- error_reporting($reporting);
-
- if ($contents === false) {
- throw new PHPUnit_Framework_Exception(
- sprintf(
- 'Could not read "%s".',
- $filename
- )
- );
- }
-
- return self::load($contents, $isHtml, $filename, $xinclude, $strict);
- }
-
- /**
- * Load an $actual document into a DOMDocument. This is called
- * from the selector assertions.
- *
- * If $actual is already a DOMDocument, it is returned with
- * no changes. Otherwise, $actual is loaded into a new DOMDocument
- * as either HTML or XML, depending on the value of $isHtml. If $isHtml is
- * false and $xinclude is true, xinclude is performed on the loaded
- * DOMDocument.
- *
- * Note: prior to PHPUnit 3.3.0, this method loaded a file and
- * not a string as it currently does. To load a file into a
- * DOMDocument, use loadFile() instead.
- *
- * @param string|DOMDocument $actual
- * @param bool $isHtml
- * @param string $filename
- * @param bool $xinclude
- * @param bool $strict
- *
- * @return DOMDocument
- *
- * @since Method available since Release 3.3.0
- */
- public static function load($actual, $isHtml = false, $filename = '', $xinclude = false, $strict = false)
- {
- if ($actual instanceof DOMDocument) {
- return $actual;
- }
-
- if (!is_string($actual)) {
- throw new PHPUnit_Framework_Exception('Could not load XML from ' . gettype($actual));
- }
-
- if ($actual === '') {
- throw new PHPUnit_Framework_Exception('Could not load XML from empty string');
- }
-
- // Required for XInclude on Windows.
- if ($xinclude) {
- $cwd = getcwd();
- @chdir(dirname($filename));
- }
-
- $document = new DOMDocument;
- $document->preserveWhiteSpace = false;
-
- $internal = libxml_use_internal_errors(true);
- $message = '';
- $reporting = error_reporting(0);
-
- if ('' !== $filename) {
- // Necessary for xinclude
- $document->documentURI = $filename;
- }
-
- if ($isHtml) {
- $loaded = $document->loadHTML($actual);
- } else {
- $loaded = $document->loadXML($actual);
- }
-
- if (!$isHtml && $xinclude) {
- $document->xinclude();
- }
-
- foreach (libxml_get_errors() as $error) {
- $message .= "\n" . $error->message;
- }
-
- libxml_use_internal_errors($internal);
- error_reporting($reporting);
-
- if ($xinclude) {
- @chdir($cwd);
- }
-
- if ($loaded === false || ($strict && $message !== '')) {
- if ($filename !== '') {
- throw new PHPUnit_Framework_Exception(
- sprintf(
- 'Could not load "%s".%s',
- $filename,
- $message != '' ? "\n" . $message : ''
- )
- );
- } else {
- if ($message === '') {
- $message = 'Could not load XML for unknown reason';
- }
- throw new PHPUnit_Framework_Exception($message);
- }
- }
-
- return $document;
- }
-
- /**
- * @param DOMNode $node
- *
- * @return string
- *
- * @since Method available since Release 3.4.0
- */
- public static function nodeToText(DOMNode $node)
- {
- if ($node->childNodes->length == 1) {
- return $node->textContent;
- }
-
- $result = '';
-
- foreach ($node->childNodes as $childNode) {
- $result .= $node->ownerDocument->saveXML($childNode);
- }
-
- return $result;
- }
-
- /**
- * @param DOMNode $node
- *
- * @since Method available since Release 3.3.0
- */
- public static function removeCharacterDataNodes(DOMNode $node)
- {
- if ($node->hasChildNodes()) {
- for ($i = $node->childNodes->length - 1; $i >= 0; $i--) {
- if (($child = $node->childNodes->item($i)) instanceof DOMCharacterData) {
- $node->removeChild($child);
- }
- }
- }
- }
-
- /**
- * "Convert" a DOMElement object into a PHP variable.
- *
- * @param DOMElement $element
- *
- * @return mixed
- *
- * @since Method available since Release 3.4.0
- */
- public static function xmlToVariable(DOMElement $element)
- {
- $variable = null;
-
- switch ($element->tagName) {
- case 'array':
- $variable = array();
-
- foreach ($element->childNodes as $entry) {
- if (!$entry instanceof DOMElement || $entry->tagName !== 'element') {
- continue;
- }
- $item = $entry->childNodes->item(0);
-
- if ($item instanceof DOMText) {
- $item = $entry->childNodes->item(1);
- }
-
- $value = self::xmlToVariable($item);
-
- if ($entry->hasAttribute('key')) {
- $variable[(string) $entry->getAttribute('key')] = $value;
- } else {
- $variable[] = $value;
- }
- }
- break;
-
- case 'object':
- $className = $element->getAttribute('class');
-
- if ($element->hasChildNodes()) {
- $arguments = $element->childNodes->item(1)->childNodes;
- $constructorArgs = array();
-
- foreach ($arguments as $argument) {
- if ($argument instanceof DOMElement) {
- $constructorArgs[] = self::xmlToVariable($argument);
- }
- }
-
- $class = new ReflectionClass($className);
- $variable = $class->newInstanceArgs($constructorArgs);
- } else {
- $variable = new $className;
- }
- break;
-
- case 'boolean':
- $variable = $element->textContent == 'true' ? true : false;
- break;
-
- case 'integer':
- case 'double':
- case 'string':
- $variable = $element->textContent;
-
- settype($variable, $element->tagName);
- break;
- }
-
- return $variable;
- }
-
- /**
- * Validate list of keys in the associative array.
- *
- * @param array $hash
- * @param array $validKeys
- *
- * @return array
- *
- * @throws PHPUnit_Framework_Exception
- *
- * @since Method available since Release 3.3.0
- */
- public static function assertValidKeys(array $hash, array $validKeys)
- {
- $valids = array();
-
- // Normalize validation keys so that we can use both indexed and
- // associative arrays.
- foreach ($validKeys as $key => $val) {
- is_int($key) ? $valids[$val] = null : $valids[$key] = $val;
- }
-
- $validKeys = array_keys($valids);
-
- // Check for invalid keys.
- foreach ($hash as $key => $value) {
- if (!in_array($key, $validKeys)) {
- $unknown[] = $key;
- }
- }
-
- if (!empty($unknown)) {
- throw new PHPUnit_Framework_Exception(
- 'Unknown key(s): ' . implode(', ', $unknown)
- );
- }
-
- // Add default values for any valid keys that are empty.
- foreach ($valids as $key => $value) {
- if (!isset($hash[$key])) {
- $hash[$key] = $value;
- }
- }
-
- return $hash;
- }
-
- /**
- * Parse a CSS selector into an associative array suitable for
- * use with findNodes().
- *
- * @param string $selector
- * @param mixed $content
- *
- * @return array
- *
- * @since Method available since Release 3.3.0
- */
- public static function convertSelectToTag($selector, $content = true)
- {
- $selector = trim(preg_replace("/\s+/", ' ', $selector));
-
- // substitute spaces within attribute value
- while (preg_match('/\[[^\]]+"[^"]+\s[^"]+"\]/', $selector)) {
- $selector = preg_replace(
- '/(\[[^\]]+"[^"]+)\s([^"]+"\])/',
- '$1__SPACE__$2',
- $selector
- );
- }
-
- if (strstr($selector, ' ')) {
- $elements = explode(' ', $selector);
- } else {
- $elements = array($selector);
- }
-
- $previousTag = array();
-
- foreach (array_reverse($elements) as $element) {
- $element = str_replace('__SPACE__', ' ', $element);
-
- // child selector
- if ($element == '>') {
- $previousTag = array('child' => $previousTag['descendant']);
- continue;
- }
-
- // adjacent-sibling selector
- if ($element == '+') {
- $previousTag = array('adjacent-sibling' => $previousTag['descendant']);
- continue;
- }
-
- $tag = array();
-
- // match element tag
- preg_match("/^([^\.#\[]*)/", $element, $eltMatches);
-
- if (!empty($eltMatches[1])) {
- $tag['tag'] = $eltMatches[1];
- }
-
- // match attributes (\[[^\]]*\]*), ids (#[^\.#\[]*),
- // and classes (\.[^\.#\[]*))
- preg_match_all(
- "/(\[[^\]]*\]*|#[^\.#\[]*|\.[^\.#\[]*)/",
- $element,
- $matches
- );
-
- if (!empty($matches[1])) {
- $classes = array();
- $attrs = array();
-
- foreach ($matches[1] as $match) {
- // id matched
- if (substr($match, 0, 1) == '#') {
- $tag['id'] = substr($match, 1);
- } // class matched
- elseif (substr($match, 0, 1) == '.') {
- $classes[] = substr($match, 1);
- } // attribute matched
- elseif (substr($match, 0, 1) == '[' &&
- substr($match, -1, 1) == ']') {
- $attribute = substr($match, 1, strlen($match) - 2);
- $attribute = str_replace('"', '', $attribute);
-
- // match single word
- if (strstr($attribute, '~=')) {
- list($key, $value) = explode('~=', $attribute);
- $value = "regexp:/.*\b$value\b.*/";
- } // match substring
- elseif (strstr($attribute, '*=')) {
- list($key, $value) = explode('*=', $attribute);
- $value = "regexp:/.*$value.*/";
- } // exact match
- else {
- list($key, $value) = explode('=', $attribute);
- }
-
- $attrs[$key] = $value;
- }
- }
-
- if (!empty($classes)) {
- $tag['class'] = implode(' ', $classes);
- }
-
- if (!empty($attrs)) {
- $tag['attributes'] = $attrs;
- }
- }
-
- // tag content
- if (is_string($content)) {
- $tag['content'] = $content;
- }
-
- // determine previous child/descendants
- if (!empty($previousTag['descendant'])) {
- $tag['descendant'] = $previousTag['descendant'];
- } elseif (!empty($previousTag['child'])) {
- $tag['child'] = $previousTag['child'];
- } elseif (!empty($previousTag['adjacent-sibling'])) {
- $tag['adjacent-sibling'] = $previousTag['adjacent-sibling'];
- unset($tag['content']);
- }
-
- $previousTag = array('descendant' => $tag);
- }
-
- return $tag;
- }
-
- /**
- * Parse an $actual document and return an array of DOMNodes
- * matching the CSS $selector. If an error occurs, it will
- * return false.
- *
- * To only return nodes containing a certain content, give
- * the $content to match as a string. Otherwise, setting
- * $content to true will return all nodes matching $selector.
- *
- * The $actual document may be a DOMDocument or a string
- * containing XML or HTML, identified by $isHtml.
- *
- * @param array $selector
- * @param string $content
- * @param mixed $actual
- * @param bool $isHtml
- *
- * @return bool|array
- *
- * @since Method available since Release 3.3.0
- */
- public static function cssSelect($selector, $content, $actual, $isHtml = true)
- {
- $matcher = self::convertSelectToTag($selector, $content);
- $dom = self::load($actual, $isHtml);
- $tags = self::findNodes($dom, $matcher, $isHtml);
-
- return $tags;
- }
-
- /**
- * Parse out the options from the tag using DOM object tree.
- *
- * @param DOMDocument $dom
- * @param array $options
- * @param bool $isHtml
- *
- * @return array
- *
- * @since Method available since Release 3.3.0
- */
- public static function findNodes(DOMDocument $dom, array $options, $isHtml = true)
- {
- $valid = array(
- 'id', 'class', 'tag', 'content', 'attributes', 'parent',
- 'child', 'ancestor', 'descendant', 'children', 'adjacent-sibling'
- );
-
- $filtered = array();
- $options = self::assertValidKeys($options, $valid);
-
- // find the element by id
- if ($options['id']) {
- $options['attributes']['id'] = $options['id'];
- }
-
- if ($options['class']) {
- $options['attributes']['class'] = $options['class'];
- }
-
- $nodes = array();
-
- // find the element by a tag type
- if ($options['tag']) {
- if ($isHtml) {
- $elements = self::getElementsByCaseInsensitiveTagName(
- $dom,
- $options['tag']
- );
- } else {
- $elements = $dom->getElementsByTagName($options['tag']);
- }
-
- foreach ($elements as $element) {
- $nodes[] = $element;
- }
-
- if (empty($nodes)) {
- return false;
- }
- } // no tag selected, get them all
- else {
- $tags = array(
- 'a', 'abbr', 'acronym', 'address', 'area', 'b', 'base', 'bdo',
- 'big', 'blockquote', 'body', 'br', 'button', 'caption', 'cite',
- 'code', 'col', 'colgroup', 'dd', 'del', 'div', 'dfn', 'dl',
- 'dt', 'em', 'fieldset', 'form', 'frame', 'frameset', 'h1', 'h2',
- 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'html', 'i', 'iframe',
- 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'link',
- 'map', 'meta', 'noframes', 'noscript', 'object', 'ol', 'optgroup',
- 'option', 'p', 'param', 'pre', 'q', 'samp', 'script', 'select',
- 'small', 'span', 'strong', 'style', 'sub', 'sup', 'table',
- 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'title',
- 'tr', 'tt', 'ul', 'var',
- // HTML5
- 'article', 'aside', 'audio', 'bdi', 'canvas', 'command',
- 'datalist', 'details', 'dialog', 'embed', 'figure', 'figcaption',
- 'footer', 'header', 'hgroup', 'keygen', 'mark', 'meter', 'nav',
- 'output', 'progress', 'ruby', 'rt', 'rp', 'track', 'section',
- 'source', 'summary', 'time', 'video', 'wbr'
- );
-
- foreach ($tags as $tag) {
- if ($isHtml) {
- $elements = self::getElementsByCaseInsensitiveTagName(
- $dom,
- $tag
- );
- } else {
- $elements = $dom->getElementsByTagName($tag);
- }
-
- foreach ($elements as $element) {
- $nodes[] = $element;
- }
- }
-
- if (empty($nodes)) {
- return false;
- }
- }
-
- // filter by attributes
- if ($options['attributes']) {
- foreach ($nodes as $node) {
- $invalid = false;
-
- foreach ($options['attributes'] as $name => $value) {
- // match by regexp if like "regexp:/foo/i"
- if (preg_match('/^regexp\s*:\s*(.*)/i', $value, $matches)) {
- if (!preg_match($matches[1], $node->getAttribute($name))) {
- $invalid = true;
- }
- } // class can match only a part
- elseif ($name == 'class') {
- // split to individual classes
- $findClasses = explode(
- ' ',
- preg_replace("/\s+/", ' ', $value)
- );
-
- $allClasses = explode(
- ' ',
- preg_replace("/\s+/", ' ', $node->getAttribute($name))
- );
-
- // make sure each class given is in the actual node
- foreach ($findClasses as $findClass) {
- if (!in_array($findClass, $allClasses)) {
- $invalid = true;
- }
- }
- } // match by exact string
- else {
- if ($node->getAttribute($name) != $value) {
- $invalid = true;
- }
- }
- }
-
- // if every attribute given matched
- if (!$invalid) {
- $filtered[] = $node;
- }
- }
-
- $nodes = $filtered;
- $filtered = array();
-
- if (empty($nodes)) {
- return false;
- }
- }
-
- // filter by content
- if ($options['content'] !== null) {
- foreach ($nodes as $node) {
- $invalid = false;
-
- // match by regexp if like "regexp:/foo/i"
- if (preg_match('/^regexp\s*:\s*(.*)/i', $options['content'], $matches)) {
- if (!preg_match($matches[1], self::getNodeText($node))) {
- $invalid = true;
- }
- } // match empty string
- elseif ($options['content'] === '') {
- if (self::getNodeText($node) !== '') {
- $invalid = true;
- }
- } // match by exact string
- elseif (strstr(self::getNodeText($node), $options['content']) === false) {
- $invalid = true;
- }
-
- if (!$invalid) {
- $filtered[] = $node;
- }
- }
-
- $nodes = $filtered;
- $filtered = array();
-
- if (empty($nodes)) {
- return false;
- }
- }
-
- // filter by parent node
- if ($options['parent']) {
- $parentNodes = self::findNodes($dom, $options['parent'], $isHtml);
- $parentNode = isset($parentNodes[0]) ? $parentNodes[0] : null;
-
- foreach ($nodes as $node) {
- if ($parentNode !== $node->parentNode) {
- continue;
- }
-
- $filtered[] = $node;
- }
-
- $nodes = $filtered;
- $filtered = array();
-
- if (empty($nodes)) {
- return false;
- }
- }
-
- // filter by child node
- if ($options['child']) {
- $childNodes = self::findNodes($dom, $options['child'], $isHtml);
- $childNodes = !empty($childNodes) ? $childNodes : array();
-
- foreach ($nodes as $node) {
- foreach ($node->childNodes as $child) {
- foreach ($childNodes as $childNode) {
- if ($childNode === $child) {
- $filtered[] = $node;
- }
- }
- }
- }
-
- $nodes = $filtered;
- $filtered = array();
-
- if (empty($nodes)) {
- return false;
- }
- }
-
- // filter by adjacent-sibling
- if ($options['adjacent-sibling']) {
- $adjacentSiblingNodes = self::findNodes($dom, $options['adjacent-sibling'], $isHtml);
- $adjacentSiblingNodes = !empty($adjacentSiblingNodes) ? $adjacentSiblingNodes : array();
-
- foreach ($nodes as $node) {
- $sibling = $node;
-
- while ($sibling = $sibling->nextSibling) {
- if ($sibling->nodeType !== XML_ELEMENT_NODE) {
- continue;
- }
-
- foreach ($adjacentSiblingNodes as $adjacentSiblingNode) {
- if ($sibling === $adjacentSiblingNode) {
- $filtered[] = $node;
- break;
- }
- }
-
- break;
- }
- }
-
- $nodes = $filtered;
- $filtered = array();
-
- if (empty($nodes)) {
- return false;
- }
- }
-
- // filter by ancestor
- if ($options['ancestor']) {
- $ancestorNodes = self::findNodes($dom, $options['ancestor'], $isHtml);
- $ancestorNode = isset($ancestorNodes[0]) ? $ancestorNodes[0] : null;
-
- foreach ($nodes as $node) {
- $parent = $node->parentNode;
-
- while ($parent && $parent->nodeType != XML_HTML_DOCUMENT_NODE) {
- if ($parent === $ancestorNode) {
- $filtered[] = $node;
- }
-
- $parent = $parent->parentNode;
- }
- }
-
- $nodes = $filtered;
- $filtered = array();
-
- if (empty($nodes)) {
- return false;
- }
- }
-
- // filter by descendant
- if ($options['descendant']) {
- $descendantNodes = self::findNodes($dom, $options['descendant'], $isHtml);
- $descendantNodes = !empty($descendantNodes) ? $descendantNodes : array();
-
- foreach ($nodes as $node) {
- foreach (self::getDescendants($node) as $descendant) {
- foreach ($descendantNodes as $descendantNode) {
- if ($descendantNode === $descendant) {
- $filtered[] = $node;
- }
- }
- }
- }
-
- $nodes = $filtered;
- $filtered = array();
-
- if (empty($nodes)) {
- return false;
- }
- }
-
- // filter by children
- if ($options['children']) {
- $validChild = array('count', 'greater_than', 'less_than', 'only');
- $childOptions = self::assertValidKeys(
- $options['children'],
- $validChild
- );
-
- foreach ($nodes as $node) {
- $childNodes = $node->childNodes;
-
- foreach ($childNodes as $childNode) {
- if ($childNode->nodeType !== XML_CDATA_SECTION_NODE &&
- $childNode->nodeType !== XML_TEXT_NODE) {
- $children[] = $childNode;
- }
- }
-
- // we must have children to pass this filter
- if (!empty($children)) {
- // exact count of children
- if ($childOptions['count'] !== null) {
- if (count($children) !== $childOptions['count']) {
- break;
- }
- } // range count of children
- elseif ($childOptions['less_than'] !== null &&
- $childOptions['greater_than'] !== null) {
- if (count($children) >= $childOptions['less_than'] ||
- count($children) <= $childOptions['greater_than']) {
- break;
- }
- } // less than a given count
- elseif ($childOptions['less_than'] !== null) {
- if (count($children) >= $childOptions['less_than']) {
- break;
- }
- } // more than a given count
- elseif ($childOptions['greater_than'] !== null) {
- if (count($children) <= $childOptions['greater_than']) {
- break;
- }
- }
-
- // match each child against a specific tag
- if ($childOptions['only']) {
- $onlyNodes = self::findNodes(
- $dom,
- $childOptions['only'],
- $isHtml
- );
-
- // try to match each child to one of the 'only' nodes
- foreach ($children as $child) {
- $matched = false;
-
- foreach ($onlyNodes as $onlyNode) {
- if ($onlyNode === $child) {
- $matched = true;
- }
- }
-
- if (!$matched) {
- break 2;
- }
- }
- }
-
- $filtered[] = $node;
- }
- }
-
- $nodes = $filtered;
-
- if (empty($nodes)) {
- return;
- }
- }
-
- // return the first node that matches all criteria
- return !empty($nodes) ? $nodes : array();
- }
-
- /**
- * Recursively get flat array of all descendants of this node.
- *
- * @param DOMNode $node
- *
- * @return array
- *
- * @since Method available since Release 3.3.0
- */
- protected static function getDescendants(DOMNode $node)
- {
- $allChildren = array();
- $childNodes = $node->childNodes ? $node->childNodes : array();
-
- foreach ($childNodes as $child) {
- if ($child->nodeType === XML_CDATA_SECTION_NODE ||
- $child->nodeType === XML_TEXT_NODE) {
- continue;
- }
-
- $children = self::getDescendants($child);
- $allChildren = array_merge($allChildren, $children, array($child));
- }
-
- return isset($allChildren) ? $allChildren : array();
- }
-
- /**
- * Gets elements by case insensitive tagname.
- *
- * @param DOMDocument $dom
- * @param string $tag
- *
- * @return DOMNodeList
- *
- * @since Method available since Release 3.4.0
- */
- protected static function getElementsByCaseInsensitiveTagName(DOMDocument $dom, $tag)
- {
- $elements = $dom->getElementsByTagName(strtolower($tag));
-
- if ($elements->length == 0) {
- $elements = $dom->getElementsByTagName(strtoupper($tag));
- }
-
- return $elements;
- }
-
- /**
- * Get the text value of this node's child text node.
- *
- * @param DOMNode $node
- *
- * @return string
- *
- * @since Method available since Release 3.3.0
- */
- protected static function getNodeText(DOMNode $node)
- {
- if (!$node->childNodes instanceof DOMNodeList) {
- return '';
- }
-
- $result = '';
-
- foreach ($node->childNodes as $childNode) {
- if ($childNode->nodeType === XML_TEXT_NODE ||
- $childNode->nodeType === XML_CDATA_SECTION_NODE) {
- $result .= trim($childNode->data) . ' ';
- } else {
- $result .= self::getNodeText($childNode);
- }
- }
-
- return str_replace(' ', ' ', $result);
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Extensions/PhptTestCaseTest.php b/vendor/phpunit/phpunit/tests/Extensions/PhptTestCaseTest.php
deleted file mode 100644
index 819f9d29..00000000
--- a/vendor/phpunit/phpunit/tests/Extensions/PhptTestCaseTest.php
+++ /dev/null
@@ -1,36 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-class Extensions_PhptTestCaseTest extends \PHPUnit_Framework_TestCase
-{
- public function testParseIniSection()
- {
- $phptTestCase = new PhpTestCaseProxy(__FILE__);
- $settings = $phptTestCase->parseIniSection("foo=1\nbar = 2\rbaz = 3\r\nempty=\nignore");
-
- $expected = array(
- 'foo=1',
- 'bar = 2',
- 'baz = 3',
- 'empty=',
- 'ignore',
- );
-
- $this->assertEquals($expected, $settings);
- }
-}
-
-class PhpTestCaseProxy extends PHPUnit_Extensions_PhptTestCase
-{
- public function parseIniSection($content)
- {
- return parent::parseIniSection($content);
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Extensions/RepeatedTestTest.php b/vendor/phpunit/phpunit/tests/Extensions/RepeatedTestTest.php
deleted file mode 100644
index de83fb5f..00000000
--- a/vendor/phpunit/phpunit/tests/Extensions/RepeatedTestTest.php
+++ /dev/null
@@ -1,64 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 2.0.0
- * @covers PHPUnit_Extensions_RepeatedTest
- */
-class Extensions_RepeatedTestTest extends PHPUnit_Framework_TestCase
-{
- protected $suite;
-
- public function __construct()
- {
- $this->suite = new PHPUnit_Framework_TestSuite;
-
- $this->suite->addTest(new Success);
- $this->suite->addTest(new Success);
- }
-
- public function testRepeatedOnce()
- {
- $test = new PHPUnit_Extensions_RepeatedTest($this->suite, 1);
- $this->assertEquals(2, count($test));
-
- $result = $test->run();
- $this->assertEquals(2, count($result));
- }
-
- public function testRepeatedMoreThanOnce()
- {
- $test = new PHPUnit_Extensions_RepeatedTest($this->suite, 3);
- $this->assertEquals(6, count($test));
-
- $result = $test->run();
- $this->assertEquals(6, count($result));
- }
-
- public function testRepeatedZero()
- {
- $test = new PHPUnit_Extensions_RepeatedTest($this->suite, 0);
- $this->assertEquals(0, count($test));
-
- $result = $test->run();
- $this->assertEquals(0, count($result));
- }
-
- public function testRepeatedNegative()
- {
- try {
- $test = new PHPUnit_Extensions_RepeatedTest($this->suite, -1);
- } catch (Exception $e) {
- return;
- }
-
- $this->fail('Should throw an Exception');
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Fail/fail.phpt b/vendor/phpunit/phpunit/tests/Fail/fail.phpt
deleted file mode 100644
index b88454fd..00000000
--- a/vendor/phpunit/phpunit/tests/Fail/fail.phpt
+++ /dev/null
@@ -1,5 +0,0 @@
---TEST--
-// This test intentionally fails and it is checked by Travis.
---FILE--
---EXPECTF--
-unexpected
diff --git a/vendor/phpunit/phpunit/tests/Framework/AssertTest.php b/vendor/phpunit/phpunit/tests/Framework/AssertTest.php
deleted file mode 100644
index 940335e8..00000000
--- a/vendor/phpunit/phpunit/tests/Framework/AssertTest.php
+++ /dev/null
@@ -1,4135 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 2.0.0
- */
-class Framework_AssertTest extends PHPUnit_Framework_TestCase
-{
- /**
- * @var string
- */
- private $filesDirectory;
-
- protected function setUp()
- {
- $this->filesDirectory = dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR;
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::fail
- */
- public function testFail()
- {
- try {
- $this->fail();
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- throw new PHPUnit_Framework_AssertionFailedError('Fail did not throw fail exception');
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertContains
- */
- public function testAssertSplObjectStorageContainsObject()
- {
- $a = new stdClass;
- $b = new stdClass;
- $c = new SplObjectStorage;
- $c->attach($a);
-
- $this->assertContains($a, $c);
-
- try {
- $this->assertContains($b, $c);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertContains
- */
- public function testAssertArrayContainsObject()
- {
- $a = new stdClass;
- $b = new stdClass;
-
- $this->assertContains($a, array($a));
-
- try {
- $this->assertContains($a, array($b));
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertContains
- */
- public function testAssertArrayContainsString()
- {
- $this->assertContains('foo', array('foo'));
-
- try {
- $this->assertContains('foo', array('bar'));
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertContains
- */
- public function testAssertArrayContainsNonObject()
- {
- $this->assertContains('foo', array(true));
-
- try {
- $this->assertContains('foo', array(true), '', false, true, true);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertContainsOnlyInstancesOf
- */
- public function testAssertContainsOnlyInstancesOf()
- {
- $test = array(
- new Book(),
- new Book
- );
- $this->assertContainsOnlyInstancesOf('Book', $test);
- $this->assertContainsOnlyInstancesOf('stdClass', array(new stdClass()));
-
- $test2 = array(
- new Author('Test')
- );
- try {
- $this->assertContainsOnlyInstancesOf('Book', $test2);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertArrayHasKey
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertArrayHasKeyThrowsExceptionForInvalidFirstArgument()
- {
- $this->assertArrayHasKey(null, array());
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertArrayHasKey
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertArrayHasKeyThrowsExceptionForInvalidSecondArgument()
- {
- $this->assertArrayHasKey(0, null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertArrayHasKey
- */
- public function testAssertArrayHasIntegerKey()
- {
- $this->assertArrayHasKey(0, array('foo'));
-
- try {
- $this->assertArrayHasKey(1, array('foo'));
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertArraySubset
- * @covers PHPUnit_Framework_Constraint_ArraySubset
- */
- public function testAssertArraySubset()
- {
- $array = array(
- 'a' => 'item a',
- 'b' => 'item b',
- 'c' => array('a2' => 'item a2', 'b2' => 'item b2'),
- 'd' => array('a2' => array('a3' => 'item a3', 'b3' => 'item b3'))
- );
-
- $this->assertArraySubset(array('a' => 'item a', 'c' => array('a2' => 'item a2')), $array);
- $this->assertArraySubset(array('a' => 'item a', 'd' => array('a2' => array('b3' => 'item b3'))), $array);
-
- $arrayAccessData = new ArrayObject($array);
-
- $this->assertArraySubset(array('a' => 'item a', 'c' => array('a2' => 'item a2')), $arrayAccessData);
- $this->assertArraySubset(array('a' => 'item a', 'd' => array('a2' => array('b3' => 'item b3'))), $arrayAccessData);
-
- try {
- $this->assertArraySubset(array('a' => 'bad value'), $array);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- }
-
- try {
- $this->assertArraySubset(array('d' => array('a2' => array('bad index' => 'item b3'))), $array);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertArraySubset
- * @covers PHPUnit_Framework_Constraint_ArraySubset
- */
- public function testAssertArraySubsetWithDeepNestedArrays()
- {
- $array = array(
- 'path' => array(
- 'to' => array(
- 'the' => array(
- 'cake' => 'is a lie'
- )
- )
- )
- );
-
- $this->assertArraySubset(array('path' => array()), $array);
- $this->assertArraySubset(array('path' => array('to' => array())), $array);
- $this->assertArraySubset(array('path' => array('to' => array('the' => array()))), $array);
- $this->assertArraySubset(array('path' => array('to' => array('the' => array('cake' => 'is a lie')))), $array);
-
- try {
- $this->assertArraySubset(array('path' => array('to' => array('the' => array('cake' => 'is not a lie')))), $array);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertArraySubset
- * @covers PHPUnit_Framework_Constraint_ArraySubset
- */
- public function testAssertArraySubsetWithNoStrictCheckAndObjects()
- {
- $obj = new \stdClass;
- $reference = &$obj;
- $array = array('a' => $obj);
-
- $this->assertArraySubset(array('a' => $reference), $array);
- $this->assertArraySubset(array('a' => new \stdClass), $array);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertArraySubset
- * @covers PHPUnit_Framework_Constraint_ArraySubset
- */
- public function testAssertArraySubsetWithStrictCheckAndObjects()
- {
- $obj = new \stdClass;
- $reference = &$obj;
- $array = array('a' => $obj);
-
- $this->assertArraySubset(array('a' => $reference), $array, true);
-
- try {
- $this->assertArraySubset(array('a' => new \stdClass), $array, true);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail('Strict recursive array check fail.');
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertArraySubset
- * @covers PHPUnit_Framework_Constraint_ArraySubset
- * @expectedException PHPUnit_Framework_Exception
- * @expectedExceptionMessage array or ArrayAccess
- * @dataProvider assertArraySubsetInvalidArgumentProvider
- */
- public function testAssertArraySubsetRaisesExceptionForInvalidArguments($partial, $subject)
- {
- $this->assertArraySubset($partial, $subject);
- }
-
- /**
- * @return array
- */
- public function assertArraySubsetInvalidArgumentProvider()
- {
- return array(
- array(false, array()),
- array(array(), false),
- );
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertArrayNotHasKey
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertArrayNotHasKeyThrowsExceptionForInvalidFirstArgument()
- {
- $this->assertArrayNotHasKey(null, array());
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertArrayNotHasKey
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertArrayNotHasKeyThrowsExceptionForInvalidSecondArgument()
- {
- $this->assertArrayNotHasKey(0, null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertArrayNotHasKey
- */
- public function testAssertArrayNotHasIntegerKey()
- {
- $this->assertArrayNotHasKey(1, array('foo'));
-
- try {
- $this->assertArrayNotHasKey(0, array('foo'));
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertArrayHasKey
- */
- public function testAssertArrayHasStringKey()
- {
- $this->assertArrayHasKey('foo', array('foo' => 'bar'));
-
- try {
- $this->assertArrayHasKey('bar', array('foo' => 'bar'));
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertArrayNotHasKey
- */
- public function testAssertArrayNotHasStringKey()
- {
- $this->assertArrayNotHasKey('bar', array('foo' => 'bar'));
-
- try {
- $this->assertArrayNotHasKey('foo', array('foo' => 'bar'));
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertArrayHasKey
- */
- public function testAssertArrayHasKeyAcceptsArrayObjectValue()
- {
- $array = new ArrayObject();
- $array['foo'] = 'bar';
- $this->assertArrayHasKey('foo', $array);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertArrayHasKey
- * @expectedException PHPUnit_Framework_AssertionFailedError
- */
- public function testAssertArrayHasKeyProperlyFailsWithArrayObjectValue()
- {
- $array = new ArrayObject();
- $array['bar'] = 'bar';
- $this->assertArrayHasKey('foo', $array);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertArrayHasKey
- */
- public function testAssertArrayHasKeyAcceptsArrayAccessValue()
- {
- $array = new SampleArrayAccess();
- $array['foo'] = 'bar';
- $this->assertArrayHasKey('foo', $array);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertArrayHasKey
- * @expectedException PHPUnit_Framework_AssertionFailedError
- */
- public function testAssertArrayHasKeyProperlyFailsWithArrayAccessValue()
- {
- $array = new SampleArrayAccess();
- $array['bar'] = 'bar';
- $this->assertArrayHasKey('foo', $array);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertArrayNotHasKey
- */
- public function testAssertArrayNotHasKeyAcceptsArrayAccessValue()
- {
- $array = new ArrayObject();
- $array['foo'] = 'bar';
- $this->assertArrayNotHasKey('bar', $array);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertArrayNotHasKey
- * @expectedException PHPUnit_Framework_AssertionFailedError
- */
- public function testAssertArrayNotHasKeyPropertlyFailsWithArrayAccessValue()
- {
- $array = new ArrayObject();
- $array['bar'] = 'bar';
- $this->assertArrayNotHasKey('bar', $array);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertContains
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertContainsThrowsException()
- {
- $this->assertContains(null, null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertContains
- */
- public function testAssertIteratorContainsObject()
- {
- $foo = new stdClass;
-
- $this->assertContains($foo, new TestIterator(array($foo)));
-
- try {
- $this->assertContains($foo, new TestIterator(array(new stdClass)));
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertContains
- */
- public function testAssertIteratorContainsString()
- {
- $this->assertContains('foo', new TestIterator(array('foo')));
-
- try {
- $this->assertContains('foo', new TestIterator(array('bar')));
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertContains
- */
- public function testAssertStringContainsString()
- {
- $this->assertContains('foo', 'foobar');
-
- try {
- $this->assertContains('foo', 'bar');
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotContains
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertNotContainsThrowsException()
- {
- $this->assertNotContains(null, null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotContains
- */
- public function testAssertSplObjectStorageNotContainsObject()
- {
- $a = new stdClass;
- $b = new stdClass;
- $c = new SplObjectStorage;
- $c->attach($a);
-
- $this->assertNotContains($b, $c);
-
- try {
- $this->assertNotContains($a, $c);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotContains
- */
- public function testAssertArrayNotContainsObject()
- {
- $a = new stdClass;
- $b = new stdClass;
-
- $this->assertNotContains($a, array($b));
-
- try {
- $this->assertNotContains($a, array($a));
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotContains
- */
- public function testAssertArrayNotContainsString()
- {
- $this->assertNotContains('foo', array('bar'));
-
- try {
- $this->assertNotContains('foo', array('foo'));
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotContains
- */
- public function testAssertArrayNotContainsNonObject()
- {
- $this->assertNotContains('foo', array(true), '', false, true, true);
-
- try {
- $this->assertNotContains('foo', array(true));
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotContains
- */
- public function testAssertStringNotContainsString()
- {
- $this->assertNotContains('foo', 'bar');
-
- try {
- $this->assertNotContains('foo', 'foo');
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertContainsOnly
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertContainsOnlyThrowsException()
- {
- $this->assertContainsOnly(null, null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotContainsOnly
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertNotContainsOnlyThrowsException()
- {
- $this->assertNotContainsOnly(null, null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertContainsOnlyInstancesOf
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertContainsOnlyInstancesOfThrowsException()
- {
- $this->assertContainsOnlyInstancesOf(null, null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertContainsOnly
- */
- public function testAssertArrayContainsOnlyIntegers()
- {
- $this->assertContainsOnly('integer', array(1, 2, 3));
-
- try {
- $this->assertContainsOnly('integer', array('1', 2, 3));
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotContainsOnly
- */
- public function testAssertArrayNotContainsOnlyIntegers()
- {
- $this->assertNotContainsOnly('integer', array('1', 2, 3));
-
- try {
- $this->assertNotContainsOnly('integer', array(1, 2, 3));
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertContainsOnly
- */
- public function testAssertArrayContainsOnlyStdClass()
- {
- $this->assertContainsOnly('StdClass', array(new stdClass));
-
- try {
- $this->assertContainsOnly('StdClass', array('StdClass'));
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotContainsOnly
- */
- public function testAssertArrayNotContainsOnlyStdClass()
- {
- $this->assertNotContainsOnly('StdClass', array('StdClass'));
-
- try {
- $this->assertNotContainsOnly('StdClass', array(new stdClass));
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- protected function sameValues()
- {
- $object = new SampleClass(4, 8, 15);
- // cannot use $filesDirectory, because neither setUp() nor
- // setUpBeforeClass() are executed before the data providers
- $file = dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'foo.xml';
- $resource = fopen($file, 'r');
-
- return array(
- // null
- array(null, null),
- // strings
- array('a', 'a'),
- // integers
- array(0, 0),
- // floats
- array(2.3, 2.3),
- array(1/3, 1 - 2/3),
- array(log(0), log(0)),
- // arrays
- array(array(), array()),
- array(array(0 => 1), array(0 => 1)),
- array(array(0 => null), array(0 => null)),
- array(array('a', 'b' => array(1, 2)), array('a', 'b' => array(1, 2))),
- // objects
- array($object, $object),
- // resources
- array($resource, $resource),
- );
- }
-
- protected function notEqualValues()
- {
- // cyclic dependencies
- $book1 = new Book;
- $book1->author = new Author('Terry Pratchett');
- $book1->author->books[] = $book1;
- $book2 = new Book;
- $book2->author = new Author('Terry Pratch');
- $book2->author->books[] = $book2;
-
- $book3 = new Book;
- $book3->author = 'Terry Pratchett';
- $book4 = new stdClass;
- $book4->author = 'Terry Pratchett';
-
- $object1 = new SampleClass(4, 8, 15);
- $object2 = new SampleClass(16, 23, 42);
- $object3 = new SampleClass(4, 8, 15);
- $storage1 = new SplObjectStorage;
- $storage1->attach($object1);
- $storage2 = new SplObjectStorage;
- $storage2->attach($object3); // same content, different object
-
- // cannot use $filesDirectory, because neither setUp() nor
- // setUpBeforeClass() are executed before the data providers
- $file = dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'foo.xml';
-
- return array(
- // strings
- array('a', 'b'),
- array('a', 'A'),
- // https://github.com/sebastianbergmann/phpunit/issues/1023
- array('9E6666666','9E7777777'),
- // integers
- array(1, 2),
- array(2, 1),
- // floats
- array(2.3, 4.2),
- array(2.3, 4.2, 0.5),
- array(array(2.3), array(4.2), 0.5),
- array(array(array(2.3)), array(array(4.2)), 0.5),
- array(new Struct(2.3), new Struct(4.2), 0.5),
- array(array(new Struct(2.3)), array(new Struct(4.2)), 0.5),
- // NAN
- array(NAN, NAN),
- // arrays
- array(array(), array(0 => 1)),
- array(array(0 => 1), array()),
- array(array(0 => null), array()),
- array(array(0 => 1, 1 => 2), array(0 => 1, 1 => 3)),
- array(array('a', 'b' => array(1, 2)), array('a', 'b' => array(2, 1))),
- // objects
- array(new SampleClass(4, 8, 15), new SampleClass(16, 23, 42)),
- array($object1, $object2),
- array($book1, $book2),
- array($book3, $book4), // same content, different class
- // resources
- array(fopen($file, 'r'), fopen($file, 'r')),
- // SplObjectStorage
- array($storage1, $storage2),
- // DOMDocument
- array(
- PHPUnit_Util_XML::load(' '),
- PHPUnit_Util_XML::load(' '),
- ),
- array(
- PHPUnit_Util_XML::load(' '),
- PHPUnit_Util_XML::load(' '),
- ),
- array(
- PHPUnit_Util_XML::load(' bar '),
- PHPUnit_Util_XML::load(' '),
- ),
- array(
- PHPUnit_Util_XML::load(' '),
- PHPUnit_Util_XML::load(' '),
- ),
- array(
- PHPUnit_Util_XML::load(' bar '),
- PHPUnit_Util_XML::load(' bir '),
- ),
- array(
- new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')),
- new DateTime('2013-03-29 03:13:35', new DateTimeZone('America/New_York')),
- ),
- array(
- new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')),
- new DateTime('2013-03-29 03:13:35', new DateTimeZone('America/New_York')),
- 3500
- ),
- array(
- new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')),
- new DateTime('2013-03-29 05:13:35', new DateTimeZone('America/New_York')),
- 3500
- ),
- array(
- new DateTime('2013-03-29', new DateTimeZone('America/New_York')),
- new DateTime('2013-03-30', new DateTimeZone('America/New_York')),
- ),
- array(
- new DateTime('2013-03-29', new DateTimeZone('America/New_York')),
- new DateTime('2013-03-30', new DateTimeZone('America/New_York')),
- 43200
- ),
- array(
- new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')),
- new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/Chicago')),
- ),
- array(
- new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')),
- new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/Chicago')),
- 3500
- ),
- array(
- new DateTime('2013-03-30', new DateTimeZone('America/New_York')),
- new DateTime('2013-03-30', new DateTimeZone('America/Chicago')),
- ),
- array(
- new DateTime('2013-03-29T05:13:35-0600'),
- new DateTime('2013-03-29T04:13:35-0600'),
- ),
- array(
- new DateTime('2013-03-29T05:13:35-0600'),
- new DateTime('2013-03-29T05:13:35-0500'),
- ),
- // Exception
- //array(new Exception('Exception 1'), new Exception('Exception 2')),
- // different types
- array(new SampleClass(4, 8, 15), false),
- array(false, new SampleClass(4, 8, 15)),
- array(array(0 => 1, 1 => 2), false),
- array(false, array(0 => 1, 1 => 2)),
- array(array(), new stdClass),
- array(new stdClass, array()),
- // PHP: 0 == 'Foobar' => true!
- // We want these values to differ
- array(0, 'Foobar'),
- array('Foobar', 0),
- array(3, acos(8)),
- array(acos(8), 3)
- );
- }
-
- protected function equalValues()
- {
- // cyclic dependencies
- $book1 = new Book;
- $book1->author = new Author('Terry Pratchett');
- $book1->author->books[] = $book1;
- $book2 = new Book;
- $book2->author = new Author('Terry Pratchett');
- $book2->author->books[] = $book2;
-
- $object1 = new SampleClass(4, 8, 15);
- $object2 = new SampleClass(4, 8, 15);
- $storage1 = new SplObjectStorage;
- $storage1->attach($object1);
- $storage2 = new SplObjectStorage;
- $storage2->attach($object1);
-
- return array(
- // strings
- array('a', 'A', 0, false, true), // ignore case
- // arrays
- array(array('a' => 1, 'b' => 2), array('b' => 2, 'a' => 1)),
- array(array(1), array('1')),
- array(array(3, 2, 1), array(2, 3, 1), 0, true), // canonicalized comparison
- // floats
- array(2.3, 2.5, 0.5),
- array(array(2.3), array(2.5), 0.5),
- array(array(array(2.3)), array(array(2.5)), 0.5),
- array(new Struct(2.3), new Struct(2.5), 0.5),
- array(array(new Struct(2.3)), array(new Struct(2.5)), 0.5),
- // numeric with delta
- array(1, 2, 1),
- // objects
- array($object1, $object2),
- array($book1, $book2),
- // SplObjectStorage
- array($storage1, $storage2),
- // DOMDocument
- array(
- PHPUnit_Util_XML::load(' '),
- PHPUnit_Util_XML::load(' '),
- ),
- array(
- PHPUnit_Util_XML::load(' '),
- PHPUnit_Util_XML::load(' '),
- ),
- array(
- PHPUnit_Util_XML::load(' '),
- PHPUnit_Util_XML::load(' '),
- ),
- array(
- PHPUnit_Util_XML::load("\n \n "),
- PHPUnit_Util_XML::load(' '),
- ),
- array(
- new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')),
- new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')),
- ),
- array(
- new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')),
- new DateTime('2013-03-29 04:13:25', new DateTimeZone('America/New_York')),
- 10
- ),
- array(
- new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')),
- new DateTime('2013-03-29 04:14:40', new DateTimeZone('America/New_York')),
- 65
- ),
- array(
- new DateTime('2013-03-29', new DateTimeZone('America/New_York')),
- new DateTime('2013-03-29', new DateTimeZone('America/New_York')),
- ),
- array(
- new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')),
- new DateTime('2013-03-29 03:13:35', new DateTimeZone('America/Chicago')),
- ),
- array(
- new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')),
- new DateTime('2013-03-29 03:13:49', new DateTimeZone('America/Chicago')),
- 15
- ),
- array(
- new DateTime('2013-03-30', new DateTimeZone('America/New_York')),
- new DateTime('2013-03-29 23:00:00', new DateTimeZone('America/Chicago')),
- ),
- array(
- new DateTime('2013-03-30', new DateTimeZone('America/New_York')),
- new DateTime('2013-03-29 23:01:30', new DateTimeZone('America/Chicago')),
- 100
- ),
- array(
- new DateTime('@1364616000'),
- new DateTime('2013-03-29 23:00:00', new DateTimeZone('America/Chicago')),
- ),
- array(
- new DateTime('2013-03-29T05:13:35-0500'),
- new DateTime('2013-03-29T04:13:35-0600'),
- ),
- // Exception
- //array(new Exception('Exception 1'), new Exception('Exception 1')),
- // mixed types
- array(0, '0'),
- array('0', 0),
- array(2.3, '2.3'),
- array('2.3', 2.3),
- array((string) (1/3), 1 - 2/3),
- array(1/3, (string) (1 - 2/3)),
- array('string representation', new ClassWithToString),
- array(new ClassWithToString, 'string representation'),
- );
- }
-
- public function equalProvider()
- {
- // same |= equal
- return array_merge($this->equalValues(), $this->sameValues());
- }
-
- public function notEqualProvider()
- {
- return $this->notEqualValues();
- }
-
- public function sameProvider()
- {
- return $this->sameValues();
- }
-
- public function notSameProvider()
- {
- // not equal |= not same
- // equal, ¬same |= not same
- return array_merge($this->notEqualValues(), $this->equalValues());
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertEquals
- * @dataProvider equalProvider
- */
- public function testAssertEqualsSucceeds($a, $b, $delta = 0.0, $canonicalize = false, $ignoreCase = false)
- {
- $this->assertEquals($a, $b, '', $delta, 10, $canonicalize, $ignoreCase);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertEquals
- * @dataProvider notEqualProvider
- */
- public function testAssertEqualsFails($a, $b, $delta = 0.0, $canonicalize = false, $ignoreCase = false)
- {
- try {
- $this->assertEquals($a, $b, '', $delta, 10, $canonicalize, $ignoreCase);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotEquals
- * @dataProvider notEqualProvider
- */
- public function testAssertNotEqualsSucceeds($a, $b, $delta = 0.0, $canonicalize = false, $ignoreCase = false)
- {
- $this->assertNotEquals($a, $b, '', $delta, 10, $canonicalize, $ignoreCase);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotEquals
- * @dataProvider equalProvider
- */
- public function testAssertNotEqualsFails($a, $b, $delta = 0.0, $canonicalize = false, $ignoreCase = false)
- {
- try {
- $this->assertNotEquals($a, $b, '', $delta, 10, $canonicalize, $ignoreCase);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertSame
- * @dataProvider sameProvider
- */
- public function testAssertSameSucceeds($a, $b)
- {
- $this->assertSame($a, $b);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertSame
- * @dataProvider notSameProvider
- */
- public function testAssertSameFails($a, $b)
- {
- try {
- $this->assertSame($a, $b);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotSame
- * @dataProvider notSameProvider
- */
- public function testAssertNotSameSucceeds($a, $b)
- {
- $this->assertNotSame($a, $b);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotSame
- * @dataProvider sameProvider
- */
- public function testAssertNotSameFails($a, $b)
- {
- try {
- $this->assertNotSame($a, $b);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertXmlFileEqualsXmlFile
- */
- public function testAssertXmlFileEqualsXmlFile()
- {
- $this->assertXmlFileEqualsXmlFile(
- $this->filesDirectory . 'foo.xml',
- $this->filesDirectory . 'foo.xml'
- );
-
- try {
- $this->assertXmlFileEqualsXmlFile(
- $this->filesDirectory . 'foo.xml',
- $this->filesDirectory . 'bar.xml'
- );
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertXmlFileNotEqualsXmlFile
- */
- public function testAssertXmlFileNotEqualsXmlFile()
- {
- $this->assertXmlFileNotEqualsXmlFile(
- $this->filesDirectory . 'foo.xml',
- $this->filesDirectory . 'bar.xml'
- );
-
- try {
- $this->assertXmlFileNotEqualsXmlFile(
- $this->filesDirectory . 'foo.xml',
- $this->filesDirectory . 'foo.xml'
- );
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertXmlStringEqualsXmlFile
- */
- public function testAssertXmlStringEqualsXmlFile()
- {
- $this->assertXmlStringEqualsXmlFile(
- $this->filesDirectory . 'foo.xml',
- file_get_contents($this->filesDirectory . 'foo.xml')
- );
-
- try {
- $this->assertXmlStringEqualsXmlFile(
- $this->filesDirectory . 'foo.xml',
- file_get_contents($this->filesDirectory . 'bar.xml')
- );
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertXmlStringNotEqualsXmlFile
- */
- public function testXmlStringNotEqualsXmlFile()
- {
- $this->assertXmlStringNotEqualsXmlFile(
- $this->filesDirectory . 'foo.xml',
- file_get_contents($this->filesDirectory . 'bar.xml')
- );
-
- try {
- $this->assertXmlStringNotEqualsXmlFile(
- $this->filesDirectory . 'foo.xml',
- file_get_contents($this->filesDirectory . 'foo.xml')
- );
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertXmlStringEqualsXmlString
- */
- public function testAssertXmlStringEqualsXmlString()
- {
- $this->assertXmlStringEqualsXmlString(' ', ' ');
-
- try {
- $this->assertXmlStringEqualsXmlString(' ', ' ');
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @expectedException PHPUnit_Framework_Exception
- * @covers PHPUnit_Framework_Assert::assertXmlStringEqualsXmlString
- * @ticket 1860
- */
- public function testAssertXmlStringEqualsXmlString2()
- {
- $this->assertXmlStringEqualsXmlString(' ', '');
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertXmlStringEqualsXmlString
- * @ticket 1860
- */
- public function testAssertXmlStringEqualsXmlString3()
- {
- $expected = <<
-
-
-
-XML;
-
- $actual = <<
-
-
-
-XML;
-
- $this->assertXmlStringEqualsXmlString($expected, $actual);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertXmlStringNotEqualsXmlString
- */
- public function testAssertXmlStringNotEqualsXmlString()
- {
- $this->assertXmlStringNotEqualsXmlString(' ', ' ');
-
- try {
- $this->assertXmlStringNotEqualsXmlString(' ', ' ');
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertEqualXMLStructure
- */
- public function testXMLStructureIsSame()
- {
- $expected = new DOMDocument;
- $expected->load($this->filesDirectory . 'structureExpected.xml');
-
- $actual = new DOMDocument;
- $actual->load($this->filesDirectory . 'structureExpected.xml');
-
- $this->assertEqualXMLStructure(
- $expected->firstChild, $actual->firstChild, true
- );
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertEqualXMLStructure
- * @expectedException PHPUnit_Framework_ExpectationFailedException
- */
- public function testXMLStructureWrongNumberOfAttributes()
- {
- $expected = new DOMDocument;
- $expected->load($this->filesDirectory . 'structureExpected.xml');
-
- $actual = new DOMDocument;
- $actual->load($this->filesDirectory . 'structureWrongNumberOfAttributes.xml');
-
- $this->assertEqualXMLStructure(
- $expected->firstChild, $actual->firstChild, true
- );
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertEqualXMLStructure
- * @expectedException PHPUnit_Framework_ExpectationFailedException
- */
- public function testXMLStructureWrongNumberOfNodes()
- {
- $expected = new DOMDocument;
- $expected->load($this->filesDirectory . 'structureExpected.xml');
-
- $actual = new DOMDocument;
- $actual->load($this->filesDirectory . 'structureWrongNumberOfNodes.xml');
-
- $this->assertEqualXMLStructure(
- $expected->firstChild, $actual->firstChild, true
- );
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertEqualXMLStructure
- */
- public function testXMLStructureIsSameButDataIsNot()
- {
- $expected = new DOMDocument;
- $expected->load($this->filesDirectory . 'structureExpected.xml');
-
- $actual = new DOMDocument;
- $actual->load($this->filesDirectory . 'structureIsSameButDataIsNot.xml');
-
- $this->assertEqualXMLStructure(
- $expected->firstChild, $actual->firstChild, true
- );
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertEqualXMLStructure
- */
- public function testXMLStructureAttributesAreSameButValuesAreNot()
- {
- $expected = new DOMDocument;
- $expected->load($this->filesDirectory . 'structureExpected.xml');
-
- $actual = new DOMDocument;
- $actual->load($this->filesDirectory . 'structureAttributesAreSameButValuesAreNot.xml');
-
- $this->assertEqualXMLStructure(
- $expected->firstChild, $actual->firstChild, true
- );
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertEqualXMLStructure
- */
- public function testXMLStructureIgnoreTextNodes()
- {
- $expected = new DOMDocument;
- $expected->load($this->filesDirectory . 'structureExpected.xml');
-
- $actual = new DOMDocument;
- $actual->load($this->filesDirectory . 'structureIgnoreTextNodes.xml');
-
- $this->assertEqualXMLStructure(
- $expected->firstChild, $actual->firstChild, true
- );
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertEquals
- */
- public function testAssertStringEqualsNumeric()
- {
- $this->assertEquals('0', 0);
-
- try {
- $this->assertEquals('0', 1);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotEquals
- */
- public function testAssertStringEqualsNumeric2()
- {
- $this->assertNotEquals('A', 0);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertFileExists
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertFileExistsThrowsException()
- {
- $this->assertFileExists(null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertFileExists
- */
- public function testAssertFileExists()
- {
- $this->assertFileExists(__FILE__);
-
- try {
- $this->assertFileExists(__DIR__ . DIRECTORY_SEPARATOR . 'NotExisting');
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertFileNotExists
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertFileNotExistsThrowsException()
- {
- $this->assertFileNotExists(null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertFileNotExists
- */
- public function testAssertFileNotExists()
- {
- $this->assertFileNotExists(__DIR__ . DIRECTORY_SEPARATOR . 'NotExisting');
-
- try {
- $this->assertFileNotExists(__FILE__);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertObjectHasAttribute
- */
- public function testAssertObjectHasAttribute()
- {
- $o = new Author('Terry Pratchett');
-
- $this->assertObjectHasAttribute('name', $o);
-
- try {
- $this->assertObjectHasAttribute('foo', $o);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertObjectNotHasAttribute
- */
- public function testAssertObjectNotHasAttribute()
- {
- $o = new Author('Terry Pratchett');
-
- $this->assertObjectNotHasAttribute('foo', $o);
-
- try {
- $this->assertObjectNotHasAttribute('name', $o);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNull
- */
- public function testAssertNull()
- {
- $this->assertNull(null);
-
- try {
- $this->assertNull(new stdClass);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotNull
- */
- public function testAssertNotNull()
- {
- $this->assertNotNull(new stdClass);
-
- try {
- $this->assertNotNull(null);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertTrue
- */
- public function testAssertTrue()
- {
- $this->assertTrue(true);
-
- try {
- $this->assertTrue(false);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotTrue
- */
- public function testAssertNotTrue()
- {
- $this->assertNotTrue(false);
- $this->assertNotTrue(1);
- $this->assertNotTrue('true');
-
- try {
- $this->assertNotTrue(true);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertFalse
- */
- public function testAssertFalse()
- {
- $this->assertFalse(false);
-
- try {
- $this->assertFalse(true);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotFalse
- */
- public function testAssertNotFalse()
- {
- $this->assertNotFalse(true);
- $this->assertNotFalse(0);
- $this->assertNotFalse('');
-
- try {
- $this->assertNotFalse(false);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertRegExp
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertRegExpThrowsException()
- {
- $this->assertRegExp(null, null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertRegExp
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertRegExpThrowsException2()
- {
- $this->assertRegExp('', null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotRegExp
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertNotRegExpThrowsException()
- {
- $this->assertNotRegExp(null, null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotRegExp
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertNotRegExpThrowsException2()
- {
- $this->assertNotRegExp('', null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertRegExp
- */
- public function testAssertRegExp()
- {
- $this->assertRegExp('/foo/', 'foobar');
-
- try {
- $this->assertRegExp('/foo/', 'bar');
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotRegExp
- */
- public function testAssertNotRegExp()
- {
- $this->assertNotRegExp('/foo/', 'bar');
-
- try {
- $this->assertNotRegExp('/foo/', 'foobar');
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertSame
- */
- public function testAssertSame()
- {
- $o = new stdClass;
-
- $this->assertSame($o, $o);
-
- try {
- $this->assertSame(
- new stdClass,
- new stdClass
- );
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertSame
- */
- public function testAssertSame2()
- {
- $this->assertSame(true, true);
- $this->assertSame(false, false);
-
- try {
- $this->assertSame(true, false);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotSame
- */
- public function testAssertNotSame()
- {
- $this->assertNotSame(
- new stdClass,
- null
- );
-
- $this->assertNotSame(
- null,
- new stdClass
- );
-
- $this->assertNotSame(
- new stdClass,
- new stdClass
- );
-
- $o = new stdClass;
-
- try {
- $this->assertNotSame($o, $o);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotSame
- */
- public function testAssertNotSame2()
- {
- $this->assertNotSame(true, false);
- $this->assertNotSame(false, true);
-
- try {
- $this->assertNotSame(true, true);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotSame
- */
- public function testAssertNotSameFailsNull()
- {
- try {
- $this->assertNotSame(null, null);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertGreaterThan
- */
- public function testGreaterThan()
- {
- $this->assertGreaterThan(1, 2);
-
- try {
- $this->assertGreaterThan(2, 1);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeGreaterThan
- */
- public function testAttributeGreaterThan()
- {
- $this->assertAttributeGreaterThan(
- 1, 'bar', new ClassWithNonPublicAttributes
- );
-
- try {
- $this->assertAttributeGreaterThan(
- 1, 'foo', new ClassWithNonPublicAttributes
- );
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertGreaterThanOrEqual
- */
- public function testGreaterThanOrEqual()
- {
- $this->assertGreaterThanOrEqual(1, 2);
-
- try {
- $this->assertGreaterThanOrEqual(2, 1);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeGreaterThanOrEqual
- */
- public function testAttributeGreaterThanOrEqual()
- {
- $this->assertAttributeGreaterThanOrEqual(
- 1, 'bar', new ClassWithNonPublicAttributes
- );
-
- try {
- $this->assertAttributeGreaterThanOrEqual(
- 2, 'foo', new ClassWithNonPublicAttributes
- );
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertLessThan
- */
- public function testLessThan()
- {
- $this->assertLessThan(2, 1);
-
- try {
- $this->assertLessThan(1, 2);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeLessThan
- */
- public function testAttributeLessThan()
- {
- $this->assertAttributeLessThan(
- 2, 'foo', new ClassWithNonPublicAttributes
- );
-
- try {
- $this->assertAttributeLessThan(
- 1, 'bar', new ClassWithNonPublicAttributes
- );
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertLessThanOrEqual
- */
- public function testLessThanOrEqual()
- {
- $this->assertLessThanOrEqual(2, 1);
-
- try {
- $this->assertLessThanOrEqual(1, 2);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeLessThanOrEqual
- */
- public function testAttributeLessThanOrEqual()
- {
- $this->assertAttributeLessThanOrEqual(
- 2, 'foo', new ClassWithNonPublicAttributes
- );
-
- try {
- $this->assertAttributeLessThanOrEqual(
- 1, 'bar', new ClassWithNonPublicAttributes
- );
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::readAttribute
- * @covers PHPUnit_Framework_Assert::getStaticAttribute
- * @covers PHPUnit_Framework_Assert::getObjectAttribute
- */
- public function testReadAttribute()
- {
- $obj = new ClassWithNonPublicAttributes;
-
- $this->assertEquals('foo', $this->readAttribute($obj, 'publicAttribute'));
- $this->assertEquals('bar', $this->readAttribute($obj, 'protectedAttribute'));
- $this->assertEquals('baz', $this->readAttribute($obj, 'privateAttribute'));
- $this->assertEquals('bar', $this->readAttribute($obj, 'protectedParentAttribute'));
- //$this->assertEquals('bar', $this->readAttribute($obj, 'privateParentAttribute'));
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::readAttribute
- * @covers PHPUnit_Framework_Assert::getStaticAttribute
- * @covers PHPUnit_Framework_Assert::getObjectAttribute
- */
- public function testReadAttribute2()
- {
- $this->assertEquals('foo', $this->readAttribute('ClassWithNonPublicAttributes', 'publicStaticAttribute'));
- $this->assertEquals('bar', $this->readAttribute('ClassWithNonPublicAttributes', 'protectedStaticAttribute'));
- $this->assertEquals('baz', $this->readAttribute('ClassWithNonPublicAttributes', 'privateStaticAttribute'));
- $this->assertEquals('foo', $this->readAttribute('ClassWithNonPublicAttributes', 'protectedStaticParentAttribute'));
- $this->assertEquals('foo', $this->readAttribute('ClassWithNonPublicAttributes', 'privateStaticParentAttribute'));
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::readAttribute
- * @covers PHPUnit_Framework_Assert::getStaticAttribute
- * @covers PHPUnit_Framework_Assert::getObjectAttribute
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testReadAttribute3()
- {
- $this->readAttribute('StdClass', null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::readAttribute
- * @covers PHPUnit_Framework_Assert::getStaticAttribute
- * @covers PHPUnit_Framework_Assert::getObjectAttribute
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testReadAttribute4()
- {
- $this->readAttribute('NotExistingClass', 'foo');
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::readAttribute
- * @covers PHPUnit_Framework_Assert::getStaticAttribute
- * @covers PHPUnit_Framework_Assert::getObjectAttribute
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testReadAttribute5()
- {
- $this->readAttribute(null, 'foo');
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::readAttribute
- * @covers PHPUnit_Framework_Assert::getStaticAttribute
- * @covers PHPUnit_Framework_Assert::getObjectAttribute
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testReadAttributeIfAttributeNameIsNotValid()
- {
- $this->readAttribute('StdClass', '2');
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::getStaticAttribute
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testGetStaticAttributeRaisesExceptionForInvalidFirstArgument()
- {
- $this->getStaticAttribute(null, 'foo');
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::getStaticAttribute
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testGetStaticAttributeRaisesExceptionForInvalidFirstArgument2()
- {
- $this->getStaticAttribute('NotExistingClass', 'foo');
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::getStaticAttribute
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testGetStaticAttributeRaisesExceptionForInvalidSecondArgument()
- {
- $this->getStaticAttribute('stdClass', null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::getStaticAttribute
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testGetStaticAttributeRaisesExceptionForInvalidSecondArgument2()
- {
- $this->getStaticAttribute('stdClass', '0');
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::getStaticAttribute
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testGetStaticAttributeRaisesExceptionForInvalidSecondArgument3()
- {
- $this->getStaticAttribute('stdClass', 'foo');
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::getObjectAttribute
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testGetObjectAttributeRaisesExceptionForInvalidFirstArgument()
- {
- $this->getObjectAttribute(null, 'foo');
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::getObjectAttribute
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testGetObjectAttributeRaisesExceptionForInvalidSecondArgument()
- {
- $this->getObjectAttribute(new stdClass, null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::getObjectAttribute
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testGetObjectAttributeRaisesExceptionForInvalidSecondArgument2()
- {
- $this->getObjectAttribute(new stdClass, '0');
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::getObjectAttribute
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testGetObjectAttributeRaisesExceptionForInvalidSecondArgument3()
- {
- $this->getObjectAttribute(new stdClass, 'foo');
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::getObjectAttribute
- */
- public function testGetObjectAttributeWorksForInheritedAttributes()
- {
- $this->assertEquals(
- 'bar',
- $this->getObjectAttribute(new ClassWithNonPublicAttributes, 'privateParentAttribute')
- );
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeContains
- */
- public function testAssertPublicAttributeContains()
- {
- $obj = new ClassWithNonPublicAttributes;
-
- $this->assertAttributeContains('foo', 'publicArray', $obj);
-
- try {
- $this->assertAttributeContains('bar', 'publicArray', $obj);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeContainsOnly
- */
- public function testAssertPublicAttributeContainsOnly()
- {
- $obj = new ClassWithNonPublicAttributes;
-
- $this->assertAttributeContainsOnly('string', 'publicArray', $obj);
-
- try {
- $this->assertAttributeContainsOnly('integer', 'publicArray', $obj);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeNotContains
- */
- public function testAssertPublicAttributeNotContains()
- {
- $obj = new ClassWithNonPublicAttributes;
-
- $this->assertAttributeNotContains('bar', 'publicArray', $obj);
-
- try {
- $this->assertAttributeNotContains('foo', 'publicArray', $obj);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeNotContainsOnly
- */
- public function testAssertPublicAttributeNotContainsOnly()
- {
- $obj = new ClassWithNonPublicAttributes;
-
- $this->assertAttributeNotContainsOnly('integer', 'publicArray', $obj);
-
- try {
- $this->assertAttributeNotContainsOnly('string', 'publicArray', $obj);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeContains
- */
- public function testAssertProtectedAttributeContains()
- {
- $obj = new ClassWithNonPublicAttributes;
-
- $this->assertAttributeContains('bar', 'protectedArray', $obj);
-
- try {
- $this->assertAttributeContains('foo', 'protectedArray', $obj);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeNotContains
- */
- public function testAssertProtectedAttributeNotContains()
- {
- $obj = new ClassWithNonPublicAttributes;
-
- $this->assertAttributeNotContains('foo', 'protectedArray', $obj);
-
- try {
- $this->assertAttributeNotContains('bar', 'protectedArray', $obj);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeContains
- */
- public function testAssertPrivateAttributeContains()
- {
- $obj = new ClassWithNonPublicAttributes;
-
- $this->assertAttributeContains('baz', 'privateArray', $obj);
-
- try {
- $this->assertAttributeContains('foo', 'privateArray', $obj);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeNotContains
- */
- public function testAssertPrivateAttributeNotContains()
- {
- $obj = new ClassWithNonPublicAttributes;
-
- $this->assertAttributeNotContains('foo', 'privateArray', $obj);
-
- try {
- $this->assertAttributeNotContains('baz', 'privateArray', $obj);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeContains
- */
- public function testAssertAttributeContainsNonObject()
- {
- $obj = new ClassWithNonPublicAttributes;
-
- $this->assertAttributeContains(true, 'privateArray', $obj);
-
- try {
- $this->assertAttributeContains(true, 'privateArray', $obj, '', false, true, true);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeNotContains
- */
- public function testAssertAttributeNotContainsNonObject()
- {
- $obj = new ClassWithNonPublicAttributes;
-
- $this->assertAttributeNotContains(true, 'privateArray', $obj, '', false, true, true);
-
- try {
- $this->assertAttributeNotContains(true, 'privateArray', $obj);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeEquals
- */
- public function testAssertPublicAttributeEquals()
- {
- $obj = new ClassWithNonPublicAttributes;
-
- $this->assertAttributeEquals('foo', 'publicAttribute', $obj);
-
- try {
- $this->assertAttributeEquals('bar', 'publicAttribute', $obj);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeNotEquals
- */
- public function testAssertPublicAttributeNotEquals()
- {
- $obj = new ClassWithNonPublicAttributes;
-
- $this->assertAttributeNotEquals('bar', 'publicAttribute', $obj);
-
- try {
- $this->assertAttributeNotEquals('foo', 'publicAttribute', $obj);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeSame
- */
- public function testAssertPublicAttributeSame()
- {
- $obj = new ClassWithNonPublicAttributes;
-
- $this->assertAttributeSame('foo', 'publicAttribute', $obj);
-
- try {
- $this->assertAttributeSame('bar', 'publicAttribute', $obj);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeNotSame
- */
- public function testAssertPublicAttributeNotSame()
- {
- $obj = new ClassWithNonPublicAttributes;
-
- $this->assertAttributeNotSame('bar', 'publicAttribute', $obj);
-
- try {
- $this->assertAttributeNotSame('foo', 'publicAttribute', $obj);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeEquals
- */
- public function testAssertProtectedAttributeEquals()
- {
- $obj = new ClassWithNonPublicAttributes;
-
- $this->assertAttributeEquals('bar', 'protectedAttribute', $obj);
-
- try {
- $this->assertAttributeEquals('foo', 'protectedAttribute', $obj);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeNotEquals
- */
- public function testAssertProtectedAttributeNotEquals()
- {
- $obj = new ClassWithNonPublicAttributes;
-
- $this->assertAttributeNotEquals('foo', 'protectedAttribute', $obj);
-
- try {
- $this->assertAttributeNotEquals('bar', 'protectedAttribute', $obj);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeEquals
- */
- public function testAssertPrivateAttributeEquals()
- {
- $obj = new ClassWithNonPublicAttributes;
-
- $this->assertAttributeEquals('baz', 'privateAttribute', $obj);
-
- try {
- $this->assertAttributeEquals('foo', 'privateAttribute', $obj);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeNotEquals
- */
- public function testAssertPrivateAttributeNotEquals()
- {
- $obj = new ClassWithNonPublicAttributes;
-
- $this->assertAttributeNotEquals('foo', 'privateAttribute', $obj);
-
- try {
- $this->assertAttributeNotEquals('baz', 'privateAttribute', $obj);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeEquals
- */
- public function testAssertPublicStaticAttributeEquals()
- {
- $this->assertAttributeEquals('foo', 'publicStaticAttribute', 'ClassWithNonPublicAttributes');
-
- try {
- $this->assertAttributeEquals('bar', 'publicStaticAttribute', 'ClassWithNonPublicAttributes');
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeNotEquals
- */
- public function testAssertPublicStaticAttributeNotEquals()
- {
- $this->assertAttributeNotEquals('bar', 'publicStaticAttribute', 'ClassWithNonPublicAttributes');
-
- try {
- $this->assertAttributeNotEquals('foo', 'publicStaticAttribute', 'ClassWithNonPublicAttributes');
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeEquals
- */
- public function testAssertProtectedStaticAttributeEquals()
- {
- $this->assertAttributeEquals('bar', 'protectedStaticAttribute', 'ClassWithNonPublicAttributes');
-
- try {
- $this->assertAttributeEquals('foo', 'protectedStaticAttribute', 'ClassWithNonPublicAttributes');
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeNotEquals
- */
- public function testAssertProtectedStaticAttributeNotEquals()
- {
- $this->assertAttributeNotEquals('foo', 'protectedStaticAttribute', 'ClassWithNonPublicAttributes');
-
- try {
- $this->assertAttributeNotEquals('bar', 'protectedStaticAttribute', 'ClassWithNonPublicAttributes');
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeEquals
- */
- public function testAssertPrivateStaticAttributeEquals()
- {
- $this->assertAttributeEquals('baz', 'privateStaticAttribute', 'ClassWithNonPublicAttributes');
-
- try {
- $this->assertAttributeEquals('foo', 'privateStaticAttribute', 'ClassWithNonPublicAttributes');
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeNotEquals
- */
- public function testAssertPrivateStaticAttributeNotEquals()
- {
- $this->assertAttributeNotEquals('foo', 'privateStaticAttribute', 'ClassWithNonPublicAttributes');
-
- try {
- $this->assertAttributeNotEquals('baz', 'privateStaticAttribute', 'ClassWithNonPublicAttributes');
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertClassHasAttribute
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertClassHasAttributeThrowsException()
- {
- $this->assertClassHasAttribute(null, null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertClassHasAttribute
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertClassHasAttributeThrowsException2()
- {
- $this->assertClassHasAttribute('foo', null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertClassHasAttribute
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertClassHasAttributeThrowsExceptionIfAttributeNameIsNotValid()
- {
- $this->assertClassHasAttribute('1', 'ClassWithNonPublicAttributes');
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertClassNotHasAttribute
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertClassNotHasAttributeThrowsException()
- {
- $this->assertClassNotHasAttribute(null, null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertClassNotHasAttribute
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertClassNotHasAttributeThrowsException2()
- {
- $this->assertClassNotHasAttribute('foo', null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertClassNotHasAttribute
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertClassNotHasAttributeThrowsExceptionIfAttributeNameIsNotValid()
- {
- $this->assertClassNotHasAttribute('1', 'ClassWithNonPublicAttributes');
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertClassHasStaticAttribute
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertClassHasStaticAttributeThrowsException()
- {
- $this->assertClassHasStaticAttribute(null, null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertClassHasStaticAttribute
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertClassHasStaticAttributeThrowsException2()
- {
- $this->assertClassHasStaticAttribute('foo', null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertClassHasStaticAttribute
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertClassHasStaticAttributeThrowsExceptionIfAttributeNameIsNotValid()
- {
- $this->assertClassHasStaticAttribute('1', 'ClassWithNonPublicAttributes');
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertClassNotHasStaticAttribute
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertClassNotHasStaticAttributeThrowsException()
- {
- $this->assertClassNotHasStaticAttribute(null, null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertClassNotHasStaticAttribute
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertClassNotHasStaticAttributeThrowsException2()
- {
- $this->assertClassNotHasStaticAttribute('foo', null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertClassNotHasStaticAttribute
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertClassNotHasStaticAttributeThrowsExceptionIfAttributeNameIsNotValid()
- {
- $this->assertClassNotHasStaticAttribute('1', 'ClassWithNonPublicAttributes');
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertObjectHasAttribute
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertObjectHasAttributeThrowsException()
- {
- $this->assertObjectHasAttribute(null, null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertObjectHasAttribute
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertObjectHasAttributeThrowsException2()
- {
- $this->assertObjectHasAttribute('foo', null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertObjectHasAttribute
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertObjectHasAttributeThrowsExceptionIfAttributeNameIsNotValid()
- {
- $this->assertObjectHasAttribute('1', 'ClassWithNonPublicAttributes');
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertObjectNotHasAttribute
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertObjectNotHasAttributeThrowsException()
- {
- $this->assertObjectNotHasAttribute(null, null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertObjectNotHasAttribute
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertObjectNotHasAttributeThrowsException2()
- {
- $this->assertObjectNotHasAttribute('foo', null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertObjectNotHasAttribute
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertObjectNotHasAttributeThrowsExceptionIfAttributeNameIsNotValid()
- {
- $this->assertObjectNotHasAttribute('1', 'ClassWithNonPublicAttributes');
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertClassHasAttribute
- */
- public function testClassHasPublicAttribute()
- {
- $this->assertClassHasAttribute('publicAttribute', 'ClassWithNonPublicAttributes');
-
- try {
- $this->assertClassHasAttribute('attribute', 'ClassWithNonPublicAttributes');
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertClassNotHasAttribute
- */
- public function testClassNotHasPublicAttribute()
- {
- $this->assertClassNotHasAttribute('attribute', 'ClassWithNonPublicAttributes');
-
- try {
- $this->assertClassNotHasAttribute('publicAttribute', 'ClassWithNonPublicAttributes');
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertClassHasStaticAttribute
- */
- public function testClassHasPublicStaticAttribute()
- {
- $this->assertClassHasStaticAttribute('publicStaticAttribute', 'ClassWithNonPublicAttributes');
-
- try {
- $this->assertClassHasStaticAttribute('attribute', 'ClassWithNonPublicAttributes');
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertClassNotHasStaticAttribute
- */
- public function testClassNotHasPublicStaticAttribute()
- {
- $this->assertClassNotHasStaticAttribute('attribute', 'ClassWithNonPublicAttributes');
-
- try {
- $this->assertClassNotHasStaticAttribute('publicStaticAttribute', 'ClassWithNonPublicAttributes');
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertObjectHasAttribute
- */
- public function testObjectHasPublicAttribute()
- {
- $obj = new ClassWithNonPublicAttributes;
-
- $this->assertObjectHasAttribute('publicAttribute', $obj);
-
- try {
- $this->assertObjectHasAttribute('attribute', $obj);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertObjectNotHasAttribute
- */
- public function testObjectNotHasPublicAttribute()
- {
- $obj = new ClassWithNonPublicAttributes;
-
- $this->assertObjectNotHasAttribute('attribute', $obj);
-
- try {
- $this->assertObjectNotHasAttribute('publicAttribute', $obj);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertObjectHasAttribute
- */
- public function testObjectHasOnTheFlyAttribute()
- {
- $obj = new stdClass;
- $obj->foo = 'bar';
-
- $this->assertObjectHasAttribute('foo', $obj);
-
- try {
- $this->assertObjectHasAttribute('bar', $obj);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertObjectNotHasAttribute
- */
- public function testObjectNotHasOnTheFlyAttribute()
- {
- $obj = new stdClass;
- $obj->foo = 'bar';
-
- $this->assertObjectNotHasAttribute('bar', $obj);
-
- try {
- $this->assertObjectNotHasAttribute('foo', $obj);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertObjectHasAttribute
- */
- public function testObjectHasProtectedAttribute()
- {
- $obj = new ClassWithNonPublicAttributes;
-
- $this->assertObjectHasAttribute('protectedAttribute', $obj);
-
- try {
- $this->assertObjectHasAttribute('attribute', $obj);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertObjectNotHasAttribute
- */
- public function testObjectNotHasProtectedAttribute()
- {
- $obj = new ClassWithNonPublicAttributes;
-
- $this->assertObjectNotHasAttribute('attribute', $obj);
-
- try {
- $this->assertObjectNotHasAttribute('protectedAttribute', $obj);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertObjectHasAttribute
- */
- public function testObjectHasPrivateAttribute()
- {
- $obj = new ClassWithNonPublicAttributes;
-
- $this->assertObjectHasAttribute('privateAttribute', $obj);
-
- try {
- $this->assertObjectHasAttribute('attribute', $obj);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertObjectNotHasAttribute
- */
- public function testObjectNotHasPrivateAttribute()
- {
- $obj = new ClassWithNonPublicAttributes;
-
- $this->assertObjectNotHasAttribute('attribute', $obj);
-
- try {
- $this->assertObjectNotHasAttribute('privateAttribute', $obj);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertThat
- * @covers PHPUnit_Framework_Assert::attribute
- * @covers PHPUnit_Framework_Assert::equalTo
- */
- public function testAssertThatAttributeEquals()
- {
- $this->assertThat(
- new ClassWithNonPublicAttributes,
- $this->attribute(
- $this->equalTo('foo'),
- 'publicAttribute'
- )
- );
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertThat
- * @covers PHPUnit_Framework_Assert::attribute
- * @covers PHPUnit_Framework_Assert::equalTo
- * @expectedException PHPUnit_Framework_AssertionFailedError
- */
- public function testAssertThatAttributeEquals2()
- {
- $this->assertThat(
- new ClassWithNonPublicAttributes,
- $this->attribute(
- $this->equalTo('bar'),
- 'publicAttribute'
- )
- );
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertThat
- * @covers PHPUnit_Framework_Assert::attribute
- * @covers PHPUnit_Framework_Assert::equalTo
- */
- public function testAssertThatAttributeEqualTo()
- {
- $this->assertThat(
- new ClassWithNonPublicAttributes,
- $this->attributeEqualTo('publicAttribute', 'foo')
- );
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertThat
- * @covers PHPUnit_Framework_Assert::anything
- */
- public function testAssertThatAnything()
- {
- $this->assertThat('anything', $this->anything());
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertThat
- * @covers PHPUnit_Framework_Assert::isTrue
- */
- public function testAssertThatIsTrue()
- {
- $this->assertThat(true, $this->isTrue());
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertThat
- * @covers PHPUnit_Framework_Assert::isFalse
- */
- public function testAssertThatIsFalse()
- {
- $this->assertThat(false, $this->isFalse());
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertThat
- * @covers PHPUnit_Framework_Assert::isJson
- */
- public function testAssertThatIsJson()
- {
- $this->assertThat('{}', $this->isJson());
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertThat
- * @covers PHPUnit_Framework_Assert::anything
- * @covers PHPUnit_Framework_Assert::logicalAnd
- */
- public function testAssertThatAnythingAndAnything()
- {
- $this->assertThat(
- 'anything',
- $this->logicalAnd(
- $this->anything(), $this->anything()
- )
- );
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertThat
- * @covers PHPUnit_Framework_Assert::anything
- * @covers PHPUnit_Framework_Assert::logicalOr
- */
- public function testAssertThatAnythingOrAnything()
- {
- $this->assertThat(
- 'anything',
- $this->logicalOr(
- $this->anything(), $this->anything()
- )
- );
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertThat
- * @covers PHPUnit_Framework_Assert::anything
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_Assert::logicalXor
- */
- public function testAssertThatAnythingXorNotAnything()
- {
- $this->assertThat(
- 'anything',
- $this->logicalXor(
- $this->anything(),
- $this->logicalNot($this->anything())
- )
- );
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertThat
- * @covers PHPUnit_Framework_Assert::contains
- */
- public function testAssertThatContains()
- {
- $this->assertThat(array('foo'), $this->contains('foo'));
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertThat
- * @covers PHPUnit_Framework_Assert::stringContains
- */
- public function testAssertThatStringContains()
- {
- $this->assertThat('barfoobar', $this->stringContains('foo'));
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertThat
- * @covers PHPUnit_Framework_Assert::containsOnly
- */
- public function testAssertThatContainsOnly()
- {
- $this->assertThat(array('foo'), $this->containsOnly('string'));
- }
- /**
- * @covers PHPUnit_Framework_Assert::assertThat
- * @covers PHPUnit_Framework_Assert::containsOnlyInstancesOf
- */
- public function testAssertThatContainsOnlyInstancesOf()
- {
- $this->assertThat(array(new Book), $this->containsOnlyInstancesOf('Book'));
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertThat
- * @covers PHPUnit_Framework_Assert::arrayHasKey
- */
- public function testAssertThatArrayHasKey()
- {
- $this->assertThat(array('foo' => 'bar'), $this->arrayHasKey('foo'));
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertThat
- * @covers PHPUnit_Framework_Assert::classHasAttribute
- */
- public function testAssertThatClassHasAttribute()
- {
- $this->assertThat(
- new ClassWithNonPublicAttributes,
- $this->classHasAttribute('publicAttribute')
- );
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertThat
- * @covers PHPUnit_Framework_Assert::classHasStaticAttribute
- */
- public function testAssertThatClassHasStaticAttribute()
- {
- $this->assertThat(
- new ClassWithNonPublicAttributes,
- $this->classHasStaticAttribute('publicStaticAttribute')
- );
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertThat
- * @covers PHPUnit_Framework_Assert::objectHasAttribute
- */
- public function testAssertThatObjectHasAttribute()
- {
- $this->assertThat(
- new ClassWithNonPublicAttributes,
- $this->objectHasAttribute('publicAttribute')
- );
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertThat
- * @covers PHPUnit_Framework_Assert::equalTo
- */
- public function testAssertThatEqualTo()
- {
- $this->assertThat('foo', $this->equalTo('foo'));
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertThat
- * @covers PHPUnit_Framework_Assert::identicalTo
- */
- public function testAssertThatIdenticalTo()
- {
- $value = new stdClass;
- $constraint = $this->identicalTo($value);
-
- $this->assertThat($value, $constraint);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertThat
- * @covers PHPUnit_Framework_Assert::isInstanceOf
- */
- public function testAssertThatIsInstanceOf()
- {
- $this->assertThat(new stdClass, $this->isInstanceOf('StdClass'));
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertThat
- * @covers PHPUnit_Framework_Assert::isType
- */
- public function testAssertThatIsType()
- {
- $this->assertThat('string', $this->isType('string'));
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertThat
- * @covers PHPUnit_Framework_Assert::isEmpty
- */
- public function testAssertThatIsEmpty()
- {
- $this->assertThat(array(), $this->isEmpty());
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertThat
- * @covers PHPUnit_Framework_Assert::fileExists
- */
- public function testAssertThatFileExists()
- {
- $this->assertThat(__FILE__, $this->fileExists());
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertThat
- * @covers PHPUnit_Framework_Assert::greaterThan
- */
- public function testAssertThatGreaterThan()
- {
- $this->assertThat(2, $this->greaterThan(1));
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertThat
- * @covers PHPUnit_Framework_Assert::greaterThanOrEqual
- */
- public function testAssertThatGreaterThanOrEqual()
- {
- $this->assertThat(2, $this->greaterThanOrEqual(1));
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertThat
- * @covers PHPUnit_Framework_Assert::lessThan
- */
- public function testAssertThatLessThan()
- {
- $this->assertThat(1, $this->lessThan(2));
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertThat
- * @covers PHPUnit_Framework_Assert::lessThanOrEqual
- */
- public function testAssertThatLessThanOrEqual()
- {
- $this->assertThat(1, $this->lessThanOrEqual(2));
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertThat
- * @covers PHPUnit_Framework_Assert::matchesRegularExpression
- */
- public function testAssertThatMatchesRegularExpression()
- {
- $this->assertThat('foobar', $this->matchesRegularExpression('/foo/'));
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertThat
- * @covers PHPUnit_Framework_Assert::callback
- */
- public function testAssertThatCallback()
- {
- $this->assertThat(
- null,
- $this->callback(function ($other) { return true; })
- );
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertThat
- * @covers PHPUnit_Framework_Assert::countOf
- */
- public function testAssertThatCountOf()
- {
- $this->assertThat(array(1), $this->countOf(1));
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertFileEquals
- */
- public function testAssertFileEquals()
- {
- $this->assertFileEquals(
- $this->filesDirectory . 'foo.xml',
- $this->filesDirectory . 'foo.xml'
- );
-
- try {
- $this->assertFileEquals(
- $this->filesDirectory . 'foo.xml',
- $this->filesDirectory . 'bar.xml'
- );
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertFileNotEquals
- */
- public function testAssertFileNotEquals()
- {
- $this->assertFileNotEquals(
- $this->filesDirectory . 'foo.xml',
- $this->filesDirectory . 'bar.xml'
- );
-
- try {
- $this->assertFileNotEquals(
- $this->filesDirectory . 'foo.xml',
- $this->filesDirectory . 'foo.xml'
- );
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertStringEqualsFile
- */
- public function testAssertStringEqualsFile()
- {
- $this->assertStringEqualsFile(
- $this->filesDirectory . 'foo.xml',
- file_get_contents($this->filesDirectory . 'foo.xml')
- );
-
- try {
- $this->assertStringEqualsFile(
- $this->filesDirectory . 'foo.xml',
- file_get_contents($this->filesDirectory . 'bar.xml')
- );
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertStringNotEqualsFile
- */
- public function testAssertStringNotEqualsFile()
- {
- $this->assertStringNotEqualsFile(
- $this->filesDirectory . 'foo.xml',
- file_get_contents($this->filesDirectory . 'bar.xml')
- );
-
- try {
- $this->assertStringNotEqualsFile(
- $this->filesDirectory . 'foo.xml',
- file_get_contents($this->filesDirectory . 'foo.xml')
- );
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertStringStartsWith
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertStringStartsWithThrowsException()
- {
- $this->assertStringStartsWith(null, null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertStringStartsWith
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertStringStartsWithThrowsException2()
- {
- $this->assertStringStartsWith('', null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertStringStartsNotWith
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertStringStartsNotWithThrowsException()
- {
- $this->assertStringStartsNotWith(null, null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertStringStartsNotWith
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertStringStartsNotWithThrowsException2()
- {
- $this->assertStringStartsNotWith('', null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertStringEndsWith
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertStringEndsWithThrowsException()
- {
- $this->assertStringEndsWith(null, null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertStringEndsWith
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertStringEndsWithThrowsException2()
- {
- $this->assertStringEndsWith('', null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertStringEndsNotWith
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertStringEndsNotWithThrowsException()
- {
- $this->assertStringEndsNotWith(null, null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertStringEndsNotWith
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertStringEndsNotWithThrowsException2()
- {
- $this->assertStringEndsNotWith('', null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertStringStartsWith
- */
- public function testAssertStringStartsWith()
- {
- $this->assertStringStartsWith('prefix', 'prefixfoo');
-
- try {
- $this->assertStringStartsWith('prefix', 'foo');
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertStringStartsNotWith
- */
- public function testAssertStringStartsNotWith()
- {
- $this->assertStringStartsNotWith('prefix', 'foo');
-
- try {
- $this->assertStringStartsNotWith('prefix', 'prefixfoo');
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertStringEndsWith
- */
- public function testAssertStringEndsWith()
- {
- $this->assertStringEndsWith('suffix', 'foosuffix');
-
- try {
- $this->assertStringEndsWith('suffix', 'foo');
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertStringEndsNotWith
- */
- public function testAssertStringEndsNotWith()
- {
- $this->assertStringEndsNotWith('suffix', 'foo');
-
- try {
- $this->assertStringEndsNotWith('suffix', 'foosuffix');
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertStringMatchesFormat
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertStringMatchesFormatRaisesExceptionForInvalidFirstArgument()
- {
- $this->assertStringMatchesFormat(null, '');
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertStringMatchesFormat
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertStringMatchesFormatRaisesExceptionForInvalidSecondArgument()
- {
- $this->assertStringMatchesFormat('', null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertStringMatchesFormat
- */
- public function testAssertStringMatchesFormat()
- {
- $this->assertStringMatchesFormat('*%s*', '***');
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertStringMatchesFormat
- * @expectedException PHPUnit_Framework_AssertionFailedError
- */
- public function testAssertStringMatchesFormatFailure()
- {
- $this->assertStringMatchesFormat('*%s*', '**');
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertStringNotMatchesFormat
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertStringNotMatchesFormatRaisesExceptionForInvalidFirstArgument()
- {
- $this->assertStringNotMatchesFormat(null, '');
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertStringNotMatchesFormat
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertStringNotMatchesFormatRaisesExceptionForInvalidSecondArgument()
- {
- $this->assertStringNotMatchesFormat('', null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertStringNotMatchesFormat
- */
- public function testAssertStringNotMatchesFormat()
- {
- $this->assertStringNotMatchesFormat('*%s*', '**');
-
- try {
- $this->assertStringMatchesFormat('*%s*', '**');
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertEmpty
- */
- public function testAssertEmpty()
- {
- $this->assertEmpty(array());
-
- try {
- $this->assertEmpty(array('foo'));
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotEmpty
- */
- public function testAssertNotEmpty()
- {
- $this->assertNotEmpty(array('foo'));
-
- try {
- $this->assertNotEmpty(array());
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeEmpty
- */
- public function testAssertAttributeEmpty()
- {
- $o = new stdClass;
- $o->a = array();
-
- $this->assertAttributeEmpty('a', $o);
-
- try {
- $o->a = array('b');
- $this->assertAttributeEmpty('a', $o);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeNotEmpty
- */
- public function testAssertAttributeNotEmpty()
- {
- $o = new stdClass;
- $o->a = array('b');
-
- $this->assertAttributeNotEmpty('a', $o);
-
- try {
- $o->a = array();
- $this->assertAttributeNotEmpty('a', $o);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::markTestIncomplete
- */
- public function testMarkTestIncomplete()
- {
- try {
- $this->markTestIncomplete('incomplete');
- } catch (PHPUnit_Framework_IncompleteTestError $e) {
- $this->assertEquals('incomplete', $e->getMessage());
-
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::markTestSkipped
- */
- public function testMarkTestSkipped()
- {
- try {
- $this->markTestSkipped('skipped');
- } catch (PHPUnit_Framework_SkippedTestError $e) {
- $this->assertEquals('skipped', $e->getMessage());
-
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertCount
- */
- public function testAssertCount()
- {
- $this->assertCount(2, array(1, 2));
-
- try {
- $this->assertCount(2, array(1, 2, 3));
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertCount
- */
- public function testAssertCountTraversable()
- {
- $this->assertCount(2, new ArrayIterator(array(1, 2)));
-
- try {
- $this->assertCount(2, new ArrayIterator(array(1, 2, 3)));
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertCount
- */
- public function testAssertCountThrowsExceptionIfExpectedCountIsNoInteger()
- {
- try {
- $this->assertCount('a', array());
- } catch (PHPUnit_Framework_Exception $e) {
- $this->assertEquals('Argument #1 (No Value) of PHPUnit_Framework_Assert::assertCount() must be a integer', $e->getMessage());
-
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertCount
- */
- public function testAssertCountThrowsExceptionIfElementIsNotCountable()
- {
- try {
- $this->assertCount(2, '');
- } catch (PHPUnit_Framework_Exception $e) {
- $this->assertEquals('Argument #2 (No Value) of PHPUnit_Framework_Assert::assertCount() must be a countable or traversable', $e->getMessage());
-
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeCount
- */
- public function testAssertAttributeCount()
- {
- $o = new stdClass;
- $o->a = array();
-
- $this->assertAttributeCount(0, 'a', $o);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotCount
- */
- public function testAssertNotCount()
- {
- $this->assertNotCount(2, array(1, 2, 3));
-
- try {
- $this->assertNotCount(2, array(1, 2));
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotCount
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertNotCountThrowsExceptionIfExpectedCountIsNoInteger()
- {
- $this->assertNotCount('a', array());
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotCount
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertNotCountThrowsExceptionIfElementIsNotCountable()
- {
- $this->assertNotCount(2, '');
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeNotCount
- */
- public function testAssertAttributeNotCount()
- {
- $o = new stdClass;
- $o->a = array();
-
- $this->assertAttributeNotCount(1, 'a', $o);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertSameSize
- */
- public function testAssertSameSize()
- {
- $this->assertSameSize(array(1, 2), array(3, 4));
-
- try {
- $this->assertSameSize(array(1, 2), array(1, 2, 3));
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertSameSize
- */
- public function testAssertSameSizeThrowsExceptionIfExpectedIsNotCountable()
- {
- try {
- $this->assertSameSize('a', array());
- } catch (PHPUnit_Framework_Exception $e) {
- $this->assertEquals('Argument #1 (No Value) of PHPUnit_Framework_Assert::assertSameSize() must be a countable or traversable', $e->getMessage());
-
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertSameSize
- */
- public function testAssertSameSizeThrowsExceptionIfActualIsNotCountable()
- {
- try {
- $this->assertSameSize(array(), '');
- } catch (PHPUnit_Framework_Exception $e) {
- $this->assertEquals('Argument #2 (No Value) of PHPUnit_Framework_Assert::assertSameSize() must be a countable or traversable', $e->getMessage());
-
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotSameSize
- */
- public function testAssertNotSameSize()
- {
- $this->assertNotSameSize(array(1, 2), array(1, 2, 3));
-
- try {
- $this->assertNotSameSize(array(1, 2), array(3, 4));
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotSameSize
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertNotSameSizeThrowsExceptionIfExpectedIsNotCountable()
- {
- $this->assertNotSameSize('a', array());
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotSameSize
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertNotSameSizeThrowsExceptionIfActualIsNotCountable()
- {
- $this->assertNotSameSize(array(), '');
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertJson
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertJsonRaisesExceptionForInvalidArgument()
- {
- $this->assertJson(null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertJson
- */
- public function testAssertJson()
- {
- $this->assertJson('{}');
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertJsonStringEqualsJsonString
- */
- public function testAssertJsonStringEqualsJsonString()
- {
- $expected = '{"Mascott" : "Tux"}';
- $actual = '{"Mascott" : "Tux"}';
- $message = 'Given Json strings do not match';
-
- $this->assertJsonStringEqualsJsonString($expected, $actual, $message);
- }
-
- /**
- * @dataProvider validInvalidJsonDataprovider
- * @covers PHPUnit_Framework_Assert::assertJsonStringEqualsJsonString
- */
- public function testAssertJsonStringEqualsJsonStringErrorRaised($expected, $actual)
- {
- try {
- $this->assertJsonStringEqualsJsonString($expected, $actual);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
- $this->fail('Expected exception not found');
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertJsonStringNotEqualsJsonString
- */
- public function testAssertJsonStringNotEqualsJsonString()
- {
- $expected = '{"Mascott" : "Beastie"}';
- $actual = '{"Mascott" : "Tux"}';
- $message = 'Given Json strings do match';
-
- $this->assertJsonStringNotEqualsJsonString($expected, $actual, $message);
- }
-
- /**
- * @dataProvider validInvalidJsonDataprovider
- * @covers PHPUnit_Framework_Assert::assertJsonStringNotEqualsJsonString
- */
- public function testAssertJsonStringNotEqualsJsonStringErrorRaised($expected, $actual)
- {
- try {
- $this->assertJsonStringNotEqualsJsonString($expected, $actual);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
- $this->fail('Expected exception not found');
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertJsonStringEqualsJsonFile
- */
- public function testAssertJsonStringEqualsJsonFile()
- {
- $file = __DIR__ . '/../_files/JsonData/simpleObject.json';
- $actual = json_encode(array('Mascott' => 'Tux'));
- $message = '';
- $this->assertJsonStringEqualsJsonFile($file, $actual, $message);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertJsonStringEqualsJsonFile
- */
- public function testAssertJsonStringEqualsJsonFileExpectingExpectationFailedException()
- {
- $file = __DIR__ . '/../_files/JsonData/simpleObject.json';
- $actual = json_encode(array('Mascott' => 'Beastie'));
- $message = '';
- try {
- $this->assertJsonStringEqualsJsonFile($file, $actual, $message);
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- 'Failed asserting that \'{"Mascott":"Beastie"}\' matches JSON string "{"Mascott":"Tux"}".',
- $e->getMessage()
- );
-
- return;
- }
-
- $this->fail('Expected Exception not thrown.');
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertJsonStringEqualsJsonFile
- */
- public function testAssertJsonStringEqualsJsonFileExpectingException()
- {
- $file = __DIR__ . '/../_files/JsonData/simpleObject.json';
- try {
- $this->assertJsonStringEqualsJsonFile($file, null);
- } catch (PHPUnit_Framework_Exception $e) {
- return;
- }
- $this->fail('Expected Exception not thrown.');
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertJsonStringNotEqualsJsonFile
- */
- public function testAssertJsonStringNotEqualsJsonFile()
- {
- $file = __DIR__ . '/../_files/JsonData/simpleObject.json';
- $actual = json_encode(array('Mascott' => 'Beastie'));
- $message = '';
- $this->assertJsonStringNotEqualsJsonFile($file, $actual, $message);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertJsonStringNotEqualsJsonFile
- */
- public function testAssertJsonStringNotEqualsJsonFileExpectingException()
- {
- $file = __DIR__ . '/../_files/JsonData/simpleObject.json';
- try {
- $this->assertJsonStringNotEqualsJsonFile($file, null);
- } catch (PHPUnit_Framework_Exception $e) {
- return;
- }
- $this->fail('Expected exception not found.');
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertJsonFileNotEqualsJsonFile
- */
- public function testAssertJsonFileNotEqualsJsonFile()
- {
- $fileExpected = __DIR__ . '/../_files/JsonData/simpleObject.json';
- $fileActual = __DIR__ . '/../_files/JsonData/arrayObject.json';
- $message = '';
- $this->assertJsonFileNotEqualsJsonFile($fileExpected, $fileActual, $message);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertJsonFileEqualsJsonFile
- */
- public function testAssertJsonFileEqualsJsonFile()
- {
- $file = __DIR__ . '/../_files/JsonData/simpleObject.json';
- $message = '';
- $this->assertJsonFileEqualsJsonFile($file, $file, $message);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertInstanceOf
- */
- public function testAssertInstanceOf()
- {
- $this->assertInstanceOf('stdClass', new stdClass);
-
- try {
- $this->assertInstanceOf('Exception', new stdClass);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertInstanceOf
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertInstanceOfThrowsExceptionForInvalidArgument()
- {
- $this->assertInstanceOf(null, new stdClass);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeInstanceOf
- */
- public function testAssertAttributeInstanceOf()
- {
- $o = new stdClass;
- $o->a = new stdClass;
-
- $this->assertAttributeInstanceOf('stdClass', 'a', $o);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotInstanceOf
- */
- public function testAssertNotInstanceOf()
- {
- $this->assertNotInstanceOf('Exception', new stdClass);
-
- try {
- $this->assertNotInstanceOf('stdClass', new stdClass);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotInstanceOf
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertNotInstanceOfThrowsExceptionForInvalidArgument()
- {
- $this->assertNotInstanceOf(null, new stdClass);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeNotInstanceOf
- */
- public function testAssertAttributeNotInstanceOf()
- {
- $o = new stdClass;
- $o->a = new stdClass;
-
- $this->assertAttributeNotInstanceOf('Exception', 'a', $o);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertInternalType
- */
- public function testAssertInternalType()
- {
- $this->assertInternalType('integer', 1);
-
- try {
- $this->assertInternalType('string', 1);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertInternalType
- */
- public function testAssertInternalTypeDouble()
- {
- $this->assertInternalType('double', 1.0);
-
- try {
- $this->assertInternalType('double', 1);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertInternalType
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertInternalTypeThrowsExceptionForInvalidArgument()
- {
- $this->assertInternalType(null, 1);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeInternalType
- */
- public function testAssertAttributeInternalType()
- {
- $o = new stdClass;
- $o->a = 1;
-
- $this->assertAttributeInternalType('integer', 'a', $o);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotInternalType
- */
- public function testAssertNotInternalType()
- {
- $this->assertNotInternalType('string', 1);
-
- try {
- $this->assertNotInternalType('integer', 1);
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertNotInternalType
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertNotInternalTypeThrowsExceptionForInvalidArgument()
- {
- $this->assertNotInternalType(null, 1);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertAttributeNotInternalType
- */
- public function testAssertAttributeNotInternalType()
- {
- $o = new stdClass;
- $o->a = 1;
-
- $this->assertAttributeNotInternalType('string', 'a', $o);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertStringMatchesFormatFile
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertStringMatchesFormatFileThrowsExceptionForInvalidArgument()
- {
- $this->assertStringMatchesFormatFile('not_existing_file', '');
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertStringMatchesFormatFile
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertStringMatchesFormatFileThrowsExceptionForInvalidArgument2()
- {
- $this->assertStringMatchesFormatFile($this->filesDirectory . 'expectedFileFormat.txt', null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertStringMatchesFormatFile
- */
- public function testAssertStringMatchesFormatFile()
- {
- $this->assertStringMatchesFormatFile($this->filesDirectory . 'expectedFileFormat.txt', "FOO\n");
-
- try {
- $this->assertStringMatchesFormatFile($this->filesDirectory . 'expectedFileFormat.txt', "BAR\n");
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertStringNotMatchesFormatFile
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertStringNotMatchesFormatFileThrowsExceptionForInvalidArgument()
- {
- $this->assertStringNotMatchesFormatFile('not_existing_file', '');
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertStringNotMatchesFormatFile
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testAssertStringNotMatchesFormatFileThrowsExceptionForInvalidArgument2()
- {
- $this->assertStringNotMatchesFormatFile($this->filesDirectory . 'expectedFileFormat.txt', null);
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::assertStringNotMatchesFormatFile
- */
- public function testAssertStringNotMatchesFormatFile()
- {
- $this->assertStringNotMatchesFormatFile($this->filesDirectory . 'expectedFileFormat.txt', "BAR\n");
-
- try {
- $this->assertStringNotMatchesFormatFile($this->filesDirectory . 'expectedFileFormat.txt', "FOO\n");
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @return array
- */
- public static function validInvalidJsonDataprovider()
- {
- return array(
- 'error syntax in expected JSON' => array('{"Mascott"::}', '{"Mascott" : "Tux"}'),
- 'error UTF-8 in actual JSON' => array('{"Mascott" : "Tux"}', '{"Mascott" : :}'),
- );
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Framework/BaseTestListenerTest.php b/vendor/phpunit/phpunit/tests/Framework/BaseTestListenerTest.php
deleted file mode 100644
index 0d426cf0..00000000
--- a/vendor/phpunit/phpunit/tests/Framework/BaseTestListenerTest.php
+++ /dev/null
@@ -1,34 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 4.0.0
- */
-class Framework_BaseTestListenerTest extends PHPUnit_Framework_TestCase
-{
- /**
- * @var PHPUnit_Framework_TestResult
- */
- private $result;
-
- /**
- * @covers PHPUnit_Framework_TestResult
- */
- public function testEndEventsAreCounted()
- {
- $this->result = new PHPUnit_Framework_TestResult;
- $listener = new BaseTestListenerSample();
- $this->result->addListener($listener);
- $test = new Success;
- $test->run($this->result);
-
- $this->assertEquals(1, $listener->endCount);
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Framework/Constraint/CountTest.php b/vendor/phpunit/phpunit/tests/Framework/Constraint/CountTest.php
deleted file mode 100644
index 79e99e88..00000000
--- a/vendor/phpunit/phpunit/tests/Framework/Constraint/CountTest.php
+++ /dev/null
@@ -1,63 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 3.7.30
- * @covers PHPUnit_Framework_Constraint_Count
- */
-class CountTest extends PHPUnit_Framework_TestCase
-{
- public function testCount()
- {
- $countConstraint = new PHPUnit_Framework_Constraint_Count(3);
- $this->assertTrue($countConstraint->evaluate(array(1, 2, 3), '', true));
-
- $countConstraint = new PHPUnit_Framework_Constraint_Count(0);
- $this->assertTrue($countConstraint->evaluate(array(), '', true));
-
- $countConstraint = new PHPUnit_Framework_Constraint_Count(2);
- $it = new TestIterator(array(1, 2));
- $this->assertTrue($countConstraint->evaluate($it, '', true));
- }
-
- public function testCountDoesNotChangeIteratorKey()
- {
- $countConstraint = new PHPUnit_Framework_Constraint_Count(2);
-
- // test with 1st implementation of Iterator
- $it = new TestIterator(array(1, 2));
-
- $countConstraint->evaluate($it, '', true);
- $this->assertEquals(1, $it->current());
-
- $it->next();
- $countConstraint->evaluate($it, '', true);
- $this->assertEquals(2, $it->current());
-
- $it->next();
- $countConstraint->evaluate($it, '', true);
- $this->assertFalse($it->valid());
-
- // test with 2nd implementation of Iterator
- $it = new TestIterator2(array(1, 2));
-
- $countConstraint = new PHPUnit_Framework_Constraint_Count(2);
- $countConstraint->evaluate($it, '', true);
- $this->assertEquals(1, $it->current());
-
- $it->next();
- $countConstraint->evaluate($it, '', true);
- $this->assertEquals(2, $it->current());
-
- $it->next();
- $countConstraint->evaluate($it, '', true);
- $this->assertFalse($it->valid());
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Framework/Constraint/ExceptionMessageRegExpTest.php b/vendor/phpunit/phpunit/tests/Framework/Constraint/ExceptionMessageRegExpTest.php
deleted file mode 100644
index 1c02a12b..00000000
--- a/vendor/phpunit/phpunit/tests/Framework/Constraint/ExceptionMessageRegExpTest.php
+++ /dev/null
@@ -1,56 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 4.3.0
- * @covers PHPUnit_Framework_Constraint_ExceptionMessageRegExp
- */
-class ExceptionMessageRegExpTest extends PHPUnit_Framework_TestCase
-{
- /**
- * @expectedException \Exception
- * @expectedExceptionMessageRegExp /^A polymorphic \w+ message/
- */
- public function testRegexMessage()
- {
- throw new Exception('A polymorphic exception message');
- }
-
- /**
- * @expectedException \Exception
- * @expectedExceptionMessageRegExp /^a poly[a-z]+ [a-zA-Z0-9_]+ me(s){2}age$/i
- */
- public function testRegexMessageExtreme()
- {
- throw new Exception('A polymorphic exception message');
- }
-
- /**
- * @runInSeparateProcess
- * @requires extension xdebug
- * @expectedException \Exception
- * @expectedExceptionMessageRegExp #Screaming preg_match#
- */
- public function testMessageXdebugScreamCompatibility()
- {
- ini_set('xdebug.scream', '1');
- throw new Exception('Screaming preg_match');
- }
-
- /**
- * @coversNothing
- * @expectedException \Exception variadic
- * @expectedExceptionMessageRegExp /^A variadic \w+ message/
- */
- public function testSimultaneousLiteralAndRegExpExceptionMessage()
- {
- throw new Exception('A variadic exception message');
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Framework/Constraint/ExceptionMessageTest.php b/vendor/phpunit/phpunit/tests/Framework/Constraint/ExceptionMessageTest.php
deleted file mode 100644
index 33f4319b..00000000
--- a/vendor/phpunit/phpunit/tests/Framework/Constraint/ExceptionMessageTest.php
+++ /dev/null
@@ -1,52 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 4.0.20
- * @covers PHPUnit_Framework_Constraint_ExceptionMessage
- */
-class ExceptionMessageTest extends PHPUnit_Framework_TestCase
-{
- /**
- * @expectedException \Exception
- * @expectedExceptionMessage A literal exception message
- */
- public function testLiteralMessage()
- {
- throw new Exception('A literal exception message');
- }
-
- /**
- * @expectedException \Exception
- * @expectedExceptionMessage A partial
- */
- public function testPatialMessageBegin()
- {
- throw new Exception('A partial exception message');
- }
-
- /**
- * @expectedException \Exception
- * @expectedExceptionMessage partial exception
- */
- public function testPatialMessageMiddle()
- {
- throw new Exception('A partial exception message');
- }
-
- /**
- * @expectedException \Exception
- * @expectedExceptionMessage exception message
- */
- public function testPatialMessageEnd()
- {
- throw new Exception('A partial exception message');
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Framework/Constraint/JsonMatches/ErrorMessageProviderTest.php b/vendor/phpunit/phpunit/tests/Framework/Constraint/JsonMatches/ErrorMessageProviderTest.php
deleted file mode 100644
index 85290262..00000000
--- a/vendor/phpunit/phpunit/tests/Framework/Constraint/JsonMatches/ErrorMessageProviderTest.php
+++ /dev/null
@@ -1,83 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since File available since Release 3.7.0
- */
-class Framework_Constraint_JsonMatches_ErrorMessageProviderTest extends PHPUnit_Framework_TestCase
-{
- /**
- * @dataProvider translateTypeToPrefixDataprovider
- * @covers PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider::translateTypeToPrefix
- */
- public function testTranslateTypeToPrefix($expected, $type)
- {
- $this->assertEquals(
- $expected,
- PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider::translateTypeToPrefix($type)
- );
- }
-
- /**
- * @dataProvider determineJsonErrorDataprovider
- * @covers PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider::determineJsonError
- */
- public function testDetermineJsonError($expected, $error, $prefix)
- {
- $this->assertEquals(
- $expected,
- PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider::determineJsonError(
- $error,
- $prefix
- )
- );
- }
-
- public static function determineJsonErrorDataprovider()
- {
- return array(
- 'JSON_ERROR_NONE' => array(
- null, 'json_error_none', ''
- ),
- 'JSON_ERROR_DEPTH' => array(
- 'Maximum stack depth exceeded', JSON_ERROR_DEPTH, ''
- ),
- 'prefixed JSON_ERROR_DEPTH' => array(
- 'TUX: Maximum stack depth exceeded', JSON_ERROR_DEPTH, 'TUX: '
- ),
- 'JSON_ERROR_STATE_MISMatch' => array(
- 'Underflow or the modes mismatch', JSON_ERROR_STATE_MISMATCH, ''
- ),
- 'JSON_ERROR_CTRL_CHAR' => array(
- 'Unexpected control character found', JSON_ERROR_CTRL_CHAR, ''
- ),
- 'JSON_ERROR_SYNTAX' => array(
- 'Syntax error, malformed JSON', JSON_ERROR_SYNTAX, ''
- ),
- 'JSON_ERROR_UTF8`' => array(
- 'Malformed UTF-8 characters, possibly incorrectly encoded',
- JSON_ERROR_UTF8,
- ''
- ),
- 'Invalid error indicator' => array(
- 'Unknown error', 55, ''
- ),
- );
- }
-
- public static function translateTypeToPrefixDataprovider()
- {
- return array(
- 'expected' => array('Expected value JSON decode error - ', 'expected'),
- 'actual' => array('Actual value JSON decode error - ', 'actual'),
- 'default' => array('', ''),
- );
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Framework/Constraint/JsonMatchesTest.php b/vendor/phpunit/phpunit/tests/Framework/Constraint/JsonMatchesTest.php
deleted file mode 100644
index 2b7221c4..00000000
--- a/vendor/phpunit/phpunit/tests/Framework/Constraint/JsonMatchesTest.php
+++ /dev/null
@@ -1,48 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since File available since Release 3.7.0
- */
-class Framework_Constraint_JsonMatchesTest extends PHPUnit_Framework_TestCase
-{
- /**
- * @dataProvider evaluateDataprovider
- * @covers PHPUnit_Framework_Constraint_JsonMatches::evaluate
- * @covers PHPUnit_Framework_Constraint_JsonMatches::matches
- * @covers PHPUnit_Framework_Constraint_JsonMatches::__construct
- */
- public function testEvaluate($expected, $jsonOther, $jsonValue)
- {
- $constraint = new PHPUnit_Framework_Constraint_JsonMatches($jsonValue);
- $this->assertEquals($expected, $constraint->evaluate($jsonOther, '', true));
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_JsonMatches::toString
- */
- public function testToString()
- {
- $jsonValue = json_encode(array('Mascott' => 'Tux'));
- $constraint = new PHPUnit_Framework_Constraint_JsonMatches($jsonValue);
-
- $this->assertEquals('matches JSON string "' . $jsonValue . '"', $constraint->toString());
- }
-
- public static function evaluateDataprovider()
- {
- return array(
- 'valid JSON' => array(true, json_encode(array('Mascott' => 'Tux')), json_encode(array('Mascott' => 'Tux'))),
- 'error syntax' => array(false, '{"Mascott"::}', json_encode(array('Mascott' => 'Tux'))),
- 'error UTF-8' => array(false, json_encode('\xB1\x31'), json_encode(array('Mascott' => 'Tux'))),
- 'invalid JSON in class instantiation' => array(false, json_encode(array('Mascott' => 'Tux')), '{"Mascott"::}'),
- );
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Framework/ConstraintTest.php b/vendor/phpunit/phpunit/tests/Framework/ConstraintTest.php
deleted file mode 100644
index 71656608..00000000
--- a/vendor/phpunit/phpunit/tests/Framework/ConstraintTest.php
+++ /dev/null
@@ -1,3489 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 3.0.0
- */
-class Framework_ConstraintTest extends PHPUnit_Framework_TestCase
-{
- /**
- * @covers PHPUnit_Framework_Constraint_ArrayHasKey
- * @covers PHPUnit_Framework_Assert::arrayHasKey
- * @covers PHPUnit_Framework_Constraint::count
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintArrayHasKey()
- {
- $constraint = PHPUnit_Framework_Assert::arrayHasKey(0);
-
- $this->assertFalse($constraint->evaluate(array(), '', true));
- $this->assertEquals('has the key 0', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate(array());
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(<<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_ArrayHasKey
- * @covers PHPUnit_Framework_Assert::arrayHasKey
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintArrayHasKey2()
- {
- $constraint = PHPUnit_Framework_Assert::arrayHasKey(0);
-
- try {
- $constraint->evaluate(array(), 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_ArrayHasKey
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::arrayHasKey
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintArrayNotHasKey()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::arrayHasKey(0)
- );
-
- $this->assertFalse($constraint->evaluate(array(0 => 1), '', true));
- $this->assertEquals('does not have the key 0', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate(array(0 => 1));
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_ArrayHasKey
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::arrayHasKey
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintArrayNotHasKey2()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::arrayHasKey(0)
- );
-
- try {
- $constraint->evaluate(array(0), 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_FileExists
- * @covers PHPUnit_Framework_Assert::fileExists
- * @covers PHPUnit_Framework_Constraint::count
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintFileExists()
- {
- $constraint = PHPUnit_Framework_Assert::fileExists();
-
- $this->assertFalse($constraint->evaluate('foo', '', true));
- $this->assertEquals('file exists', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate('foo');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_FileExists
- * @covers PHPUnit_Framework_Assert::fileExists
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintFileExists2()
- {
- $constraint = PHPUnit_Framework_Assert::fileExists();
-
- try {
- $constraint->evaluate('foo', 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(<<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_FileExists
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_Assert::fileExists
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintFileNotExists()
- {
- $file = dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'ClassWithNonPublicAttributes.php';
-
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::fileExists()
- );
-
- $this->assertFalse($constraint->evaluate($file, '', true));
- $this->assertEquals('file does not exist', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate($file);
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_FileExists
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_Assert::fileExists
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintFileNotExists2()
- {
- $file = dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'ClassWithNonPublicAttributes.php';
-
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::fileExists()
- );
-
- try {
- $constraint->evaluate($file, 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(<<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_GreaterThan
- * @covers PHPUnit_Framework_Assert::greaterThan
- * @covers PHPUnit_Framework_Constraint::count
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintGreaterThan()
- {
- $constraint = PHPUnit_Framework_Assert::greaterThan(1);
-
- $this->assertFalse($constraint->evaluate(0, '', true));
- $this->assertTrue($constraint->evaluate(2, '', true));
- $this->assertEquals('is greater than 1', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate(0);
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_GreaterThan
- * @covers PHPUnit_Framework_Assert::greaterThan
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintGreaterThan2()
- {
- $constraint = PHPUnit_Framework_Assert::greaterThan(1);
-
- try {
- $constraint->evaluate(0, 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_GreaterThan
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::greaterThan
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintNotGreaterThan()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::greaterThan(1)
- );
-
- $this->assertTrue($constraint->evaluate(1, '', true));
- $this->assertEquals('is not greater than 1', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate(2);
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_GreaterThan
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::greaterThan
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintNotGreaterThan2()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::greaterThan(1)
- );
-
- try {
- $constraint->evaluate(2, 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_IsEqual
- * @covers PHPUnit_Framework_Constraint_GreaterThan
- * @covers PHPUnit_Framework_Constraint_Or
- * @covers PHPUnit_Framework_Assert::greaterThanOrEqual
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintGreaterThanOrEqual()
- {
- $constraint = PHPUnit_Framework_Assert::greaterThanOrEqual(1);
-
- $this->assertTrue($constraint->evaluate(1, '', true));
- $this->assertFalse($constraint->evaluate(0, '', true));
- $this->assertEquals('is equal to 1 or is greater than 1', $constraint->toString());
- $this->assertEquals(2, count($constraint));
-
- try {
- $constraint->evaluate(0);
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_IsEqual
- * @covers PHPUnit_Framework_Constraint_GreaterThan
- * @covers PHPUnit_Framework_Constraint_Or
- * @covers PHPUnit_Framework_Assert::greaterThanOrEqual
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintGreaterThanOrEqual2()
- {
- $constraint = PHPUnit_Framework_Assert::greaterThanOrEqual(1);
-
- try {
- $constraint->evaluate(0, 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_IsEqual
- * @covers PHPUnit_Framework_Constraint_GreaterThan
- * @covers PHPUnit_Framework_Constraint_Or
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::greaterThanOrEqual
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintNotGreaterThanOrEqual()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::greaterThanOrEqual(1)
- );
-
- $this->assertFalse($constraint->evaluate(1, '', true));
- $this->assertEquals('not( is equal to 1 or is greater than 1 )', $constraint->toString());
- $this->assertEquals(2, count($constraint));
-
- try {
- $constraint->evaluate(1);
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_IsEqual
- * @covers PHPUnit_Framework_Constraint_GreaterThan
- * @covers PHPUnit_Framework_Constraint_Or
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::greaterThanOrEqual
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintNotGreaterThanOrEqual2()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::greaterThanOrEqual(1)
- );
-
- try {
- $constraint->evaluate(1, 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_IsAnything
- * @covers PHPUnit_Framework_Assert::anything
- * @covers PHPUnit_Framework_Constraint::count
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintIsAnything()
- {
- $constraint = PHPUnit_Framework_Assert::anything();
-
- $this->assertTrue($constraint->evaluate(null, '', true));
- $this->assertNull($constraint->evaluate(null));
- $this->assertEquals('is anything', $constraint->toString());
- $this->assertEquals(0, count($constraint));
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_IsAnything
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::anything
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintNotIsAnything()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::anything()
- );
-
- $this->assertFalse($constraint->evaluate(null, '', true));
- $this->assertEquals('is not anything', $constraint->toString());
- $this->assertEquals(0, count($constraint));
-
- try {
- $constraint->evaluate(null);
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_IsEqual
- * @covers PHPUnit_Framework_Assert::equalTo
- * @covers PHPUnit_Framework_Constraint::count
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintIsEqual()
- {
- $constraint = PHPUnit_Framework_Assert::equalTo(1);
-
- $this->assertTrue($constraint->evaluate(1, '', true));
- $this->assertFalse($constraint->evaluate(0, '', true));
- $this->assertEquals('is equal to 1', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate(0);
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- public function isEqualProvider()
- {
- $a = new stdClass;
- $a->foo = 'bar';
- $b = new stdClass;
- $ahash = spl_object_hash($a);
- $bhash = spl_object_hash($b);
-
- $c = new stdClass;
- $c->foo = 'bar';
- $c->int = 1;
- $c->array = array(0, array(1), array(2), 3);
- $c->related = new stdClass;
- $c->related->foo = "a\nb\nc\nd\ne\nf\ng\nh\ni\nj\nk";
- $c->self = $c;
- $c->c = $c;
- $d = new stdClass;
- $d->foo = 'bar';
- $d->int = 2;
- $d->array = array(0, array(4), array(2), 3);
- $d->related = new stdClass;
- $d->related->foo = "a\np\nc\nd\ne\nf\ng\nh\ni\nw\nk";
- $d->self = $d;
- $d->c = $c;
-
- $storage1 = new SplObjectStorage;
- $storage1->attach($a);
- $storage1->attach($b);
- $storage2 = new SplObjectStorage;
- $storage2->attach($b);
- $storage1hash = spl_object_hash($storage1);
- $storage2hash = spl_object_hash($storage2);
-
- $dom1 = new DOMDocument;
- $dom1->preserveWhiteSpace = false;
- $dom1->loadXML(' ');
- $dom2 = new DOMDocument;
- $dom2->preserveWhiteSpace = false;
- $dom2->loadXML(' ');
-
- $data = array(
- array(1, 0, << 0
-+ 0 => 1
- )
-
-EOF
- ),
- array(array(true), array('true'), << true
-+ 0 => 'true'
- )
-
-EOF
- ),
- array(array(0, array(1), array(2), 3), array(0, array(4), array(2), 3), << 0
- 1 => Array (
-- 0 => 1
-+ 0 => 4
- )
- 2 => Array (...)
- 3 => 3
- )
-
-EOF
- ),
- array($a, array(0), << 'bar'
- )
-
-EOF
- ),
- array($c, $d, << 'bar'
-- 'int' => 1
-+ 'int' => 2
- 'array' => Array (
- 0 => 0
- 1 => Array (
-- 0 => 1
-+ 0 => 4
-
-@@ @@
- 'foo' => 'a
-- b
-+ p
-
-@@ @@
- i
-- j
-+ w
- k'
- )
- 'self' => stdClass Object (...)
- 'c' => stdClass Object (...)
- )
-
-EOF
- ),
- array($dom1, $dom2, <<
--
-+
-+
-+
-
-EOF
- ),
- array(
- new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')),
- new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/Chicago')),
- << Array &0 (
-- 'obj' => stdClass Object &$ahash (
-- 'foo' => 'bar'
-- )
-+SplObjectStorage Object &$storage2hash (
-+ '$bhash' => Array &0 (
-+ 'obj' => stdClass Object &$bhash ()
- 'inf' => null
- )
-- '$bhash' => Array &0
- )
-
-EOF
- );
- } else {
- $data[] = array($storage1, $storage2, << Array &0 (
-- 'obj' => stdClass Object &$ahash (
-- 'foo' => 'bar'
-- )
-+SplObjectStorage Object &$storage2hash (
-+ '$bhash' => Array &0 (
-+ 'obj' => stdClass Object &$bhash ()
- 'inf' => null
- )
-- '$bhash' => Array &0
- )
-
-EOF
- );
- }
-
- return $data;
- }
-
- /**
- * @dataProvider isEqualProvider
- * @covers PHPUnit_Framework_Constraint_IsEqual
- * @covers PHPUnit_Framework_Assert::equalTo
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintIsEqual2($expected, $actual, $message)
- {
- $constraint = PHPUnit_Framework_Assert::equalTo($expected);
-
- try {
- $constraint->evaluate($actual, 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- "custom message\n$message",
- $this->trimnl(PHPUnit_Framework_TestFailure::exceptionToString($e))
- );
-
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_IsEqual
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::equalTo
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintIsNotEqual()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::equalTo(1)
- );
-
- $this->assertTrue($constraint->evaluate(0, '', true));
- $this->assertFalse($constraint->evaluate(1, '', true));
- $this->assertEquals('is not equal to 1', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate(1);
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_IsEqual
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::equalTo
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintIsNotEqual2()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::equalTo(1)
- );
-
- try {
- $constraint->evaluate(1, 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_IsIdentical
- * @covers PHPUnit_Framework_Assert::identicalTo
- * @covers PHPUnit_Framework_Constraint::count
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintIsIdentical()
- {
- $a = new stdClass;
- $b = new stdClass;
-
- $constraint = PHPUnit_Framework_Assert::identicalTo($a);
-
- $this->assertFalse($constraint->evaluate($b, '', true));
- $this->assertTrue($constraint->evaluate($a, '', true));
- $this->assertEquals('is identical to an object of class "stdClass"', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate($b);
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(<<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_IsIdentical
- * @covers PHPUnit_Framework_Assert::identicalTo
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintIsIdentical2()
- {
- $a = new stdClass;
- $b = new stdClass;
-
- $constraint = PHPUnit_Framework_Assert::identicalTo($a);
-
- try {
- $constraint->evaluate($b, 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(<<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_IsIdentical
- * @covers PHPUnit_Framework_Assert::identicalTo
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintIsIdentical3()
- {
- $constraint = PHPUnit_Framework_Assert::identicalTo('a');
-
- try {
- $constraint->evaluate('b', 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(<<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_IsIdentical
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::identicalTo
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintIsNotIdentical()
- {
- $a = new stdClass;
- $b = new stdClass;
-
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::identicalTo($a)
- );
-
- $this->assertTrue($constraint->evaluate($b, '', true));
- $this->assertFalse($constraint->evaluate($a, '', true));
- $this->assertEquals('is not identical to an object of class "stdClass"', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate($a);
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(<<trimnl(PHPUnit_Framework_TestFailure::exceptionToString($e))
- );
-
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_IsIdentical
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::identicalTo
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintIsNotIdentical2()
- {
- $a = new stdClass;
-
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::identicalTo($a)
- );
-
- try {
- $constraint->evaluate($a, 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(<<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_IsIdentical
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::identicalTo
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintIsNotIdentical3()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::identicalTo('a')
- );
-
- try {
- $constraint->evaluate('a', 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(<<trimnl(PHPUnit_Framework_TestFailure::exceptionToString($e))
- );
-
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_IsInstanceOf
- * @covers PHPUnit_Framework_Assert::isInstanceOf
- * @covers PHPUnit_Framework_Constraint::count
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintIsInstanceOf()
- {
- $constraint = PHPUnit_Framework_Assert::isInstanceOf('Exception');
-
- $this->assertFalse($constraint->evaluate(new stdClass, '', true));
- $this->assertTrue($constraint->evaluate(new Exception, '', true));
- $this->assertEquals('is instance of class "Exception"', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- $interfaceConstraint = PHPUnit_Framework_Assert::isInstanceOf('Countable');
- $this->assertFalse($interfaceConstraint->evaluate(new stdClass, '', true));
- $this->assertTrue($interfaceConstraint->evaluate(new ArrayObject, '', true));
- $this->assertEquals('is instance of interface "Countable"', $interfaceConstraint->toString());
-
- try {
- $constraint->evaluate(new stdClass);
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_IsInstanceOf
- * @covers PHPUnit_Framework_Assert::isInstanceOf
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintIsInstanceOf2()
- {
- $constraint = PHPUnit_Framework_Assert::isInstanceOf('Exception');
-
- try {
- $constraint->evaluate(new stdClass, 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(<<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_IsInstanceOf
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::isInstanceOf
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintIsNotInstanceOf()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::isInstanceOf('stdClass')
- );
-
- $this->assertFalse($constraint->evaluate(new stdClass, '', true));
- $this->assertTrue($constraint->evaluate(new Exception, '', true));
- $this->assertEquals('is not instance of class "stdClass"', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate(new stdClass);
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_IsInstanceOf
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::isInstanceOf
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintIsNotInstanceOf2()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::isInstanceOf('stdClass')
- );
-
- try {
- $constraint->evaluate(new stdClass, 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(<<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_IsType
- * @covers PHPUnit_Framework_Assert::isType
- * @covers PHPUnit_Framework_Constraint::count
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintIsType()
- {
- $constraint = PHPUnit_Framework_Assert::isType('string');
-
- $this->assertFalse($constraint->evaluate(0, '', true));
- $this->assertTrue($constraint->evaluate('', '', true));
- $this->assertEquals('is of type "string"', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate(new stdClass);
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertStringMatchesFormat(<<trimnl(PHPUnit_Framework_TestFailure::exceptionToString($e))
- );
-
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_IsType
- * @covers PHPUnit_Framework_Assert::isType
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintIsType2()
- {
- $constraint = PHPUnit_Framework_Assert::isType('string');
-
- try {
- $constraint->evaluate(new stdClass, 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertStringMatchesFormat(<<trimnl(PHPUnit_Framework_TestFailure::exceptionToString($e))
- );
-
- return;
- }
-
- $this->fail();
- }
-
- public function resources()
- {
- $fh = fopen(__FILE__, 'r');
- fclose($fh);
-
- return array(
- 'open resource' => array(fopen(__FILE__, 'r')),
- 'closed resource' => array($fh),
- );
- }
-
- /**
- * @dataProvider resources
- * @covers PHPUnit_Framework_Constraint_IsType
- * @covers PHPUnit_Framework_Assert::isType
- */
- public function testConstraintIsResourceTypeEvaluatesCorrectlyWithResources($resource)
- {
- $constraint = PHPUnit_Framework_Assert::isType('resource');
-
- $this->assertTrue($constraint->evaluate($resource, '', true));
-
- @fclose($resource);
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_IsType
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::isType
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintIsNotType()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::isType('string')
- );
-
- $this->assertTrue($constraint->evaluate(0, '', true));
- $this->assertFalse($constraint->evaluate('', '', true));
- $this->assertEquals('is not of type "string"', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate('');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_IsType
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::isType
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintIsNotType2()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::isType('string')
- );
-
- try {
- $constraint->evaluate('', 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(<<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_IsNull
- * @covers PHPUnit_Framework_Assert::isNull
- * @covers PHPUnit_Framework_Constraint::count
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintIsNull()
- {
- $constraint = PHPUnit_Framework_Assert::isNull();
-
- $this->assertFalse($constraint->evaluate(0, '', true));
- $this->assertTrue($constraint->evaluate(null, '', true));
- $this->assertEquals('is null', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate(0);
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(<<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_IsNull
- * @covers PHPUnit_Framework_Assert::isNull
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintIsNull2()
- {
- $constraint = PHPUnit_Framework_Assert::isNull();
-
- try {
- $constraint->evaluate(0, 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(<<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_IsNull
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::isNull
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_Constraint::count
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintIsNotNull()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::isNull()
- );
-
- $this->assertFalse($constraint->evaluate(null, '', true));
- $this->assertTrue($constraint->evaluate(0, '', true));
- $this->assertEquals('is not null', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate(null);
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(<<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_IsNull
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::isNull
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintIsNotNull2()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::isNull()
- );
-
- try {
- $constraint->evaluate(null, 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(<<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_LessThan
- * @covers PHPUnit_Framework_Assert::lessThan
- * @covers PHPUnit_Framework_Constraint::count
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintLessThan()
- {
- $constraint = PHPUnit_Framework_Assert::lessThan(1);
-
- $this->assertTrue($constraint->evaluate(0, '', true));
- $this->assertFalse($constraint->evaluate(1, '', true));
- $this->assertEquals('is less than 1', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate(1);
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_LessThan
- * @covers PHPUnit_Framework_Assert::lessThan
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintLessThan2()
- {
- $constraint = PHPUnit_Framework_Assert::lessThan(1);
-
- try {
- $constraint->evaluate(1, 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_LessThan
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::lessThan
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintNotLessThan()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::lessThan(1)
- );
-
- $this->assertTrue($constraint->evaluate(1, '', true));
- $this->assertFalse($constraint->evaluate(0, '', true));
- $this->assertEquals('is not less than 1', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate(0);
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_LessThan
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::lessThan
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintNotLessThan2()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::lessThan(1)
- );
-
- try {
- $constraint->evaluate(0, 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_IsEqual
- * @covers PHPUnit_Framework_Constraint_LessThan
- * @covers PHPUnit_Framework_Constraint_Or
- * @covers PHPUnit_Framework_Assert::lessThanOrEqual
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintLessThanOrEqual()
- {
- $constraint = PHPUnit_Framework_Assert::lessThanOrEqual(1);
-
- $this->assertTrue($constraint->evaluate(1, '', true));
- $this->assertFalse($constraint->evaluate(2, '', true));
- $this->assertEquals('is equal to 1 or is less than 1', $constraint->toString());
- $this->assertEquals(2, count($constraint));
-
- try {
- $constraint->evaluate(2);
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_Callback
- */
- public function testConstraintCallback()
- {
- $closureReflect = function ($parameter) {
- return $parameter;
- };
-
- $closureWithoutParameter = function () {
- return true;
- };
-
- $constraint = PHPUnit_Framework_Assert::callback($closureWithoutParameter);
- $this->assertTrue($constraint->evaluate('', '', true));
-
- $constraint = PHPUnit_Framework_Assert::callback($closureReflect);
- $this->assertTrue($constraint->evaluate(true, '', true));
- $this->assertFalse($constraint->evaluate(false, '', true));
-
- $callback = array($this, 'callbackReturningTrue');
- $constraint = PHPUnit_Framework_Assert::callback($callback);
- $this->assertTrue($constraint->evaluate(false, '', true));
-
- $callback = array('Framework_ConstraintTest', 'staticCallbackReturningTrue');
- $constraint = PHPUnit_Framework_Assert::callback($callback);
- $this->assertTrue($constraint->evaluate(null, '', true));
-
- $this->assertEquals('is accepted by specified callback', $constraint->toString());
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_Callback
- * @expectedException PHPUnit_Framework_ExpectationFailedException
- * @expectedExceptionMessage Failed asserting that 'This fails' is accepted by specified callback.
- */
- public function testConstraintCallbackFailure()
- {
- $constraint = PHPUnit_Framework_Assert::callback(function () {
- return false;
- });
- $constraint->evaluate('This fails');
- }
-
- public function callbackReturningTrue()
- {
- return true;
- }
-
- public static function staticCallbackReturningTrue()
- {
- return true;
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_IsEqual
- * @covers PHPUnit_Framework_Constraint_LessThan
- * @covers PHPUnit_Framework_Constraint_Or
- * @covers PHPUnit_Framework_Assert::lessThanOrEqual
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintLessThanOrEqual2()
- {
- $constraint = PHPUnit_Framework_Assert::lessThanOrEqual(1);
-
- try {
- $constraint->evaluate(2, 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_IsEqual
- * @covers PHPUnit_Framework_Constraint_LessThan
- * @covers PHPUnit_Framework_Constraint_Or
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::lessThanOrEqual
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintNotLessThanOrEqual()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::lessThanOrEqual(1)
- );
-
- $this->assertTrue($constraint->evaluate(2, '', true));
- $this->assertFalse($constraint->evaluate(1, '', true));
- $this->assertEquals('not( is equal to 1 or is less than 1 )', $constraint->toString());
- $this->assertEquals(2, count($constraint));
-
- try {
- $constraint->evaluate(1);
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_IsEqual
- * @covers PHPUnit_Framework_Constraint_LessThan
- * @covers PHPUnit_Framework_Constraint_Or
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::lessThanOrEqual
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintNotLessThanOrEqual2()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::lessThanOrEqual(1)
- );
-
- try {
- $constraint->evaluate(1, 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_ClassHasAttribute
- * @covers PHPUnit_Framework_Assert::classHasAttribute
- * @covers PHPUnit_Framework_Constraint::count
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintClassHasAttribute()
- {
- $constraint = PHPUnit_Framework_Assert::classHasAttribute('privateAttribute');
-
- $this->assertTrue($constraint->evaluate('ClassWithNonPublicAttributes', '', true));
- $this->assertFalse($constraint->evaluate('stdClass', '', true));
- $this->assertEquals('has attribute "privateAttribute"', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate('stdClass');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_ClassHasAttribute
- * @covers PHPUnit_Framework_Assert::classHasAttribute
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintClassHasAttribute2()
- {
- $constraint = PHPUnit_Framework_Assert::classHasAttribute('privateAttribute');
-
- try {
- $constraint->evaluate('stdClass', 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(<<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_ClassHasAttribute
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::classHasAttribute
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintClassNotHasAttribute()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::classHasAttribute('privateAttribute')
- );
-
- $this->assertTrue($constraint->evaluate('stdClass', '', true));
- $this->assertFalse($constraint->evaluate('ClassWithNonPublicAttributes', '', true));
- $this->assertEquals('does not have attribute "privateAttribute"', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate('ClassWithNonPublicAttributes');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_ClassHasAttribute
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::classHasAttribute
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintClassNotHasAttribute2()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::classHasAttribute('privateAttribute')
- );
-
- try {
- $constraint->evaluate('ClassWithNonPublicAttributes', 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(<<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_ClassHasStaticAttribute
- * @covers PHPUnit_Framework_Assert::classHasStaticAttribute
- * @covers PHPUnit_Framework_Constraint::count
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintClassHasStaticAttribute()
- {
- $constraint = PHPUnit_Framework_Assert::classHasStaticAttribute('privateStaticAttribute');
-
- $this->assertTrue($constraint->evaluate('ClassWithNonPublicAttributes', '', true));
- $this->assertFalse($constraint->evaluate('stdClass', '', true));
- $this->assertEquals('has static attribute "privateStaticAttribute"', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate('stdClass');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_ClassHasStaticAttribute
- * @covers PHPUnit_Framework_Assert::classHasStaticAttribute
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintClassHasStaticAttribute2()
- {
- $constraint = PHPUnit_Framework_Assert::classHasStaticAttribute('foo');
-
- try {
- $constraint->evaluate('stdClass', 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(<<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_ClassHasStaticAttribute
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::classHasStaticAttribute
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintClassNotHasStaticAttribute()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::classHasStaticAttribute('privateStaticAttribute')
- );
-
- $this->assertTrue($constraint->evaluate('stdClass', '', true));
- $this->assertFalse($constraint->evaluate('ClassWithNonPublicAttributes', '', true));
- $this->assertEquals('does not have static attribute "privateStaticAttribute"', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate('ClassWithNonPublicAttributes');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_ClassHasStaticAttribute
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::classHasStaticAttribute
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintClassNotHasStaticAttribute2()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::classHasStaticAttribute('privateStaticAttribute')
- );
-
- try {
- $constraint->evaluate('ClassWithNonPublicAttributes', 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(<<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_ObjectHasAttribute
- * @covers PHPUnit_Framework_Assert::objectHasAttribute
- * @covers PHPUnit_Framework_Constraint::count
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintObjectHasAttribute()
- {
- $constraint = PHPUnit_Framework_Assert::objectHasAttribute('privateAttribute');
-
- $this->assertTrue($constraint->evaluate(new ClassWithNonPublicAttributes, '', true));
- $this->assertFalse($constraint->evaluate(new stdClass, '', true));
- $this->assertEquals('has attribute "privateAttribute"', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate(new stdClass);
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_ObjectHasAttribute
- * @covers PHPUnit_Framework_Assert::objectHasAttribute
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintObjectHasAttribute2()
- {
- $constraint = PHPUnit_Framework_Assert::objectHasAttribute('privateAttribute');
-
- try {
- $constraint->evaluate(new stdClass, 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(<<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_ObjectHasAttribute
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::objectHasAttribute
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintObjectNotHasAttribute()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::objectHasAttribute('privateAttribute')
- );
-
- $this->assertTrue($constraint->evaluate(new stdClass, '', true));
- $this->assertFalse($constraint->evaluate(new ClassWithNonPublicAttributes, '', true));
- $this->assertEquals('does not have attribute "privateAttribute"', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate(new ClassWithNonPublicAttributes);
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_ObjectHasAttribute
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::objectHasAttribute
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintObjectNotHasAttribute2()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::objectHasAttribute('privateAttribute')
- );
-
- try {
- $constraint->evaluate(new ClassWithNonPublicAttributes, 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(<<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_PCREMatch
- * @covers PHPUnit_Framework_Assert::matchesRegularExpression
- * @covers PHPUnit_Framework_Constraint::count
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintPCREMatch()
- {
- $constraint = PHPUnit_Framework_Assert::matchesRegularExpression('/foo/');
-
- $this->assertFalse($constraint->evaluate('barbazbar', '', true));
- $this->assertTrue($constraint->evaluate('barfoobar', '', true));
- $this->assertEquals('matches PCRE pattern "/foo/"', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate('barbazbar');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_PCREMatch
- * @covers PHPUnit_Framework_Assert::matchesRegularExpression
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintPCREMatch2()
- {
- $constraint = PHPUnit_Framework_Assert::matchesRegularExpression('/foo/');
-
- try {
- $constraint->evaluate('barbazbar', 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(<<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_PCREMatch
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::matchesRegularExpression
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintPCRENotMatch()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::matchesRegularExpression('/foo/')
- );
-
- $this->assertTrue($constraint->evaluate('barbazbar', '', true));
- $this->assertFalse($constraint->evaluate('barfoobar', '', true));
- $this->assertEquals('does not match PCRE pattern "/foo/"', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate('barfoobar');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_PCREMatch
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::matchesRegularExpression
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintPCRENotMatch2()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::matchesRegularExpression('/foo/')
- );
-
- try {
- $constraint->evaluate('barfoobar', 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(<<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_StringMatches
- * @covers PHPUnit_Framework_Assert::matches
- * @covers PHPUnit_Framework_Constraint::count
- */
- public function testConstraintStringMatches()
- {
- $constraint = PHPUnit_Framework_Assert::matches('*%c*');
- $this->assertFalse($constraint->evaluate('**', '', true));
- $this->assertTrue($constraint->evaluate('***', '', true));
- $this->assertEquals('matches PCRE pattern "/^\*.\*$/s"', $constraint->toString());
- $this->assertEquals(1, count($constraint));
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_StringMatches
- * @covers PHPUnit_Framework_Assert::matches
- * @covers PHPUnit_Framework_Constraint::count
- */
- public function testConstraintStringMatches2()
- {
- $constraint = PHPUnit_Framework_Assert::matches('*%s*');
- $this->assertFalse($constraint->evaluate('**', '', true));
- $this->assertTrue($constraint->evaluate('***', '', true));
- $this->assertEquals('matches PCRE pattern "/^\*[^\r\n]+\*$/s"', $constraint->toString());
- $this->assertEquals(1, count($constraint));
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_StringMatches
- * @covers PHPUnit_Framework_Assert::matches
- * @covers PHPUnit_Framework_Constraint::count
- */
- public function testConstraintStringMatches3()
- {
- $constraint = PHPUnit_Framework_Assert::matches('*%i*');
- $this->assertFalse($constraint->evaluate('**', '', true));
- $this->assertTrue($constraint->evaluate('*0*', '', true));
- $this->assertEquals('matches PCRE pattern "/^\*[+-]?\d+\*$/s"', $constraint->toString());
- $this->assertEquals(1, count($constraint));
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_StringMatches
- * @covers PHPUnit_Framework_Assert::matches
- * @covers PHPUnit_Framework_Constraint::count
- */
- public function testConstraintStringMatches4()
- {
- $constraint = PHPUnit_Framework_Assert::matches('*%d*');
- $this->assertFalse($constraint->evaluate('**', '', true));
- $this->assertTrue($constraint->evaluate('*0*', '', true));
- $this->assertEquals('matches PCRE pattern "/^\*\d+\*$/s"', $constraint->toString());
- $this->assertEquals(1, count($constraint));
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_StringMatches
- * @covers PHPUnit_Framework_Assert::matches
- * @covers PHPUnit_Framework_Constraint::count
- */
- public function testConstraintStringMatches5()
- {
- $constraint = PHPUnit_Framework_Assert::matches('*%x*');
- $this->assertFalse($constraint->evaluate('**', '', true));
- $this->assertTrue($constraint->evaluate('*0f0f0f*', '', true));
- $this->assertEquals('matches PCRE pattern "/^\*[0-9a-fA-F]+\*$/s"', $constraint->toString());
- $this->assertEquals(1, count($constraint));
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_StringMatches
- * @covers PHPUnit_Framework_Assert::matches
- * @covers PHPUnit_Framework_Constraint::count
- */
- public function testConstraintStringMatches6()
- {
- $constraint = PHPUnit_Framework_Assert::matches('*%f*');
- $this->assertFalse($constraint->evaluate('**', '', true));
- $this->assertTrue($constraint->evaluate('*1.0*', '', true));
- $this->assertEquals('matches PCRE pattern "/^\*[+-]?\.?\d+\.?\d*(?:[Ee][+-]?\d+)?\*$/s"', $constraint->toString());
- $this->assertEquals(1, count($constraint));
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_StringStartsWith
- * @covers PHPUnit_Framework_Assert::stringStartsWith
- * @covers PHPUnit_Framework_Constraint::count
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintStringStartsWith()
- {
- $constraint = PHPUnit_Framework_Assert::stringStartsWith('prefix');
-
- $this->assertFalse($constraint->evaluate('foo', '', true));
- $this->assertTrue($constraint->evaluate('prefixfoo', '', true));
- $this->assertEquals('starts with "prefix"', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate('foo');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_StringStartsWith
- * @covers PHPUnit_Framework_Assert::stringStartsWith
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintStringStartsWith2()
- {
- $constraint = PHPUnit_Framework_Assert::stringStartsWith('prefix');
-
- try {
- $constraint->evaluate('foo', 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_StringStartsWith
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::stringStartsWith
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintStringStartsNotWith()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::stringStartsWith('prefix')
- );
-
- $this->assertTrue($constraint->evaluate('foo', '', true));
- $this->assertFalse($constraint->evaluate('prefixfoo', '', true));
- $this->assertEquals('starts not with "prefix"', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate('prefixfoo');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_StringStartsWith
- * @covers PHPUnit_Framework_Assert::stringStartsWith
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintStringStartsNotWith2()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::stringStartsWith('prefix')
- );
-
- try {
- $constraint->evaluate('prefixfoo', 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_StringContains
- * @covers PHPUnit_Framework_Assert::stringContains
- * @covers PHPUnit_Framework_Constraint::count
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintStringContains()
- {
- $constraint = PHPUnit_Framework_Assert::stringContains('foo');
-
- $this->assertFalse($constraint->evaluate('barbazbar', '', true));
- $this->assertTrue($constraint->evaluate('barfoobar', '', true));
- $this->assertEquals('contains "foo"', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate('barbazbar');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_StringContains
- * @covers PHPUnit_Framework_Assert::stringContains
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintStringContains2()
- {
- $constraint = PHPUnit_Framework_Assert::stringContains('foo');
-
- try {
- $constraint->evaluate('barbazbar', 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_StringContains
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::stringContains
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintStringNotContains()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::stringContains('foo')
- );
-
- $this->assertTrue($constraint->evaluate('barbazbar', '', true));
- $this->assertFalse($constraint->evaluate('barfoobar', '', true));
- $this->assertEquals('does not contain "foo"', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate('barfoobar');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_StringContains
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::stringContains
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintStringNotContains2()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::stringContains('foo')
- );
-
- try {
- $constraint->evaluate('barfoobar', 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_StringEndsWith
- * @covers PHPUnit_Framework_Assert::stringEndsWith
- * @covers PHPUnit_Framework_Constraint::count
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintStringEndsWith()
- {
- $constraint = PHPUnit_Framework_Assert::stringEndsWith('suffix');
-
- $this->assertFalse($constraint->evaluate('foo', '', true));
- $this->assertTrue($constraint->evaluate('foosuffix', '', true));
- $this->assertEquals('ends with "suffix"', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate('foo');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_StringEndsWith
- * @covers PHPUnit_Framework_Assert::stringEndsWith
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintStringEndsWith2()
- {
- $constraint = PHPUnit_Framework_Assert::stringEndsWith('suffix');
-
- try {
- $constraint->evaluate('foo', 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_StringEndsWith
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::stringEndsWith
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintStringEndsNotWith()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::stringEndsWith('suffix')
- );
-
- $this->assertTrue($constraint->evaluate('foo', '', true));
- $this->assertFalse($constraint->evaluate('foosuffix', '', true));
- $this->assertEquals('ends not with "suffix"', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate('foosuffix');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_StringEndsWith
- * @covers PHPUnit_Framework_Assert::stringEndsWith
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintStringEndsNotWith2()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::stringEndsWith('suffix')
- );
-
- try {
- $constraint->evaluate('foosuffix', 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_TraversableContains
- */
- public function testConstraintArrayContainsCheckForObjectIdentity()
- {
- // Check for primitive type.
- $constraint = new PHPUnit_Framework_Constraint_TraversableContains('foo', true, true);
-
- $this->assertFalse($constraint->evaluate(array(0), '', true));
- $this->assertFalse($constraint->evaluate(array(true), '', true));
-
- // Default case.
- $constraint = new PHPUnit_Framework_Constraint_TraversableContains('foo');
-
- $this->assertTrue($constraint->evaluate(array(0), '', true));
- $this->assertTrue($constraint->evaluate(array(true), '', true));
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_TraversableContains
- * @covers PHPUnit_Framework_Constraint::count
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintArrayContains()
- {
- $constraint = new PHPUnit_Framework_Constraint_TraversableContains('foo');
-
- $this->assertFalse($constraint->evaluate(array('bar'), '', true));
- $this->assertTrue($constraint->evaluate(array('foo'), '', true));
- $this->assertEquals("contains 'foo'", $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate(array('bar'));
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_TraversableContains
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintArrayContains2()
- {
- $constraint = new PHPUnit_Framework_Constraint_TraversableContains('foo');
-
- try {
- $constraint->evaluate(array('bar'), 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_TraversableContains
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintArrayNotContains()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- new PHPUnit_Framework_Constraint_TraversableContains('foo')
- );
-
- $this->assertTrue($constraint->evaluate(array('bar'), '', true));
- $this->assertFalse($constraint->evaluate(array('foo'), '', true));
- $this->assertEquals("does not contain 'foo'", $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate(array('foo'));
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_TraversableContains
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintArrayNotContains2()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- new PHPUnit_Framework_Constraint_TraversableContains('foo')
- );
-
- try {
- $constraint->evaluate(array('foo'), 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_TraversableContains
- * @covers PHPUnit_Framework_Constraint::count
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintSplObjectStorageContains()
- {
- $object = new StdClass;
- $constraint = new PHPUnit_Framework_Constraint_TraversableContains($object);
- $this->assertStringMatchesFormat('contains stdClass Object &%s ()', $constraint->toString());
-
- $storage = new SplObjectStorage;
- $this->assertFalse($constraint->evaluate($storage, '', true));
-
- $storage->attach($object);
- $this->assertTrue($constraint->evaluate($storage, '', true));
-
- try {
- $constraint->evaluate(new SplObjectStorage);
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertStringMatchesFormat(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_TraversableContains
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintSplObjectStorageContains2()
- {
- $object = new StdClass;
- $constraint = new PHPUnit_Framework_Constraint_TraversableContains($object);
-
- try {
- $constraint->evaluate(new SplObjectStorage, 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertStringMatchesFormat(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::attributeEqualTo
- * @covers PHPUnit_Framework_Constraint_Attribute
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testAttributeEqualTo()
- {
- $object = new ClassWithNonPublicAttributes;
- $constraint = PHPUnit_Framework_Assert::attributeEqualTo('foo', 1);
-
- $this->assertTrue($constraint->evaluate($object, '', true));
- $this->assertEquals('attribute "foo" is equal to 1', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- $constraint = PHPUnit_Framework_Assert::attributeEqualTo('foo', 2);
-
- $this->assertFalse($constraint->evaluate($object, '', true));
-
- try {
- $constraint->evaluate($object);
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::attributeEqualTo
- * @covers PHPUnit_Framework_Constraint_Attribute
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testAttributeEqualTo2()
- {
- $object = new ClassWithNonPublicAttributes;
- $constraint = PHPUnit_Framework_Assert::attributeEqualTo('foo', 2);
-
- try {
- $constraint->evaluate($object, 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::attributeEqualTo
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_Constraint_Attribute
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testAttributeNotEqualTo()
- {
- $object = new ClassWithNonPublicAttributes;
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::attributeEqualTo('foo', 2)
- );
-
- $this->assertTrue($constraint->evaluate($object, '', true));
- $this->assertEquals('attribute "foo" is not equal to 2', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::attributeEqualTo('foo', 1)
- );
-
- $this->assertFalse($constraint->evaluate($object, '', true));
-
- try {
- $constraint->evaluate($object);
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Assert::attributeEqualTo
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_Constraint_Attribute
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testAttributeNotEqualTo2()
- {
- $object = new ClassWithNonPublicAttributes;
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- PHPUnit_Framework_Assert::attributeEqualTo('foo', 1)
- );
-
- try {
- $constraint->evaluate($object, 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_IsEmpty
- * @covers PHPUnit_Framework_Constraint::count
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintIsEmpty()
- {
- $constraint = new PHPUnit_Framework_Constraint_IsEmpty;
-
- $this->assertFalse($constraint->evaluate(array('foo'), '', true));
- $this->assertTrue($constraint->evaluate(array(), '', true));
- $this->assertFalse($constraint->evaluate(new ArrayObject(array('foo')), '', true));
- $this->assertTrue($constraint->evaluate(new ArrayObject(array()), '', true));
- $this->assertEquals('is empty', $constraint->toString());
- $this->assertEquals(1, count($constraint));
-
- try {
- $constraint->evaluate(array('foo'));
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_IsEmpty
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintIsEmpty2()
- {
- $constraint = new PHPUnit_Framework_Constraint_IsEmpty;
-
- try {
- $constraint->evaluate(array('foo'), 'custom message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_Count
- */
- public function testConstraintCountWithAnArray()
- {
- $constraint = new PHPUnit_Framework_Constraint_Count(5);
-
- $this->assertTrue($constraint->evaluate(array(1, 2, 3, 4, 5), '', true));
- $this->assertFalse($constraint->evaluate(array(1, 2, 3, 4), '', true));
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_Count
- */
- public function testConstraintCountWithAnIteratorWhichDoesNotImplementCountable()
- {
- $constraint = new PHPUnit_Framework_Constraint_Count(5);
-
- $this->assertTrue($constraint->evaluate(new TestIterator(array(1, 2, 3, 4, 5)), '', true));
- $this->assertFalse($constraint->evaluate(new TestIterator(array(1, 2, 3, 4)), '', true));
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_Count
- */
- public function testConstraintCountWithAnObjectImplementingCountable()
- {
- $constraint = new PHPUnit_Framework_Constraint_Count(5);
-
- $this->assertTrue($constraint->evaluate(new ArrayObject(array(1, 2, 3, 4, 5)), '', true));
- $this->assertFalse($constraint->evaluate(new ArrayObject(array(1, 2, 3, 4)), '', true));
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_Count
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintCountFailing()
- {
- $constraint = new PHPUnit_Framework_Constraint_Count(5);
-
- try {
- $constraint->evaluate(array(1, 2));
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_Count
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintNotCountFailing()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- new PHPUnit_Framework_Constraint_Count(2)
- );
-
- try {
- $constraint->evaluate(array(1, 2));
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_SameSize
- */
- public function testConstraintSameSizeWithAnArray()
- {
- $constraint = new PHPUnit_Framework_Constraint_SameSize(array(1, 2, 3, 4, 5));
-
- $this->assertTrue($constraint->evaluate(array(6, 7, 8, 9, 10), '', true));
- $this->assertFalse($constraint->evaluate(array(1, 2, 3, 4), '', true));
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_SameSize
- */
- public function testConstraintSameSizeWithAnIteratorWhichDoesNotImplementCountable()
- {
- $constraint = new PHPUnit_Framework_Constraint_SameSize(new TestIterator(array(1, 2, 3, 4, 5)));
-
- $this->assertTrue($constraint->evaluate(new TestIterator(array(6, 7, 8, 9, 10)), '', true));
- $this->assertFalse($constraint->evaluate(new TestIterator(array(1, 2, 3, 4)), '', true));
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_SameSize
- */
- public function testConstraintSameSizeWithAnObjectImplementingCountable()
- {
- $constraint = new PHPUnit_Framework_Constraint_SameSize(new ArrayObject(array(1, 2, 3, 4, 5)));
-
- $this->assertTrue($constraint->evaluate(new ArrayObject(array(6, 7, 8, 9, 10)), '', true));
- $this->assertFalse($constraint->evaluate(new ArrayObject(array(1, 2, 3, 4)), '', true));
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_SameSize
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintSameSizeFailing()
- {
- $constraint = new PHPUnit_Framework_Constraint_SameSize(array(1, 2, 3, 4, 5));
-
- try {
- $constraint->evaluate(array(1, 2));
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_SameSize
- * @covers PHPUnit_Framework_Constraint_Not
- * @covers PHPUnit_Framework_Assert::logicalNot
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintNotSameSizeFailing()
- {
- $constraint = PHPUnit_Framework_Assert::logicalNot(
- new PHPUnit_Framework_Constraint_SameSize(array(1, 2))
- );
-
- try {
- $constraint->evaluate(array(3, 4));
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_Exception
- * @covers PHPUnit_Framework_TestFailure::exceptionToString
- */
- public function testConstraintException()
- {
- $constraint = new PHPUnit_Framework_Constraint_Exception('FoobarException');
- $exception = new DummyException('Test');
- $stackTrace = $exception->getTraceAsString();
-
- try {
- $constraint->evaluate($exception);
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $this->assertEquals(
- <<fail();
- }
-
- /**
- * Removes spaces in front of newlines
- *
- * @param string $string
- *
- * @return string
- */
- private function trimnl($string)
- {
- return preg_replace('/[ ]*\n/', "\n", $string);
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Framework/SuiteTest.php b/vendor/phpunit/phpunit/tests/Framework/SuiteTest.php
deleted file mode 100644
index e3f58b3d..00000000
--- a/vendor/phpunit/phpunit/tests/Framework/SuiteTest.php
+++ /dev/null
@@ -1,242 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'BeforeAndAfterTest.php';
-require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'BeforeClassAndAfterClassTest.php';
-require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'TestWithTest.php';
-require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'DataProviderSkippedTest.php';
-require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'DataProviderIncompleteTest.php';
-require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'InheritedTestCase.php';
-require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'NoTestCaseClass.php';
-require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'NoTestCases.php';
-require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'NotPublicTestCase.php';
-require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'NotVoidTestCase.php';
-require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'OverrideTestCase.php';
-require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'RequirementsClassBeforeClassHookTest.php';
-
-/**
- * @since Class available since Release 2.0.0
- * @covers PHPUnit_Framework_TestSuite
- */
-class Framework_SuiteTest extends PHPUnit_Framework_TestCase
-{
- protected $result;
-
- protected function setUp()
- {
- $this->result = new PHPUnit_Framework_TestResult;
- }
-
- public static function suite()
- {
- $suite = new PHPUnit_Framework_TestSuite;
-
- $suite->addTest(new self('testAddTestSuite'));
- $suite->addTest(new self('testInheritedTests'));
- $suite->addTest(new self('testNoTestCases'));
- $suite->addTest(new self('testNoTestCaseClass'));
- $suite->addTest(new self('testNotExistingTestCase'));
- $suite->addTest(new self('testNotPublicTestCase'));
- $suite->addTest(new self('testNotVoidTestCase'));
- $suite->addTest(new self('testOneTestCase'));
- $suite->addTest(new self('testShadowedTests'));
- $suite->addTest(new self('testBeforeClassAndAfterClassAnnotations'));
- $suite->addTest(new self('testBeforeAnnotation'));
- $suite->addTest(new self('testTestWithAnnotation'));
- $suite->addTest(new self('testSkippedTestDataProvider'));
- $suite->addTest(new self('testIncompleteTestDataProvider'));
- $suite->addTest(new self('testRequirementsBeforeClassHook'));
- $suite->addTest(new self('testDontSkipInheritedClass'));
-
- return $suite;
- }
-
- public function testAddTestSuite()
- {
- $suite = new PHPUnit_Framework_TestSuite(
- 'OneTestCase'
- );
-
- $suite->run($this->result);
-
- $this->assertEquals(1, count($this->result));
- }
-
- public function testInheritedTests()
- {
- $suite = new PHPUnit_Framework_TestSuite(
- 'InheritedTestCase'
- );
-
- $suite->run($this->result);
-
- $this->assertTrue($this->result->wasSuccessful());
- $this->assertEquals(2, count($this->result));
- }
-
- public function testNoTestCases()
- {
- $suite = new PHPUnit_Framework_TestSuite(
- 'NoTestCases'
- );
-
- $suite->run($this->result);
-
- $this->assertTrue(!$this->result->wasSuccessful());
- $this->assertEquals(1, $this->result->failureCount());
- $this->assertEquals(1, count($this->result));
- }
-
- /**
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testNoTestCaseClass()
- {
- $suite = new PHPUnit_Framework_TestSuite('NoTestCaseClass');
- }
-
- public function testNotExistingTestCase()
- {
- $suite = new self('notExistingMethod');
-
- $suite->run($this->result);
-
- $this->assertEquals(0, $this->result->errorCount());
- $this->assertEquals(1, $this->result->failureCount());
- $this->assertEquals(1, count($this->result));
- }
-
- public function testNotPublicTestCase()
- {
- $suite = new PHPUnit_Framework_TestSuite(
- 'NotPublicTestCase'
- );
-
- $this->assertEquals(2, count($suite));
- }
-
- public function testNotVoidTestCase()
- {
- $suite = new PHPUnit_Framework_TestSuite(
- 'NotVoidTestCase'
- );
-
- $this->assertEquals(1, count($suite));
- }
-
- public function testOneTestCase()
- {
- $suite = new PHPUnit_Framework_TestSuite(
- 'OneTestCase'
- );
-
- $suite->run($this->result);
-
- $this->assertEquals(0, $this->result->errorCount());
- $this->assertEquals(0, $this->result->failureCount());
- $this->assertEquals(1, count($this->result));
- $this->assertTrue($this->result->wasSuccessful());
- }
-
- public function testShadowedTests()
- {
- $suite = new PHPUnit_Framework_TestSuite(
- 'OverrideTestCase'
- );
-
- $suite->run($this->result);
-
- $this->assertEquals(1, count($this->result));
- }
-
- public function testBeforeClassAndAfterClassAnnotations()
- {
- $suite = new PHPUnit_Framework_TestSuite(
- 'BeforeClassAndAfterClassTest'
- );
-
- BeforeClassAndAfterClassTest::resetProperties();
- $suite->run($this->result);
-
- $this->assertEquals(1, BeforeClassAndAfterClassTest::$beforeClassWasRun, '@beforeClass method was not run once for the whole suite.');
- $this->assertEquals(1, BeforeClassAndAfterClassTest::$afterClassWasRun, '@afterClass method was not run once for the whole suite.');
- }
-
- public function testBeforeAnnotation()
- {
- $test = new PHPUnit_Framework_TestSuite(
- 'BeforeAndAfterTest'
- );
-
- BeforeAndAfterTest::resetProperties();
- $result = $test->run();
-
- $this->assertEquals(2, BeforeAndAfterTest::$beforeWasRun);
- $this->assertEquals(2, BeforeAndAfterTest::$afterWasRun);
- }
-
- public function testTestWithAnnotation()
- {
- $test = new PHPUnit_Framework_TestSuite(
- 'TestWithTest'
- );
-
- BeforeAndAfterTest::resetProperties();
- $result = $test->run();
-
- $this->assertEquals(4, count($result->passed()));
- }
-
- public function testSkippedTestDataProvider()
- {
- $suite = new PHPUnit_Framework_TestSuite('DataProviderSkippedTest');
-
- $suite->run($this->result);
-
- $this->assertEquals(3, $this->result->count());
- $this->assertEquals(1, $this->result->skippedCount());
- }
-
- public function testIncompleteTestDataProvider()
- {
- $suite = new PHPUnit_Framework_TestSuite('DataProviderIncompleteTest');
-
- $suite->run($this->result);
-
- $this->assertEquals(3, $this->result->count());
- $this->assertEquals(1, $this->result->notImplementedCount());
- }
-
- public function testRequirementsBeforeClassHook()
- {
- $suite = new PHPUnit_Framework_TestSuite(
- 'RequirementsClassBeforeClassHookTest'
- );
-
- $suite->run($this->result);
-
- $this->assertEquals(0, $this->result->errorCount());
- $this->assertEquals(1, $this->result->skippedCount());
- }
-
- public function testDontSkipInheritedClass()
- {
- $suite = new PHPUnit_Framework_TestSuite(
- 'DontSkipInheritedClass'
- );
-
- $dir = dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'Inheritance' . DIRECTORY_SEPARATOR;
-
- $suite->addTestFile($dir . 'InheritanceA.php');
- $suite->addTestFile($dir . 'InheritanceB.php');
- $result = $suite->run();
- $this->assertEquals(2, count($result));
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Framework/TestCaseTest.php b/vendor/phpunit/phpunit/tests/Framework/TestCaseTest.php
deleted file mode 100644
index 91332786..00000000
--- a/vendor/phpunit/phpunit/tests/Framework/TestCaseTest.php
+++ /dev/null
@@ -1,550 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'NoArgTestCaseTest.php';
-require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'Singleton.php';
-
-$GLOBALS['a'] = 'a';
-$_ENV['b'] = 'b';
-$_POST['c'] = 'c';
-$_GET['d'] = 'd';
-$_COOKIE['e'] = 'e';
-$_SERVER['f'] = 'f';
-$_FILES['g'] = 'g';
-$_REQUEST['h'] = 'h';
-$GLOBALS['i'] = 'i';
-
-/**
- * @since Class available since Release 2.0.0
- * @covers PHPUnit_Framework_TestCase
- */
-class Framework_TestCaseTest extends PHPUnit_Framework_TestCase
-{
- protected $backupGlobalsBlacklist = array('i', 'singleton');
-
- /**
- * Used be testStaticAttributesBackupPre
- */
- protected static $_testStatic = 0;
-
- public function testCaseToString()
- {
- $this->assertEquals(
- 'Framework_TestCaseTest::testCaseToString',
- $this->toString()
- );
- }
-
- public function testSuccess()
- {
- $test = new Success;
- $result = $test->run();
-
- $this->assertEquals(PHPUnit_Runner_BaseTestRunner::STATUS_PASSED, $test->getStatus());
- $this->assertEquals(0, $result->errorCount());
- $this->assertEquals(0, $result->failureCount());
- $this->assertEquals(0, $result->skippedCount());
- $this->assertEquals(1, count($result));
- }
-
- public function testFailure()
- {
- $test = new Failure;
- $result = $test->run();
-
- $this->assertEquals(PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE, $test->getStatus());
- $this->assertEquals(0, $result->errorCount());
- $this->assertEquals(1, $result->failureCount());
- $this->assertEquals(0, $result->skippedCount());
- $this->assertEquals(1, count($result));
- }
-
- public function testError()
- {
- $test = new TestError;
- $result = $test->run();
-
- $this->assertEquals(PHPUnit_Runner_BaseTestRunner::STATUS_ERROR, $test->getStatus());
- $this->assertEquals(1, $result->errorCount());
- $this->assertEquals(0, $result->failureCount());
- $this->assertEquals(0, $result->skippedCount());
- $this->assertEquals(1, count($result));
- }
-
- public function testSkipped()
- {
- $test = new TestSkipped();
- $result = $test->run();
-
- $this->assertEquals(PHPUnit_Runner_BaseTestRunner::STATUS_SKIPPED, $test->getStatus());
- $this->assertEquals('Skipped test', $test->getStatusMessage());
- $this->assertEquals(0, $result->errorCount());
- $this->assertEquals(0, $result->failureCount());
- $this->assertEquals(1, $result->skippedCount());
- $this->assertEquals(1, count($result));
- }
-
- public function testIncomplete()
- {
- $test = new TestIncomplete();
- $result = $test->run();
-
- $this->assertEquals(PHPUnit_Runner_BaseTestRunner::STATUS_INCOMPLETE, $test->getStatus());
- $this->assertEquals('Incomplete test', $test->getStatusMessage());
- $this->assertEquals(0, $result->errorCount());
- $this->assertEquals(0, $result->failureCount());
- $this->assertEquals(0, $result->skippedCount());
- $this->assertEquals(1, count($result));
- }
-
- public function testExceptionInSetUp()
- {
- $test = new ExceptionInSetUpTest('testSomething');
- $result = $test->run();
-
- $this->assertTrue($test->setUp);
- $this->assertFalse($test->assertPreConditions);
- $this->assertFalse($test->testSomething);
- $this->assertFalse($test->assertPostConditions);
- $this->assertTrue($test->tearDown);
- }
-
- public function testExceptionInAssertPreConditions()
- {
- $test = new ExceptionInAssertPreConditionsTest('testSomething');
- $result = $test->run();
-
- $this->assertTrue($test->setUp);
- $this->assertTrue($test->assertPreConditions);
- $this->assertFalse($test->testSomething);
- $this->assertFalse($test->assertPostConditions);
- $this->assertTrue($test->tearDown);
- }
-
- public function testExceptionInTest()
- {
- $test = new ExceptionInTest('testSomething');
- $result = $test->run();
-
- $this->assertTrue($test->setUp);
- $this->assertTrue($test->assertPreConditions);
- $this->assertTrue($test->testSomething);
- $this->assertFalse($test->assertPostConditions);
- $this->assertTrue($test->tearDown);
- }
-
- public function testExceptionInAssertPostConditions()
- {
- $test = new ExceptionInAssertPostConditionsTest('testSomething');
- $result = $test->run();
-
- $this->assertTrue($test->setUp);
- $this->assertTrue($test->assertPreConditions);
- $this->assertTrue($test->testSomething);
- $this->assertTrue($test->assertPostConditions);
- $this->assertTrue($test->tearDown);
- }
-
- public function testExceptionInTearDown()
- {
- $test = new ExceptionInTearDownTest('testSomething');
- $result = $test->run();
-
- $this->assertTrue($test->setUp);
- $this->assertTrue($test->assertPreConditions);
- $this->assertTrue($test->testSomething);
- $this->assertTrue($test->assertPostConditions);
- $this->assertTrue($test->tearDown);
- }
-
- public function testNoArgTestCasePasses()
- {
- $result = new PHPUnit_Framework_TestResult;
- $t = new PHPUnit_Framework_TestSuite('NoArgTestCaseTest');
-
- $t->run($result);
-
- $this->assertEquals(1, count($result));
- $this->assertEquals(0, $result->failureCount());
- $this->assertEquals(0, $result->errorCount());
- }
-
- public function testWasRun()
- {
- $test = new WasRun;
- $test->run();
-
- $this->assertTrue($test->wasRun);
- }
-
- public function testException()
- {
- $test = new ThrowExceptionTestCase('test');
- $test->setExpectedException('RuntimeException');
-
- $result = $test->run();
-
- $this->assertEquals(1, count($result));
- $this->assertTrue($result->wasSuccessful());
- }
-
- public function testExceptionWithMessage()
- {
- $test = new ThrowExceptionTestCase('test');
- $test->setExpectedException('RuntimeException', 'A runtime error occurred');
-
- $result = $test->run();
-
- $this->assertEquals(1, count($result));
- $this->assertTrue($result->wasSuccessful());
- }
-
- public function testExceptionWithWrongMessage()
- {
- $test = new ThrowExceptionTestCase('test');
- $test->setExpectedException('RuntimeException', 'A logic error occurred');
-
- $result = $test->run();
-
- $this->assertEquals(1, $result->failureCount());
- $this->assertEquals(1, count($result));
- $this->assertEquals(
- "Failed asserting that exception message 'A runtime error occurred' contains 'A logic error occurred'.",
- $test->getStatusMessage()
- );
- }
-
- public function testExceptionWithRegexpMessage()
- {
- $test = new ThrowExceptionTestCase('test');
- $test->setExpectedExceptionRegExp('RuntimeException', '/runtime .*? occurred/');
-
- $result = $test->run();
-
- $this->assertEquals(1, count($result));
- $this->assertTrue($result->wasSuccessful());
- }
-
- public function testExceptionWithWrongRegexpMessage()
- {
- $test = new ThrowExceptionTestCase('test');
- $test->setExpectedExceptionRegExp('RuntimeException', '/logic .*? occurred/');
-
- $result = $test->run();
-
- $this->assertEquals(1, $result->failureCount());
- $this->assertEquals(1, count($result));
- $this->assertEquals(
- "Failed asserting that exception message 'A runtime error occurred' matches '/logic .*? occurred/'.",
- $test->getStatusMessage()
- );
- }
-
- /**
- * @covers PHPUnit_Framework_Constraint_ExceptionMessageRegExp
- */
- public function testExceptionWithInvalidRegexpMessage()
- {
- $test = new ThrowExceptionTestCase('test');
- $test->setExpectedExceptionRegExp('RuntimeException', '#runtime .*? occurred/'); // wrong delimiter
-
- $result = $test->run();
-
- $this->assertEquals(
- "Invalid expected exception message regex given: '#runtime .*? occurred/'",
- $test->getStatusMessage()
- );
- }
-
- public function testNoException()
- {
- $test = new ThrowNoExceptionTestCase('test');
- $test->setExpectedException('RuntimeException');
-
- $result = $test->run();
-
- $this->assertEquals(1, $result->failureCount());
- $this->assertEquals(1, count($result));
- }
-
- public function testWrongException()
- {
- $test = new ThrowExceptionTestCase('test');
- $test->setExpectedException('InvalidArgumentException');
-
- $result = $test->run();
-
- $this->assertEquals(1, $result->failureCount());
- $this->assertEquals(1, count($result));
- }
-
- /**
- * @backupGlobals enabled
- */
- public function testGlobalsBackupPre()
- {
- global $a;
- global $i;
-
- $this->assertEquals('a', $a);
- $this->assertEquals('a', $GLOBALS['a']);
- $this->assertEquals('b', $_ENV['b']);
- $this->assertEquals('c', $_POST['c']);
- $this->assertEquals('d', $_GET['d']);
- $this->assertEquals('e', $_COOKIE['e']);
- $this->assertEquals('f', $_SERVER['f']);
- $this->assertEquals('g', $_FILES['g']);
- $this->assertEquals('h', $_REQUEST['h']);
- $this->assertEquals('i', $i);
- $this->assertEquals('i', $GLOBALS['i']);
-
- $GLOBALS['a'] = 'aa';
- $GLOBALS['foo'] = 'bar';
- $_ENV['b'] = 'bb';
- $_POST['c'] = 'cc';
- $_GET['d'] = 'dd';
- $_COOKIE['e'] = 'ee';
- $_SERVER['f'] = 'ff';
- $_FILES['g'] = 'gg';
- $_REQUEST['h'] = 'hh';
- $GLOBALS['i'] = 'ii';
-
- $this->assertEquals('aa', $a);
- $this->assertEquals('aa', $GLOBALS['a']);
- $this->assertEquals('bar', $GLOBALS['foo']);
- $this->assertEquals('bb', $_ENV['b']);
- $this->assertEquals('cc', $_POST['c']);
- $this->assertEquals('dd', $_GET['d']);
- $this->assertEquals('ee', $_COOKIE['e']);
- $this->assertEquals('ff', $_SERVER['f']);
- $this->assertEquals('gg', $_FILES['g']);
- $this->assertEquals('hh', $_REQUEST['h']);
- $this->assertEquals('ii', $i);
- $this->assertEquals('ii', $GLOBALS['i']);
- }
-
- public function testGlobalsBackupPost()
- {
- global $a;
- global $i;
-
- $this->assertEquals('a', $a);
- $this->assertEquals('a', $GLOBALS['a']);
- $this->assertEquals('b', $_ENV['b']);
- $this->assertEquals('c', $_POST['c']);
- $this->assertEquals('d', $_GET['d']);
- $this->assertEquals('e', $_COOKIE['e']);
- $this->assertEquals('f', $_SERVER['f']);
- $this->assertEquals('g', $_FILES['g']);
- $this->assertEquals('h', $_REQUEST['h']);
- $this->assertEquals('ii', $i);
- $this->assertEquals('ii', $GLOBALS['i']);
-
- $this->assertArrayNotHasKey('foo', $GLOBALS);
- }
-
- /**
- * @backupGlobals enabled
- * @backupStaticAttributes enabled
- */
- public function testStaticAttributesBackupPre()
- {
- $GLOBALS['singleton'] = Singleton::getInstance();
- self::$_testStatic = 123;
- }
-
- /**
- * @depends testStaticAttributesBackupPre
- */
- public function testStaticAttributesBackupPost()
- {
- $this->assertNotSame($GLOBALS['singleton'], Singleton::getInstance());
- $this->assertSame(0, self::$_testStatic);
- }
-
- public function testIsInIsolationReturnsFalse()
- {
- $test = new IsolationTest('testIsInIsolationReturnsFalse');
- $result = $test->run();
-
- $this->assertEquals(1, count($result));
- $this->assertTrue($result->wasSuccessful());
- }
-
- public function testIsInIsolationReturnsTrue()
- {
- $test = new IsolationTest('testIsInIsolationReturnsTrue');
- $test->setRunTestInSeparateProcess(true);
- $result = $test->run();
-
- $this->assertEquals(1, count($result));
- $this->assertTrue($result->wasSuccessful());
- }
-
- public function testExpectOutputStringFooActualFoo()
- {
- $test = new OutputTestCase('testExpectOutputStringFooActualFoo');
- $result = $test->run();
-
- $this->assertEquals(1, count($result));
- $this->assertTrue($result->wasSuccessful());
- }
-
- public function testExpectOutputStringFooActualBar()
- {
- $test = new OutputTestCase('testExpectOutputStringFooActualBar');
- $result = $test->run();
-
- $this->assertEquals(1, count($result));
- $this->assertFalse($result->wasSuccessful());
- }
-
- public function testExpectOutputRegexFooActualFoo()
- {
- $test = new OutputTestCase('testExpectOutputRegexFooActualFoo');
- $result = $test->run();
-
- $this->assertEquals(1, count($result));
- $this->assertTrue($result->wasSuccessful());
- }
-
- public function testExpectOutputRegexFooActualBar()
- {
- $test = new OutputTestCase('testExpectOutputRegexFooActualBar');
- $result = $test->run();
-
- $this->assertEquals(1, count($result));
- $this->assertFalse($result->wasSuccessful());
- }
-
- public function testSkipsIfRequiresHigherVersionOfPHPUnit()
- {
- $test = new RequirementsTest('testAlwaysSkip');
- $result = $test->run();
-
- $this->assertEquals(1, $result->skippedCount());
- $this->assertEquals(
- 'PHPUnit 1111111 (or later) is required.',
- $test->getStatusMessage()
- );
- }
-
- public function testSkipsIfRequiresHigherVersionOfPHP()
- {
- $test = new RequirementsTest('testAlwaysSkip2');
- $result = $test->run();
-
- $this->assertEquals(1, $result->skippedCount());
- $this->assertEquals(
- 'PHP 9999999 (or later) is required.',
- $test->getStatusMessage()
- );
- }
-
- public function testSkipsIfRequiresNonExistingOs()
- {
- $test = new RequirementsTest('testAlwaysSkip3');
- $result = $test->run();
-
- $this->assertEquals(1, $result->skippedCount());
- $this->assertEquals(
- 'Operating system matching /DOESNOTEXIST/i is required.',
- $test->getStatusMessage()
- );
- }
-
- public function testSkipsIfRequiresNonExistingFunction()
- {
- $test = new RequirementsTest('testNine');
- $result = $test->run();
-
- $this->assertEquals(1, $result->skippedCount());
- $this->assertEquals(
- 'Function testFunc is required.',
- $test->getStatusMessage()
- );
- }
-
- public function testSkipsIfRequiresNonExistingExtension()
- {
- $test = new RequirementsTest('testTen');
- $result = $test->run();
-
- $this->assertEquals(
- 'Extension testExt is required.',
- $test->getStatusMessage()
- );
- }
-
- public function testSkipsProvidesMessagesForAllSkippingReasons()
- {
- $test = new RequirementsTest('testAllPossibleRequirements');
- $result = $test->run();
-
- $this->assertEquals(
- 'PHP 99-dev (or later) is required.' . PHP_EOL .
- 'PHPUnit 9-dev (or later) is required.' . PHP_EOL .
- 'Operating system matching /DOESNOTEXIST/i is required.' . PHP_EOL .
- 'Function testFuncOne is required.' . PHP_EOL .
- 'Function testFuncTwo is required.' . PHP_EOL .
- 'Extension testExtOne is required.' . PHP_EOL .
- 'Extension testExtTwo is required.',
- $test->getStatusMessage()
- );
- }
-
- public function testRequiringAnExistingMethodDoesNotSkip()
- {
- $test = new RequirementsTest('testExistingMethod');
- $result = $test->run();
- $this->assertEquals(0, $result->skippedCount());
- }
-
- public function testRequiringAnExistingFunctionDoesNotSkip()
- {
- $test = new RequirementsTest('testExistingFunction');
- $result = $test->run();
- $this->assertEquals(0, $result->skippedCount());
- }
-
- public function testRequiringAnExistingExtensionDoesNotSkip()
- {
- $test = new RequirementsTest('testExistingExtension');
- $result = $test->run();
- $this->assertEquals(0, $result->skippedCount());
- }
-
- public function testRequiringAnExistingOsDoesNotSkip()
- {
- $test = new RequirementsTest('testExistingOs');
- $result = $test->run();
- $this->assertEquals(0, $result->skippedCount());
- }
-
- public function testCurrentWorkingDirectoryIsRestored()
- {
- $expectedCwd = getcwd();
-
- $test = new ChangeCurrentWorkingDirectoryTest('testSomethingThatChangesTheCwd');
- $test->run();
-
- $this->assertSame($expectedCwd, getcwd());
- }
-
- /**
- * @requires PHP 7
- * @expectedException TypeError
- */
- public function testTypeErrorCanBeExpected()
- {
- $o = new ClassWithScalarTypeDeclarations;
- $o->foo(null, null);
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Framework/TestFailureTest.php b/vendor/phpunit/phpunit/tests/Framework/TestFailureTest.php
deleted file mode 100644
index 8df0a394..00000000
--- a/vendor/phpunit/phpunit/tests/Framework/TestFailureTest.php
+++ /dev/null
@@ -1,27 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since File available since Release 3.7.20
- */
-class Framework_TestFailureTest extends PHPUnit_Framework_TestCase
-{
- /**
- * @covers PHPUnit_Framework_TestFailure::toString
- */
- public function testToString()
- {
- $test = new self(__FUNCTION__);
- $exception = new PHPUnit_Framework_Exception('message');
- $failure = new PHPUnit_Framework_TestFailure($test, $exception);
-
- $this->assertEquals(__METHOD__ . ': message', $failure->toString());
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Framework/TestImplementorTest.php b/vendor/phpunit/phpunit/tests/Framework/TestImplementorTest.php
deleted file mode 100644
index f10a5098..00000000
--- a/vendor/phpunit/phpunit/tests/Framework/TestImplementorTest.php
+++ /dev/null
@@ -1,30 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 2.0.0
- */
-class Framework_TestImplementorTest extends PHPUnit_Framework_TestCase
-{
- /**
- * @covers PHPUnit_Framework_TestCase
- */
- public function testSuccessfulRun()
- {
- $result = new PHPUnit_Framework_TestResult;
-
- $test = new DoubleTestCase(new Success);
- $test->run($result);
-
- $this->assertEquals(count($test), count($result));
- $this->assertEquals(0, $result->errorCount());
- $this->assertEquals(0, $result->failureCount());
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Framework/TestListenerTest.php b/vendor/phpunit/phpunit/tests/Framework/TestListenerTest.php
deleted file mode 100644
index 589741bf..00000000
--- a/vendor/phpunit/phpunit/tests/Framework/TestListenerTest.php
+++ /dev/null
@@ -1,108 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 2.0.0
- * @covers PHPUnit_Framework_TestCase
- */
-class Framework_TestListenerTest extends PHPUnit_Framework_TestCase implements PHPUnit_Framework_TestListener
-{
- protected $endCount;
- protected $errorCount;
- protected $failureCount;
- protected $notImplementedCount;
- protected $riskyCount;
- protected $skippedCount;
- protected $result;
- protected $startCount;
-
- public function addError(PHPUnit_Framework_Test $test, Exception $e, $time)
- {
- $this->errorCount++;
- }
-
- public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time)
- {
- $this->failureCount++;
- }
-
- public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time)
- {
- $this->notImplementedCount++;
- }
-
- public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time)
- {
- $this->riskyCount++;
- }
-
- public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time)
- {
- $this->skippedCount++;
- }
-
- public function startTestSuite(PHPUnit_Framework_TestSuite $suite)
- {
- }
-
- public function endTestSuite(PHPUnit_Framework_TestSuite $suite)
- {
- }
-
- public function startTest(PHPUnit_Framework_Test $test)
- {
- $this->startCount++;
- }
-
- public function endTest(PHPUnit_Framework_Test $test, $time)
- {
- $this->endCount++;
- }
-
- protected function setUp()
- {
- $this->result = new PHPUnit_Framework_TestResult;
- $this->result->addListener($this);
-
- $this->endCount = 0;
- $this->failureCount = 0;
- $this->notImplementedCount = 0;
- $this->riskyCount = 0;
- $this->skippedCount = 0;
- $this->startCount = 0;
- }
-
- public function testError()
- {
- $test = new TestError;
- $test->run($this->result);
-
- $this->assertEquals(1, $this->errorCount);
- $this->assertEquals(1, $this->endCount);
- }
-
- public function testFailure()
- {
- $test = new Failure;
- $test->run($this->result);
-
- $this->assertEquals(1, $this->failureCount);
- $this->assertEquals(1, $this->endCount);
- }
-
- public function testStartStop()
- {
- $test = new Success;
- $test->run($this->result);
-
- $this->assertEquals(1, $this->startCount);
- $this->assertEquals(1, $this->endCount);
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1149.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/1149.phpt
deleted file mode 100644
index c4111908..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1149.phpt
+++ /dev/null
@@ -1,20 +0,0 @@
---TEST--
-GH-1149: Test swallows output buffer when run in a separate process
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-.1.2
-
-Time: %s, Memory: %s
-
-OK (2 tests, 2 assertions)
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1149/Issue1149Test.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/1149/Issue1149Test.php
deleted file mode 100644
index 01ac870a..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1149/Issue1149Test.php
+++ /dev/null
@@ -1,18 +0,0 @@
-assertTrue(true);
- print '1';
- }
-
- /**
- * @runInSeparateProcess
- */
- public function testTwo()
- {
- $this->assertTrue(true);
- print '2';
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1216.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/1216.phpt
deleted file mode 100644
index 631bb2a1..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1216.phpt
+++ /dev/null
@@ -1,25 +0,0 @@
---TEST--
-GH-1216: PHPUnit bootstrap must take globals vars even when the file is specified in command line
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-
-Starting test 'Issue1216Test::testConfigAvailableInBootstrap'.
-.
-
-Time: %s, Memory: %s
-
-OK (1 test, 1 assertion)
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1216/Issue1216Test.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/1216/Issue1216Test.php
deleted file mode 100644
index cfceaf58..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1216/Issue1216Test.php
+++ /dev/null
@@ -1,8 +0,0 @@
-assertTrue($_ENV['configAvailableInBootstrap']);
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1216/bootstrap1216.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/1216/bootstrap1216.php
deleted file mode 100644
index cec2724a..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1216/bootstrap1216.php
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
- Issue1216Test.php
-
-
-
-
-
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1265.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/1265.phpt
deleted file mode 100644
index 1b3159c3..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1265.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-GH-1265: Could not use "PHPUnit_Runner_StandardTestSuiteLoader" as loader
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-.
-
-Time: %s, Memory: %s
-
-OK (1 test, 1 assertion)
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1265/Issue1265Test.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/1265/Issue1265Test.php
deleted file mode 100644
index 68d71b3c..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1265/Issue1265Test.php
+++ /dev/null
@@ -1,8 +0,0 @@
-assertTrue(true);
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1265/phpunit1265.xml b/vendor/phpunit/phpunit/tests/Regression/GitHub/1265/phpunit1265.xml
deleted file mode 100644
index 27fdd529..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1265/phpunit1265.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1330.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/1330.phpt
deleted file mode 100644
index 48dab3c2..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1330.phpt
+++ /dev/null
@@ -1,24 +0,0 @@
---TEST--
-GH-1330: Allow non-ambiguous shortened longopts
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-
-Starting test 'Issue1330Test::testTrue'.
-.
-
-Time: %s, Memory: %s
-
-OK (1 test, 1 assertion)
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1330/Issue1330Test.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/1330/Issue1330Test.php
deleted file mode 100644
index 0829cb95..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1330/Issue1330Test.php
+++ /dev/null
@@ -1,8 +0,0 @@
-assertTrue(PHPUNIT_1330);
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1330/phpunit1330.xml b/vendor/phpunit/phpunit/tests/Regression/GitHub/1330/phpunit1330.xml
deleted file mode 100644
index a61e0cc1..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1330/phpunit1330.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1335.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/1335.phpt
deleted file mode 100644
index 1ed52031..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1335.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-GH-1335: exportVariable multiple backslash problem
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-............
-
-Time: %s, Memory: %s
-
-OK (12 tests, 12 assertions)
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1335/Issue1335Test.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/1335/Issue1335Test.php
deleted file mode 100644
index 4407ec8d..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1335/Issue1335Test.php
+++ /dev/null
@@ -1,67 +0,0 @@
-assertEquals('Hello', $GLOBALS['globalString']);
- }
-
- public function testGlobalIntTruthy()
- {
- $this->assertEquals(1, $GLOBALS['globalIntTruthy']);
- }
-
- public function testGlobalIntFalsey()
- {
- $this->assertEquals(0, $GLOBALS['globalIntFalsey']);
- }
-
- public function testGlobalFloat()
- {
- $this->assertEquals(1.123, $GLOBALS['globalFloat']);
- }
-
- public function testGlobalBoolTrue()
- {
- $this->assertEquals(true, $GLOBALS['globalBoolTrue']);
- }
-
- public function testGlobalBoolFalse()
- {
- $this->assertEquals(false, $GLOBALS['globalBoolFalse']);
- }
-
- public function testGlobalNull()
- {
- $this->assertEquals(null, $GLOBALS['globalNull']);
- }
-
- public function testGlobalArray()
- {
- $this->assertEquals(array('foo'), $GLOBALS['globalArray']);
- }
-
- public function testGlobalNestedArray()
- {
- $this->assertEquals(array(array('foo')), $GLOBALS['globalNestedArray']);
- }
-
- public function testGlobalObject()
- {
- $this->assertEquals((object) array('foo'=> 'bar'), $GLOBALS['globalObject']);
- }
-
- public function testGlobalObjectWithBackSlashString()
- {
- $this->assertEquals((object) array('foo'=> 'back\\slash'), $GLOBALS['globalObjectWithBackSlashString']);
- }
-
- public function testGlobalObjectWithDoubleBackSlashString()
- {
- $this->assertEquals((object) array('foo'=> 'back\\\\slash'), $GLOBALS['globalObjectWithDoubleBackSlashString']);
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1335/bootstrap1335.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/1335/bootstrap1335.php
deleted file mode 100644
index 073a87e3..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1335/bootstrap1335.php
+++ /dev/null
@@ -1,13 +0,0 @@
- 'bar');
-$globalObjectWithBackSlashString = (object) array('foo'=> 'back\\slash');
-$globalObjectWithDoubleBackSlashString = (object) array('foo'=> 'back\\\\slash');
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1337.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/1337.phpt
deleted file mode 100644
index 3c7077e4..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1337.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-GH-1337: Data Provider with \ at the end of the name breaks with process isolation
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-..
-
-Time: %s, Memory: %s
-
-OK (2 tests, 2 assertions)
\ No newline at end of file
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1337/Issue1337Test.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/1337/Issue1337Test.php
deleted file mode 100644
index b972b2ad..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1337/Issue1337Test.php
+++ /dev/null
@@ -1,19 +0,0 @@
-assertTrue($a);
- }
-
- public function dataProvider()
- {
- return array(
- 'c:\\'=> array(true),
- 0.9 => array(true)
- );
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1348.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/1348.phpt
deleted file mode 100644
index a3a721d7..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1348.phpt
+++ /dev/null
@@ -1,36 +0,0 @@
---TEST--
-GH-1348: STDOUT/STDERR IO streams should exist in process isolation
---SKIPIF--
-
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-.
-STDOUT does not break test result
-E
-
-Time: %s, Memory: %s
-
-There was 1 error:
-
-1) Issue1348Test::testSTDERR
-PHPUnit_Framework_Exception: STDERR works as usual.
-
-FAILURES!
-Tests: 2, Assertions: 1, Errors: 1.
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1348/Issue1348Test.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/1348/Issue1348Test.php
deleted file mode 100644
index d3c82f0e..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1348/Issue1348Test.php
+++ /dev/null
@@ -1,14 +0,0 @@
-assertTrue(true);
- }
-
- public function testSTDERR()
- {
- fwrite(STDERR, 'STDERR works as usual.');
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1351.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/1351.phpt
deleted file mode 100644
index c13c4220..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1351.phpt
+++ /dev/null
@@ -1,48 +0,0 @@
---TEST--
-GH-1351: Test result does not serialize test class in process isolation
---SKIPIF--
-
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-F.E.E
-
-Time: %s, Memory: %s
-
-There were 2 errors:
-
-1) Issue1351Test::testExceptionPre
-RuntimeException: Expected rethrown exception.
-%A
-Caused by
-LogicException: Expected exception.
-%A
-
-2) Issue1351Test::testPhpCoreLanguageException
-PDOException: SQLSTATE[HY000]: General error: 1 no such table: php_wtf
-%A
-
---
-
-There was 1 failure:
-
-1) Issue1351Test::testFailurePre
-Expected failure.
-%A
-FAILURES!
-Tests: 5, Assertions: 5, Errors: 2, Failures: 1.
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1351/ChildProcessClass1351.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/1351/ChildProcessClass1351.php
deleted file mode 100644
index 24c05376..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1351/ChildProcessClass1351.php
+++ /dev/null
@@ -1,4 +0,0 @@
-instance = new ChildProcessClass1351();
- $this->assertFalse(true, 'Expected failure.');
- }
-
- public function testFailurePost()
- {
- $this->assertNull($this->instance);
- $this->assertFalse(class_exists('ChildProcessClass1351', false), 'ChildProcessClass1351 is not loaded.');
- }
-
- /**
- * @runInSeparateProcess
- */
- public function testExceptionPre()
- {
- $this->instance = new ChildProcessClass1351();
- try {
- throw new LogicException('Expected exception.');
- } catch (LogicException $e) {
- throw new RuntimeException('Expected rethrown exception.', 0, $e);
- }
- }
-
- public function testExceptionPost()
- {
- $this->assertNull($this->instance);
- $this->assertFalse(class_exists('ChildProcessClass1351', false), 'ChildProcessClass1351 is not loaded.');
- }
-
- public function testPhpCoreLanguageException()
- {
- // User-space code cannot instantiate a PDOException with a string code,
- // so trigger a real one.
- $connection = new PDO('sqlite::memory:');
- $connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
- $connection->query("DELETE FROM php_wtf WHERE exception_code = 'STRING'");
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1374.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/1374.phpt
deleted file mode 100644
index 473e01ff..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1374.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-GH-1374: tearDown() is called despite unmet requirements
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-S
-
-Time: %s, Memory: %s
-
-OK, but incomplete, skipped, or risky tests!
-Tests: 1, Assertions: 0, Skipped: 1.
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1374/Issue1374Test.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/1374/Issue1374Test.php
deleted file mode 100644
index ad6a3bf0..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1374/Issue1374Test.php
+++ /dev/null
@@ -1,21 +0,0 @@
-fail('This should not be reached');
- }
-
- protected function tearDown()
- {
- print __FUNCTION__;
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1437.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/1437.phpt
deleted file mode 100644
index b7064c58..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1437.phpt
+++ /dev/null
@@ -1,28 +0,0 @@
---TEST--
-GH-1437: Risky test messages mask failures
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-F
-
-Time: %s, Memory: %s
-
-There was 1 failure:
-
-1) Issue1437Test::testFailure
-Failed asserting that false is true.
-
-%sIssue1437Test.php:%i
-
-FAILURES!
-Tests: 1, Assertions: 1, Failures: 1.
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1437/Issue1437Test.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/1437/Issue1437Test.php
deleted file mode 100644
index bff4b205..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1437/Issue1437Test.php
+++ /dev/null
@@ -1,9 +0,0 @@
-assertTrue(false);
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1468.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/1468.phpt
deleted file mode 100644
index 7b46ca97..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1468.phpt
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-GH-1468: Incomplete and @todo annotated tests are counted twice
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-I
-
-Time: %s, Memory: %s
-
-OK, but incomplete, skipped, or risky tests!
-Tests: 1, Assertions: 0, Incomplete: 1.
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1468/Issue1468Test.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/1468/Issue1468Test.php
deleted file mode 100644
index 535b25b9..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1468/Issue1468Test.php
+++ /dev/null
@@ -1,11 +0,0 @@
-markTestIncomplete();
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1471.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/1471.phpt
deleted file mode 100644
index 20886823..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1471.phpt
+++ /dev/null
@@ -1,28 +0,0 @@
---TEST--
-GH-1471: Output made while test is running is printed although expectOutputString() is used when an assertion fails
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-F
-
-Time: %s, Memory: %s
-
-There was 1 failure:
-
-1) Issue1471Test::testFailure
-Failed asserting that false is true.
-
-%s/Issue1471Test.php:10
-
-FAILURES!
-Tests: 1, Assertions: 1, Failures: 1.
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1471/Issue1471Test.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/1471/Issue1471Test.php
deleted file mode 100644
index 28f12748..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1471/Issue1471Test.php
+++ /dev/null
@@ -1,12 +0,0 @@
-expectOutputString('*');
-
- print '*';
-
- $this->assertTrue(false);
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1472.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/1472.phpt
deleted file mode 100644
index 0958eb35..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1472.phpt
+++ /dev/null
@@ -1,26 +0,0 @@
---TEST--
-GH-1472: assertEqualXMLStructure modifies the tested elements
---SKIPIF--
-
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-.
-
-Time: %s, Memory: %s
-
-OK (1 test, 4 assertions)
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1472/Issue1472Test.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/1472/Issue1472Test.php
deleted file mode 100644
index a392773a..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1472/Issue1472Test.php
+++ /dev/null
@@ -1,21 +0,0 @@
-loadXML(' ');
-
- $xpath = new DOMXPath($doc);
-
- $labelElement = $doc->getElementsByTagName('label')->item(0);
-
- $this->assertEquals(1, $xpath->evaluate('count(//label[text() = "text content"])'));
-
- $expectedElmt = $doc->createElement('label', 'text content');
- $this->assertEqualXMLStructure($expectedElmt, $labelElement);
-
- // the following assertion fails, even though it passed before - which is due to the assertEqualXMLStructure() has modified the $labelElement
- $this->assertEquals(1, $xpath->evaluate('count(//label[text() = "text content"])'));
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1570.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/1570.phpt
deleted file mode 100644
index 553c6448..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1570.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-GH-1570: Test that prints output is marked as failure and not as risky when --disallow-test-output is used
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-R*
-
-Time: %s, Memory: %s
-
-OK, but incomplete, skipped, or risky tests!
-Tests: 1, Assertions: 0, Risky: 1.
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1570/Issue1570Test.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/1570/Issue1570Test.php
deleted file mode 100644
index 01485066..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1570/Issue1570Test.php
+++ /dev/null
@@ -1,8 +0,0 @@
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-%s
-
-Time: %s, Memory: %s
-
-OK (2 tests, 2 assertions)
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/2158/Issue2158Test.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/2158/Issue2158Test.php
deleted file mode 100644
index 014aa4f6..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/2158/Issue2158Test.php
+++ /dev/null
@@ -1,23 +0,0 @@
-assertTrue(true);
- }
-
- /**
- * Constant defined previously in main process constant should be available and
- * no errors should be yielded by reload of included files
- *
- * @runInSeparateProcess
- */
- public function testSomethingElse()
- {
- $this->assertTrue(defined('TEST_CONSTANT'));
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/2158/constant.inc b/vendor/phpunit/phpunit/tests/Regression/GitHub/2158/constant.inc
deleted file mode 100644
index 4137114f..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/2158/constant.inc
+++ /dev/null
@@ -1,5 +0,0 @@
-
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/244.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/244.phpt
deleted file mode 100644
index b517e5c0..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/244.phpt
+++ /dev/null
@@ -1,32 +0,0 @@
---TEST--
-GH-244: Expected Exception should support string codes
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-.FFF
-
-Time: %s, Memory: %s
-
-There were 3 failures:
-
-1) Issue244Test::testFails
-Failed asserting that '123StringCode' is equal to expected exception code 'OtherString'.
-
-2) Issue244Test::testFailsTooIfExpectationIsANumber
-Failed asserting that '123StringCode' is equal to expected exception code 123.
-
-3) Issue244Test::testFailsTooIfExceptionCodeIsANumber
-Failed asserting that 123 is equal to expected exception code '123String'.
-
-FAILURES!
-Tests: 4, Assertions: 8, Failures: 3.
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/244/Issue244Test.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/244/Issue244Test.php
deleted file mode 100644
index 621c4cf5..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/244/Issue244Test.php
+++ /dev/null
@@ -1,55 +0,0 @@
-code = '123StringCode';
- }
-}
-
-class Issue244ExceptionIntCode extends Exception
-{
- public function __construct()
- {
- $this->code = 123;
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/322.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/322.phpt
deleted file mode 100644
index 0974a706..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/322.phpt
+++ /dev/null
@@ -1,26 +0,0 @@
---TEST--
-GH-322: group commandline option should override group/exclude setting in phpunit.xml
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-
-Starting test 'Issue322Test::testOne'.
-.
-
-Time: %s, Memory: %s
-
-OK (1 test, 0 assertions)
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/322/Issue322Test.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/322/Issue322Test.php
deleted file mode 100644
index 618bcaa1..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/322/Issue322Test.php
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
- Test.php
-
-
-
-
- one
-
-
-
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/433.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/433.phpt
deleted file mode 100644
index df6c6f8e..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/433.phpt
+++ /dev/null
@@ -1,31 +0,0 @@
---TEST--
-GH-433: expectOutputString not completely working as expected
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-..F
-
-Time: %s, Memory: %s
-
-There was 1 failure:
-
-1) Issue433Test::testNotMatchingOutput
-Failed asserting that two strings are equal.
---- Expected
-+++ Actual
-@@ @@
--'foo'
-+'bar'
-
-FAILURES!
-Tests: 3, Assertions: 3, Failures: 1.
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/433/Issue433Test.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/433/Issue433Test.php
deleted file mode 100644
index e0a91b35..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/433/Issue433Test.php
+++ /dev/null
@@ -1,21 +0,0 @@
-expectOutputString('test');
- print 'test';
- }
-
- public function testOutputWithExpectationAfter()
- {
- print 'test';
- $this->expectOutputString('test');
- }
-
- public function testNotMatchingOutput()
- {
- print 'bar';
- $this->expectOutputString('foo');
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/445.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/445.phpt
deleted file mode 100644
index c0183f9e..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/445.phpt
+++ /dev/null
@@ -1,32 +0,0 @@
---TEST--
-GH-455: expectOutputString not working in strict mode
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-..F
-
-Time: %s, Memory: %s
-
-There was 1 failure:
-
-1) Issue445Test::testNotMatchingOutput
-Failed asserting that two strings are equal.
---- Expected
-+++ Actual
-@@ @@
--'foo'
-+'bar'
-
-FAILURES!
-Tests: 3, Assertions: 3, Failures: 1.
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/445/Issue445Test.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/445/Issue445Test.php
deleted file mode 100644
index c3090259..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/445/Issue445Test.php
+++ /dev/null
@@ -1,21 +0,0 @@
-expectOutputString('test');
- print 'test';
- }
-
- public function testOutputWithExpectationAfter()
- {
- print 'test';
- $this->expectOutputString('test');
- }
-
- public function testNotMatchingOutput()
- {
- print 'bar';
- $this->expectOutputString('foo');
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/498.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/498.phpt
deleted file mode 100644
index 4f8508e1..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/498.phpt
+++ /dev/null
@@ -1,29 +0,0 @@
---TEST--
-GH-498: The test methods won't be run if a dataProvider throws Exception and --group is added in command line
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-F
-
-Time: %s, Memory: %s
-
-There was 1 failure:
-
-1) Warning
-The data provider specified for Issue498Test::shouldBeFalse is invalid.
-Can't create the data
-
-FAILURES!
-Tests: 1, Assertions: 0, Failures: 1.
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/498/Issue498Test.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/498/Issue498Test.php
deleted file mode 100644
index 49fa7645..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/498/Issue498Test.php
+++ /dev/null
@@ -1,44 +0,0 @@
-assertTrue(true);
- }
-
- /**
- * @test
- * @dataProvider shouldBeFalseDataProvider
- * @group trueOnly
- */
- public function shouldBeFalse($testData)
- {
- $this->assertFalse(false);
- }
-
- public function shouldBeTrueDataProvider()
- {
-
- //throw new Exception("Can't create the data");
- return array(
- array(true),
- array(false)
- );
- }
-
- public function shouldBeFalseDataProvider()
- {
- throw new Exception("Can't create the data");
-
- return array(
- array(true),
- array(false)
- );
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/503.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/503.phpt
deleted file mode 100644
index c9dbd564..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/503.phpt
+++ /dev/null
@@ -1,33 +0,0 @@
---TEST--
-GH-503: assertEquals() Line Ending Differences Are Obscure
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-F
-
-Time: %s, Memory: %s
-
-There was 1 failure:
-
-1) Issue503Test::testCompareDifferentLineEndings
-Failed asserting that two strings are identical.
---- Expected
-+++ Actual
-@@ @@
- #Warning: Strings contain different line endings!
- foo
-
-%s:%i
-
-FAILURES!
-Tests: 1, Assertions: 1, Failures: 1.
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/503/Issue503Test.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/503/Issue503Test.php
deleted file mode 100644
index 75ca8d45..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/503/Issue503Test.php
+++ /dev/null
@@ -1,11 +0,0 @@
-assertSame(
- "foo\n",
- "foo\r\n"
- );
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/581.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/581.phpt
deleted file mode 100644
index 96ad88a9..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/581.phpt
+++ /dev/null
@@ -1,42 +0,0 @@
---TEST--
-GH-581: PHPUnit_Util_Type::export adds extra newlines in Windows
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-F
-
-Time: %s, Memory: %s
-
-There was 1 failure:
-
-1) Issue581Test::testExportingObjectsDoesNotBreakWindowsLineFeeds
-Failed asserting that two objects are equal.
---- Expected
-+++ Actual
-@@ @@
- stdClass Object (
- 0 => 1
- 1 => 2
- 2 => 'Test\n'
- 3 => 4
-- 4 => 5
-+ 4 => 1
- 5 => 6
- 6 => 7
- 7 => 8
- )
-
-%s:%i
-
-FAILURES!
-Tests: 1, Assertions: 1, Failures: 1.
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/581/Issue581Test.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/581/Issue581Test.php
deleted file mode 100644
index 51de83b1..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/581/Issue581Test.php
+++ /dev/null
@@ -1,11 +0,0 @@
-assertEquals(
- (object) array(1, 2, "Test\r\n", 4, 5, 6, 7, 8),
- (object) array(1, 2, "Test\r\n", 4, 1, 6, 7, 8)
- );
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/74.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/74.phpt
deleted file mode 100644
index 2f54d268..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/74.phpt
+++ /dev/null
@@ -1,28 +0,0 @@
---TEST--
-GH-74: catchable fatal error in 3.5
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-E
-
-Time: %s, Memory: %s
-
-There was 1 error:
-
-1) Issue74Test::testCreateAndThrowNewExceptionInProcessIsolation
-NewException: Testing GH-74
-
-%sIssue74Test.php:7
-
-FAILURES!
-Tests: 1, Assertions: 0, Errors: 1.
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/74/Issue74Test.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/74/Issue74Test.php
deleted file mode 100644
index 72f35928..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/74/Issue74Test.php
+++ /dev/null
@@ -1,9 +0,0 @@
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-.F
-
-Time: %s, Memory: %s
-
-There was 1 failure:
-
-1) Warning
-The data provider specified for Issue765Test::testDependent is invalid.
-
-FAILURES!
-Tests: 2, Assertions: 1, Failures: 1.
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/765/Issue765Test.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/765/Issue765Test.php
deleted file mode 100644
index a47474b2..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/765/Issue765Test.php
+++ /dev/null
@@ -1,22 +0,0 @@
-assertTrue(true);
- }
-
- /**
- * @depends testDependee
- * @dataProvider dependentProvider
- */
- public function testDependent($a)
- {
- $this->assertTrue(true);
- }
-
- public function dependentProvider()
- {
- throw new Exception;
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/797.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/797.phpt
deleted file mode 100644
index 8be21eb6..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/797.phpt
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-GH-797: Disabled $preserveGlobalState does not load bootstrap.php.
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-.
-
-Time: %s, Memory: %s
-
-OK (1 test, 1 assertion)
\ No newline at end of file
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/797/Issue797Test.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/797/Issue797Test.php
deleted file mode 100644
index b1c1b8f9..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/797/Issue797Test.php
+++ /dev/null
@@ -1,10 +0,0 @@
-assertEquals(GITHUB_ISSUE, 797);
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/797/bootstrap797.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/797/bootstrap797.php
deleted file mode 100644
index 03890a35..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/797/bootstrap797.php
+++ /dev/null
@@ -1,6 +0,0 @@
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-............................................................... 63 / 150 ( 42%)
-............................................................... 126 / 150 ( 84%)
-........................
-
-Time: %s, Memory: %s
-
-OK (150 tests, 150 assertions)
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/873-php5.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/873-php5.phpt
deleted file mode 100644
index 89b74023..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/873-php5.phpt
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-GH-873: PHPUnit suppresses exceptions thrown outside of test case function
---SKIPIF--
- 5) {
- print 'skip: PHP 5 is required';
-}
-?>
---FILE--
-
---EXPECTF--
-
-Fatal error: Uncaught exception 'Exception' with message 'PHPUnit suppresses exceptions thrown outside of test case function' in %s:%i
-Stack trace:
-%a
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/873-php7.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/873-php7.phpt
deleted file mode 100644
index b022f997..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/873-php7.phpt
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-GH-873: PHPUnit suppresses exceptions thrown outside of test case function
---SKIPIF--
-
---FILE--
-
---EXPECTF--
-
-Fatal error: Uncaught Exception: PHPUnit suppresses exceptions thrown outside of test case function in %s:%i
-Stack trace:
-%a
diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/873/Issue873Test.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/873/Issue873Test.php
deleted file mode 100644
index 70fd9046..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/GitHub/873/Issue873Test.php
+++ /dev/null
@@ -1,9 +0,0 @@
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-..
-
-Time: %s, Memory: %s
-
-OK (2 tests, 1 assertion)
diff --git a/vendor/phpunit/phpunit/tests/Regression/Trac/1021/Issue1021Test.php b/vendor/phpunit/phpunit/tests/Regression/Trac/1021/Issue1021Test.php
deleted file mode 100644
index 5814e94c..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/Trac/1021/Issue1021Test.php
+++ /dev/null
@@ -1,23 +0,0 @@
-assertTrue($data);
- }
-
- /**
- * @depends testSomething
- */
- public function testSomethingElse()
- {
- }
-
- public function provider()
- {
- return array(array(true));
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Regression/Trac/523.phpt b/vendor/phpunit/phpunit/tests/Regression/Trac/523.phpt
deleted file mode 100644
index c182a987..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/Trac/523.phpt
+++ /dev/null
@@ -1,19 +0,0 @@
---TEST--
-#523: assertAttributeEquals does not work with classes extending ArrayIterator
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-.
-
-Time: %s, Memory: %s
-
-OK (1 test, 1 assertion)
diff --git a/vendor/phpunit/phpunit/tests/Regression/Trac/523/Issue523Test.php b/vendor/phpunit/phpunit/tests/Regression/Trac/523/Issue523Test.php
deleted file mode 100644
index 80124f1d..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/Trac/523/Issue523Test.php
+++ /dev/null
@@ -1,13 +0,0 @@
-assertAttributeEquals('foo', 'field', new Issue523());
- }
-};
-
-class Issue523 extends ArrayIterator
-{
- protected $field = 'foo';
-}
diff --git a/vendor/phpunit/phpunit/tests/Regression/Trac/578.phpt b/vendor/phpunit/phpunit/tests/Regression/Trac/578.phpt
deleted file mode 100644
index 27ea9f1f..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/Trac/578.phpt
+++ /dev/null
@@ -1,37 +0,0 @@
---TEST--
-#578: Double printing of trace line for exceptions from notices and warnings
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-EEE
-
-Time: %s, Memory: %s
-
-There were 3 errors:
-
-1) Issue578Test::testNoticesDoublePrintStackTrace
-Invalid error type specified
-
-%sIssue578Test.php:%i
-
-2) Issue578Test::testWarningsDoublePrintStackTrace
-Invalid error type specified
-
-%sIssue578Test.php:%i
-
-3) Issue578Test::testUnexpectedExceptionsPrintsCorrectly
-Exception: Double printed exception
-
-%sIssue578Test.php:%i
-
-FAILURES!
-Tests: 3, Assertions: 0, Errors: 3.
diff --git a/vendor/phpunit/phpunit/tests/Regression/Trac/578/Issue578Test.php b/vendor/phpunit/phpunit/tests/Regression/Trac/578/Issue578Test.php
deleted file mode 100644
index 262d97f6..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/Trac/578/Issue578Test.php
+++ /dev/null
@@ -1,20 +0,0 @@
-iniSet('error_reporting', E_ALL | E_NOTICE);
- trigger_error('Stack Trace Test Notice', E_NOTICE);
- }
-
- public function testWarningsDoublePrintStackTrace()
- {
- $this->iniSet('error_reporting', E_ALL | E_NOTICE);
- trigger_error('Stack Trace Test Notice', E_WARNING);
- }
-
- public function testUnexpectedExceptionsPrintsCorrectly()
- {
- throw new Exception('Double printed exception');
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Regression/Trac/684.phpt b/vendor/phpunit/phpunit/tests/Regression/Trac/684.phpt
deleted file mode 100644
index da51508d..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/Trac/684.phpt
+++ /dev/null
@@ -1,25 +0,0 @@
---TEST--
-#684: Unable to find test class when no test methods exists
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-F
-
-Time: %s, Memory: %s
-
-There was 1 failure:
-
-1) Warning
-No tests found in class "Foo_Bar_Issue684Test".
-
-FAILURES!
-Tests: 1, Assertions: 0, Failures: 1.
diff --git a/vendor/phpunit/phpunit/tests/Regression/Trac/684/Issue684Test.php b/vendor/phpunit/phpunit/tests/Regression/Trac/684/Issue684Test.php
deleted file mode 100644
index e8e5d87e..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/Trac/684/Issue684Test.php
+++ /dev/null
@@ -1,4 +0,0 @@
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-..
-
-Time: %s, Memory: %s
-
-OK (2 tests, 0 assertions)
diff --git a/vendor/phpunit/phpunit/tests/Regression/Trac/783/ChildSuite.php b/vendor/phpunit/phpunit/tests/Regression/Trac/783/ChildSuite.php
deleted file mode 100644
index 8bac5144..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/Trac/783/ChildSuite.php
+++ /dev/null
@@ -1,15 +0,0 @@
-addTestSuite('OneTest');
- $suite->addTestSuite('TwoTest');
-
- return $suite;
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Regression/Trac/783/OneTest.php b/vendor/phpunit/phpunit/tests/Regression/Trac/783/OneTest.php
deleted file mode 100644
index 71951582..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/Trac/783/OneTest.php
+++ /dev/null
@@ -1,10 +0,0 @@
-addTest(ChildSuite::suite());
-
- return $suite;
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Regression/Trac/783/TwoTest.php b/vendor/phpunit/phpunit/tests/Regression/Trac/783/TwoTest.php
deleted file mode 100644
index 580246ce..00000000
--- a/vendor/phpunit/phpunit/tests/Regression/Trac/783/TwoTest.php
+++ /dev/null
@@ -1,10 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 2.0.0
- * @covers PHPUnit_Runner_BaseTestRunner
- */
-class Runner_BaseTestRunnerTest extends PHPUnit_Framework_TestCase
-{
- public function testInvokeNonStaticSuite()
- {
- $runner = new MockRunner;
- $runner->getTest('NonStatic');
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/TextUI/abstract-test-class.phpt b/vendor/phpunit/phpunit/tests/TextUI/abstract-test-class.phpt
deleted file mode 100644
index e26a80c7..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/abstract-test-class.phpt
+++ /dev/null
@@ -1,25 +0,0 @@
---TEST--
-phpunit AbstractTest ../_files/AbstractTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-F
-
-Time: %s, Memory: %s
-
-There was 1 failure:
-
-1) Warning
-Cannot instantiate class "AbstractTest".
-
-FAILURES!
-Tests: 1, Assertions: 0, Failures: 1.
diff --git a/vendor/phpunit/phpunit/tests/TextUI/colors-always.phpt b/vendor/phpunit/phpunit/tests/TextUI/colors-always.phpt
deleted file mode 100644
index 0e0ac1ed..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/colors-always.phpt
+++ /dev/null
@@ -1,19 +0,0 @@
---TEST--
-phpunit --colors=always BankAccountTest ../_files/BankAccountTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-...
-
-Time: %s, Memory: %s
-
-%s[30;42mOK (3 tests, 3 assertions)%s[0m
diff --git a/vendor/phpunit/phpunit/tests/TextUI/concrete-test-class.phpt b/vendor/phpunit/phpunit/tests/TextUI/concrete-test-class.phpt
deleted file mode 100644
index 445c01c4..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/concrete-test-class.phpt
+++ /dev/null
@@ -1,19 +0,0 @@
---TEST--
-phpunit ConcreteTest ../_files/ConcreteTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-..
-
-Time: %s, Memory: %s
-
-OK (2 tests, 0 assertions)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/custom-printer-debug.phpt b/vendor/phpunit/phpunit/tests/TextUI/custom-printer-debug.phpt
deleted file mode 100644
index 81e4ae06..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/custom-printer-debug.phpt
+++ /dev/null
@@ -1,27 +0,0 @@
---TEST--
-phpunit -c ../_files/configuration.custom-printer.xml --debug BankAccountTest ../_files/BankAccountTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-
-Starting test 'BankAccountTest::testBalanceIsInitiallyZero'.
-.
-Starting test 'BankAccountTest::testBalanceCannotBecomeNegative'.
-.
-Starting test 'BankAccountTest::testBalanceCannotBecomeNegative2'.
-.
-
-Time: %s, Memory: %s
-
-OK (3 tests, 3 assertions)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/custom-printer-verbose.phpt b/vendor/phpunit/phpunit/tests/TextUI/custom-printer-verbose.phpt
deleted file mode 100644
index 2255a6ee..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/custom-printer-verbose.phpt
+++ /dev/null
@@ -1,32 +0,0 @@
---TEST--
-phpunit -c ../_files/configuration.custom-printer.xml --verbose IncompleteTest ../_files/IncompleteTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-Runtime: %s
-Configuration: %sconfiguration.custom-printer.xml
-
-I
-
-Time: %s, Memory: %s
-
-There was 1 incomplete test:
-
-1) IncompleteTest::testIncomplete
-Test incomplete
-
-%s
-
-OK, but incomplete, skipped, or risky tests!
-Tests: 1, Assertions: 0, Incomplete: 1.
diff --git a/vendor/phpunit/phpunit/tests/TextUI/dataprovider-debug.phpt b/vendor/phpunit/phpunit/tests/TextUI/dataprovider-debug.phpt
deleted file mode 100644
index e95136f2..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/dataprovider-debug.phpt
+++ /dev/null
@@ -1,34 +0,0 @@
---TEST--
-phpunit --debug DataProviderDebugTest ../_files/DataProviderDebugTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-
-Starting test 'DataProviderDebugTest::testProvider with data set #0 (null, true, 1, 1.0)'.
-.
-Starting test 'DataProviderDebugTest::testProvider with data set #1 (1.2, resource(%d) of type (stream), '1')'.
-.
-Starting test 'DataProviderDebugTest::testProvider with data set #2 (array(array(1, 2, 3), array(3, 4, 5)))'.
-.
-Starting test 'DataProviderDebugTest::testProvider with data set #3 ('this\nis\na\nvery\nvery\nvery\nvery...g\ntext')'.
-.
-Starting test 'DataProviderDebugTest::testProvider with data set #4 (stdClass Object (), stdClass Object (...), array(), SplObjectStorage Object (...), stdClass Object (...))'.
-.
-Starting test 'DataProviderDebugTest::testProvider with data set #5 (Binary String: 0x000102030405, Binary String: 0x0e0f101112131...c1d1e1f)'.
-.
-Starting test 'DataProviderDebugTest::testProvider with data set #6 (Binary String: 0x0009)'.
-.
-
-Time: %s, Memory: %s
-
-OK (7 tests, 7 assertions)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/dataprovider-log-xml-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/dataprovider-log-xml-isolation.phpt
deleted file mode 100644
index 0e70df80..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/dataprovider-log-xml-isolation.phpt
+++ /dev/null
@@ -1,47 +0,0 @@
---TEST--
-phpunit --process-isolation --log-junit php://stdout DataProviderTest ../_files/DataProviderTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-..F.
-
-
-
-
-
-
- DataProviderTest::testAdd with data set #2 (1, 1, 3)
-Failed asserting that 2 matches expected 3.
-
-%s:%i
-
-
-
-
-
-
-
-
-Time: %s, Memory: %s
-
-There was 1 failure:
-
-1) DataProviderTest::testAdd with data set #2 (1, 1, 3)
-Failed asserting that 2 matches expected 3.
-
-%s:%i
-
-FAILURES!
-Tests: 4, Assertions: 4, Failures: 1.
diff --git a/vendor/phpunit/phpunit/tests/TextUI/dataprovider-log-xml.phpt b/vendor/phpunit/phpunit/tests/TextUI/dataprovider-log-xml.phpt
deleted file mode 100644
index f6ca5d16..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/dataprovider-log-xml.phpt
+++ /dev/null
@@ -1,46 +0,0 @@
---TEST--
-phpunit --log-junit php://stdout DataProviderTest ../_files/DataProviderTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-..F.
-
-
-
-
-
-
- DataProviderTest::testAdd with data set #2 (1, 1, 3)
-Failed asserting that 2 matches expected 3.
-
-%s:%i
-
-
-
-
-
-
-
-
-Time: %s, Memory: %s
-
-There was 1 failure:
-
-1) DataProviderTest::testAdd with data set #2 (1, 1, 3)
-Failed asserting that 2 matches expected 3.
-
-%s:%i
-
-FAILURES!
-Tests: 4, Assertions: 4, Failures: 1.
diff --git a/vendor/phpunit/phpunit/tests/TextUI/dataprovider-testdox.phpt b/vendor/phpunit/phpunit/tests/TextUI/dataprovider-testdox.phpt
deleted file mode 100644
index 75973fea..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/dataprovider-testdox.phpt
+++ /dev/null
@@ -1,17 +0,0 @@
---TEST--
-phpunit --testdox DataProviderTest ../_files/DataProviderTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-DataProvider
- [ ] Add
diff --git a/vendor/phpunit/phpunit/tests/TextUI/debug.phpt b/vendor/phpunit/phpunit/tests/TextUI/debug.phpt
deleted file mode 100644
index 0829197c..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/debug.phpt
+++ /dev/null
@@ -1,26 +0,0 @@
---TEST--
-phpunit --debug BankAccountTest ../_files/BankAccountTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-
-Starting test 'BankAccountTest::testBalanceIsInitiallyZero'.
-.
-Starting test 'BankAccountTest::testBalanceCannotBecomeNegative'.
-.
-Starting test 'BankAccountTest::testBalanceCannotBecomeNegative2'.
-.
-
-Time: %s, Memory: %s
-
-OK (3 tests, 3 assertions)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/default-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/default-isolation.phpt
deleted file mode 100644
index cca8bc81..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/default-isolation.phpt
+++ /dev/null
@@ -1,20 +0,0 @@
---TEST--
-phpunit --process-isolation BankAccountTest ../_files/BankAccountTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-...
-
-Time: %s, Memory: %s
-
-OK (3 tests, 3 assertions)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/default.phpt b/vendor/phpunit/phpunit/tests/TextUI/default.phpt
deleted file mode 100644
index bd7615b2..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/default.phpt
+++ /dev/null
@@ -1,19 +0,0 @@
---TEST--
-phpunit BankAccountTest ../_files/BankAccountTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-...
-
-Time: %s, Memory: %s
-
-OK (3 tests, 3 assertions)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/dependencies-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/dependencies-isolation.phpt
deleted file mode 100644
index 6d2a5b35..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/dependencies-isolation.phpt
+++ /dev/null
@@ -1,40 +0,0 @@
---TEST--
-phpunit --process-isolation --verbose DependencyTestSuite ../_files/DependencyTestSuite.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-Runtime: %s
-
-...FSS
-
-Time: %s, Memory: %s
-
-There was 1 failure:
-
-1) DependencyFailureTest::testOne
-
-%s:%i
-
---
-
-There were 2 skipped tests:
-
-1) DependencyFailureTest::testTwo
-This test depends on "DependencyFailureTest::testOne" to pass.
-
-2) DependencyFailureTest::testThree
-This test depends on "DependencyFailureTest::testTwo" to pass.
-
-FAILURES!
-Tests: 4, Assertions: 0, Failures: 1, Skipped: 2.
diff --git a/vendor/phpunit/phpunit/tests/TextUI/dependencies.phpt b/vendor/phpunit/phpunit/tests/TextUI/dependencies.phpt
deleted file mode 100644
index f32d10a5..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/dependencies.phpt
+++ /dev/null
@@ -1,39 +0,0 @@
---TEST--
-phpunit --verbose DependencyTestSuite ../_files/DependencyTestSuite.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-Runtime: %s
-
-...FSS
-
-Time: %s, Memory: %s
-
-There was 1 failure:
-
-1) DependencyFailureTest::testOne
-
-%s:%i
-
---
-
-There were 2 skipped tests:
-
-1) DependencyFailureTest::testTwo
-This test depends on "DependencyFailureTest::testOne" to pass.
-
-2) DependencyFailureTest::testThree
-This test depends on "DependencyFailureTest::testTwo" to pass.
-
-FAILURES!
-Tests: 4, Assertions: 0, Failures: 1, Skipped: 2.
diff --git a/vendor/phpunit/phpunit/tests/TextUI/dependencies2-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/dependencies2-isolation.phpt
deleted file mode 100644
index 5e7ef8fe..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/dependencies2-isolation.phpt
+++ /dev/null
@@ -1,20 +0,0 @@
---TEST--
-phpunit --process-isolation StackTest ../_files/StackTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-..
-
-Time: %s, Memory: %s
-
-OK (2 tests, 5 assertions)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/dependencies2.phpt b/vendor/phpunit/phpunit/tests/TextUI/dependencies2.phpt
deleted file mode 100644
index a30dd4e2..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/dependencies2.phpt
+++ /dev/null
@@ -1,19 +0,0 @@
---TEST--
-phpunit StackTest ../_files/StackTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-..
-
-Time: %s, Memory: %s
-
-OK (2 tests, 5 assertions)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/dependencies3-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/dependencies3-isolation.phpt
deleted file mode 100644
index 51d448c2..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/dependencies3-isolation.phpt
+++ /dev/null
@@ -1,20 +0,0 @@
---TEST--
-phpunit --process-isolation MultiDependencyTest ../_files/MultiDependencyTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-...
-
-Time: %s, Memory: %s
-
-OK (3 tests, 2 assertions)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/dependencies3.phpt b/vendor/phpunit/phpunit/tests/TextUI/dependencies3.phpt
deleted file mode 100644
index 218620d6..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/dependencies3.phpt
+++ /dev/null
@@ -1,19 +0,0 @@
---TEST--
-phpunit MultiDependencyTest ../_files/MultiDependencyTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-...
-
-Time: %s, Memory: %s
-
-OK (3 tests, 2 assertions)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/empty-testcase.phpt b/vendor/phpunit/phpunit/tests/TextUI/empty-testcase.phpt
deleted file mode 100644
index 0d0eccb5..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/empty-testcase.phpt
+++ /dev/null
@@ -1,25 +0,0 @@
---TEST--
-phpunit EmptyTestCaseTest ../_files/EmptyTestCaseTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-F
-
-Time: %s, Memory: %s
-
-There was 1 failure:
-
-1) Warning
-No tests found in class "EmptyTestCaseTest".
-
-FAILURES!
-Tests: 1, Assertions: 0, Failures: 1.
diff --git a/vendor/phpunit/phpunit/tests/TextUI/exception-stack.phpt b/vendor/phpunit/phpunit/tests/TextUI/exception-stack.phpt
deleted file mode 100644
index 823ef1bd..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/exception-stack.phpt
+++ /dev/null
@@ -1,65 +0,0 @@
---TEST--
-phpunit ExceptionStackTest ../_files/ExceptionStackTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-EE
-
-Time: %s, Memory: %s
-
-There were 2 errors:
-
-1) ExceptionStackTest::testPrintingChildException
-PHPUnit_Framework_Exception: Child exception
-message
-Failed asserting that two arrays are equal.
---- Expected
-+++ Actual
-@@ @@
- Array (
-- 0 => 1
-+ 0 => 2
- )
-
-
-%s:%i
-
-Caused by
-message
-Failed asserting that two arrays are equal.
---- Expected
-+++ Actual
-@@ @@
- Array (
-- 0 => 1
-+ 0 => 2
- )
-
-%s:%i
-
-2) ExceptionStackTest::testNestedExceptions
-Exception: One
-
-%s:%i
-
-Caused by
-InvalidArgumentException: Two
-
-%s:%i
-
-Caused by
-Exception: Three
-
-%s:%i
-
-FAILURES!
-Tests: 2, Assertions: 1, Errors: 2.
diff --git a/vendor/phpunit/phpunit/tests/TextUI/exclude-group-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/exclude-group-isolation.phpt
deleted file mode 100644
index b9afb6b7..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/exclude-group-isolation.phpt
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-phpunit --process-isolation --exclude-group balanceIsInitiallyZero BankAccountTest ../_files/BankAccountTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-..
-
-Time: %s, Memory: %s
-
-OK (2 tests, 2 assertions)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/exclude-group.phpt b/vendor/phpunit/phpunit/tests/TextUI/exclude-group.phpt
deleted file mode 100644
index dcbc5d3d..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/exclude-group.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-phpunit --exclude-group balanceIsInitiallyZero BankAccountTest ../_files/BankAccountTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-..
-
-Time: %s, Memory: %s
-
-OK (2 tests, 2 assertions)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/failure-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/failure-isolation.phpt
deleted file mode 100644
index a0c9906a..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/failure-isolation.phpt
+++ /dev/null
@@ -1,142 +0,0 @@
---TEST--
-phpunit --process-isolation FailureTest ../_files/FailureTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-FFFFFFFFFFFFF
-
-Time: %s, Memory: %s
-
-There were 13 failures:
-
-1) FailureTest::testAssertArrayEqualsArray
-message
-Failed asserting that two arrays are equal.
---- Expected
-+++ Actual
-@@ @@
- Array (
-- 0 => 1
-+ 0 => 2
- )
-
-%s:%i
-
-2) FailureTest::testAssertIntegerEqualsInteger
-message
-Failed asserting that 2 matches expected 1.
-
-%s:%i
-
-3) FailureTest::testAssertObjectEqualsObject
-message
-Failed asserting that two objects are equal.
---- Expected
-+++ Actual
-@@ @@
- stdClass Object (
-- 'foo' => 'bar'
-+ 'bar' => 'foo'
- )
-
-%s:%i
-
-4) FailureTest::testAssertNullEqualsString
-message
-Failed asserting that 'bar' matches expected null.
-
-%s:%i
-
-5) FailureTest::testAssertStringEqualsString
-message
-Failed asserting that two strings are equal.
---- Expected
-+++ Actual
-@@ @@
--'foo'
-+'bar'
-
-%s:%i
-
-6) FailureTest::testAssertTextEqualsText
-message
-Failed asserting that two strings are equal.
---- Expected
-+++ Actual
-@@ @@
- 'foo
--bar
-+baz
- '
-
-%s:%i
-
-7) FailureTest::testAssertStringMatchesFormat
-message
-Failed asserting that format description matches text.
---- Expected
-+++ Actual
-@@ @@
--*%s*
-+**
-
-%s:%i
-
-8) FailureTest::testAssertNumericEqualsNumeric
-message
-Failed asserting that 2 matches expected 1.
-
-%s:%i
-
-9) FailureTest::testAssertTextSameText
-message
-Failed asserting that two strings are identical.
---- Expected
-+++ Actual
-@@ @@
--foo
-+bar
-
-%s:%i
-
-10) FailureTest::testAssertObjectSameObject
-message
-Failed asserting that two variables reference the same object.
-
-%s:%i
-
-11) FailureTest::testAssertObjectSameNull
-message
-Failed asserting that null is identical to an object of class "stdClass".
-
-%s:%i
-
-12) FailureTest::testAssertFloatSameFloat
-message
-Failed asserting that 1.5 is identical to 1.0.
-
-%s:%i
-
-13) FailureTest::testAssertStringMatchesFormatFile
-Failed asserting that format description matches text.
---- Expected
-+++ Actual
-@@ @@
--FOO
--
-+...BAR...
-
-%s:%i
-
-FAILURES!
-Tests: 13, Assertions: 14, Failures: 13.
diff --git a/vendor/phpunit/phpunit/tests/TextUI/failure.phpt b/vendor/phpunit/phpunit/tests/TextUI/failure.phpt
deleted file mode 100644
index 30ce3031..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/failure.phpt
+++ /dev/null
@@ -1,141 +0,0 @@
---TEST--
-phpunit FailureTest ../_files/FailureTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-FFFFFFFFFFFFF
-
-Time: %s, Memory: %s
-
-There were 13 failures:
-
-1) FailureTest::testAssertArrayEqualsArray
-message
-Failed asserting that two arrays are equal.
---- Expected
-+++ Actual
-@@ @@
- Array (
-- 0 => 1
-+ 0 => 2
- )
-
-%s:%i
-
-2) FailureTest::testAssertIntegerEqualsInteger
-message
-Failed asserting that 2 matches expected 1.
-
-%s:%i
-
-3) FailureTest::testAssertObjectEqualsObject
-message
-Failed asserting that two objects are equal.
---- Expected
-+++ Actual
-@@ @@
- stdClass Object (
-- 'foo' => 'bar'
-+ 'bar' => 'foo'
- )
-
-%s:%i
-
-4) FailureTest::testAssertNullEqualsString
-message
-Failed asserting that 'bar' matches expected null.
-
-%s:%i
-
-5) FailureTest::testAssertStringEqualsString
-message
-Failed asserting that two strings are equal.
---- Expected
-+++ Actual
-@@ @@
--'foo'
-+'bar'
-
-%s:%i
-
-6) FailureTest::testAssertTextEqualsText
-message
-Failed asserting that two strings are equal.
---- Expected
-+++ Actual
-@@ @@
- 'foo
--bar
-+baz
- '
-
-%s:%i
-
-7) FailureTest::testAssertStringMatchesFormat
-message
-Failed asserting that format description matches text.
---- Expected
-+++ Actual
-@@ @@
--*%s*
-+**
-
-%s:%i
-
-8) FailureTest::testAssertNumericEqualsNumeric
-message
-Failed asserting that 2 matches expected 1.
-
-%s:%i
-
-9) FailureTest::testAssertTextSameText
-message
-Failed asserting that two strings are identical.
---- Expected
-+++ Actual
-@@ @@
--foo
-+bar
-
-%s:%i
-
-10) FailureTest::testAssertObjectSameObject
-message
-Failed asserting that two variables reference the same object.
-
-%s:%i
-
-11) FailureTest::testAssertObjectSameNull
-message
-Failed asserting that null is identical to an object of class "stdClass".
-
-%s:%i
-
-12) FailureTest::testAssertFloatSameFloat
-message
-Failed asserting that 1.5 is identical to 1.0.
-
-%s:%i
-
-13) FailureTest::testAssertStringMatchesFormatFile
-Failed asserting that format description matches text.
---- Expected
-+++ Actual
-@@ @@
--FOO
--
-+...BAR...
-
-%s:%i
-
-FAILURES!
-Tests: 13, Assertions: 14, Failures: 13.
diff --git a/vendor/phpunit/phpunit/tests/TextUI/fatal-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/fatal-isolation.phpt
deleted file mode 100644
index 95e3f113..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/fatal-isolation.phpt
+++ /dev/null
@@ -1,26 +0,0 @@
---TEST--
-phpunit FatalTest --process-isolation ../_files/FatalTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-E
-
-Time: %s, Memory: %s
-
-There was 1 error:
-
-1) FatalTest::testFatalError
-%s
-
-FAILURES!
-Tests: 1, Assertions: 0, Errors: 1.
diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-class-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-class-isolation.phpt
deleted file mode 100644
index acb2e5d7..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/filter-class-isolation.phpt
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-phpunit --process-isolation --filter BankAccountTest BankAccountTest ../_files/BankAccountTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-...
-
-Time: %s, Memory: %s
-
-OK (3 tests, 3 assertions)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-class.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-class.phpt
deleted file mode 100644
index 97c94da1..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/filter-class.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-phpunit --filter BankAccountTest BankAccountTest ../_files/BankAccountTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-...
-
-Time: %s, Memory: %s
-
-OK (3 tests, 3 assertions)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-classname-and-range-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-classname-and-range-isolation.phpt
deleted file mode 100644
index 630a48a7..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-classname-and-range-isolation.phpt
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-phpunit --process-isolation --filter DataProviderFilterTest#1-3 DataProviderFilterTest ../_files/DataProviderFilterTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-...
-
-Time: %s, Memory: %s
-
-OK (3 tests, 3 assertions)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-classname-and-range.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-classname-and-range.phpt
deleted file mode 100644
index 2314eb85..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-classname-and-range.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-phpunit --filter DataProviderFilterTest#1-3 DataProviderFilterTest ../_files/DataProviderFilterTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-...
-
-Time: %s, Memory: %s
-
-OK (3 tests, 3 assertions)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-number-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-number-isolation.phpt
deleted file mode 100644
index 3ff675e4..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-number-isolation.phpt
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-phpunit --process-isolation --filter testTrue#3 DataProviderFilterTest ../_files/DataProviderFilterTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-.
-
-Time: %s, Memory: %s
-
-OK (1 test, 1 assertion)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-number.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-number.phpt
deleted file mode 100644
index bc7beda4..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-number.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-phpunit --filter testTrue#3 DataProviderFilterTest ../_files/DataProviderFilterTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-.
-
-Time: %s, Memory: %s
-
-OK (1 test, 1 assertion)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-range-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-range-isolation.phpt
deleted file mode 100644
index 6aa25676..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-range-isolation.phpt
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-phpunit --process-isolation --filter \#1-3 DataProviderFilterTest ../_files/DataProviderFilterTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-...
-
-Time: %s, Memory: %s
-
-OK (3 tests, 3 assertions)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-range.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-range.phpt
deleted file mode 100644
index b3b681c4..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-range.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-phpunit --filter \#1-3 DataProviderFilterTest ../_files/DataProviderFilterTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-...
-
-Time: %s, Memory: %s
-
-OK (3 tests, 3 assertions)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-regexp-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-regexp-isolation.phpt
deleted file mode 100644
index db1516bb..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-regexp-isolation.phpt
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-phpunit --process-isolation --filter @false.* DataProviderFilterTest ../_files/DataProviderFilterTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-..
-
-Time: %s, Memory: %s
-
-OK (2 tests, 2 assertions)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-regexp.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-regexp.phpt
deleted file mode 100644
index 27db60b3..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-regexp.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-phpunit --filter @false.* DataProviderFilterTest ../_files/DataProviderFilterTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-..
-
-Time: %s, Memory: %s
-
-OK (2 tests, 2 assertions)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-string-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-string-isolation.phpt
deleted file mode 100644
index fca15519..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-string-isolation.phpt
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-phpunit --process-isolation --filter @false\ test DataProviderFilterTest ../_files/DataProviderFilterTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-.
-
-Time: %s, Memory: %s
-
-OK (1 test, 1 assertion)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-string.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-string.phpt
deleted file mode 100644
index 00a32d7a..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-string.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-phpunit --filter @false\ test DataProviderFilterTest ../_files/DataProviderFilterTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-.
-
-Time: %s, Memory: %s
-
-OK (1 test, 1 assertion)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-range-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-range-isolation.phpt
deleted file mode 100644
index 22bacbbe..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-range-isolation.phpt
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-phpunit --process-isolation --filter testTrue#1-3 DataProviderFilterTest ../_files/DataProviderFilterTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-...
-
-Time: %s, Memory: %s
-
-OK (3 tests, 3 assertions)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-range.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-range.phpt
deleted file mode 100644
index 2a6a5570..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-range.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-phpunit --filter testTrue#1-3 DataProviderFilterTest ../_files/DataProviderFilterTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-...
-
-Time: %s, Memory: %s
-
-OK (3 tests, 3 assertions)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-regexp-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-regexp-isolation.phpt
deleted file mode 100644
index 8126802c..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-regexp-isolation.phpt
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-phpunit --process-isolation --filter testFalse@false.* DataProviderFilterTest ../_files/DataProviderFilterTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-..
-
-Time: %s, Memory: %s
-
-OK (2 tests, 2 assertions)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-regexp.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-regexp.phpt
deleted file mode 100644
index 17ad7183..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-regexp.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-phpunit --filter testFalse@false.* DataProviderFilterTest ../_files/DataProviderFilterTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-..
-
-Time: %s, Memory: %s
-
-OK (2 tests, 2 assertions)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-string-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-string-isolation.phpt
deleted file mode 100644
index db34b62b..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-string-isolation.phpt
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-phpunit --process-isolation --filter testFalse@false\ test DataProviderFilterTest ../_files/DataProviderFilterTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-.
-
-Time: %s, Memory: %s
-
-OK (1 test, 1 assertion)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-string.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-string.phpt
deleted file mode 100644
index 79878e9b..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-string.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-phpunit --filter testFalse@false\ test DataProviderFilterTest ../_files/DataProviderFilterTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-.
-
-Time: %s, Memory: %s
-
-OK (1 test, 1 assertion)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-method-case-insensitive.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-method-case-insensitive.phpt
deleted file mode 100644
index 4f510421..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/filter-method-case-insensitive.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-phpunit --filter /balanceIsInitiallyZero/i BankAccountTest ../_files/BankAccountTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-.
-
-Time: %s, Memory: %s
-
-OK (1 test, 1 assertion)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-method-case-sensitive-no-result.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-method-case-sensitive-no-result.phpt
deleted file mode 100644
index 454d116d..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/filter-method-case-sensitive-no-result.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-phpunit --filter balanceIsInitiallyZero BankAccountTest ../_files/BankAccountTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-
-
-Time: %s, Memory: %s
-
-No tests executed!
diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-method-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-method-isolation.phpt
deleted file mode 100644
index c9fa6e54..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/filter-method-isolation.phpt
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-phpunit --process-isolation --filter testBalanceIsInitiallyZero BankAccountTest ../_files/BankAccountTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-.
-
-Time: %s, Memory: %s
-
-OK (1 test, 1 assertion)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-method.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-method.phpt
deleted file mode 100644
index 95fd598a..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/filter-method.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-phpunit --filter testBalanceIsInitiallyZero BankAccountTest ../_files/BankAccountTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-.
-
-Time: %s, Memory: %s
-
-OK (1 test, 1 assertion)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-no-results.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-no-results.phpt
deleted file mode 100644
index bb1e6d37..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/filter-no-results.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-phpunit --filter doesNotExist BankAccountTest ../_files/BankAccountTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-
-
-Time: %s, Memory: %s
-
-No tests executed!
diff --git a/vendor/phpunit/phpunit/tests/TextUI/group-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/group-isolation.phpt
deleted file mode 100644
index 7e74c6f9..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/group-isolation.phpt
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-phpunit --process-isolation --group balanceIsInitiallyZero BankAccountTest ../_files/BankAccountTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-.
-
-Time: %s, Memory: %s
-
-OK (1 test, 1 assertion)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/group.phpt b/vendor/phpunit/phpunit/tests/TextUI/group.phpt
deleted file mode 100644
index be123934..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/group.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-phpunit --group balanceIsInitiallyZero BankAccountTest ../_files/BankAccountTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-.
-
-Time: %s, Memory: %s
-
-OK (1 test, 1 assertion)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/help.phpt b/vendor/phpunit/phpunit/tests/TextUI/help.phpt
deleted file mode 100644
index 8022c47f..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/help.phpt
+++ /dev/null
@@ -1,87 +0,0 @@
---TEST--
-phpunit
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-Usage: phpunit [options] UnitTest [UnitTest.php]
- phpunit [options]
-
-Code Coverage Options:
-
- --coverage-clover Generate code coverage report in Clover XML format.
- --coverage-crap4j Generate code coverage report in Crap4J XML format.
- --coverage-html Generate code coverage report in HTML format.
- --coverage-php Export PHP_CodeCoverage object to file.
- --coverage-text= Generate code coverage report in text format.
- Default: Standard output.
- --coverage-xml Generate code coverage report in PHPUnit XML format.
-
-Logging Options:
-
- --log-junit Log test execution in JUnit XML format to file.
- --log-tap Log test execution in TAP format to file.
- --log-json Log test execution in JSON format.
- --testdox-html Write agile documentation in HTML format to file.
- --testdox-text Write agile documentation in Text format to file.
-
-Test Selection Options:
-
- --filter Filter which tests to run.
- --testsuite Filter which testsuite to run.
- --group ... Only runs tests from the specified group(s).
- --exclude-group ... Exclude tests from the specified group(s).
- --list-groups List available test groups.
- --test-suffix ... Only search for test in files with specified
- suffix(es). Default: Test.php,.phpt
-
-Test Execution Options:
-
- --report-useless-tests Be strict about tests that do not test anything.
- --strict-coverage Be strict about unintentionally covered code.
- --strict-global-state Be strict about changes to global state
- --disallow-test-output Be strict about output during tests.
- --enforce-time-limit Enforce time limit based on test size.
- --disallow-todo-tests Disallow @todo-annotated tests.
-
- --process-isolation Run each test in a separate PHP process.
- --no-globals-backup Do not backup and restore $GLOBALS for each test.
- --static-backup Backup and restore static attributes for each test.
-
- --colors= Use colors in output ("never", "auto" or "always").
- --columns Number of columns to use for progress output.
- --columns max Use maximum number of columns for progress output.
- --stderr Write to STDERR instead of STDOUT.
- --stop-on-error Stop execution upon first error.
- --stop-on-failure Stop execution upon first error or failure.
- --stop-on-risky Stop execution upon first risky test.
- --stop-on-skipped Stop execution upon first skipped test.
- --stop-on-incomplete Stop execution upon first incomplete test.
- -v|--verbose Output more verbose information.
- --debug Display debugging information during test execution.
-
- --loader TestSuiteLoader implementation to use.
- --repeat Runs the test(s) repeatedly.
- --tap Report test execution progress in TAP format.
- --testdox Report test execution progress in TestDox format.
- --printer TestListener implementation to use.
-
-Configuration Options:
-
- --bootstrap A "bootstrap" PHP file that is run before the tests.
- -c|--configuration Read configuration from XML file.
- --no-configuration Ignore default configuration file (phpunit.xml).
- --no-coverage Ignore code coverage configuration.
- --include-path Prepend PHP's include_path with given path(s).
- -d key[=value] Sets a php.ini value.
-
-Miscellaneous Options:
-
- -h|--help Prints this usage information.
- --version Prints the version and exits.
diff --git a/vendor/phpunit/phpunit/tests/TextUI/help2.phpt b/vendor/phpunit/phpunit/tests/TextUI/help2.phpt
deleted file mode 100644
index 020f949c..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/help2.phpt
+++ /dev/null
@@ -1,88 +0,0 @@
---TEST--
-phpunit --help
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-Usage: phpunit [options] UnitTest [UnitTest.php]
- phpunit [options]
-
-Code Coverage Options:
-
- --coverage-clover Generate code coverage report in Clover XML format.
- --coverage-crap4j Generate code coverage report in Crap4J XML format.
- --coverage-html Generate code coverage report in HTML format.
- --coverage-php Export PHP_CodeCoverage object to file.
- --coverage-text= Generate code coverage report in text format.
- Default: Standard output.
- --coverage-xml Generate code coverage report in PHPUnit XML format.
-
-Logging Options:
-
- --log-junit Log test execution in JUnit XML format to file.
- --log-tap Log test execution in TAP format to file.
- --log-json Log test execution in JSON format.
- --testdox-html Write agile documentation in HTML format to file.
- --testdox-text Write agile documentation in Text format to file.
-
-Test Selection Options:
-
- --filter Filter which tests to run.
- --testsuite Filter which testsuite to run.
- --group ... Only runs tests from the specified group(s).
- --exclude-group ... Exclude tests from the specified group(s).
- --list-groups List available test groups.
- --test-suffix ... Only search for test in files with specified
- suffix(es). Default: Test.php,.phpt
-
-Test Execution Options:
-
- --report-useless-tests Be strict about tests that do not test anything.
- --strict-coverage Be strict about unintentionally covered code.
- --strict-global-state Be strict about changes to global state
- --disallow-test-output Be strict about output during tests.
- --enforce-time-limit Enforce time limit based on test size.
- --disallow-todo-tests Disallow @todo-annotated tests.
-
- --process-isolation Run each test in a separate PHP process.
- --no-globals-backup Do not backup and restore $GLOBALS for each test.
- --static-backup Backup and restore static attributes for each test.
-
- --colors= Use colors in output ("never", "auto" or "always").
- --columns Number of columns to use for progress output.
- --columns max Use maximum number of columns for progress output.
- --stderr Write to STDERR instead of STDOUT.
- --stop-on-error Stop execution upon first error.
- --stop-on-failure Stop execution upon first error or failure.
- --stop-on-risky Stop execution upon first risky test.
- --stop-on-skipped Stop execution upon first skipped test.
- --stop-on-incomplete Stop execution upon first incomplete test.
- -v|--verbose Output more verbose information.
- --debug Display debugging information during test execution.
-
- --loader TestSuiteLoader implementation to use.
- --repeat Runs the test(s) repeatedly.
- --tap Report test execution progress in TAP format.
- --testdox Report test execution progress in TestDox format.
- --printer TestListener implementation to use.
-
-Configuration Options:
-
- --bootstrap A "bootstrap" PHP file that is run before the tests.
- -c|--configuration Read configuration from XML file.
- --no-configuration Ignore default configuration file (phpunit.xml).
- --no-coverage Ignore code coverage configuration.
- --include-path Prepend PHP's include_path with given path(s).
- -d key[=value] Sets a php.ini value.
-
-Miscellaneous Options:
-
- -h|--help Prints this usage information.
- --version Prints the version and exits.
diff --git a/vendor/phpunit/phpunit/tests/TextUI/ini-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/ini-isolation.phpt
deleted file mode 100644
index 76b88ac1..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/ini-isolation.phpt
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-phpunit --process-isolation -d default_mimetype=application/x-test IniTest ../_files/IniTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-.
-
-Time: %s, Memory: %s
-
-OK (1 test, 1 assertion)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/list-groups.phpt b/vendor/phpunit/phpunit/tests/TextUI/list-groups.phpt
deleted file mode 100644
index fba98685..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/list-groups.phpt
+++ /dev/null
@@ -1,19 +0,0 @@
---TEST--
-phpunit --list-groups BankAccountTest ../_files/BankAccountTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-Available test group(s):
- - balanceCannotBecomeNegative
- - balanceIsInitiallyZero
- - specification
diff --git a/vendor/phpunit/phpunit/tests/TextUI/log-json-no-pretty-print.phpt b/vendor/phpunit/phpunit/tests/TextUI/log-json-no-pretty-print.phpt
deleted file mode 100644
index 33ed4ed4..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/log-json-no-pretty-print.phpt
+++ /dev/null
@@ -1,27 +0,0 @@
---TEST--
-phpunit --log-json php://stdout BankAccountTest ../_files/BankAccountTest.php
---SKIPIF--
-
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-{"event":"suiteStart","suite":"BankAccountTest","tests":3}{"event":"testStart","suite":"BankAccountTest","test":"BankAccountTest::testBalanceIsInitiallyZero"}.{"event":"test","suite":"BankAccountTest","test":"BankAccountTest::testBalanceIsInitiallyZero","status":"pass","time":%f,"trace":[],"message":"","output":""}{"event":"testStart","suite":"BankAccountTest","test":"BankAccountTest::testBalanceCannotBecomeNegative"}.{"event":"test","suite":"BankAccountTest","test":"BankAccountTest::testBalanceCannotBecomeNegative","status":"pass","time":%f,"trace":[],"message":"","output":""}{"event":"testStart","suite":"BankAccountTest","test":"BankAccountTest::testBalanceCannotBecomeNegative2"}.{"event":"test","suite":"BankAccountTest","test":"BankAccountTest::testBalanceCannotBecomeNegative2","status":"pass","time":%f,"trace":[],"message":"","output":""}
-
-Time: %s, Memory: %s
-
-OK (3 tests, 3 assertions)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/log-json-post-66021.phpt b/vendor/phpunit/phpunit/tests/TextUI/log-json-post-66021.phpt
deleted file mode 100644
index b045617c..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/log-json-post-66021.phpt
+++ /dev/null
@@ -1,72 +0,0 @@
---TEST--
-phpunit --log-json php://stdout BankAccountTest ../_files/BankAccountTest.php
---SKIPIF--
-
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-{
- "event": "suiteStart",
- "suite": "BankAccountTest",
- "tests": 3
-}{
- "event": "testStart",
- "suite": "BankAccountTest",
- "test": "BankAccountTest::testBalanceIsInitiallyZero"
-}.{
- "event": "test",
- "suite": "BankAccountTest",
- "test": "BankAccountTest::testBalanceIsInitiallyZero",
- "status": "pass",
- "time": %f,
- "trace": [],
- "message": "",
- "output": ""
-}{
- "event": "testStart",
- "suite": "BankAccountTest",
- "test": "BankAccountTest::testBalanceCannotBecomeNegative"
-}.{
- "event": "test",
- "suite": "BankAccountTest",
- "test": "BankAccountTest::testBalanceCannotBecomeNegative",
- "status": "pass",
- "time": %f,
- "trace": [],
- "message": "",
- "output": ""
-}{
- "event": "testStart",
- "suite": "BankAccountTest",
- "test": "BankAccountTest::testBalanceCannotBecomeNegative2"
-}.{
- "event": "test",
- "suite": "BankAccountTest",
- "test": "BankAccountTest::testBalanceCannotBecomeNegative2",
- "status": "pass",
- "time": %f,
- "trace": [],
- "message": "",
- "output": ""
-}
-
-Time: %s, Memory: %s
-
-OK (3 tests, 3 assertions)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/log-json-pre-66021.phpt b/vendor/phpunit/phpunit/tests/TextUI/log-json-pre-66021.phpt
deleted file mode 100644
index 1b2b37c0..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/log-json-pre-66021.phpt
+++ /dev/null
@@ -1,78 +0,0 @@
---TEST--
-phpunit --log-json php://stdout BankAccountTest ../_files/BankAccountTest.php
---SKIPIF--
-
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-{
- "event": "suiteStart",
- "suite": "BankAccountTest",
- "tests": 3
-}{
- "event": "testStart",
- "suite": "BankAccountTest",
- "test": "BankAccountTest::testBalanceIsInitiallyZero"
-}.{
- "event": "test",
- "suite": "BankAccountTest",
- "test": "BankAccountTest::testBalanceIsInitiallyZero",
- "status": "pass",
- "time": %f,
- "trace": [
-
- ],
- "message": "",
- "output": ""
-}{
- "event": "testStart",
- "suite": "BankAccountTest",
- "test": "BankAccountTest::testBalanceCannotBecomeNegative"
-}.{
- "event": "test",
- "suite": "BankAccountTest",
- "test": "BankAccountTest::testBalanceCannotBecomeNegative",
- "status": "pass",
- "time": %f,
- "trace": [
-
- ],
- "message": "",
- "output": ""
-}{
- "event": "testStart",
- "suite": "BankAccountTest",
- "test": "BankAccountTest::testBalanceCannotBecomeNegative2"
-}.{
- "event": "test",
- "suite": "BankAccountTest",
- "test": "BankAccountTest::testBalanceCannotBecomeNegative2",
- "status": "pass",
- "time": %f,
- "trace": [
-
- ],
- "message": "",
- "output": ""
-}
-
-Time: %s, Memory: %s
-
-OK (3 tests, 3 assertions)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/log-junit.phpt b/vendor/phpunit/phpunit/tests/TextUI/log-junit.phpt
deleted file mode 100644
index 70dbcbea..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/log-junit.phpt
+++ /dev/null
@@ -1,59 +0,0 @@
---TEST--
-phpunit --log-junit php://stdout StatusTest ../_files/StatusTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-.FEIS.
-
-
-
-
- StatusTest::testFailure
-Failed asserting that false is true.
-
-%s/StatusTest.php:%d
-
-
-
- StatusTest::testError
-Exception:
-
-%s/StatusTest.php:%d
-
-
-
-
-
-
-
-Time: %s, Memory: %s
-
-There was 1 error:
-
-1) StatusTest::testError
-Exception:
-
-%s/StatusTest.php:%d
-
---
-
-There was 1 failure:
-
-1) StatusTest::testFailure
-Failed asserting that false is true.
-
-%s/StatusTest.php:%d
-
-FAILURES!
-Tests: 6, Assertions: 2, Errors: 1, Failures: 1, Skipped: 1, Incomplete: 1.
\ No newline at end of file
diff --git a/vendor/phpunit/phpunit/tests/TextUI/log-tap.phpt b/vendor/phpunit/phpunit/tests/TextUI/log-tap.phpt
deleted file mode 100644
index e9221ee4..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/log-tap.phpt
+++ /dev/null
@@ -1,26 +0,0 @@
---TEST--
-phpunit --log-tap php://stdout BankAccountTest ../_files/BankAccountTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-TAP version 13
-.ok 1 - BankAccountTest::testBalanceIsInitiallyZero
-.ok 2 - BankAccountTest::testBalanceCannotBecomeNegative
-.ok 3 - BankAccountTest::testBalanceCannotBecomeNegative2
-1..3
-
-
-Time: %s, Memory: %s
-
-OK (3 tests, 3 assertions)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/options-after-arguments.phpt b/vendor/phpunit/phpunit/tests/TextUI/options-after-arguments.phpt
deleted file mode 100644
index e7f2cec8..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/options-after-arguments.phpt
+++ /dev/null
@@ -1,19 +0,0 @@
---TEST--
-phpunit BankAccountTest ../_files/BankAccountTest.php --colors
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-...
-
-Time: %s, Memory: %s
-
-%s[30;42mOK (3 tests, 3 assertions)%s[0m
diff --git a/vendor/phpunit/phpunit/tests/TextUI/output-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/output-isolation.phpt
deleted file mode 100644
index 5226b257..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/output-isolation.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-phpunit --process-isolation --filter testExpectOutputStringFooActualFoo ../_files/OutputTestCase.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-.
-
-Time: %s, Memory: %s
-
-OK (1 test, 1 assertion)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/repeat.phpt b/vendor/phpunit/phpunit/tests/TextUI/repeat.phpt
deleted file mode 100644
index 8be67ea4..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/repeat.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-phpunit --repeat 3 BankAccountTest ../_files/BankAccountTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-.........
-
-Time: %s, Memory: %s
-
-OK (9 tests, 9 assertions)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/report-useless-tests-incomplete.phpt b/vendor/phpunit/phpunit/tests/TextUI/report-useless-tests-incomplete.phpt
deleted file mode 100644
index 04239246..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/report-useless-tests-incomplete.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-phpunit --report-useless-tests IncompleteTest ../_files/IncompleteTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-I
-
-Time: %s, Memory: %s
-
-OK, but incomplete, skipped, or risky tests!
-Tests: 1, Assertions: 0, Incomplete: 1.
diff --git a/vendor/phpunit/phpunit/tests/TextUI/report-useless-tests-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/report-useless-tests-isolation.phpt
deleted file mode 100644
index ff6a0d1e..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/report-useless-tests-isolation.phpt
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-phpunit --report-useless-tests --process-isolation IncompleteTest ../_files/IncompleteTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-R
-
-Time: %s, Memory: %s
-
-OK, but incomplete, skipped, or risky tests!
-Tests: 1, Assertions: 0, Risky: 1.
diff --git a/vendor/phpunit/phpunit/tests/TextUI/report-useless-tests.phpt b/vendor/phpunit/phpunit/tests/TextUI/report-useless-tests.phpt
deleted file mode 100644
index f9812782..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/report-useless-tests.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-phpunit --report-useless-tests NothingTest ../_files/NothingTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-R
-
-Time: %s, Memory: %s
-
-OK, but incomplete, skipped, or risky tests!
-Tests: 1, Assertions: 0, Risky: 1.
diff --git a/vendor/phpunit/phpunit/tests/TextUI/tap.phpt b/vendor/phpunit/phpunit/tests/TextUI/tap.phpt
deleted file mode 100644
index ca5676df..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/tap.phpt
+++ /dev/null
@@ -1,18 +0,0 @@
---TEST--
-phpunit --tap BankAccountTest ../_files/BankAccountTest.php
---FILE--
-
---EXPECTF--
-TAP version 13
-ok 1 - BankAccountTest::testBalanceIsInitiallyZero
-ok 2 - BankAccountTest::testBalanceCannotBecomeNegative
-ok 3 - BankAccountTest::testBalanceCannotBecomeNegative2
-1..3
diff --git a/vendor/phpunit/phpunit/tests/TextUI/test-suffix-multiple.phpt b/vendor/phpunit/phpunit/tests/TextUI/test-suffix-multiple.phpt
deleted file mode 100644
index 6509b68f..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/test-suffix-multiple.phpt
+++ /dev/null
@@ -1,20 +0,0 @@
---TEST--
-phpunit --test-suffix .test.php,.my.php ../_files/
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-.....
-
-Time: %s, Memory: %s
-
-OK (5 tests, 3 assertions)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/test-suffix-single.phpt b/vendor/phpunit/phpunit/tests/TextUI/test-suffix-single.phpt
deleted file mode 100644
index 137a3e51..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/test-suffix-single.phpt
+++ /dev/null
@@ -1,20 +0,0 @@
---TEST--
-phpunit --test-suffix .test.php ../_files/
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-...
-
-Time: %s, Memory: %s
-
-OK (3 tests, 3 assertions)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/testdox-html.phpt b/vendor/phpunit/phpunit/tests/TextUI/testdox-html.phpt
deleted file mode 100644
index c5ebeef2..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/testdox-html.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-phpunit --testdox-html php://stdout BankAccountTest ../_files/BankAccountTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-BankAccount
...- Balance is initially zero
- Balance cannot become negative
-
-Time: %s, Memory: %s
-
-OK (3 tests, 3 assertions)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/testdox-text.phpt b/vendor/phpunit/phpunit/tests/TextUI/testdox-text.phpt
deleted file mode 100644
index bb36acfb..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/testdox-text.phpt
+++ /dev/null
@@ -1,25 +0,0 @@
---TEST--
-phpunit --testdox-text php://stdout BankAccountTest ../_files/BankAccountTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-BankAccount
-... [x] Balance is initially zero
- [x] Balance cannot become negative
-
-
-
-Time: %s, Memory: %s
-
-OK (3 tests, 3 assertions)
diff --git a/vendor/phpunit/phpunit/tests/TextUI/testdox.phpt b/vendor/phpunit/phpunit/tests/TextUI/testdox.phpt
deleted file mode 100644
index fb24e94a..00000000
--- a/vendor/phpunit/phpunit/tests/TextUI/testdox.phpt
+++ /dev/null
@@ -1,19 +0,0 @@
---TEST--
-phpunit --testdox php://stdout BankAccountTest ../_files/BankAccountTest.php
---FILE--
-
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann and contributors.
-
-BankAccount
- [x] Balance is initially zero
- [x] Balance cannot become negative
-
diff --git a/vendor/phpunit/phpunit/tests/Util/ConfigurationTest.php b/vendor/phpunit/phpunit/tests/Util/ConfigurationTest.php
deleted file mode 100644
index 0cdd95e1..00000000
--- a/vendor/phpunit/phpunit/tests/Util/ConfigurationTest.php
+++ /dev/null
@@ -1,504 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 3.3.0
- */
-class Util_ConfigurationTest extends PHPUnit_Framework_TestCase
-{
- protected $configuration;
-
- protected function setUp()
- {
- $this->configuration = PHPUnit_Util_Configuration::getInstance(
- dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'configuration.xml'
- );
- }
-
- /**
- * @covers PHPUnit_Util_Configuration::getInstance
- * @expectedException PHPUnit_Framework_Exception
- */
- public function testExceptionIsThrownForNotExistingConfigurationFile()
- {
- PHPUnit_Util_Configuration::getInstance('not_existing_file.xml');
- }
-
- /**
- * @covers PHPUnit_Util_Configuration::getPHPUnitConfiguration
- */
- public function testShouldReadColorsWhenTrueInConfigurationfile()
- {
- $configurationFilename = dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'configuration.colors.true.xml';
- $configurationInstance = PHPUnit_Util_Configuration::getInstance($configurationFilename);
- $configurationValues = $configurationInstance->getPHPUnitConfiguration();
-
- $this->assertEquals(PHPUnit_TextUI_ResultPrinter::COLOR_AUTO, $configurationValues['colors']);
- }
-
- /**
- * @covers PHPUnit_Util_Configuration::getPHPUnitConfiguration
- */
- public function testShouldReadColorsWhenFalseInConfigurationfile()
- {
- $configurationFilename = dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'configuration.colors.false.xml';
- $configurationInstance = PHPUnit_Util_Configuration::getInstance($configurationFilename);
- $configurationValues = $configurationInstance->getPHPUnitConfiguration();
-
- $this->assertEquals(PHPUnit_TextUI_ResultPrinter::COLOR_NEVER, $configurationValues['colors']);
- }
-
- /**
- * @covers PHPUnit_Util_Configuration::getPHPUnitConfiguration
- */
- public function testShouldReadColorsWhenEmptyInConfigurationfile()
- {
- $configurationFilename = dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'configuration.colors.empty.xml';
- $configurationInstance = PHPUnit_Util_Configuration::getInstance($configurationFilename);
- $configurationValues = $configurationInstance->getPHPUnitConfiguration();
-
- $this->assertEquals(PHPUnit_TextUI_ResultPrinter::COLOR_NEVER, $configurationValues['colors']);
- }
-
- /**
- * @covers PHPUnit_Util_Configuration::getPHPUnitConfiguration
- */
- public function testShouldReadColorsWhenInvalidInConfigurationfile()
- {
- $configurationFilename = dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'configuration.colors.invalid.xml';
- $configurationInstance = PHPUnit_Util_Configuration::getInstance($configurationFilename);
- $configurationValues = $configurationInstance->getPHPUnitConfiguration();
-
- $this->assertEquals(PHPUnit_TextUI_ResultPrinter::COLOR_NEVER, $configurationValues['colors']);
- }
-
- /**
- * @covers PHPUnit_Util_Configuration::getFilterConfiguration
- */
- public function testFilterConfigurationIsReadCorrectly()
- {
- $this->assertEquals(
- array(
- 'blacklist' =>
- array(
- 'include' =>
- array(
- 'directory' =>
- array(
- 0 =>
- array(
- 'path' => '/path/to/files',
- 'prefix' => '',
- 'suffix' => '.php',
- 'group' => 'DEFAULT'
- ),
- ),
- 'file' =>
- array(
- 0 => '/path/to/file',
- 1 => '/path/to/file',
- ),
- ),
- 'exclude' =>
- array(
- 'directory' =>
- array(
- 0 =>
- array(
- 'path' => '/path/to/files',
- 'prefix' => '',
- 'suffix' => '.php',
- 'group' => 'DEFAULT'
- ),
- ),
- 'file' =>
- array(
- 0 => '/path/to/file',
- ),
- ),
- ),
- 'whitelist' =>
- array(
- 'addUncoveredFilesFromWhitelist' => true,
- 'processUncoveredFilesFromWhitelist' => false,
- 'include' =>
- array(
- 'directory' =>
- array(
- 0 =>
- array(
- 'path' => '/path/to/files',
- 'prefix' => '',
- 'suffix' => '.php',
- 'group' => 'DEFAULT'
- ),
- ),
- 'file' =>
- array(
- 0 => '/path/to/file',
- ),
- ),
- 'exclude' =>
- array(
- 'directory' =>
- array(
- 0 =>
- array(
- 'path' => '/path/to/files',
- 'prefix' => '',
- 'suffix' => '.php',
- 'group' => 'DEFAULT'
- ),
- ),
- 'file' =>
- array(
- 0 => '/path/to/file',
- ),
- ),
- ),
- ),
- $this->configuration->getFilterConfiguration()
- );
- }
-
- /**
- * @covers PHPUnit_Util_Configuration::getGroupConfiguration
- */
- public function testGroupConfigurationIsReadCorrectly()
- {
- $this->assertEquals(
- array(
- 'include' =>
- array(
- 0 => 'name',
- ),
- 'exclude' =>
- array(
- 0 => 'name',
- ),
- ),
- $this->configuration->getGroupConfiguration()
- );
- }
-
- /**
- * @covers PHPUnit_Util_Configuration::getListenerConfiguration
- */
- public function testListenerConfigurationIsReadCorrectly()
- {
- $dir = __DIR__;
- $includePath = ini_get('include_path');
-
- ini_set('include_path', $dir . PATH_SEPARATOR . $includePath);
-
- $this->assertEquals(
- array(
- 0 =>
- array(
- 'class' => 'MyListener',
- 'file' => '/optional/path/to/MyListener.php',
- 'arguments' =>
- array(
- 0 =>
- array(
- 0 => 'Sebastian',
- ),
- 1 => 22,
- 2 => 'April',
- 3 => 19.78,
- 4 => null,
- 5 => new stdClass,
- 6 => dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'MyTestFile.php',
- 7 => dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'MyRelativePath',
- ),
- ),
- array(
- 'class' => 'IncludePathListener',
- 'file' => __FILE__,
- 'arguments' => array()
- ),
- array(
- 'class' => 'CompactArgumentsListener',
- 'file' => '/CompactArgumentsListener.php',
- 'arguments' =>
- array(
- 0 => 42
- ),
- ),
- ),
- $this->configuration->getListenerConfiguration()
- );
-
- ini_set('include_path', $includePath);
- }
-
- /**
- * @covers PHPUnit_Util_Configuration::getLoggingConfiguration
- */
- public function testLoggingConfigurationIsReadCorrectly()
- {
- $this->assertEquals(
- array(
- 'lowUpperBound' => '50',
- 'highLowerBound' => '90',
- 'coverage-html' => '/tmp/report',
- 'coverage-clover' => '/tmp/clover.xml',
- 'json' => '/tmp/logfile.json',
- 'plain' => '/tmp/logfile.txt',
- 'tap' => '/tmp/logfile.tap',
- 'logIncompleteSkipped' => false,
- 'junit' => '/tmp/logfile.xml',
- 'testdox-html' => '/tmp/testdox.html',
- 'testdox-text' => '/tmp/testdox.txt',
- ),
- $this->configuration->getLoggingConfiguration()
- );
- }
-
- /**
- * @covers PHPUnit_Util_Configuration::getPHPConfiguration
- */
- public function testPHPConfigurationIsReadCorrectly()
- {
- $this->assertEquals(
- array(
- 'include_path' =>
- array(
- dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . '.',
- '/path/to/lib'
- ),
- 'ini' => array('foo' => 'bar'),
- 'const' => array('FOO' => false, 'BAR' => true),
- 'var' => array('foo' => false),
- 'env' => array('foo' => true),
- 'post' => array('foo' => 'bar'),
- 'get' => array('foo' => 'bar'),
- 'cookie' => array('foo' => 'bar'),
- 'server' => array('foo' => 'bar'),
- 'files' => array('foo' => 'bar'),
- 'request'=> array('foo' => 'bar'),
- ),
- $this->configuration->getPHPConfiguration()
- );
- }
-
- /**
- * @backupGlobals enabled
- * @covers PHPUnit_Util_Configuration::handlePHPConfiguration
- */
- public function testPHPConfigurationIsHandledCorrectly()
- {
- $this->configuration->handlePHPConfiguration();
-
- $path = dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . '.' . PATH_SEPARATOR . '/path/to/lib';
- $this->assertStringStartsWith($path, ini_get('include_path'));
- $this->assertEquals(false, FOO);
- $this->assertEquals(true, BAR);
- $this->assertEquals(false, $GLOBALS['foo']);
- $this->assertEquals(true, $_ENV['foo']);
- $this->assertEquals(true, getenv('foo'));
- $this->assertEquals('bar', $_POST['foo']);
- $this->assertEquals('bar', $_GET['foo']);
- $this->assertEquals('bar', $_COOKIE['foo']);
- $this->assertEquals('bar', $_SERVER['foo']);
- $this->assertEquals('bar', $_FILES['foo']);
- $this->assertEquals('bar', $_REQUEST['foo']);
- }
-
- /**
- * @backupGlobals enabled
- *
- * @see https://github.com/sebastianbergmann/phpunit/issues/1181
- */
- public function testHandlePHPConfigurationDoesNotOverwrittenExistingEnvArrayVariables()
- {
- $_ENV['foo'] = false;
- $this->configuration->handlePHPConfiguration();
-
- $this->assertEquals(false, $_ENV['foo']);
- $this->assertEquals(true, getenv('foo'));
- }
-
- /**
- * @backupGlobals enabled
- *
- * @see https://github.com/sebastianbergmann/phpunit/issues/1181
- */
- public function testHandlePHPConfigurationDoesNotOverriteVariablesFromPutEnv()
- {
- putenv('foo=putenv');
- $this->configuration->handlePHPConfiguration();
-
- $this->assertEquals(true, $_ENV['foo']);
- $this->assertEquals('putenv', getenv('foo'));
- }
-
- /**
- * @covers PHPUnit_Util_Configuration::getPHPUnitConfiguration
- */
- public function testPHPUnitConfigurationIsReadCorrectly()
- {
- $this->assertEquals(
- array(
- 'backupGlobals' => true,
- 'backupStaticAttributes' => false,
- 'disallowChangesToGlobalState' => false,
- 'bootstrap' => '/path/to/bootstrap.php',
- 'cacheTokens' => false,
- 'columns' => 80,
- 'colors' => 'never',
- 'stderr' => false,
- 'convertErrorsToExceptions' => true,
- 'convertNoticesToExceptions' => true,
- 'convertWarningsToExceptions' => true,
- 'forceCoversAnnotation' => false,
- 'mapTestClassNameToCoveredClassName' => false,
- 'printerClass' => 'PHPUnit_TextUI_ResultPrinter',
- 'stopOnFailure' => false,
- 'reportUselessTests' => false,
- 'strictCoverage' => false,
- 'disallowTestOutput' => false,
- 'enforceTimeLimit' => false,
- 'disallowTodoAnnotatedTests' => false,
- 'testSuiteLoaderClass' => 'PHPUnit_Runner_StandardTestSuiteLoader',
- 'verbose' => false,
- 'timeoutForSmallTests' => 1,
- 'timeoutForMediumTests' => 10,
- 'timeoutForLargeTests' => 60
- ),
- $this->configuration->getPHPUnitConfiguration()
- );
- }
-
- /**
- * @covers PHPUnit_Util_Configuration::getSeleniumBrowserConfiguration
- */
- public function testSeleniumBrowserConfigurationIsReadCorrectly()
- {
- $this->assertEquals(
- array(
- 0 =>
- array(
- 'name' => 'Firefox on Linux',
- 'browser' => '*firefox /usr/lib/firefox/firefox-bin',
- 'host' => 'my.linux.box',
- 'port' => 4444,
- 'timeout' => 30000,
- ),
- ),
- $this->configuration->getSeleniumBrowserConfiguration()
- );
- }
-
- /**
- * @covers PHPUnit_Util_Configuration::getInstance
- */
- public function testXincludeInConfiguration()
- {
- $configurationWithXinclude = PHPUnit_Util_Configuration::getInstance(
- dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'configuration_xinclude.xml'
- );
-
- $this->assertConfigurationEquals(
- $this->configuration,
- $configurationWithXinclude
- );
- }
-
- /**
- * @ticket 1311
- * @covers PHPUnit_Util_Configuration::getLoggingConfiguration
- * @covers PHPUnit_Util_Configuration::getPHPConfiguration
- * @covers PHPUnit_Util_Configuration::getPHPUnitConfiguration
- * @covers PHPUnit_Util_Configuration::getTestSuiteConfiguration
- * @covers PHPUnit_Util_Configuration::getFilterConfiguration
- *
- * @uses PHPUnit_Util_Configuration::getInstance
- */
- public function testWithEmptyConfigurations()
- {
- $emptyConfiguration = PHPUnit_Util_Configuration::getInstance(
- dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'configuration_empty.xml'
- );
-
- $logging = $emptyConfiguration->getLoggingConfiguration();
- $this->assertEmpty($logging);
-
- $php = $emptyConfiguration->getPHPConfiguration();
- $this->assertEmpty($php['include_path']);
-
- $phpunit = $emptyConfiguration->getPHPUnitConfiguration();
- $this->assertArrayNotHasKey('bootstrap', $phpunit);
- $this->assertArrayNotHasKey('testSuiteLoaderFile', $phpunit);
- $this->assertArrayNotHasKey('printerFile', $phpunit);
-
- $suite = $emptyConfiguration->getTestSuiteConfiguration();
- $this->assertEmpty($suite->getGroups());
-
- $filter = $emptyConfiguration->getFilterConfiguration();
- $this->assertEmpty($filter['blacklist']['include']['directory']);
- $this->assertEmpty($filter['blacklist']['include']['file']);
- $this->assertEmpty($filter['blacklist']['exclude']['directory']);
- $this->assertEmpty($filter['blacklist']['exclude']['file']);
- $this->assertEmpty($filter['whitelist']['include']['directory']);
- $this->assertEmpty($filter['whitelist']['include']['file']);
- $this->assertEmpty($filter['whitelist']['exclude']['directory']);
- $this->assertEmpty($filter['whitelist']['exclude']['file']);
- }
-
- /**
- * Asserts that the values in $actualConfiguration equal $expectedConfiguration.
- *
- * @param PHPUnit_Util_Configuration $expectedConfiguration
- * @param PHPUnit_Util_Configuration $actualConfiguration
- */
- protected function assertConfigurationEquals(PHPUnit_Util_Configuration $expectedConfiguration, PHPUnit_Util_Configuration $actualConfiguration)
- {
- $this->assertEquals(
- $expectedConfiguration->getFilterConfiguration(),
- $actualConfiguration->getFilterConfiguration()
- );
-
- $this->assertEquals(
- $expectedConfiguration->getGroupConfiguration(),
- $actualConfiguration->getGroupConfiguration()
- );
-
- $this->assertEquals(
- $expectedConfiguration->getListenerConfiguration(),
- $actualConfiguration->getListenerConfiguration()
- );
-
- $this->assertEquals(
- $expectedConfiguration->getLoggingConfiguration(),
- $actualConfiguration->getLoggingConfiguration()
- );
-
- $this->assertEquals(
- $expectedConfiguration->getPHPConfiguration(),
- $actualConfiguration->getPHPConfiguration()
- );
-
- $this->assertEquals(
- $expectedConfiguration->getPHPUnitConfiguration(),
- $actualConfiguration->getPHPUnitConfiguration()
- );
-
- $this->assertEquals(
- $expectedConfiguration->getSeleniumBrowserConfiguration(),
- $actualConfiguration->getSeleniumBrowserConfiguration()
- );
-
- $this->assertEquals(
- $expectedConfiguration->getTestSuiteConfiguration(),
- $actualConfiguration->getTestSuiteConfiguration()
- );
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Util/GetoptTest.php b/vendor/phpunit/phpunit/tests/Util/GetoptTest.php
deleted file mode 100644
index 8e7ad4dc..00000000
--- a/vendor/phpunit/phpunit/tests/Util/GetoptTest.php
+++ /dev/null
@@ -1,62 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- */
-class Util_GetoptTest extends PHPUnit_Framework_TestCase
-{
- public function testItIncludeTheLongOptionsAfterTheArgument()
- {
- $args = array(
- 'command',
- 'myArgument',
- '--colors',
- );
- $actual = PHPUnit_Util_Getopt::getopt($args, '', array('colors=='));
-
- $expected = array(
- array(
- array(
- '--colors',
- null,
- ),
- ),
- array(
- 'myArgument',
- ),
- );
-
- $this->assertEquals($expected, $actual);
- }
-
- public function testItIncludeTheShortOptionsAfterTheArgument()
- {
- $args = array(
- 'command',
- 'myArgument',
- '-v',
- );
- $actual = PHPUnit_Util_Getopt::getopt($args, 'v');
-
- $expected = array(
- array(
- array(
- 'v',
- null,
- ),
- ),
- array(
- 'myArgument',
- ),
- );
-
- $this->assertEquals($expected, $actual);
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Util/GlobalStateTest.php b/vendor/phpunit/phpunit/tests/Util/GlobalStateTest.php
deleted file mode 100644
index 5810ee39..00000000
--- a/vendor/phpunit/phpunit/tests/Util/GlobalStateTest.php
+++ /dev/null
@@ -1,35 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- */
-class Util_GlobalStateTest extends PHPUnit_Framework_TestCase
-{
- /**
- * @covers PHPUnit_Util_GlobalState::processIncludedFilesAsString
- */
- public function testIncludedFilesAsStringSkipsVfsProtocols()
- {
- $dir = __DIR__;
- $files = array(
- 'phpunit', // The 0 index is not used
- $dir . '/ConfigurationTest.php',
- $dir . '/GlobalStateTest.php',
- 'vfs://' . $dir . '/RegexTest.php',
- 'phpvfs53e46260465c7://' . $dir . '/TestTest.php',
- 'file://' . $dir . '/XMLTest.php'
- );
-
- $this->assertEquals(
- "require_once '" . $dir . "/ConfigurationTest.php';\n" .
- "require_once '" . $dir . "/GlobalStateTest.php';\n" .
- "require_once 'file://" . $dir . "/XMLTest.php';\n", PHPUnit_Util_GlobalState::processIncludedFilesAsString($files));
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Util/RegexTest.php b/vendor/phpunit/phpunit/tests/Util/RegexTest.php
deleted file mode 100644
index 7242654f..00000000
--- a/vendor/phpunit/phpunit/tests/Util/RegexTest.php
+++ /dev/null
@@ -1,52 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 4.2.0
- */
-class Util_RegexTest extends PHPUnit_Framework_TestCase
-{
- public function validRegexpProvider()
- {
- return array(
- array('#valid regexp#', 'valid regexp', 1),
- array(';val.*xp;', 'valid regexp', 1),
- array('/val.*xp/i', 'VALID REGEXP', 1),
- array('/a val.*p/','valid regexp', 0),
- );
- }
-
- public function invalidRegexpProvider()
- {
- return array(
- array('valid regexp', 'valid regexp'),
- array(';val.*xp', 'valid regexp'),
- array('val.*xp/i', 'VALID REGEXP'),
- );
- }
-
- /**
- * @dataProvider validRegexpProvider
- * @covers PHPUnit_Util_Regex::pregMatchSafe
- */
- public function testValidRegex($pattern, $subject, $return)
- {
- $this->assertEquals($return, PHPUnit_Util_Regex::pregMatchSafe($pattern, $subject));
- }
-
- /**
- * @dataProvider invalidRegexpProvider
- * @covers PHPUnit_Util_Regex::pregMatchSafe
- */
- public function testInvalidRegex($pattern, $subject)
- {
- $this->assertFalse(PHPUnit_Util_Regex::pregMatchSafe($pattern, $subject));
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Util/TestDox/NamePrettifierTest.php b/vendor/phpunit/phpunit/tests/Util/TestDox/NamePrettifierTest.php
deleted file mode 100644
index 729e8ac2..00000000
--- a/vendor/phpunit/phpunit/tests/Util/TestDox/NamePrettifierTest.php
+++ /dev/null
@@ -1,81 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 2.1.0
- */
-class Util_TestDox_NamePrettifierTest extends PHPUnit_Framework_TestCase
-{
- protected $namePrettifier;
-
- protected function setUp()
- {
- $this->namePrettifier = new PHPUnit_Util_TestDox_NamePrettifier;
- }
-
- /**
- * @covers PHPUnit_Util_TestDox_NamePrettifier::prettifyTestClass
- */
- public function testTitleHasSensibleDefaults()
- {
- $this->assertEquals('Foo', $this->namePrettifier->prettifyTestClass('FooTest'));
- $this->assertEquals('Foo', $this->namePrettifier->prettifyTestClass('TestFoo'));
- $this->assertEquals('Foo', $this->namePrettifier->prettifyTestClass('TestFooTest'));
- $this->assertEquals('Foo', $this->namePrettifier->prettifyTestClass('Test\FooTest'));
- }
-
- /**
- * @covers PHPUnit_Util_TestDox_NamePrettifier::prettifyTestClass
- */
- public function testCaterForUserDefinedSuffix()
- {
- $this->namePrettifier->setSuffix('TestCase');
- $this->namePrettifier->setPrefix(null);
-
- $this->assertEquals('Foo', $this->namePrettifier->prettifyTestClass('FooTestCase'));
- $this->assertEquals('TestFoo', $this->namePrettifier->prettifyTestClass('TestFoo'));
- $this->assertEquals('FooTest', $this->namePrettifier->prettifyTestClass('FooTest'));
- }
-
- /**
- * @covers PHPUnit_Util_TestDox_NamePrettifier::prettifyTestClass
- */
- public function testCaterForUserDefinedPrefix()
- {
- $this->namePrettifier->setSuffix(null);
- $this->namePrettifier->setPrefix('XXX');
-
- $this->assertEquals('Foo', $this->namePrettifier->prettifyTestClass('XXXFoo'));
- $this->assertEquals('TestXXX', $this->namePrettifier->prettifyTestClass('TestXXX'));
- $this->assertEquals('XXX', $this->namePrettifier->prettifyTestClass('XXXXXX'));
- }
-
- /**
- * @covers PHPUnit_Util_TestDox_NamePrettifier::prettifyTestMethod
- */
- public function testTestNameIsConvertedToASentence()
- {
- $this->assertEquals('This is a test', $this->namePrettifier->prettifyTestMethod('testThisIsATest'));
- $this->assertEquals('This is a test', $this->namePrettifier->prettifyTestMethod('testThisIsATest2'));
- $this->assertEquals('This is a test', $this->namePrettifier->prettifyTestMethod('this_is_a_test'));
- $this->assertEquals('Foo for bar is 0', $this->namePrettifier->prettifyTestMethod('testFooForBarIs0'));
- $this->assertEquals('Foo for baz is 1', $this->namePrettifier->prettifyTestMethod('testFooForBazIs1'));
- }
-
- /**
- * @covers PHPUnit_Util_TestDox_NamePrettifier::prettifyTestMethod
- * @ticket 224
- */
- public function testTestNameIsNotGroupedWhenNotInSequence()
- {
- $this->assertEquals('Sets redirect header on 301', $this->namePrettifier->prettifyTestMethod('testSetsRedirectHeaderOn301'));
- $this->assertEquals('Sets redirect header on 302', $this->namePrettifier->prettifyTestMethod('testSetsRedirectHeaderOn302'));
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Util/TestTest.php b/vendor/phpunit/phpunit/tests/Util/TestTest.php
deleted file mode 100644
index 2b425364..00000000
--- a/vendor/phpunit/phpunit/tests/Util/TestTest.php
+++ /dev/null
@@ -1,685 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-if (!defined('TEST_FILES_PATH')) {
- define(
- 'TEST_FILES_PATH',
- dirname(__DIR__) . DIRECTORY_SEPARATOR .
- '_files' . DIRECTORY_SEPARATOR
- );
-}
-
-require TEST_FILES_PATH . 'CoverageNamespacedFunctionTest.php';
-require TEST_FILES_PATH . 'NamespaceCoveredFunction.php';
-
-/**
- * @since Class available since Release 3.3.6
- */
-class Util_TestTest extends PHPUnit_Framework_TestCase
-{
- /**
- * @covers PHPUnit_Util_Test::getExpectedException
- *
- * @todo Split up in separate tests
- */
- public function testGetExpectedException()
- {
- $this->assertArraySubset(
- array('class' => 'FooBarBaz', 'code' => null, 'message' => ''),
- PHPUnit_Util_Test::getExpectedException('ExceptionTest', 'testOne')
- );
-
- $this->assertArraySubset(
- array('class' => 'Foo_Bar_Baz', 'code' => null, 'message' => ''),
- PHPUnit_Util_Test::getExpectedException('ExceptionTest', 'testTwo')
- );
-
- $this->assertArraySubset(
- array('class' => 'Foo\Bar\Baz', 'code' => null, 'message' => ''),
- PHPUnit_Util_Test::getExpectedException('ExceptionTest', 'testThree')
- );
-
- $this->assertArraySubset(
- array('class' => 'ほげ', 'code' => null, 'message' => ''),
- PHPUnit_Util_Test::getExpectedException('ExceptionTest', 'testFour')
- );
-
- $this->assertArraySubset(
- array('class' => 'Class', 'code' => 1234, 'message' => 'Message'),
- PHPUnit_Util_Test::getExpectedException('ExceptionTest', 'testFive')
- );
-
- $this->assertArraySubset(
- array('class' => 'Class', 'code' => 1234, 'message' => 'Message'),
- PHPUnit_Util_Test::getExpectedException('ExceptionTest', 'testSix')
- );
-
- $this->assertArraySubset(
- array('class' => 'Class', 'code' => 'ExceptionCode', 'message' => 'Message'),
- PHPUnit_Util_Test::getExpectedException('ExceptionTest', 'testSeven')
- );
-
- $this->assertArraySubset(
- array('class' => 'Class', 'code' => 0, 'message' => 'Message'),
- PHPUnit_Util_Test::getExpectedException('ExceptionTest', 'testEight')
- );
-
- $this->assertArraySubset(
- array('class' => 'Class', 'code' => ExceptionTest::ERROR_CODE, 'message' => ExceptionTest::ERROR_MESSAGE),
- PHPUnit_Util_Test::getExpectedException('ExceptionTest', 'testNine')
- );
-
- $this->assertArraySubset(
- array('class' => 'Class', 'code' => null, 'message' => ''),
- PHPUnit_Util_Test::getExpectedException('ExceptionTest', 'testSingleLine')
- );
-
- $this->assertArraySubset(
- array('class' => 'Class', 'code' => My\Space\ExceptionNamespaceTest::ERROR_CODE, 'message' => My\Space\ExceptionNamespaceTest::ERROR_MESSAGE),
- PHPUnit_Util_Test::getExpectedException('My\Space\ExceptionNamespaceTest', 'testConstants')
- );
-
- // Ensure the Class::CONST expression is only evaluated when the constant really exists
- $this->assertArraySubset(
- array('class' => 'Class', 'code' => 'ExceptionTest::UNKNOWN_CODE_CONSTANT', 'message' => 'ExceptionTest::UNKNOWN_MESSAGE_CONSTANT'),
- PHPUnit_Util_Test::getExpectedException('ExceptionTest', 'testUnknownConstants')
- );
-
- $this->assertArraySubset(
- array('class' => 'Class', 'code' => 'My\Space\ExceptionNamespaceTest::UNKNOWN_CODE_CONSTANT', 'message' => 'My\Space\ExceptionNamespaceTest::UNKNOWN_MESSAGE_CONSTANT'),
- PHPUnit_Util_Test::getExpectedException('My\Space\ExceptionNamespaceTest', 'testUnknownConstants')
- );
- }
-
- /**
- * @covers PHPUnit_Util_Test::getExpectedException
- */
- public function testGetExpectedRegExp()
- {
- $this->assertArraySubset(
- array('message_regex' => '#regex#'),
- PHPUnit_Util_Test::getExpectedException('ExceptionTest', 'testWithRegexMessage')
- );
-
- $this->assertArraySubset(
- array('message_regex' => '#regex#'),
- PHPUnit_Util_Test::getExpectedException('ExceptionTest', 'testWithRegexMessageFromClassConstant')
- );
-
- $this->assertArraySubset(
- array('message_regex' => 'ExceptionTest::UNKNOWN_MESSAGE_REGEX_CONSTANT'),
- PHPUnit_Util_Test::getExpectedException('ExceptionTest', 'testWithUnknowRegexMessageFromClassConstant')
- );
- }
-
- /**
- * @covers PHPUnit_Util_Test::getRequirements
- * @dataProvider requirementsProvider
- */
- public function testGetRequirements($test, $result)
- {
- $this->assertEquals(
- $result,
- PHPUnit_Util_Test::getRequirements('RequirementsTest', $test)
- );
- }
-
- public function requirementsProvider()
- {
- return array(
- array('testOne', array()),
- array('testTwo', array('PHPUnit' => '1.0')),
- array('testThree', array('PHP' => '2.0')),
- array('testFour', array('PHPUnit' => '2.0', 'PHP' => '1.0')),
- array('testFive', array('PHP' => '5.4.0RC6')),
- array('testSix', array('PHP' => '5.4.0-alpha1')),
- array('testSeven', array('PHP' => '5.4.0beta2')),
- array('testEight', array('PHP' => '5.4-dev')),
- array('testNine', array('functions' => array('testFunc'))),
- array('testTen', array('extensions' => array('testExt'))),
- array('testEleven', array('OS' => '/Linux/i')),
- array(
- 'testSpace',
- array(
- 'extensions' => array('spl'),
- 'OS' => '/.*/i'
- )
- ),
- array(
- 'testAllPossibleRequirements',
- array(
- 'PHP' => '99-dev',
- 'PHPUnit' => '9-dev',
- 'OS' => '/DOESNOTEXIST/i',
- 'functions' => array(
- 'testFuncOne',
- 'testFuncTwo',
- ),
- 'extensions' => array(
- 'testExtOne',
- 'testExtTwo',
- )
- )
- )
- );
- }
-
- /**
- * @covers PHPUnit_Util_Test::getRequirements
- */
- public function testGetRequirementsMergesClassAndMethodDocBlocks()
- {
- $expectedAnnotations = array(
- 'PHP' => '5.4',
- 'PHPUnit' => '3.7',
- 'OS' => '/WINNT/i',
- 'functions' => array(
- 'testFuncClass',
- 'testFuncMethod',
- ),
- 'extensions' => array(
- 'testExtClass',
- 'testExtMethod',
- )
- );
-
- $this->assertEquals(
- $expectedAnnotations,
- PHPUnit_Util_Test::getRequirements('RequirementsClassDocBlockTest', 'testMethod')
- );
- }
-
- /**
- * @covers PHPUnit_Util_Test::getMissingRequirements
- * @dataProvider missingRequirementsProvider
- */
- public function testGetMissingRequirements($test, $result)
- {
- $this->assertEquals(
- $result,
- PHPUnit_Util_Test::getMissingRequirements('RequirementsTest', $test)
- );
- }
-
- public function missingRequirementsProvider()
- {
- return array(
- array('testOne', array()),
- array('testNine', array('Function testFunc is required.')),
- array('testTen', array('Extension testExt is required.')),
- array('testAlwaysSkip', array('PHPUnit 1111111 (or later) is required.')),
- array('testAlwaysSkip2', array('PHP 9999999 (or later) is required.')),
- array('testAlwaysSkip3', array('Operating system matching /DOESNOTEXIST/i is required.')),
- array('testAllPossibleRequirements', array(
- 'PHP 99-dev (or later) is required.',
- 'PHPUnit 9-dev (or later) is required.',
- 'Operating system matching /DOESNOTEXIST/i is required.',
- 'Function testFuncOne is required.',
- 'Function testFuncTwo is required.',
- 'Extension testExtOne is required.',
- 'Extension testExtTwo is required.',
- )),
- );
- }
-
- /**
- * @coversNothing
- *
- * @todo This test does not really test functionality of PHPUnit_Util_Test
- */
- public function testGetProvidedDataRegEx()
- {
- $result = preg_match(PHPUnit_Util_Test::REGEX_DATA_PROVIDER, '@dataProvider method', $matches);
- $this->assertEquals(1, $result);
- $this->assertEquals('method', $matches[1]);
-
- $result = preg_match(PHPUnit_Util_Test::REGEX_DATA_PROVIDER, '@dataProvider class::method', $matches);
- $this->assertEquals(1, $result);
- $this->assertEquals('class::method', $matches[1]);
-
- $result = preg_match(PHPUnit_Util_Test::REGEX_DATA_PROVIDER, '@dataProvider namespace\class::method', $matches);
- $this->assertEquals(1, $result);
- $this->assertEquals('namespace\class::method', $matches[1]);
-
- $result = preg_match(PHPUnit_Util_Test::REGEX_DATA_PROVIDER, '@dataProvider namespace\namespace\class::method', $matches);
- $this->assertEquals(1, $result);
- $this->assertEquals('namespace\namespace\class::method', $matches[1]);
-
- $result = preg_match(PHPUnit_Util_Test::REGEX_DATA_PROVIDER, '@dataProvider メソッド', $matches);
- $this->assertEquals(1, $result);
- $this->assertEquals('メソッド', $matches[1]);
- }
-
- /**
- * @covers PHPUnit_Util_Test::getDataFromTestWithAnnotation
- */
- public function testTestWithEmptyAnnotation()
- {
- $result = PHPUnit_Util_Test::getDataFromTestWithAnnotation("/**\n * @anotherAnnotation\n */");
- $this->assertNull($result);
- }
-
- /**
- * @covers PHPUnit_Util_Test::getDataFromTestWithAnnotation
- */
- public function testTestWithSimpleCase()
- {
- $result = PHPUnit_Util_Test::getDataFromTestWithAnnotation('/**
- * @testWith [1]
- */');
- $this->assertEquals(array(array(1)), $result);
- }
-
- /**
- * @covers PHPUnit_Util_Test::getDataFromTestWithAnnotation
- */
- public function testTestWithMultiLineMultiParameterCase()
- {
- $result = PHPUnit_Util_Test::getDataFromTestWithAnnotation('/**
- * @testWith [1, 2]
- * [3, 4]
- */');
- $this->assertEquals(array(array(1, 2), array(3, 4)), $result);
- }
-
- /**
- * @covers PHPUnit_Util_Test::getDataFromTestWithAnnotation
- */
- public function testTestWithVariousTypes()
- {
- $result = PHPUnit_Util_Test::getDataFromTestWithAnnotation('/**
- * @testWith ["ab"]
- * [true]
- * [null]
- */');
- $this->assertEquals(array(array('ab'), array(true), array(null)), $result);
- }
-
- /**
- * @covers PHPUnit_Util_Test::getDataFromTestWithAnnotation
- */
- public function testTestWithAnnotationAfter()
- {
- $result = PHPUnit_Util_Test::getDataFromTestWithAnnotation('/**
- * @testWith [1]
- * [2]
- * @annotation
- */');
- $this->assertEquals(array(array(1), array(2)), $result);
- }
-
- /**
- * @covers PHPUnit_Util_Test::getDataFromTestWithAnnotation
- */
- public function testTestWithSimpleTextAfter()
- {
- $result = PHPUnit_Util_Test::getDataFromTestWithAnnotation('/**
- * @testWith [1]
- * [2]
- * blah blah
- */');
- $this->assertEquals(array(array(1), array(2)), $result);
- }
-
- /**
- * @covers PHPUnit_Util_Test::getDataFromTestWithAnnotation
- */
- public function testTestWithCharacterEscape()
- {
- $result = PHPUnit_Util_Test::getDataFromTestWithAnnotation('/**
- * @testWith ["\"", "\""]
- */');
- $this->assertEquals(array(array('"', '"')), $result);
- }
-
- /**
- * @covers PHPUnit_Util_Test::getDataFromTestWithAnnotation
- */
- public function testTestWithThrowsProperExceptionIfDatasetCannotBeParsed()
- {
- $this->setExpectedExceptionRegExp(
- 'PHPUnit_Framework_Exception',
- '/^The dataset for the @testWith annotation cannot be parsed:/'
- );
- PHPUnit_Util_Test::getDataFromTestWithAnnotation('/**
- * @testWith [s]
- */');
- }
-
- public function testTestWithThrowsProperExceptionIfMultiLineDatasetCannotBeParsed()
- {
- $this->setExpectedExceptionRegExp(
- 'PHPUnit_Framework_Exception',
- '/^The dataset for the @testWith annotation cannot be parsed:/'
- );
- PHPUnit_Util_Test::getDataFromTestWithAnnotation('/**
- * @testWith ["valid"]
- * [invalid]
- */');
- }
-
- /**
- * @covers PHPUnit_Util_Test::getDependencies
- *
- * @todo Not sure what this test tests (name is misleading at least)
- */
- public function testParseAnnotation()
- {
- $this->assertEquals(
- array('Foo', 'ほげ'),
- PHPUnit_Util_Test::getDependencies(get_class($this), 'methodForTestParseAnnotation')
- );
- }
-
- /**
- * @depends Foo
- * @depends ほげ
- *
- * @todo Remove fixture from test class
- */
- public function methodForTestParseAnnotation()
- {
- }
-
- /**
- * @covers PHPUnit_Util_Test::getDependencies
- */
- public function testParseAnnotationThatIsOnlyOneLine()
- {
- $this->assertEquals(
- array('Bar'),
- PHPUnit_Util_Test::getDependencies(get_class($this), 'methodForTestParseAnnotationThatIsOnlyOneLine')
- );
- }
-
- /** @depends Bar */
- public function methodForTestParseAnnotationThatIsOnlyOneLine()
- {
- // TODO Remove fixture from test class
- }
-
- /**
- * @covers PHPUnit_Util_Test::getLinesToBeCovered
- * @covers PHPUnit_Util_Test::getLinesToBeCoveredOrUsed
- * @covers PHPUnit_Util_Test::resolveElementToReflectionObjects
- * @dataProvider getLinesToBeCoveredProvider
- */
- public function testGetLinesToBeCovered($test, $lines)
- {
- if (strpos($test, 'Namespace') === 0) {
- $expected = array(
- TEST_FILES_PATH . 'NamespaceCoveredClass.php' => $lines
- );
- } elseif ($test === 'CoverageNoneTest') {
- $expected = array();
- } elseif ($test === 'CoverageNothingTest') {
- $expected = false;
- } elseif ($test === 'CoverageFunctionTest') {
- $expected = array(
- TEST_FILES_PATH . 'CoveredFunction.php' => $lines
- );
- } else {
- $expected = array(TEST_FILES_PATH . 'CoveredClass.php' => $lines);
- }
-
- $this->assertEquals(
- $expected,
- PHPUnit_Util_Test::getLinesToBeCovered(
- $test, 'testSomething'
- )
- );
- }
-
- /**
- * @covers PHPUnit_Util_Test::getLinesToBeCovered
- * @covers PHPUnit_Util_Test::getLinesToBeCoveredOrUsed
- * @covers PHPUnit_Util_Test::resolveElementToReflectionObjects
- * @expectedException PHPUnit_Framework_CodeCoverageException
- */
- public function testGetLinesToBeCovered2()
- {
- PHPUnit_Util_Test::getLinesToBeCovered(
- 'NotExistingCoveredElementTest', 'testOne'
- );
- }
-
- /**
- * @covers PHPUnit_Util_Test::getLinesToBeCovered
- * @covers PHPUnit_Util_Test::getLinesToBeCoveredOrUsed
- * @covers PHPUnit_Util_Test::resolveElementToReflectionObjects
- * @expectedException PHPUnit_Framework_CodeCoverageException
- */
- public function testGetLinesToBeCovered3()
- {
- PHPUnit_Util_Test::getLinesToBeCovered(
- 'NotExistingCoveredElementTest', 'testTwo'
- );
- }
-
- /**
- * @covers PHPUnit_Util_Test::getLinesToBeCovered
- * @covers PHPUnit_Util_Test::getLinesToBeCoveredOrUsed
- * @covers PHPUnit_Util_Test::resolveElementToReflectionObjects
- * @expectedException PHPUnit_Framework_CodeCoverageException
- */
- public function testGetLinesToBeCovered4()
- {
- PHPUnit_Util_Test::getLinesToBeCovered(
- 'NotExistingCoveredElementTest', 'testThree'
- );
- }
-
- /**
- * @covers PHPUnit_Util_Test::getLinesToBeCovered
- * @covers PHPUnit_Util_Test::getLinesToBeCoveredOrUsed
- */
- public function testGetLinesToBeCoveredSkipsNonExistentMethods()
- {
- $this->assertSame(
- array(),
- PHPUnit_Util_Test::getLinesToBeCovered(
- 'NotExistingCoveredElementTest',
- 'methodDoesNotExist'
- )
- );
- }
-
- /**
- * @covers PHPUnit_Util_Test::getLinesToBeCovered
- * @covers PHPUnit_Util_Test::getLinesToBeCoveredOrUsed
- * @expectedException PHPUnit_Framework_CodeCoverageException
- */
- public function testTwoCoversDefaultClassAnnoationsAreNotAllowed()
- {
- PHPUnit_Util_Test::getLinesToBeCovered(
- 'CoverageTwoDefaultClassAnnotations',
- 'testSomething'
- );
- }
-
- /**
- * @covers PHPUnit_Util_Test::getLinesToBeCovered
- * @covers PHPUnit_Util_Test::getLinesToBeCoveredOrUsed
- */
- public function testFunctionParenthesesAreAllowed()
- {
- $this->assertSame(
- array(TEST_FILES_PATH . 'CoveredFunction.php' => range(2, 4)),
- PHPUnit_Util_Test::getLinesToBeCovered(
- 'CoverageFunctionParenthesesTest',
- 'testSomething'
- )
- );
- }
-
- /**
- * @covers PHPUnit_Util_Test::getLinesToBeCovered
- * @covers PHPUnit_Util_Test::getLinesToBeCoveredOrUsed
- */
- public function testFunctionParenthesesAreAllowedWithWhitespace()
- {
- $this->assertSame(
- array(TEST_FILES_PATH . 'CoveredFunction.php' => range(2, 4)),
- PHPUnit_Util_Test::getLinesToBeCovered(
- 'CoverageFunctionParenthesesWhitespaceTest',
- 'testSomething'
- )
- );
- }
-
- /**
- * @covers PHPUnit_Util_Test::getLinesToBeCovered
- * @covers PHPUnit_Util_Test::getLinesToBeCoveredOrUsed
- */
- public function testMethodParenthesesAreAllowed()
- {
- $this->assertSame(
- array(TEST_FILES_PATH . 'CoveredClass.php' => range(31, 35)),
- PHPUnit_Util_Test::getLinesToBeCovered(
- 'CoverageMethodParenthesesTest',
- 'testSomething'
- )
- );
- }
-
- /**
- * @covers PHPUnit_Util_Test::getLinesToBeCovered
- * @covers PHPUnit_Util_Test::getLinesToBeCoveredOrUsed
- */
- public function testMethodParenthesesAreAllowedWithWhitespace()
- {
- $this->assertSame(
- array(TEST_FILES_PATH . 'CoveredClass.php' => range(31, 35)),
- PHPUnit_Util_Test::getLinesToBeCovered(
- 'CoverageMethodParenthesesWhitespaceTest',
- 'testSomething'
- )
- );
- }
-
- /**
- * @covers PHPUnit_Util_Test::getLinesToBeCovered
- * @covers PHPUnit_Util_Test::getLinesToBeCoveredOrUsed
- */
- public function testNamespacedFunctionCanBeCoveredOrUsed()
- {
- $this->assertEquals(
- array(
- TEST_FILES_PATH . 'NamespaceCoveredFunction.php' => range(4, 7)
- ),
- PHPUnit_Util_Test::getLinesToBeCovered(
- 'CoverageNamespacedFunctionTest',
- 'testFunc'
- )
- );
- }
-
- public function getLinesToBeCoveredProvider()
- {
- return array(
- array(
- 'CoverageNoneTest',
- array()
- ),
- array(
- 'CoverageClassExtendedTest',
- array_merge(range(19, 36), range(2, 17))
- ),
- array(
- 'CoverageClassTest',
- range(19, 36)
- ),
- array(
- 'CoverageMethodTest',
- range(31, 35)
- ),
- array(
- 'CoverageMethodOneLineAnnotationTest',
- range(31, 35)
- ),
- array(
- 'CoverageNotPrivateTest',
- array_merge(range(25, 29), range(31, 35))
- ),
- array(
- 'CoverageNotProtectedTest',
- array_merge(range(21, 23), range(31, 35))
- ),
- array(
- 'CoverageNotPublicTest',
- array_merge(range(21, 23), range(25, 29))
- ),
- array(
- 'CoveragePrivateTest',
- range(21, 23)
- ),
- array(
- 'CoverageProtectedTest',
- range(25, 29)
- ),
- array(
- 'CoveragePublicTest',
- range(31, 35)
- ),
- array(
- 'CoverageFunctionTest',
- range(2, 4)
- ),
- array(
- 'NamespaceCoverageClassExtendedTest',
- array_merge(range(21, 38), range(4, 19))
- ),
- array(
- 'NamespaceCoverageClassTest',
- range(21, 38)
- ),
- array(
- 'NamespaceCoverageMethodTest',
- range(33, 37)
- ),
- array(
- 'NamespaceCoverageNotPrivateTest',
- array_merge(range(27, 31), range(33, 37))
- ),
- array(
- 'NamespaceCoverageNotProtectedTest',
- array_merge(range(23, 25), range(33, 37))
- ),
- array(
- 'NamespaceCoverageNotPublicTest',
- array_merge(range(23, 25), range(27, 31))
- ),
- array(
- 'NamespaceCoveragePrivateTest',
- range(23, 25)
- ),
- array(
- 'NamespaceCoverageProtectedTest',
- range(27, 31)
- ),
- array(
- 'NamespaceCoveragePublicTest',
- range(33, 37)
- ),
- array(
- 'NamespaceCoverageCoversClassTest',
- array_merge(range(23, 25), range(27, 31), range(33, 37), range(6, 8), range(10, 13), range(15, 18))
- ),
- array(
- 'NamespaceCoverageCoversClassPublicTest',
- range(33, 37)
- ),
- array(
- 'CoverageNothingTest',
- false
- )
- );
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/Util/XMLTest.php b/vendor/phpunit/phpunit/tests/Util/XMLTest.php
deleted file mode 100644
index f4c3bd17..00000000
--- a/vendor/phpunit/phpunit/tests/Util/XMLTest.php
+++ /dev/null
@@ -1,363 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * @since Class available since Release 3.3.0
- * @covers PHPUnit_Util_XML
- */
-class Util_XMLTest extends PHPUnit_Framework_TestCase
-{
- public function testAssertValidKeysValidKeys()
- {
- $options = array('testA' => 1, 'testB' => 2, 'testC' => 3);
- $valid = array('testA', 'testB', 'testC');
- $expected = array('testA' => 1, 'testB' => 2, 'testC' => 3);
- $validated = PHPUnit_Util_XML::assertValidKeys($options, $valid);
-
- $this->assertEquals($expected, $validated);
- }
-
- public function testAssertValidKeysValidKeysEmpty()
- {
- $options = array('testA' => 1, 'testB' => 2);
- $valid = array('testA', 'testB', 'testC');
- $expected = array('testA' => 1, 'testB' => 2, 'testC' => null);
- $validated = PHPUnit_Util_XML::assertValidKeys($options, $valid);
-
- $this->assertEquals($expected, $validated);
- }
-
- public function testAssertValidKeysDefaultValuesA()
- {
- $options = array('testA' => 1, 'testB' => 2);
- $valid = array('testA' => 23, 'testB' => 24, 'testC' => 25);
- $expected = array('testA' => 1, 'testB' => 2, 'testC' => 25);
- $validated = PHPUnit_Util_XML::assertValidKeys($options, $valid);
-
- $this->assertEquals($expected, $validated);
- }
-
- public function testAssertValidKeysDefaultValuesB()
- {
- $options = array();
- $valid = array('testA' => 23, 'testB' => 24, 'testC' => 25);
- $expected = array('testA' => 23, 'testB' => 24, 'testC' => 25);
- $validated = PHPUnit_Util_XML::assertValidKeys($options, $valid);
-
- $this->assertEquals($expected, $validated);
- }
-
- public function testAssertValidKeysInvalidKey()
- {
- $options = array('testA' => 1, 'testB' => 2, 'testD' => 3);
- $valid = array('testA', 'testB', 'testC');
-
- try {
- $validated = PHPUnit_Util_XML::assertValidKeys($options, $valid);
- $this->fail();
- } catch (PHPUnit_Framework_Exception $e) {
- $this->assertEquals('Unknown key(s): testD', $e->getMessage());
- }
- }
-
- public function testAssertValidKeysInvalidKeys()
- {
- $options = array('testA' => 1, 'testD' => 2, 'testE' => 3);
- $valid = array('testA', 'testB', 'testC');
-
- try {
- $validated = PHPUnit_Util_XML::assertValidKeys($options, $valid);
- $this->fail();
- } catch (PHPUnit_Framework_Exception $e) {
- $this->assertEquals('Unknown key(s): testD, testE', $e->getMessage());
- }
- }
-
- public function testConvertAssertSelect()
- {
- $selector = 'div#folder.open a[href="http://www.xerox.com"][title="xerox"].selected.big > span + h1';
- $converted = PHPUnit_Util_XML::convertSelectToTag($selector);
- $tag = array('tag' => 'div',
- 'id' => 'folder',
- 'class' => 'open',
- 'descendant' => array('tag' => 'a',
- 'class' => 'selected big',
- 'attributes' => array('href' => 'http://www.xerox.com',
- 'title' => 'xerox'),
- 'child' => array('tag' => 'span',
- 'adjacent-sibling' => array('tag' => 'h1'))));
- $this->assertEquals($tag, $converted);
- }
-
- public function testConvertAssertSelectElt()
- {
- $selector = 'div';
- $converted = PHPUnit_Util_XML::convertSelectToTag($selector);
- $tag = array('tag' => 'div');
-
- $this->assertEquals($tag, $converted);
- }
-
- public function testConvertAssertClass()
- {
- $selector = '.foo';
- $converted = PHPUnit_Util_XML::convertSelectToTag($selector);
- $tag = array('class' => 'foo');
-
- $this->assertEquals($tag, $converted);
- }
-
- public function testConvertAssertId()
- {
- $selector = '#foo';
- $converted = PHPUnit_Util_XML::convertSelectToTag($selector);
- $tag = array('id' => 'foo');
-
- $this->assertEquals($tag, $converted);
- }
-
- public function testConvertAssertAttribute()
- {
- $selector = '[foo="bar"]';
- $converted = PHPUnit_Util_XML::convertSelectToTag($selector);
- $tag = array('attributes' => array('foo' => 'bar'));
-
- $this->assertEquals($tag, $converted);
- }
-
- public function testConvertAssertAttributeSpaces()
- {
- $selector = '[foo="bar baz"] div[value="foo bar"]';
- $converted = PHPUnit_Util_XML::convertSelectToTag($selector);
- $tag = array('attributes' => array('foo' => 'bar baz'),
- 'descendant' => array('tag' => 'div',
- 'attributes' => array('value' => 'foo bar')));
- $this->assertEquals($tag, $converted);
- }
-
- public function testConvertAssertAttributeMultipleSpaces()
- {
- $selector = '[foo="bar baz"] div[value="foo bar baz"]';
- $converted = PHPUnit_Util_XML::convertSelectToTag($selector);
- $tag = array('attributes' => array('foo' => 'bar baz'),
- 'descendant' => array('tag' => 'div',
- 'attributes' => array('value' => 'foo bar baz')));
- $this->assertEquals($tag, $converted);
- }
-
- public function testConvertAssertSelectEltClass()
- {
- $selector = 'div.foo';
- $converted = PHPUnit_Util_XML::convertSelectToTag($selector);
- $tag = array('tag' => 'div', 'class' => 'foo');
-
- $this->assertEquals($tag, $converted);
- }
-
- public function testConvertAssertSelectEltId()
- {
- $selector = 'div#foo';
- $converted = PHPUnit_Util_XML::convertSelectToTag($selector);
- $tag = array('tag' => 'div', 'id' => 'foo');
-
- $this->assertEquals($tag, $converted);
- }
-
- public function testConvertAssertSelectEltAttrEqual()
- {
- $selector = 'div[foo="bar"]';
- $converted = PHPUnit_Util_XML::convertSelectToTag($selector);
- $tag = array('tag' => 'div', 'attributes' => array('foo' => 'bar'));
-
- $this->assertEquals($tag, $converted);
- }
-
- public function testConvertAssertSelectEltMultiAttrEqual()
- {
- $selector = 'div[foo="bar"][baz="fob"]';
- $converted = PHPUnit_Util_XML::convertSelectToTag($selector);
- $tag = array('tag' => 'div', 'attributes' => array('foo' => 'bar', 'baz' => 'fob'));
-
- $this->assertEquals($tag, $converted);
- }
-
- public function testConvertAssertSelectEltAttrHasOne()
- {
- $selector = 'div[foo~="bar"]';
- $converted = PHPUnit_Util_XML::convertSelectToTag($selector);
- $tag = array('tag' => 'div', 'attributes' => array('foo' => 'regexp:/.*\bbar\b.*/'));
-
- $this->assertEquals($tag, $converted);
- }
-
- public function testConvertAssertSelectEltAttrContains()
- {
- $selector = 'div[foo*="bar"]';
- $converted = PHPUnit_Util_XML::convertSelectToTag($selector);
- $tag = array('tag' => 'div', 'attributes' => array('foo' => 'regexp:/.*bar.*/'));
-
- $this->assertEquals($tag, $converted);
- }
-
- public function testConvertAssertSelectEltChild()
- {
- $selector = 'div > a';
- $converted = PHPUnit_Util_XML::convertSelectToTag($selector);
- $tag = array('tag' => 'div', 'child' => array('tag' => 'a'));
-
- $this->assertEquals($tag, $converted);
- }
-
- public function testConvertAssertSelectEltAdjacentSibling()
- {
- $selector = 'div + a';
- $converted = PHPUnit_Util_XML::convertSelectToTag($selector);
- $tag = array('tag' => 'div', 'adjacent-sibling' => array('tag' => 'a'));
-
- $this->assertEquals($tag, $converted);
- }
-
- public function testConvertAssertSelectEltDescendant()
- {
- $selector = 'div a';
- $converted = PHPUnit_Util_XML::convertSelectToTag($selector);
- $tag = array('tag' => 'div', 'descendant' => array('tag' => 'a'));
-
- $this->assertEquals($tag, $converted);
- }
-
- public function testConvertAssertSelectContent()
- {
- $selector = '#foo';
- $content = 'div contents';
- $converted = PHPUnit_Util_XML::convertSelectToTag($selector, $content);
- $tag = array('id' => 'foo', 'content' => 'div contents');
-
- $this->assertEquals($tag, $converted);
- }
-
- public function testConvertAssertSelectTrue()
- {
- $selector = '#foo';
- $content = true;
- $converted = PHPUnit_Util_XML::convertSelectToTag($selector, $content);
- $tag = array('id' => 'foo');
-
- $this->assertEquals($tag, $converted);
- }
-
- public function testConvertAssertSelectFalse()
- {
- $selector = '#foo';
- $content = false;
- $converted = PHPUnit_Util_XML::convertSelectToTag($selector, $content);
- $tag = array('id' => 'foo');
-
- $this->assertEquals($tag, $converted);
- }
-
- public function testConvertAssertNumber()
- {
- $selector = '.foo';
- $content = 3;
- $converted = PHPUnit_Util_XML::convertSelectToTag($selector, $content);
- $tag = array('class' => 'foo');
-
- $this->assertEquals($tag, $converted);
- }
-
- public function testConvertAssertRange()
- {
- $selector = '#foo';
- $content = array('greater_than' => 5, 'less_than' => 10);
- $converted = PHPUnit_Util_XML::convertSelectToTag($selector, $content);
- $tag = array('id' => 'foo');
-
- $this->assertEquals($tag, $converted);
- }
-
- /**
- * @dataProvider charProvider
- */
- public function testPrepareString($char)
- {
- $e = null;
-
- $escapedString = PHPUnit_Util_XML::prepareString($char);
- $xml = "$escapedString ";
- $dom = new DomDocument('1.0', 'UTF-8');
-
- try {
- $dom->loadXML($xml);
- } catch (Exception $e) {
- }
-
- $this->assertNull($e, sprintf(
- 'PHPUnit_Util_XML::prepareString("\x%02x") should not crash DomDocument',
- ord($char)
- ));
- }
-
- public function charProvider()
- {
- $data = array();
-
- for ($i = 0; $i < 256; $i++) {
- $data[] = array(chr($i));
- }
-
- return $data;
- }
-
- /**
- * @expectedException PHPUnit_Framework_Exception
- * @expectedExceptionMessage Could not load XML from empty string
- */
- public function testLoadEmptyString()
- {
- PHPUnit_Util_XML::load('');
- }
-
- /**
- * @expectedException PHPUnit_Framework_Exception
- * @expectedExceptionMessage Could not load XML from array
- */
- public function testLoadArray()
- {
- PHPUnit_Util_XML::load(array(1, 2, 3));
- }
-
- /**
- * @expectedException PHPUnit_Framework_Exception
- * @expectedExceptionMessage Could not load XML from boolean
- */
- public function testLoadBoolean()
- {
- PHPUnit_Util_XML::load(false);
- }
-
- public function testNestedXmlToVariable()
- {
- $xml = 'foo bar ';
- $dom = new DOMDocument();
- $dom->loadXML($xml);
-
- $expected = array(
- 'a' => array(
- 'b' => 'foo',
- ),
- 'c' => 'bar',
- );
-
- $actual = PHPUnit_Util_XML::xmlToVariable($dom->documentElement);
-
- $this->assertSame($expected, $actual);
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/AbstractTest.php b/vendor/phpunit/phpunit/tests/_files/AbstractTest.php
deleted file mode 100644
index 556e7dbc..00000000
--- a/vendor/phpunit/phpunit/tests/_files/AbstractTest.php
+++ /dev/null
@@ -1,7 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * An author.
- *
- * @since Class available since Release 3.6.0
- */
-class Author
-{
- // the order of properties is important for testing the cycle!
- public $books = array();
-
- private $name = '';
-
- public function __construct($name)
- {
- $this->name = $name;
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/BankAccount.php b/vendor/phpunit/phpunit/tests/_files/BankAccount.php
deleted file mode 100644
index 30596a45..00000000
--- a/vendor/phpunit/phpunit/tests/_files/BankAccount.php
+++ /dev/null
@@ -1,82 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-class BankAccountException extends RuntimeException
-{
-}
-
-/**
- * A bank account.
- *
- * @since Class available since Release 2.3.0
- */
-class BankAccount
-{
- /**
- * The bank account's balance.
- *
- * @var float
- */
- protected $balance = 0;
-
- /**
- * Returns the bank account's balance.
- *
- * @return float
- */
- public function getBalance()
- {
- return $this->balance;
- }
-
- /**
- * Sets the bank account's balance.
- *
- * @param float $balance
- *
- * @throws BankAccountException
- */
- protected function setBalance($balance)
- {
- if ($balance >= 0) {
- $this->balance = $balance;
- } else {
- throw new BankAccountException;
- }
- }
-
- /**
- * Deposits an amount of money to the bank account.
- *
- * @param float $balance
- *
- * @throws BankAccountException
- */
- public function depositMoney($balance)
- {
- $this->setBalance($this->getBalance() + $balance);
-
- return $this->getBalance();
- }
-
- /**
- * Withdraws an amount of money from the bank account.
- *
- * @param float $balance
- *
- * @throws BankAccountException
- */
- public function withdrawMoney($balance)
- {
- $this->setBalance($this->getBalance() - $balance);
-
- return $this->getBalance();
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/BankAccountTest.php b/vendor/phpunit/phpunit/tests/_files/BankAccountTest.php
deleted file mode 100644
index b8e7061e..00000000
--- a/vendor/phpunit/phpunit/tests/_files/BankAccountTest.php
+++ /dev/null
@@ -1,87 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Tests for the BankAccount class.
- *
- * @since Class available since Release 2.3.0
- */
-class BankAccountTest extends PHPUnit_Framework_TestCase
-{
- protected $ba;
-
- protected function setUp()
- {
- $this->ba = new BankAccount;
- }
-
- /**
- * @covers BankAccount::getBalance
- * @group balanceIsInitiallyZero
- * @group specification
- */
- public function testBalanceIsInitiallyZero()
- {
- $this->assertEquals(0, $this->ba->getBalance());
- }
-
- /**
- * @covers BankAccount::withdrawMoney
- * @group balanceCannotBecomeNegative
- * @group specification
- */
- public function testBalanceCannotBecomeNegative()
- {
- try {
- $this->ba->withdrawMoney(1);
- } catch (BankAccountException $e) {
- $this->assertEquals(0, $this->ba->getBalance());
-
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers BankAccount::depositMoney
- * @group balanceCannotBecomeNegative
- * @group specification
- */
- public function testBalanceCannotBecomeNegative2()
- {
- try {
- $this->ba->depositMoney(-1);
- } catch (BankAccountException $e) {
- $this->assertEquals(0, $this->ba->getBalance());
-
- return;
- }
-
- $this->fail();
- }
-
- /*
- * @covers BankAccount::getBalance
- * @covers BankAccount::depositMoney
- * @covers BankAccount::withdrawMoney
- * @group balanceCannotBecomeNegative
- */
- /*
- public function testDepositingAndWithdrawingMoneyWorks()
- {
- $this->assertEquals(0, $this->ba->getBalance());
- $this->ba->depositMoney(1);
- $this->assertEquals(1, $this->ba->getBalance());
- $this->ba->withdrawMoney(1);
- $this->assertEquals(0, $this->ba->getBalance());
- }
- */
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/BankAccountTest.test.php b/vendor/phpunit/phpunit/tests/_files/BankAccountTest.test.php
deleted file mode 100644
index 371cc771..00000000
--- a/vendor/phpunit/phpunit/tests/_files/BankAccountTest.test.php
+++ /dev/null
@@ -1,87 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Tests for the BankAccount class.
- *
- * @since Class available since Release 2.3.0
- */
-class BankAccountWithCustomExtensionTest extends PHPUnit_Framework_TestCase
-{
- protected $ba;
-
- protected function setUp()
- {
- $this->ba = new BankAccount;
- }
-
- /**
- * @covers BankAccount::getBalance
- * @group balanceIsInitiallyZero
- * @group specification
- */
- public function testBalanceIsInitiallyZero()
- {
- $this->assertEquals(0, $this->ba->getBalance());
- }
-
- /**
- * @covers BankAccount::withdrawMoney
- * @group balanceCannotBecomeNegative
- * @group specification
- */
- public function testBalanceCannotBecomeNegative()
- {
- try {
- $this->ba->withdrawMoney(1);
- } catch (BankAccountException $e) {
- $this->assertEquals(0, $this->ba->getBalance());
-
- return;
- }
-
- $this->fail();
- }
-
- /**
- * @covers BankAccount::depositMoney
- * @group balanceCannotBecomeNegative
- * @group specification
- */
- public function testBalanceCannotBecomeNegative2()
- {
- try {
- $this->ba->depositMoney(-1);
- } catch (BankAccountException $e) {
- $this->assertEquals(0, $this->ba->getBalance());
-
- return;
- }
-
- $this->fail();
- }
-
- /*
- * @covers BankAccount::getBalance
- * @covers BankAccount::depositMoney
- * @covers BankAccount::withdrawMoney
- * @group balanceCannotBecomeNegative
- */
- /*
- public function testDepositingAndWithdrawingMoneyWorks()
- {
- $this->assertEquals(0, $this->ba->getBalance());
- $this->ba->depositMoney(1);
- $this->assertEquals(1, $this->ba->getBalance());
- $this->ba->withdrawMoney(1);
- $this->assertEquals(0, $this->ba->getBalance());
- }
- */
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/BaseTestListenerSample.php b/vendor/phpunit/phpunit/tests/_files/BaseTestListenerSample.php
deleted file mode 100644
index 7753b280..00000000
--- a/vendor/phpunit/phpunit/tests/_files/BaseTestListenerSample.php
+++ /dev/null
@@ -1,11 +0,0 @@
-endCount++;
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/BeforeAndAfterTest.php b/vendor/phpunit/phpunit/tests/_files/BeforeAndAfterTest.php
deleted file mode 100644
index 0b52526a..00000000
--- a/vendor/phpunit/phpunit/tests/_files/BeforeAndAfterTest.php
+++ /dev/null
@@ -1,35 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * A book.
- *
- * @since Class available since Release 3.6.0
- */
-class Book
-{
- // the order of properties is important for testing the cycle!
- public $author = null;
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/Calculator.php b/vendor/phpunit/phpunit/tests/_files/Calculator.php
deleted file mode 100644
index e269bd6c..00000000
--- a/vendor/phpunit/phpunit/tests/_files/Calculator.php
+++ /dev/null
@@ -1,14 +0,0 @@
-assertTrue(true);
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/ClassWithNonPublicAttributes.php b/vendor/phpunit/phpunit/tests/_files/ClassWithNonPublicAttributes.php
deleted file mode 100644
index abc8ff66..00000000
--- a/vendor/phpunit/phpunit/tests/_files/ClassWithNonPublicAttributes.php
+++ /dev/null
@@ -1,29 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * A class with a __toString() method.
- *
- * @since Class available since Release 3.6.0
- */
-class ClassWithToString
-{
- public function __toString()
- {
- return 'string representation';
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/ConcreteTest.my.php b/vendor/phpunit/phpunit/tests/_files/ConcreteTest.my.php
deleted file mode 100644
index fe01ceed..00000000
--- a/vendor/phpunit/phpunit/tests/_files/ConcreteTest.my.php
+++ /dev/null
@@ -1,7 +0,0 @@
-
- */
- public function testSomething()
- {
- $o = new CoveredClass;
- $o->publicMethod();
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/CoverageClassTest.php b/vendor/phpunit/phpunit/tests/_files/CoverageClassTest.php
deleted file mode 100644
index 7f569ae6..00000000
--- a/vendor/phpunit/phpunit/tests/_files/CoverageClassTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-publicMethod();
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/CoverageFunctionParenthesesTest.php b/vendor/phpunit/phpunit/tests/_files/CoverageFunctionParenthesesTest.php
deleted file mode 100644
index 33b5fe3d..00000000
--- a/vendor/phpunit/phpunit/tests/_files/CoverageFunctionParenthesesTest.php
+++ /dev/null
@@ -1,11 +0,0 @@
-publicMethod();
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/CoverageMethodParenthesesTest.php b/vendor/phpunit/phpunit/tests/_files/CoverageMethodParenthesesTest.php
deleted file mode 100644
index 42230045..00000000
--- a/vendor/phpunit/phpunit/tests/_files/CoverageMethodParenthesesTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-publicMethod();
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/CoverageMethodParenthesesWhitespaceTest.php b/vendor/phpunit/phpunit/tests/_files/CoverageMethodParenthesesWhitespaceTest.php
deleted file mode 100644
index d1be1c6c..00000000
--- a/vendor/phpunit/phpunit/tests/_files/CoverageMethodParenthesesWhitespaceTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-publicMethod();
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/CoverageMethodTest.php b/vendor/phpunit/phpunit/tests/_files/CoverageMethodTest.php
deleted file mode 100644
index 167b3db4..00000000
--- a/vendor/phpunit/phpunit/tests/_files/CoverageMethodTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-publicMethod();
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/CoverageNamespacedFunctionTest.php b/vendor/phpunit/phpunit/tests/_files/CoverageNamespacedFunctionTest.php
deleted file mode 100644
index 9fc056fa..00000000
--- a/vendor/phpunit/phpunit/tests/_files/CoverageNamespacedFunctionTest.php
+++ /dev/null
@@ -1,11 +0,0 @@
-publicMethod();
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/CoverageNotPrivateTest.php b/vendor/phpunit/phpunit/tests/_files/CoverageNotPrivateTest.php
deleted file mode 100644
index 12b56e80..00000000
--- a/vendor/phpunit/phpunit/tests/_files/CoverageNotPrivateTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
- */
- public function testSomething()
- {
- $o = new CoveredClass;
- $o->publicMethod();
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/CoverageNotProtectedTest.php b/vendor/phpunit/phpunit/tests/_files/CoverageNotProtectedTest.php
deleted file mode 100644
index c69d261d..00000000
--- a/vendor/phpunit/phpunit/tests/_files/CoverageNotProtectedTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
- */
- public function testSomething()
- {
- $o = new CoveredClass;
- $o->publicMethod();
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/CoverageNotPublicTest.php b/vendor/phpunit/phpunit/tests/_files/CoverageNotPublicTest.php
deleted file mode 100644
index aebfe4bd..00000000
--- a/vendor/phpunit/phpunit/tests/_files/CoverageNotPublicTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
- */
- public function testSomething()
- {
- $o = new CoveredClass;
- $o->publicMethod();
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/CoverageNothingTest.php b/vendor/phpunit/phpunit/tests/_files/CoverageNothingTest.php
deleted file mode 100644
index 5d5680d9..00000000
--- a/vendor/phpunit/phpunit/tests/_files/CoverageNothingTest.php
+++ /dev/null
@@ -1,13 +0,0 @@
-publicMethod();
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/CoveragePrivateTest.php b/vendor/phpunit/phpunit/tests/_files/CoveragePrivateTest.php
deleted file mode 100644
index f09560d3..00000000
--- a/vendor/phpunit/phpunit/tests/_files/CoveragePrivateTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
- */
- public function testSomething()
- {
- $o = new CoveredClass;
- $o->publicMethod();
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/CoverageProtectedTest.php b/vendor/phpunit/phpunit/tests/_files/CoverageProtectedTest.php
deleted file mode 100644
index 9b3acbf6..00000000
--- a/vendor/phpunit/phpunit/tests/_files/CoverageProtectedTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
- */
- public function testSomething()
- {
- $o = new CoveredClass;
- $o->publicMethod();
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/CoveragePublicTest.php b/vendor/phpunit/phpunit/tests/_files/CoveragePublicTest.php
deleted file mode 100644
index 480a522b..00000000
--- a/vendor/phpunit/phpunit/tests/_files/CoveragePublicTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
- */
- public function testSomething()
- {
- $o = new CoveredClass;
- $o->publicMethod();
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/CoverageTwoDefaultClassAnnotations.php b/vendor/phpunit/phpunit/tests/_files/CoverageTwoDefaultClassAnnotations.php
deleted file mode 100644
index 1011769f..00000000
--- a/vendor/phpunit/phpunit/tests/_files/CoverageTwoDefaultClassAnnotations.php
+++ /dev/null
@@ -1,17 +0,0 @@
-
- */
- public function testSomething()
- {
- $o = new Foo\CoveredClass;
- $o->publicMethod();
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/CoveredClass.php b/vendor/phpunit/phpunit/tests/_files/CoveredClass.php
deleted file mode 100644
index f382ce99..00000000
--- a/vendor/phpunit/phpunit/tests/_files/CoveredClass.php
+++ /dev/null
@@ -1,36 +0,0 @@
-privateMethod();
- }
-
- public function publicMethod()
- {
- $this->protectedMethod();
- }
-}
-
-class CoveredClass extends CoveredParentClass
-{
- private function privateMethod()
- {
- }
-
- protected function protectedMethod()
- {
- parent::protectedMethod();
- $this->privateMethod();
- }
-
- public function publicMethod()
- {
- parent::publicMethod();
- $this->protectedMethod();
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/CoveredFunction.php b/vendor/phpunit/phpunit/tests/_files/CoveredFunction.php
deleted file mode 100644
index 9989eb02..00000000
--- a/vendor/phpunit/phpunit/tests/_files/CoveredFunction.php
+++ /dev/null
@@ -1,4 +0,0 @@
-assertTrue(true);
- }
-
- public static function provider()
- {
- $obj2 = new \stdClass();
- $obj2->foo = 'bar';
-
- $obj3 = (object) array(1,2,"Test\r\n",4,5,6,7,8);
-
- $obj = new \stdClass();
- //@codingStandardsIgnoreStart
- $obj->null = null;
- //@codingStandardsIgnoreEnd
- $obj->boolean = true;
- $obj->integer = 1;
- $obj->double = 1.2;
- $obj->string = '1';
- $obj->text = "this\nis\na\nvery\nvery\nvery\nvery\nvery\nvery\rlong\n\rtext";
- $obj->object = $obj2;
- $obj->objectagain = $obj2;
- $obj->array = array('foo' => 'bar');
- $obj->self = $obj;
-
- $storage = new \SplObjectStorage();
- $storage->attach($obj2);
- $storage->foo = $obj2;
-
- return array(
- array(null, true, 1, 1.0),
- array(1.2, fopen('php://memory', 'r'), '1'),
- array(array(array(1,2,3), array(3,4,5))),
- // \n\r and \r is converted to \n
- array("this\nis\na\nvery\nvery\nvery\nvery\nvery\nvery\rlong\n\rtext"),
- array(new \stdClass(), $obj, array(), $storage, $obj3),
- array(chr(0) . chr(1) . chr(2) . chr(3) . chr(4) . chr(5), implode('', array_map('chr', range(0x0e, 0x1f)))),
- array(chr(0x00) . chr(0x09))
- );
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/DataProviderFilterTest.php b/vendor/phpunit/phpunit/tests/_files/DataProviderFilterTest.php
deleted file mode 100644
index a872bc99..00000000
--- a/vendor/phpunit/phpunit/tests/_files/DataProviderFilterTest.php
+++ /dev/null
@@ -1,39 +0,0 @@
-assertTrue($truth);
- }
-
- public static function truthProvider()
- {
- return array(
- array(true),
- array(true),
- array(true),
- array(true)
- );
- }
-
- /**
- * @dataProvider falseProvider
- */
- public function testFalse($false)
- {
- $this->assertFalse($false);
- }
-
- public static function falseProvider()
- {
- return array(
- 'false test' => array(false),
- 'false test 2' => array(false),
- 'other false test' => array(false),
- 'other false test2'=> array(false)
- );
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/DataProviderIncompleteTest.php b/vendor/phpunit/phpunit/tests/_files/DataProviderIncompleteTest.php
deleted file mode 100644
index e0efb5bc..00000000
--- a/vendor/phpunit/phpunit/tests/_files/DataProviderIncompleteTest.php
+++ /dev/null
@@ -1,37 +0,0 @@
-assertTrue(true);
- }
-
- /**
- * @dataProvider providerMethod
- */
- public function testAdd($a, $b, $c)
- {
- $this->assertEquals($c, $a + $b);
- }
-
- public function incompleteTestProviderMethod()
- {
- $this->markTestIncomplete('incomplete');
-
- return array(
- array(0, 0, 0),
- array(0, 1, 1),
- );
- }
-
- public static function providerMethod()
- {
- return array(
- array(0, 0, 0),
- array(0, 1, 1),
- );
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/DataProviderSkippedTest.php b/vendor/phpunit/phpunit/tests/_files/DataProviderSkippedTest.php
deleted file mode 100644
index ec67ce55..00000000
--- a/vendor/phpunit/phpunit/tests/_files/DataProviderSkippedTest.php
+++ /dev/null
@@ -1,37 +0,0 @@
-assertTrue(true);
- }
-
- /**
- * @dataProvider providerMethod
- */
- public function testAdd($a, $b, $c)
- {
- $this->assertEquals($c, $a + $b);
- }
-
- public function skippedTestProviderMethod()
- {
- $this->markTestSkipped('skipped');
-
- return array(
- array(0, 0, 0),
- array(0, 1, 1),
- );
- }
-
- public static function providerMethod()
- {
- return array(
- array(0, 0, 0),
- array(0, 1, 1),
- );
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/DataProviderTest.php b/vendor/phpunit/phpunit/tests/_files/DataProviderTest.php
deleted file mode 100644
index d940a059..00000000
--- a/vendor/phpunit/phpunit/tests/_files/DataProviderTest.php
+++ /dev/null
@@ -1,21 +0,0 @@
-assertEquals($c, $a + $b);
- }
-
- public static function providerMethod()
- {
- return array(
- array(0, 0, 0),
- array(0, 1, 1),
- array(1, 1, 3),
- array(1, 0, 1)
- );
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/DependencyFailureTest.php b/vendor/phpunit/phpunit/tests/_files/DependencyFailureTest.php
deleted file mode 100644
index d83aecd8..00000000
--- a/vendor/phpunit/phpunit/tests/_files/DependencyFailureTest.php
+++ /dev/null
@@ -1,22 +0,0 @@
-fail();
- }
-
- /**
- * @depends testOne
- */
- public function testTwo()
- {
- }
-
- /**
- * @depends testTwo
- */
- public function testThree()
- {
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/DependencySuccessTest.php b/vendor/phpunit/phpunit/tests/_files/DependencySuccessTest.php
deleted file mode 100644
index 0e4b5dde..00000000
--- a/vendor/phpunit/phpunit/tests/_files/DependencySuccessTest.php
+++ /dev/null
@@ -1,21 +0,0 @@
-addTestSuite('DependencySuccessTest');
- $suite->addTestSuite('DependencyFailureTest');
-
- return $suite;
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/DoubleTestCase.php b/vendor/phpunit/phpunit/tests/_files/DoubleTestCase.php
deleted file mode 100644
index b1f00a8f..00000000
--- a/vendor/phpunit/phpunit/tests/_files/DoubleTestCase.php
+++ /dev/null
@@ -1,25 +0,0 @@
-testCase = $testCase;
- }
-
- public function count()
- {
- return 2;
- }
-
- public function run(PHPUnit_Framework_TestResult $result = null)
- {
- $result->startTest($this);
-
- $this->testCase->runBare();
- $this->testCase->runBare();
-
- $result->endTest($this, 0);
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/DummyException.php b/vendor/phpunit/phpunit/tests/_files/DummyException.php
deleted file mode 100644
index 29a69b99..00000000
--- a/vendor/phpunit/phpunit/tests/_files/DummyException.php
+++ /dev/null
@@ -1,5 +0,0 @@
-setUp = true;
- }
-
- protected function assertPreConditions()
- {
- $this->assertPreConditions = true;
- }
-
- public function testSomething()
- {
- $this->testSomething = true;
- }
-
- protected function assertPostConditions()
- {
- $this->assertPostConditions = true;
- throw new Exception;
- }
-
- protected function tearDown()
- {
- $this->tearDown = true;
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/ExceptionInAssertPreConditionsTest.php b/vendor/phpunit/phpunit/tests/_files/ExceptionInAssertPreConditionsTest.php
deleted file mode 100644
index a375d050..00000000
--- a/vendor/phpunit/phpunit/tests/_files/ExceptionInAssertPreConditionsTest.php
+++ /dev/null
@@ -1,35 +0,0 @@
-setUp = true;
- }
-
- protected function assertPreConditions()
- {
- $this->assertPreConditions = true;
- throw new Exception;
- }
-
- public function testSomething()
- {
- $this->testSomething = true;
- }
-
- protected function assertPostConditions()
- {
- $this->assertPostConditions = true;
- }
-
- protected function tearDown()
- {
- $this->tearDown = true;
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/ExceptionInSetUpTest.php b/vendor/phpunit/phpunit/tests/_files/ExceptionInSetUpTest.php
deleted file mode 100644
index 193b9a82..00000000
--- a/vendor/phpunit/phpunit/tests/_files/ExceptionInSetUpTest.php
+++ /dev/null
@@ -1,35 +0,0 @@
-setUp = true;
- throw new Exception;
- }
-
- protected function assertPreConditions()
- {
- $this->assertPreConditions = true;
- }
-
- public function testSomething()
- {
- $this->testSomething = true;
- }
-
- protected function assertPostConditions()
- {
- $this->assertPostConditions = true;
- }
-
- protected function tearDown()
- {
- $this->tearDown = true;
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/ExceptionInTearDownTest.php b/vendor/phpunit/phpunit/tests/_files/ExceptionInTearDownTest.php
deleted file mode 100644
index 5ee4a9d1..00000000
--- a/vendor/phpunit/phpunit/tests/_files/ExceptionInTearDownTest.php
+++ /dev/null
@@ -1,35 +0,0 @@
-setUp = true;
- }
-
- protected function assertPreConditions()
- {
- $this->assertPreConditions = true;
- }
-
- public function testSomething()
- {
- $this->testSomething = true;
- }
-
- protected function assertPostConditions()
- {
- $this->assertPostConditions = true;
- }
-
- protected function tearDown()
- {
- $this->tearDown = true;
- throw new Exception;
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/ExceptionInTest.php b/vendor/phpunit/phpunit/tests/_files/ExceptionInTest.php
deleted file mode 100644
index 32c7e24a..00000000
--- a/vendor/phpunit/phpunit/tests/_files/ExceptionInTest.php
+++ /dev/null
@@ -1,35 +0,0 @@
-setUp = true;
- }
-
- protected function assertPreConditions()
- {
- $this->assertPreConditions = true;
- }
-
- public function testSomething()
- {
- $this->testSomething = true;
- throw new Exception;
- }
-
- protected function assertPostConditions()
- {
- $this->assertPostConditions = true;
- }
-
- protected function tearDown()
- {
- $this->tearDown = true;
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/ExceptionNamespaceTest.php b/vendor/phpunit/phpunit/tests/_files/ExceptionNamespaceTest.php
deleted file mode 100644
index 22f3760b..00000000
--- a/vendor/phpunit/phpunit/tests/_files/ExceptionNamespaceTest.php
+++ /dev/null
@@ -1,38 +0,0 @@
-assertEquals(array(1), array(2), 'message');
- } catch (PHPUnit_Framework_ExpectationFailedException $e) {
- $message = $e->getMessage() . $e->getComparisonFailure()->getDiff();
- throw new PHPUnit_Framework_Exception("Child exception\n$message", 101, $e);
- }
- }
-
- public function testNestedExceptions()
- {
- $exceptionThree = new Exception('Three');
- $exceptionTwo = new InvalidArgumentException('Two', 0, $exceptionThree);
- $exceptionOne = new Exception('One', 0, $exceptionTwo);
- throw $exceptionOne;
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/ExceptionTest.php b/vendor/phpunit/phpunit/tests/_files/ExceptionTest.php
deleted file mode 100644
index 02138052..00000000
--- a/vendor/phpunit/phpunit/tests/_files/ExceptionTest.php
+++ /dev/null
@@ -1,139 +0,0 @@
-fail();
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/FailureTest.php b/vendor/phpunit/phpunit/tests/_files/FailureTest.php
deleted file mode 100644
index e9df755a..00000000
--- a/vendor/phpunit/phpunit/tests/_files/FailureTest.php
+++ /dev/null
@@ -1,75 +0,0 @@
-assertEquals(array(1), array(2), 'message');
- }
-
- public function testAssertIntegerEqualsInteger()
- {
- $this->assertEquals(1, 2, 'message');
- }
-
- public function testAssertObjectEqualsObject()
- {
- $a = new StdClass;
- $a->foo = 'bar';
-
- $b = new StdClass;
- $b->bar = 'foo';
-
- $this->assertEquals($a, $b, 'message');
- }
-
- public function testAssertNullEqualsString()
- {
- $this->assertEquals(null, 'bar', 'message');
- }
-
- public function testAssertStringEqualsString()
- {
- $this->assertEquals('foo', 'bar', 'message');
- }
-
- public function testAssertTextEqualsText()
- {
- $this->assertEquals("foo\nbar\n", "foo\nbaz\n", 'message');
- }
-
- public function testAssertStringMatchesFormat()
- {
- $this->assertStringMatchesFormat('*%s*', '**', 'message');
- }
-
- public function testAssertNumericEqualsNumeric()
- {
- $this->assertEquals(1, 2, 'message');
- }
-
- public function testAssertTextSameText()
- {
- $this->assertSame('foo', 'bar', 'message');
- }
-
- public function testAssertObjectSameObject()
- {
- $this->assertSame(new StdClass, new StdClass, 'message');
- }
-
- public function testAssertObjectSameNull()
- {
- $this->assertSame(new StdClass, null, 'message');
- }
-
- public function testAssertFloatSameFloat()
- {
- $this->assertSame(1.0, 1.5, 'message');
- }
-
- // Note that due to the implementation of this assertion it counts as 2 asserts
- public function testAssertStringMatchesFormatFile()
- {
- $this->assertStringMatchesFormatFile(__DIR__ . '/expectedFileFormat.txt', '...BAR...');
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/FatalTest.php b/vendor/phpunit/phpunit/tests/_files/FatalTest.php
deleted file mode 100644
index bf005f99..00000000
--- a/vendor/phpunit/phpunit/tests/_files/FatalTest.php
+++ /dev/null
@@ -1,13 +0,0 @@
-markTestIncomplete('Test incomplete');
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/Inheritance/InheritanceA.php b/vendor/phpunit/phpunit/tests/_files/Inheritance/InheritanceA.php
deleted file mode 100644
index e189b7d2..00000000
--- a/vendor/phpunit/phpunit/tests/_files/Inheritance/InheritanceA.php
+++ /dev/null
@@ -1,7 +0,0 @@
-assertEquals('application/x-test', ini_get('default_mimetype'));
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/IsolationTest.php b/vendor/phpunit/phpunit/tests/_files/IsolationTest.php
deleted file mode 100644
index df95c916..00000000
--- a/vendor/phpunit/phpunit/tests/_files/IsolationTest.php
+++ /dev/null
@@ -1,13 +0,0 @@
-assertFalse($this->isInIsolation());
- }
-
- public function testIsInIsolationReturnsTrue()
- {
- $this->assertTrue($this->isInIsolation());
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/JsonData/arrayObject.json b/vendor/phpunit/phpunit/tests/_files/JsonData/arrayObject.json
deleted file mode 100644
index 8a74fc58..00000000
--- a/vendor/phpunit/phpunit/tests/_files/JsonData/arrayObject.json
+++ /dev/null
@@ -1 +0,0 @@
-["Mascott", "Tux", "OS", "Linux"]
diff --git a/vendor/phpunit/phpunit/tests/_files/JsonData/simpleObject.json b/vendor/phpunit/phpunit/tests/_files/JsonData/simpleObject.json
deleted file mode 100644
index 27085be2..00000000
--- a/vendor/phpunit/phpunit/tests/_files/JsonData/simpleObject.json
+++ /dev/null
@@ -1 +0,0 @@
-{"Mascott":"Tux"}
\ No newline at end of file
diff --git a/vendor/phpunit/phpunit/tests/_files/MockRunner.php b/vendor/phpunit/phpunit/tests/_files/MockRunner.php
deleted file mode 100644
index b3bc0cc4..00000000
--- a/vendor/phpunit/phpunit/tests/_files/MockRunner.php
+++ /dev/null
@@ -1,7 +0,0 @@
-assertEquals('foo', $a);
- $this->assertEquals('bar', $b);
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageClassExtendedTest.php b/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageClassExtendedTest.php
deleted file mode 100644
index d0954cba..00000000
--- a/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageClassExtendedTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
- */
- public function testSomething()
- {
- $o = new Foo\CoveredClass;
- $o->publicMethod();
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageClassTest.php b/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageClassTest.php
deleted file mode 100644
index 63912c08..00000000
--- a/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageClassTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-publicMethod();
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageCoversClassPublicTest.php b/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageCoversClassPublicTest.php
deleted file mode 100644
index 45f583b7..00000000
--- a/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageCoversClassPublicTest.php
+++ /dev/null
@@ -1,15 +0,0 @@
-publicMethod();
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageCoversClassTest.php b/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageCoversClassTest.php
deleted file mode 100644
index b3367454..00000000
--- a/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageCoversClassTest.php
+++ /dev/null
@@ -1,20 +0,0 @@
-publicMethod();
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageMethodTest.php b/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageMethodTest.php
deleted file mode 100644
index 35dfb8b1..00000000
--- a/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageMethodTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-publicMethod();
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageNotPrivateTest.php b/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageNotPrivateTest.php
deleted file mode 100644
index 552c9ec5..00000000
--- a/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageNotPrivateTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
- */
- public function testSomething()
- {
- $o = new Foo\CoveredClass;
- $o->publicMethod();
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageNotProtectedTest.php b/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageNotProtectedTest.php
deleted file mode 100644
index 33fc8c72..00000000
--- a/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageNotProtectedTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
- */
- public function testSomething()
- {
- $o = new Foo\CoveredClass;
- $o->publicMethod();
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageNotPublicTest.php b/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageNotPublicTest.php
deleted file mode 100644
index ccbc5009..00000000
--- a/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageNotPublicTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
- */
- public function testSomething()
- {
- $o = new Foo\CoveredClass;
- $o->publicMethod();
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/NamespaceCoveragePrivateTest.php b/vendor/phpunit/phpunit/tests/_files/NamespaceCoveragePrivateTest.php
deleted file mode 100644
index cce7ba9d..00000000
--- a/vendor/phpunit/phpunit/tests/_files/NamespaceCoveragePrivateTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
- */
- public function testSomething()
- {
- $o = new Foo\CoveredClass;
- $o->publicMethod();
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageProtectedTest.php b/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageProtectedTest.php
deleted file mode 100644
index dbbcc1c3..00000000
--- a/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageProtectedTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
- */
- public function testSomething()
- {
- $o = new Foo\CoveredClass;
- $o->publicMethod();
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/NamespaceCoveragePublicTest.php b/vendor/phpunit/phpunit/tests/_files/NamespaceCoveragePublicTest.php
deleted file mode 100644
index bf1bff8c..00000000
--- a/vendor/phpunit/phpunit/tests/_files/NamespaceCoveragePublicTest.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
- */
- public function testSomething()
- {
- $o = new Foo\CoveredClass;
- $o->publicMethod();
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/NamespaceCoveredClass.php b/vendor/phpunit/phpunit/tests/_files/NamespaceCoveredClass.php
deleted file mode 100644
index 5bd0ddfb..00000000
--- a/vendor/phpunit/phpunit/tests/_files/NamespaceCoveredClass.php
+++ /dev/null
@@ -1,38 +0,0 @@
-privateMethod();
- }
-
- public function publicMethod()
- {
- $this->protectedMethod();
- }
-}
-
-class CoveredClass extends CoveredParentClass
-{
- private function privateMethod()
- {
- }
-
- protected function protectedMethod()
- {
- parent::protectedMethod();
- $this->privateMethod();
- }
-
- public function publicMethod()
- {
- parent::publicMethod();
- $this->protectedMethod();
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/NamespaceCoveredFunction.php b/vendor/phpunit/phpunit/tests/_files/NamespaceCoveredFunction.php
deleted file mode 100644
index afc00d7c..00000000
--- a/vendor/phpunit/phpunit/tests/_files/NamespaceCoveredFunction.php
+++ /dev/null
@@ -1,7 +0,0 @@
-
- */
- public function testThree()
- {
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/NotPublicTestCase.php b/vendor/phpunit/phpunit/tests/_files/NotPublicTestCase.php
deleted file mode 100644
index a3910100..00000000
--- a/vendor/phpunit/phpunit/tests/_files/NotPublicTestCase.php
+++ /dev/null
@@ -1,11 +0,0 @@
-expectOutputString('foo');
- print 'foo';
- }
-
- public function testExpectOutputStringFooActualBar()
- {
- $this->expectOutputString('foo');
- print 'bar';
- }
-
- public function testExpectOutputRegexFooActualFoo()
- {
- $this->expectOutputRegex('/foo/');
- print 'foo';
- }
-
- public function testExpectOutputRegexFooActualBar()
- {
- $this->expectOutputRegex('/foo/');
- print 'bar';
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/OverrideTestCase.php b/vendor/phpunit/phpunit/tests/_files/OverrideTestCase.php
deleted file mode 100644
index fcc276c5..00000000
--- a/vendor/phpunit/phpunit/tests/_files/OverrideTestCase.php
+++ /dev/null
@@ -1,7 +0,0 @@
-container = array();
- }
- public function offsetSet($offset, $value)
- {
- if (is_null($offset)) {
- $this->container[] = $value;
- } else {
- $this->container[$offset] = $value;
- }
- }
- public function offsetExists($offset)
- {
- return isset($this->container[$offset]);
- }
- public function offsetUnset($offset)
- {
- unset($this->container[$offset]);
- }
- public function offsetGet($offset)
- {
- return isset($this->container[$offset]) ? $this->container[$offset] : null;
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/SampleClass.php b/vendor/phpunit/phpunit/tests/_files/SampleClass.php
deleted file mode 100644
index 06c51c51..00000000
--- a/vendor/phpunit/phpunit/tests/_files/SampleClass.php
+++ /dev/null
@@ -1,14 +0,0 @@
-a = $a;
- $this->b = $b;
- $this->c = $c;
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/Singleton.php b/vendor/phpunit/phpunit/tests/_files/Singleton.php
deleted file mode 100644
index bfdf3bb0..00000000
--- a/vendor/phpunit/phpunit/tests/_files/Singleton.php
+++ /dev/null
@@ -1,22 +0,0 @@
-assertEquals(0, count($stack));
-
- array_push($stack, 'foo');
- $this->assertEquals('foo', $stack[count($stack)-1]);
- $this->assertEquals(1, count($stack));
-
- return $stack;
- }
-
- /**
- * @depends testPush
- */
- public function testPop(array $stack)
- {
- $this->assertEquals('foo', array_pop($stack));
- $this->assertEquals(0, count($stack));
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/StatusTest.php b/vendor/phpunit/phpunit/tests/_files/StatusTest.php
deleted file mode 100644
index a267bb72..00000000
--- a/vendor/phpunit/phpunit/tests/_files/StatusTest.php
+++ /dev/null
@@ -1,32 +0,0 @@
-assertTrue(true);
- }
-
- public function testFailure()
- {
- $this->assertTrue(false);
- }
-
- public function testError()
- {
- throw new \Exception;
- }
-
- public function testIncomplete()
- {
- $this->markTestIncomplete();
- }
-
- public function testSkipped()
- {
- $this->markTestSkipped();
- }
-
- public function testRisky()
- {
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/Struct.php b/vendor/phpunit/phpunit/tests/_files/Struct.php
deleted file mode 100644
index 12977a99..00000000
--- a/vendor/phpunit/phpunit/tests/_files/Struct.php
+++ /dev/null
@@ -1,10 +0,0 @@
-var = $var;
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/Success.php b/vendor/phpunit/phpunit/tests/_files/Success.php
deleted file mode 100644
index 6d3dd618..00000000
--- a/vendor/phpunit/phpunit/tests/_files/Success.php
+++ /dev/null
@@ -1,7 +0,0 @@
-assertTrue(true);
- }
-
- public function testTwo()
- {
- print __METHOD__ . "\n";
- $this->assertTrue(false);
- }
-
- protected function assertPostConditions()
- {
- print __METHOD__ . "\n";
- }
-
- protected function tearDown()
- {
- print __METHOD__ . "\n";
- }
-
- public static function tearDownAfterClass()
- {
- print __METHOD__ . "\n";
- }
-
- protected function onNotSuccessfulTest(Exception $e)
- {
- print __METHOD__ . "\n";
- throw $e;
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/TestIncomplete.php b/vendor/phpunit/phpunit/tests/_files/TestIncomplete.php
deleted file mode 100644
index 743a761c..00000000
--- a/vendor/phpunit/phpunit/tests/_files/TestIncomplete.php
+++ /dev/null
@@ -1,8 +0,0 @@
-markTestIncomplete('Incomplete test');
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/TestIterator.php b/vendor/phpunit/phpunit/tests/_files/TestIterator.php
deleted file mode 100644
index 01135e3b..00000000
--- a/vendor/phpunit/phpunit/tests/_files/TestIterator.php
+++ /dev/null
@@ -1,36 +0,0 @@
-array = $array;
- }
-
- public function rewind()
- {
- $this->position = 0;
- }
-
- public function valid()
- {
- return $this->position < count($this->array);
- }
-
- public function key()
- {
- return $this->position;
- }
-
- public function current()
- {
- return $this->array[$this->position];
- }
-
- public function next()
- {
- $this->position++;
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/TestIterator2.php b/vendor/phpunit/phpunit/tests/_files/TestIterator2.php
deleted file mode 100644
index 3b47fa36..00000000
--- a/vendor/phpunit/phpunit/tests/_files/TestIterator2.php
+++ /dev/null
@@ -1,35 +0,0 @@
-data = $array;
- }
-
- public function current()
- {
- return current($this->data);
- }
-
- public function next()
- {
- next($this->data);
- }
-
- public function key()
- {
- return key($this->data);
- }
-
- public function valid()
- {
- return key($this->data) !== null;
- }
-
- public function rewind()
- {
- reset($this->data);
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/TestSkipped.php b/vendor/phpunit/phpunit/tests/_files/TestSkipped.php
deleted file mode 100644
index c2d68b24..00000000
--- a/vendor/phpunit/phpunit/tests/_files/TestSkipped.php
+++ /dev/null
@@ -1,8 +0,0 @@
-markTestSkipped('Skipped test');
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/TestTestError.php b/vendor/phpunit/phpunit/tests/_files/TestTestError.php
deleted file mode 100644
index 6f61b8ed..00000000
--- a/vendor/phpunit/phpunit/tests/_files/TestTestError.php
+++ /dev/null
@@ -1,8 +0,0 @@
-assertEquals($c, $a + $b);
- }
-
- public static function providerMethod()
- {
- return array(
- array(0, 0, 0),
- array(0, 1, 1),
- array(1, 1, 3),
- array(1, 0, 1)
- );
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/ThrowExceptionTestCase.php b/vendor/phpunit/phpunit/tests/_files/ThrowExceptionTestCase.php
deleted file mode 100644
index 1d2a769a..00000000
--- a/vendor/phpunit/phpunit/tests/_files/ThrowExceptionTestCase.php
+++ /dev/null
@@ -1,8 +0,0 @@
-wasRun = true;
- }
-}
diff --git a/vendor/phpunit/phpunit/tests/_files/bar.xml b/vendor/phpunit/phpunit/tests/_files/bar.xml
deleted file mode 100644
index 5d3fa282..00000000
--- a/vendor/phpunit/phpunit/tests/_files/bar.xml
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/vendor/phpunit/phpunit/tests/_files/configuration.colors.empty.xml b/vendor/phpunit/phpunit/tests/_files/configuration.colors.empty.xml
deleted file mode 100644
index 5f9e0556..00000000
--- a/vendor/phpunit/phpunit/tests/_files/configuration.colors.empty.xml
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/vendor/phpunit/phpunit/tests/_files/configuration.colors.false.xml b/vendor/phpunit/phpunit/tests/_files/configuration.colors.false.xml
deleted file mode 100644
index dcd4aa47..00000000
--- a/vendor/phpunit/phpunit/tests/_files/configuration.colors.false.xml
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/vendor/phpunit/phpunit/tests/_files/configuration.colors.invalid.xml b/vendor/phpunit/phpunit/tests/_files/configuration.colors.invalid.xml
deleted file mode 100644
index c5bd6990..00000000
--- a/vendor/phpunit/phpunit/tests/_files/configuration.colors.invalid.xml
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/vendor/phpunit/phpunit/tests/_files/configuration.colors.true.xml b/vendor/phpunit/phpunit/tests/_files/configuration.colors.true.xml
deleted file mode 100644
index 1efe4132..00000000
--- a/vendor/phpunit/phpunit/tests/_files/configuration.colors.true.xml
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/vendor/phpunit/phpunit/tests/_files/configuration.custom-printer.xml b/vendor/phpunit/phpunit/tests/_files/configuration.custom-printer.xml
deleted file mode 100644
index 7a5a1f1d..00000000
--- a/vendor/phpunit/phpunit/tests/_files/configuration.custom-printer.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
\ No newline at end of file
diff --git a/vendor/phpunit/phpunit/tests/_files/configuration.xml b/vendor/phpunit/phpunit/tests/_files/configuration.xml
deleted file mode 100644
index 7a23dae0..00000000
--- a/vendor/phpunit/phpunit/tests/_files/configuration.xml
+++ /dev/null
@@ -1,123 +0,0 @@
-
-
-
-
-
- /path/to/files
- /path/to/MyTest.php
-
-
-
-
-
- name
-
-
- name
-
-
-
-
-
- /path/to/files
- /path/to/file
-
- /path/to/file
-
-
- /path/to/files
- /path/to/file
-
-
-
- /path/to/files
- /path/to/file
-
- /path/to/files
- /path/to/file
-
-
-
-
-
-
-
-
-
- Sebastian
-
-
- 22
- April
- 19.78
-
-
- MyTestFile.php
- MyRelativePath
-
-
-
- 42
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- .
- /path/to/lib
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/vendor/phpunit/phpunit/tests/_files/configuration_empty.xml b/vendor/phpunit/phpunit/tests/_files/configuration_empty.xml
deleted file mode 100644
index 13c8b71d..00000000
--- a/vendor/phpunit/phpunit/tests/_files/configuration_empty.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/vendor/phpunit/phpunit/tests/_files/configuration_xinclude.xml b/vendor/phpunit/phpunit/tests/_files/configuration_xinclude.xml
deleted file mode 100644
index 43076297..00000000
--- a/vendor/phpunit/phpunit/tests/_files/configuration_xinclude.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- .
- /path/to/lib
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/vendor/phpunit/phpunit/tests/_files/expectedFileFormat.txt b/vendor/phpunit/phpunit/tests/_files/expectedFileFormat.txt
deleted file mode 100644
index b7d6715e..00000000
--- a/vendor/phpunit/phpunit/tests/_files/expectedFileFormat.txt
+++ /dev/null
@@ -1 +0,0 @@
-FOO
diff --git a/vendor/phpunit/phpunit/tests/_files/foo.xml b/vendor/phpunit/phpunit/tests/_files/foo.xml
deleted file mode 100644
index f1999f80..00000000
--- a/vendor/phpunit/phpunit/tests/_files/foo.xml
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/vendor/phpunit/phpunit/tests/_files/structureAttributesAreSameButValuesAreNot.xml b/vendor/phpunit/phpunit/tests/_files/structureAttributesAreSameButValuesAreNot.xml
deleted file mode 100644
index a5d9ab33..00000000
--- a/vendor/phpunit/phpunit/tests/_files/structureAttributesAreSameButValuesAreNot.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
- Image 1 : Dette er en test caption
-
-
-
diff --git a/vendor/phpunit/phpunit/tests/_files/structureExpected.xml b/vendor/phpunit/phpunit/tests/_files/structureExpected.xml
deleted file mode 100644
index d9001059..00000000
--- a/vendor/phpunit/phpunit/tests/_files/structureExpected.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
- Image 1 : Dette er en test caption
-
-
-
diff --git a/vendor/phpunit/phpunit/tests/_files/structureIgnoreTextNodes.xml b/vendor/phpunit/phpunit/tests/_files/structureIgnoreTextNodes.xml
deleted file mode 100644
index 0771b60c..00000000
--- a/vendor/phpunit/phpunit/tests/_files/structureIgnoreTextNodes.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
- textnode
-
- textnode
-
- textnode
- Image 1 : Dette er en test caption
- textnode
-
-
-
diff --git a/vendor/phpunit/phpunit/tests/_files/structureIsSameButDataIsNot.xml b/vendor/phpunit/phpunit/tests/_files/structureIsSameButDataIsNot.xml
deleted file mode 100644
index 2ba21b98..00000000
--- a/vendor/phpunit/phpunit/tests/_files/structureIsSameButDataIsNot.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
- Image is not the same 1 : Dette er en test caption
-
-
-
diff --git a/vendor/phpunit/phpunit/tests/_files/structureWrongNumberOfAttributes.xml b/vendor/phpunit/phpunit/tests/_files/structureWrongNumberOfAttributes.xml
deleted file mode 100644
index af9b9741..00000000
--- a/vendor/phpunit/phpunit/tests/_files/structureWrongNumberOfAttributes.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
- Image 1 : Dette er en test caption
-
-
-
diff --git a/vendor/phpunit/phpunit/tests/_files/structureWrongNumberOfNodes.xml b/vendor/phpunit/phpunit/tests/_files/structureWrongNumberOfNodes.xml
deleted file mode 100644
index 9a394e23..00000000
--- a/vendor/phpunit/phpunit/tests/_files/structureWrongNumberOfNodes.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/vendor/phpunit/phpunit/tests/bootstrap.php b/vendor/phpunit/phpunit/tests/bootstrap.php
deleted file mode 100644
index cc79889b..00000000
--- a/vendor/phpunit/phpunit/tests/bootstrap.php
+++ /dev/null
@@ -1,6 +0,0 @@
-log(LogLevel::EMERGENCY, $message, $context);
- }
-
- /**
- * Action must be taken immediately.
- *
- * Example: Entire website down, database unavailable, etc. This should
- * trigger the SMS alerts and wake you up.
- *
- * @param string $message
- * @param array $context
- *
- * @return void
- */
- public function alert($message, array $context = array())
- {
- $this->log(LogLevel::ALERT, $message, $context);
- }
-
- /**
- * Critical conditions.
- *
- * Example: Application component unavailable, unexpected exception.
- *
- * @param string $message
- * @param array $context
- *
- * @return void
- */
- public function critical($message, array $context = array())
- {
- $this->log(LogLevel::CRITICAL, $message, $context);
- }
-
- /**
- * Runtime errors that do not require immediate action but should typically
- * be logged and monitored.
- *
- * @param string $message
- * @param array $context
- *
- * @return void
- */
- public function error($message, array $context = array())
- {
- $this->log(LogLevel::ERROR, $message, $context);
- }
-
- /**
- * Exceptional occurrences that are not errors.
- *
- * Example: Use of deprecated APIs, poor use of an API, undesirable things
- * that are not necessarily wrong.
- *
- * @param string $message
- * @param array $context
- *
- * @return void
- */
- public function warning($message, array $context = array())
- {
- $this->log(LogLevel::WARNING, $message, $context);
- }
-
- /**
- * Normal but significant events.
- *
- * @param string $message
- * @param array $context
- *
- * @return void
- */
- public function notice($message, array $context = array())
- {
- $this->log(LogLevel::NOTICE, $message, $context);
- }
-
- /**
- * Interesting events.
- *
- * Example: User logs in, SQL logs.
- *
- * @param string $message
- * @param array $context
- *
- * @return void
- */
- public function info($message, array $context = array())
- {
- $this->log(LogLevel::INFO, $message, $context);
- }
-
- /**
- * Detailed debug information.
- *
- * @param string $message
- * @param array $context
- *
- * @return void
- */
- public function debug($message, array $context = array())
- {
- $this->log(LogLevel::DEBUG, $message, $context);
- }
-}
diff --git a/vendor/psr/log/Psr/Log/InvalidArgumentException.php b/vendor/psr/log/Psr/Log/InvalidArgumentException.php
deleted file mode 100644
index 67f852d1..00000000
--- a/vendor/psr/log/Psr/Log/InvalidArgumentException.php
+++ /dev/null
@@ -1,7 +0,0 @@
-logger = $logger;
- }
-}
diff --git a/vendor/psr/log/Psr/Log/LoggerInterface.php b/vendor/psr/log/Psr/Log/LoggerInterface.php
deleted file mode 100644
index e695046e..00000000
--- a/vendor/psr/log/Psr/Log/LoggerInterface.php
+++ /dev/null
@@ -1,125 +0,0 @@
-log(LogLevel::EMERGENCY, $message, $context);
- }
-
- /**
- * Action must be taken immediately.
- *
- * Example: Entire website down, database unavailable, etc. This should
- * trigger the SMS alerts and wake you up.
- *
- * @param string $message
- * @param array $context
- *
- * @return void
- */
- public function alert($message, array $context = array())
- {
- $this->log(LogLevel::ALERT, $message, $context);
- }
-
- /**
- * Critical conditions.
- *
- * Example: Application component unavailable, unexpected exception.
- *
- * @param string $message
- * @param array $context
- *
- * @return void
- */
- public function critical($message, array $context = array())
- {
- $this->log(LogLevel::CRITICAL, $message, $context);
- }
-
- /**
- * Runtime errors that do not require immediate action but should typically
- * be logged and monitored.
- *
- * @param string $message
- * @param array $context
- *
- * @return void
- */
- public function error($message, array $context = array())
- {
- $this->log(LogLevel::ERROR, $message, $context);
- }
-
- /**
- * Exceptional occurrences that are not errors.
- *
- * Example: Use of deprecated APIs, poor use of an API, undesirable things
- * that are not necessarily wrong.
- *
- * @param string $message
- * @param array $context
- *
- * @return void
- */
- public function warning($message, array $context = array())
- {
- $this->log(LogLevel::WARNING, $message, $context);
- }
-
- /**
- * Normal but significant events.
- *
- * @param string $message
- * @param array $context
- *
- * @return void
- */
- public function notice($message, array $context = array())
- {
- $this->log(LogLevel::NOTICE, $message, $context);
- }
-
- /**
- * Interesting events.
- *
- * Example: User logs in, SQL logs.
- *
- * @param string $message
- * @param array $context
- *
- * @return void
- */
- public function info($message, array $context = array())
- {
- $this->log(LogLevel::INFO, $message, $context);
- }
-
- /**
- * Detailed debug information.
- *
- * @param string $message
- * @param array $context
- *
- * @return void
- */
- public function debug($message, array $context = array())
- {
- $this->log(LogLevel::DEBUG, $message, $context);
- }
-
- /**
- * Logs with an arbitrary level.
- *
- * @param mixed $level
- * @param string $message
- * @param array $context
- *
- * @return void
- *
- * @throws \Psr\Log\InvalidArgumentException
- */
- abstract public function log($level, $message, array $context = array());
-}
diff --git a/vendor/psr/log/Psr/Log/NullLogger.php b/vendor/psr/log/Psr/Log/NullLogger.php
deleted file mode 100644
index c8f7293b..00000000
--- a/vendor/psr/log/Psr/Log/NullLogger.php
+++ /dev/null
@@ -1,30 +0,0 @@
-logger) { }`
- * blocks.
- */
-class NullLogger extends AbstractLogger
-{
- /**
- * Logs with an arbitrary level.
- *
- * @param mixed $level
- * @param string $message
- * @param array $context
- *
- * @return void
- *
- * @throws \Psr\Log\InvalidArgumentException
- */
- public function log($level, $message, array $context = array())
- {
- // noop
- }
-}
diff --git a/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php b/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php
deleted file mode 100644
index 9ecb6c4b..00000000
--- a/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php
+++ /dev/null
@@ -1,146 +0,0 @@
- ".
- *
- * Example ->error('Foo') would yield "error Foo".
- *
- * @return string[]
- */
- abstract public function getLogs();
-
- public function testImplements()
- {
- $this->assertInstanceOf('Psr\Log\LoggerInterface', $this->getLogger());
- }
-
- /**
- * @dataProvider provideLevelsAndMessages
- */
- public function testLogsAtAllLevels($level, $message)
- {
- $logger = $this->getLogger();
- $logger->{$level}($message, array('user' => 'Bob'));
- $logger->log($level, $message, array('user' => 'Bob'));
-
- $expected = array(
- $level.' message of level '.$level.' with context: Bob',
- $level.' message of level '.$level.' with context: Bob',
- );
- $this->assertEquals($expected, $this->getLogs());
- }
-
- public function provideLevelsAndMessages()
- {
- return array(
- LogLevel::EMERGENCY => array(LogLevel::EMERGENCY, 'message of level emergency with context: {user}'),
- LogLevel::ALERT => array(LogLevel::ALERT, 'message of level alert with context: {user}'),
- LogLevel::CRITICAL => array(LogLevel::CRITICAL, 'message of level critical with context: {user}'),
- LogLevel::ERROR => array(LogLevel::ERROR, 'message of level error with context: {user}'),
- LogLevel::WARNING => array(LogLevel::WARNING, 'message of level warning with context: {user}'),
- LogLevel::NOTICE => array(LogLevel::NOTICE, 'message of level notice with context: {user}'),
- LogLevel::INFO => array(LogLevel::INFO, 'message of level info with context: {user}'),
- LogLevel::DEBUG => array(LogLevel::DEBUG, 'message of level debug with context: {user}'),
- );
- }
-
- /**
- * @expectedException \Psr\Log\InvalidArgumentException
- */
- public function testThrowsOnInvalidLevel()
- {
- $logger = $this->getLogger();
- $logger->log('invalid level', 'Foo');
- }
-
- public function testContextReplacement()
- {
- $logger = $this->getLogger();
- $logger->info('{Message {nothing} {user} {foo.bar} a}', array('user' => 'Bob', 'foo.bar' => 'Bar'));
-
- $expected = array('info {Message {nothing} Bob Bar a}');
- $this->assertEquals($expected, $this->getLogs());
- }
-
- public function testObjectCastToString()
- {
- if (method_exists($this, 'createPartialMock')) {
- $dummy = $this->createPartialMock('Psr\Log\Test\DummyTest', array('__toString'));
- } else {
- $dummy = $this->getMock('Psr\Log\Test\DummyTest', array('__toString'));
- }
- $dummy->expects($this->once())
- ->method('__toString')
- ->will($this->returnValue('DUMMY'));
-
- $this->getLogger()->warning($dummy);
-
- $expected = array('warning DUMMY');
- $this->assertEquals($expected, $this->getLogs());
- }
-
- public function testContextCanContainAnything()
- {
- $closed = fopen('php://memory', 'r');
- fclose($closed);
-
- $context = array(
- 'bool' => true,
- 'null' => null,
- 'string' => 'Foo',
- 'int' => 0,
- 'float' => 0.5,
- 'nested' => array('with object' => new DummyTest),
- 'object' => new \DateTime,
- 'resource' => fopen('php://memory', 'r'),
- 'closed' => $closed,
- );
-
- $this->getLogger()->warning('Crazy context data', $context);
-
- $expected = array('warning Crazy context data');
- $this->assertEquals($expected, $this->getLogs());
- }
-
- public function testContextExceptionKeyCanBeExceptionOrOtherValues()
- {
- $logger = $this->getLogger();
- $logger->warning('Random message', array('exception' => 'oops'));
- $logger->critical('Uncaught Exception!', array('exception' => new \LogicException('Fail')));
-
- $expected = array(
- 'warning Random message',
- 'critical Uncaught Exception!'
- );
- $this->assertEquals($expected, $this->getLogs());
- }
-}
-
-class DummyTest
-{
- public function __toString()
- {
- return 'DummyTest';
- }
-}
diff --git a/vendor/psr/log/Psr/Log/Test/TestLogger.php b/vendor/psr/log/Psr/Log/Test/TestLogger.php
deleted file mode 100644
index 1be32304..00000000
--- a/vendor/psr/log/Psr/Log/Test/TestLogger.php
+++ /dev/null
@@ -1,147 +0,0 @@
- $level,
- 'message' => $message,
- 'context' => $context,
- ];
-
- $this->recordsByLevel[$record['level']][] = $record;
- $this->records[] = $record;
- }
-
- public function hasRecords($level)
- {
- return isset($this->recordsByLevel[$level]);
- }
-
- public function hasRecord($record, $level)
- {
- if (is_string($record)) {
- $record = ['message' => $record];
- }
- return $this->hasRecordThatPasses(function ($rec) use ($record) {
- if ($rec['message'] !== $record['message']) {
- return false;
- }
- if (isset($record['context']) && $rec['context'] !== $record['context']) {
- return false;
- }
- return true;
- }, $level);
- }
-
- public function hasRecordThatContains($message, $level)
- {
- return $this->hasRecordThatPasses(function ($rec) use ($message) {
- return strpos($rec['message'], $message) !== false;
- }, $level);
- }
-
- public function hasRecordThatMatches($regex, $level)
- {
- return $this->hasRecordThatPasses(function ($rec) use ($regex) {
- return preg_match($regex, $rec['message']) > 0;
- }, $level);
- }
-
- public function hasRecordThatPasses(callable $predicate, $level)
- {
- if (!isset($this->recordsByLevel[$level])) {
- return false;
- }
- foreach ($this->recordsByLevel[$level] as $i => $rec) {
- if (call_user_func($predicate, $rec, $i)) {
- return true;
- }
- }
- return false;
- }
-
- public function __call($method, $args)
- {
- if (preg_match('/(.*)(Debug|Info|Notice|Warning|Error|Critical|Alert|Emergency)(.*)/', $method, $matches) > 0) {
- $genericMethod = $matches[1] . ('Records' !== $matches[3] ? 'Record' : '') . $matches[3];
- $level = strtolower($matches[2]);
- if (method_exists($this, $genericMethod)) {
- $args[] = $level;
- return call_user_func_array([$this, $genericMethod], $args);
- }
- }
- throw new \BadMethodCallException('Call to undefined method ' . get_class($this) . '::' . $method . '()');
- }
-
- public function reset()
- {
- $this->records = [];
- $this->recordsByLevel = [];
- }
-}
diff --git a/vendor/psr/log/README.md b/vendor/psr/log/README.md
deleted file mode 100644
index a9f20c43..00000000
--- a/vendor/psr/log/README.md
+++ /dev/null
@@ -1,58 +0,0 @@
-PSR Log
-=======
-
-This repository holds all interfaces/classes/traits related to
-[PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md).
-
-Note that this is not a logger of its own. It is merely an interface that
-describes a logger. See the specification for more details.
-
-Installation
-------------
-
-```bash
-composer require psr/log
-```
-
-Usage
------
-
-If you need a logger, you can use the interface like this:
-
-```php
-logger = $logger;
- }
-
- public function doSomething()
- {
- if ($this->logger) {
- $this->logger->info('Doing work');
- }
-
- try {
- $this->doSomethingElse();
- } catch (Exception $exception) {
- $this->logger->error('Oh no!', array('exception' => $exception));
- }
-
- // do something useful
- }
-}
-```
-
-You can then pick one of the implementations of the interface to get a logger.
-
-If you want to implement the interface, you can require this package and
-implement `Psr\Log\LoggerInterface` in your code. Please read the
-[specification text](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md)
-for details.
diff --git a/vendor/psr/log/composer.json b/vendor/psr/log/composer.json
deleted file mode 100644
index 3f6d4eea..00000000
--- a/vendor/psr/log/composer.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "name": "psr/log",
- "description": "Common interface for logging libraries",
- "keywords": ["psr", "psr-3", "log"],
- "homepage": "https://github.com/php-fig/log",
- "license": "MIT",
- "authors": [
- {
- "name": "PHP-FIG",
- "homepage": "http://www.php-fig.org/"
- }
- ],
- "require": {
- "php": ">=5.3.0"
- },
- "autoload": {
- "psr-4": {
- "Psr\\Log\\": "Psr/Log/"
- }
- },
- "extra": {
- "branch-alias": {
- "dev-master": "1.1.x-dev"
- }
- }
-}
diff --git a/vendor/rollbar/rollbar/.gitignore b/vendor/rollbar/rollbar/.gitignore
deleted file mode 100644
index f14c91f7..00000000
--- a/vendor/rollbar/rollbar/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-*.swp
-*.swo
-vendor
-composer.lock
-.idea
-build
-.vscode
\ No newline at end of file
diff --git a/vendor/rollbar/rollbar/.travis.yml b/vendor/rollbar/rollbar/.travis.yml
deleted file mode 100644
index 15d7d98f..00000000
--- a/vendor/rollbar/rollbar/.travis.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-language: php
-dist: trusty
-
-php:
- - 7.2
- - 7.1
- - 7.0
- - 5.6
- - 5.5
- - 5.4
- - hhvm-3.6
- - hhvm-3.18
- - hhvm-3.30
-matrix:
- include:
- - php: 5.3
- dist: precise
- env: COMPOSER_MEMORY_LIMIT=-1
-
-sudo: false
-
-install: composer install --no-interaction
-
-script: composer test
-
-after_success:
- - vendor/bin/test-reporter
diff --git a/vendor/rollbar/rollbar/CHANGELOG.md b/vendor/rollbar/rollbar/CHANGELOG.md
deleted file mode 100644
index 9efda9db..00000000
--- a/vendor/rollbar/rollbar/CHANGELOG.md
+++ /dev/null
@@ -1,410 +0,0 @@
-# Changelog
-
-## 1.5.1
-- #367 Newest version 1.5.0 missing changelog, Notifier version not bumped
-- #366 Make the anonymized IP addresses indexable
-- Removed `CHANGELOG.md` in favor of using [release notes](https://github.com/rollbar/rollbar-php/releases)
-
-## 1.5.0
-- #362 - Fix running isolated tests by requiring the Config.php file with ROLLBAR_INCLUDED_ERRNO_BITMASK definition
-- #353 - Only collect person.id by default for person tracking
-- #354 - Allow IP collection to be easily turned on and off in config
-- #355 - Anonymize IP address config option
-
-## 1.4.1
-- Temporarily add `\Rollbar\Monolog\Handler\MonologHandler` until `Seldaek:monolog` PR 1042 gets merged into their `master`
-- Refactor JSON encoding mechanis to limit calls to `json_encode` to minimum with `\Rollbar\Payload\EncodedPayload`
-- Optimize performance of `StringsStrategy` and `FramesStrategy` truncation strategies
-- Remove `RawStrategy` and `MinBodyStrategy` completely (they are not adding any value - the same results are achieved by the combination of other strategies)
-- Fix for non-encodable values in the payload data. This was occasionally causing `400` response codes from the API
-- Updat code examples in README.md
-- Lock Monolog dependency at `^1.23`. The implementation of `\Monolog\TestCase` class in their master is currently not stable
-- Add instructions on using Rollbar with Monolog after bringing the `MonologHandler` into this repo
-- Clean up `RollbarLogger` instances after each test in the testsuite so the configuration doesn't persist between test cases
-- Add `composer performance` command to run performance test suite
-
-## 1.4.0
-- Add internal SDK debugging with `verbosity` configuration option
-- `local_vars_dump` configuration option is now enabled by default
-- Update rollbar.js snippet to v2.3.6
-- Refactor error, fatal error and exception handling from the ground up
-- Exception traces will now include an additional frame with the file name and line
- where the Exception was actually thrown
-- Fix a bug where `E_USER_ERROR` type errors were reported twice
-- Add enable / disable functionality to Rollbar class and `enabled` configuration option
-- `Rollbar`'s class proxy methods will now return the return value of the proxied method
-
-## 1.3.6
-
-- Replace a leftover invocation to exec() with shell_exec()
-- Eliminate error duplication on PHP 7+ / Symfony environments by expanding ignore to all Throwables
-[293](https://github.com/rollbar/rollbar-php/issues/293)
-
-## 1.3.5
-
-- Fix sending $context argument from the log() method with exception logs.
-
-## 1.3.4
-
-- Increase the minimum version constraint for the monolog/monolog package to support composer --prefer-minimum
-- Decrease the minimum version constraint for psr/log package to match the monolog/monolog package in --prefer-minimum
-- Add support for dynamic custom data
-
-## 1.3.3
-
-- Remove fluent/logger from the required section of composer.json
-
-## 1.3.2
-
-- Performance improvments
-- Include request body for PUT requests if `include_raw_request_body` is true
-
-## 1.3.1
-
-- Remove dependency on rollbar.js through composer
-- Actually change the notifier version number constant
-- Stop duplicate logging some errors [#240](https://github.com/rollbar/rollbar-php/pull/240)
-
-## 1.3.0
-
-- all of the senders should return a response
-[#239](https://github.com/rollbar/rollbar-php/pull/239)
-- add an explicit semicolon between snippet and custom js
-[#238](https://github.com/rollbar/rollbar-php/pull/238)
-- GitHub Issue #225: Allow custom JS addition in RollbarJsHelper
-[#235](https://github.com/rollbar/rollbar-php/pull/235)
-- Minor spacing and indentation on Scrubber
-[#234](https://github.com/rollbar/rollbar-php/pull/234)
-- GitHub Issue #227: Add curl_error() to check for log submission failures
-[#231](https://github.com/rollbar/rollbar-php/pull/231)
-- GitHub Issue 229: Make fluentd a suggest requirement rather than mandatory
-[#230](https://github.com/rollbar/rollbar-php/pull/230)
-- Github Issue 226: Update rollbar.js code snippet
-[#228](https://github.com/rollbar/rollbar-php/pull/228)
-- configuration option to disallow calling exec to get git information
-[#223](https://github.com/rollbar/rollbar-php/pull/223)
-- use the configuration array directly, don't nest it under options
-[#222](https://github.com/rollbar/rollbar-php/pull/222)
-- GitHub Issue #144: allow passing ROLLBAR_TEST_TOKEN in phpunit arguments
-[#219](https://github.com/rollbar/rollbar-php/pull/219)
-- Performance fixes
-[#217](https://github.com/rollbar/rollbar-php/pull/217)
-
-## 1.2.0
-
-- No longer ignore the native PHP error handler:
- [#175](https://github.com/rollbar/rollbar-php/pull/175)
-- Fix for when `HTTP_X_FORWARDED_PROTO` includes multiple values: [#179](https://github.com/rollbar/rollbar-php/pull/179)
-- Add the `use_error_reporting` option back: [#182](https://github.com/rollbar/rollbar-php/pull/182)
-- Fix a backwards compatibility bug with `base_api_url` which has since been deprecated in favor of
- `endpoint`: [#189](https://github.com/rollbar/rollbar-php/pull/189)
-- Add a helper method to inject the javascript snippet into views:
- [#186](https://github.com/rollbar/rollbar-php/pull/186)
-- Add option to include some local variables to stack traces:
- [#192](https://github.com/rollbar/rollbar-php/pull/192)
-- Address an issue reading from php://input for PHP < 5.6 and provide a workaround:
- [#181](https://github.com/rollbar/rollbar-php/pull/181)
-- Add static helper methods for Level: [#210](https://github.com/rollbar/rollbar-php/pull/210)
-- Correctly reverse frames in a stacktrace: [#211](https://github.com/rollbar/rollbar-php/pull/211).
- NOTE: this behaviour is consistent with this library for versions less than 1.0, we consider it a
- bug that the frames were in the wrong order for versions 1.0.0 to 1.1.1. However, this change will
- cause the fingerprints of errors to change and therefore may result in some errors showing up as
- new when in fact they already existed with the stack trace in the opposite order.
-- Allow sampling for exceptions: [#215](https://github.com/rollbar/rollbar-php/pull/215)
-- Add a whitelist to prevent scrubbing of specific fields:
- [#216](https://github.com/rollbar/rollbar-php/pull/216)
-- Various refactorings and cleanup
-
-## 1.1.1
-
-- Forgot to bump the version number in the README and in the Notifier configuration.
-
-## 1.1.0
-
-This release includes some new features, some improvements to existing functionality, and several
-bug fixes. Below are the highlights of issues/PRs that are included in this release:
-
-- GitHub Issue [#38](https://github.com/rollbar/rollbar-php/issues/38): truncate payload [#167](https://github.com/rollbar/rollbar-php/pull/167)
-- GitHub Issue [#102](https://github.com/rollbar/rollbar-php/issues/102): Support the Forwarded (RFC 7239) header [#155](https://github.com/rollbar/rollbar-php/pull/155)
-- GitHub Issue [#72](https://github.com/rollbar/rollbar-php/issues/72): status 200 when using set_exception_handler [#143](https://github.com/rollbar/rollbar-php/pull/143)
-- GitHub Issue [#53](https://github.com/rollbar/rollbar-php/issues/53): Option to capture stack trace in report_message() [#145](https://github.com/rollbar/rollbar-php/pull/145)
-- Fix how include_error_code_context works with defaults [#168](https://github.com/rollbar/rollbar-php/pull/168)
-- Fix how we handle scrubbing related to query strings so that we don't accidentially urlencode
- things that should not be, such as sql queries [#164](https://github.com/rollbar/rollbar-php/pull/164)
-- Bug: infinite loop when previous exception set [#158](https://github.com/rollbar/rollbar-php/pull/158) (@vilius-g)
-- Bug: checkIgnore was not getting passed documented arguments [#152](https://github.com/rollbar/rollbar-php/pull/152)
-- Only report legitimate fatal errors during shutdown rather than anything returned by
- error_get_last(), Fatal handler type check [#161](https://github.com/rollbar/rollbar-php/pull/161) (@vilius-g)
-- Move packfire/php5.3-compat from require to suggest in composer.json [#169](https://github.com/rollbar/rollbar-php/pull/169) (@elazar)
-
-## 1.0.1
-
-- Bug fix related to scrubbing potential query strings
-- Update notifier to send the correct version number in the payload
-
-## 1.0.0
-
-Almost everything has been refactored or rewritten. The updated README has all of the current
-information on how to use the notifier. This release includes API that is backwards compatible with 0.18.2,
-however this is for convenience only and the methods that have changed have been marked deprecated.
-
-## 0.18.2
-
-- removed type hinting from RollbarException
-
-## 0.18.1
-
-- added configuration switch for disabling utf 8 sanitization
-
-## 0.18.0
-
-- Added support for checkIgnore function See [#82](https://github.com/rollbar/rollbar-php/pull/82)
-
-## 0.17.0
-
-- Accidental tag of documentation change. No API change present.
-
-## 0.16.0
-
-Features:
-
-- Added support for reporting errors in Command Line Scripts.
-- Added (opt-in) support for capturing line of code and context around that code in stack traces. See [#76](https://github.com/rollbar/rollbar-php/pull/76)
-- Added Level class with string constants for Level values.
-
-Bug fixes:
-
-- Fixed the severity level that E_PARSE errors are reproted at. See [#75](https://github.com/rollbar/rollbar-php/pull/75)
-- Captured \Throwable rather than \Exception if using PHP 7
-
-## 0.15.0
-
-Bug fixes (all of which are unlikely, but possibly, breaking changes):
-
-- Fix bug where `scrub_fields` were case-sensitive, instead of case-insensitive as the docs say. See [#63](https://github.com/rollbar/rollbar-php/pull/63)
-- Fix bug where integer 0 keys would always be scrubbed. See [#64](https://github.com/rollbar/rollbar-php/pull/64) and [#65](https://github.com/rollbar/rollbar-php/pull/65)
-- Fix detection of the current URL when the protocol is `https` but no `SERVER_PORT` is set. See [#50](https://github.com/rollbar/rollbar-php/pull/50)
-
-## 0.14.0
-
-Possibly-breaking changes:
-
-- Fix bug where generated UUIDs could overlap if the application calls mt_srand() with a predictable value, and then Rollbar methods are called later. Rollbar now calls `mt_srand()` itself. This shouldn't affect anyone, unless you happen to be relying on the sequence of numbers coming from mt_rand across Rollbar calls.
-
-## 0.13.0
-
-Possibly-breaking changes (again relating to param scrubbing):
-
-- Param scrubbing is now applied to query string params inside the request URL. See [#59](https://github.com/rollbar/rollbar-php/pull/59)
-
-
-## 0.12.1
-
-Bug fixes:
-
-- `branch` now defaults to null (meaning it will not be set) instead of `master`. This fixes a bug where the Rollbar UI wouldn't use the "default branch" setting because it was being overridden by the value sent by rollbar-php. See [#58](https://github.com/rollbar/rollbar-php/pull/58).
-
-## 0.12.0
-
-Possibly-breaking changes (all related to param scrubbing):
-
-- Param scrubbing now accepts a regex string for the key name. Key names starting with `/` are assumed to be a regex.
-- Headers are now scrubbed
-- Arrays are recursively scrubbed
-
-## 0.11.2
-
-Bug fixes:
-
-- Fix issue where fatal E_PARSE errors were not reported. See [#55](https://github.com/rollbar/rollbar-php/issues/55)
-
-## 0.11.1
-
-- Add in dependency for cURL library to warn users if they do not have the cURL extension installed ([#54](https://github.com/rollbar/rollbar-php/pull/54))
-
-## 0.11.0
-
-New features:
-
-- Added support for nested exceptions. See [#51](https://github.com/rollbar/rollbar-php/pull/51)
-
-Possible breaking changes:
-
-- Calling report_exception with a non-exception will result in the data being dropped and a message being logged to the Rollbar logger, instead of an empty message being reported
-- Exceptions are now sent as trace_chain, not trace, so any Custom Grouping Rules in the Rollbar UI will need to be updated to use `body.trace_chain.*.` in place of `body.trace.`
-
-## 0.10.0
-
-New features:
-
-- `report_exception` now accepts args for `extra_data` and `payload_data`, providing full access to the Rollbar API. See [#47](https://github.com/rollbar/rollbar-php/pull/47)
-- Fix a json_encode warning with utf8 request param keys. See [#42](https://github.com/rollbar/rollbar-php/pull/42)
-
-Backwards-incompatible changes:
-
-- Moved `rollbar.php` inside `src/`
-
-Other:
-
-- Added a unit test suite running on Travis CI (running for PHP 5.3 and higher)
-
-
-## 0.9.12
-
-- Fix PHP < 5.4 compatability. (Regression added in 0.9.11)
-
-
-## 0.9.11
-
-- Added proxy support. ([#44](https://github.com/rollbar/rollbar-php/pull/44))
-
-
-## 0.9.10
-
-New features:
-
-- Add ability to send fingerprint, title, and other advanced payload options in `Rollbar::report_message()`.
-
-
-## 0.9.9
-
-- Fix an error caused when `report_exception` is called with a non-object (e.g. `null`).
-
-
-## 0.9.8
-
-- Fixes a bug where `iconv()` will sometimes throw an error, (#36).
-
-
-## 0.9.7
-
-- Force cURL to use IPV4 (`CURLOPT_IPRESOLVE_V4`) if supported ([#35](https://github.com/rollbar/rollbar-php/pull/35))
-
-
-## 0.9.6
-
-- No longer have `error_reporting()` prevent simple log message reports ([#33](https://github.com/rollbar/rollbar-php/pull/33))
-
-## 0.9.5
-
-- Only define `ROLLBAR_INCLUDED_ERRNO_BITMASK` once to prevent warnings and test framework breakages ([#32](https://github.com/rollbar/rollbar-php/pull/32))
-
-
-## 0.9.4
-
-- New `use_error_reporting` flag that when enabled will respect the current `error_reporting()` level when deciding to report an error ([#29](https://github.com/rollbar/rollbar-php/pull/29))
-- Access token no longer required if using the agent handler
-
-
-## 0.9.3
-
-- Walk payloads to ensure strings are correctly utf-8 encoded for json encoding
-
-
-## 0.9.2
-
-- Append timestamp (in milliseconds) to agent log file names, to prevent collisions.
-
-
-## 0.9.1
-
-- Lazy create the agent log file ([#22](https://github.com/rollbar/rollbar-php/pull/22))
-
-
-## 0.9.0
-
-- Added `included_errno`, which allows specifying which set of error levels to send to Rollbar (instead of everything below a certain level). This replaces `max_errno`.
-- Changed the default settings to no longer send E_NOTICE errors.
-- Removed the max_errno config option.
-- Added a performance optimization which sends the access token as a header.
-
-## 0.8.1
-
-- Added support for more seamless configuration on Heroku
-
-
-## 0.8.0
-
-- Added ability to disable the notifier's fatal error handler ([#18](https://github.com/rollbar/rollbar-php/pull/18))
-
-
-## 0.7.0
-
-- Fix regression introduced in 0.5.6 which would prevent the default php error handler from running, resulting in scripts no longer halting after such errors.
-
-
-## 0.6.4
-
-- Composer package defenition optimizations
-- Use subclass for Ratchetio backwards-compatibility layer instead of a class_alias
-
-
-## 0.6.3
-
-- Fix issue where POST params could get clobbered while scrubbing
-- Convert internal methods from `private` to `protected` for better extensibility
-
-
-## 0.6.2
-
-- Adding "pass" to default scrub fields
-
-
-## 0.6.1
-
-- Respect HTTP_X_FORWARDED_ http headers for request url construction
-
-
-## 0.6.0
-
-- Don't report errors suppressed with '@' by default
-
-
-## 0.5.6
-
-- A uuid is now generated and sent with each item
-
-
-## 0.5.5
-
-- Added `code_version` configuration setting
-
-
-## 0.5.4
-
-- Fix E_WARNING when scrubbing a param that is an array
-
-
-## 0.5.3
-
-- Scrub fields from session params too (instead of just POST). Add csrf_token and auth_token to list of default scrub fields.
-
-
-## 0.5.2
-
-- Fix compatability issue with PHP 5.2.
-
-
-## 0.5.1
-
-- Adding ability to write to rollbar-agent files
-
-
-## 0.5.0
-
-- Rename to rollbar
-
-
-## 0.4.2
-
-- Added new default scrub params
-
-
-## 0.4.1
-
-- Added optional extra_data param to report_message()
-
-
-## 0.4.0
-
-- Error handler function (`report_php_error`) now always returns false, so that the default php error handler still runs. This is a breaking change if your code relied on the old behavior where the error handler did *not* ever halt script execution.
diff --git a/vendor/rollbar/rollbar/LICENSE b/vendor/rollbar/rollbar/LICENSE
deleted file mode 100644
index 27cfdef2..00000000
--- a/vendor/rollbar/rollbar/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright (c) 2014 Rollbar, Inc.
-
-MIT License
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/vendor/rollbar/rollbar/POST_FORMAT.md b/vendor/rollbar/rollbar/POST_FORMAT.md
deleted file mode 100644
index 56ff5b47..00000000
--- a/vendor/rollbar/rollbar/POST_FORMAT.md
+++ /dev/null
@@ -1,346 +0,0 @@
-```
-{
- // Required: access_token
- // An access token with scope "post_server_item" or "post_client_item".
- // A post_client_item token must be used if the "platform" is "browser", "android", "ios", "flash", or "client"
- // A post_server_item token should be used for other platforms.
- "access_token": "aaaabbbbccccddddeeeeffff00001111",
-
- // Required: data
- "data": {
-
- // Required: environment
- // The name of the environment in which this occurrence was seen.
- // A string up to 255 characters. For best results, use "production" or "prod" for your
- // production environment.
- // You don't need to configure anything in the Rollbar UI for new environment names;
- // we'll detect them automatically.
- "environment": "production",
-
- // Required: body
- // The main data being sent. It can either be a message, an exception, or a crash report.
- "body": {
-
- // Required: "trace", "trace_chain", "message", or "crash_report" (exactly one)
- // If this payload is a single exception, use "trace"
- // If a chain of exceptions (for languages that support inner exceptions), use "trace_chain"
- // If a message with no stack trace, use "message"
- // If an iOS crash report, use "crash_report"
-
- // Option 1: "trace"
- "trace": {
-
- // Required: frames
- // A list of stack frames, ordered such that the most recent call is last in the list.
- "frames": [
- // Each frame is an object.
- {
- // Required: filename
- // The filename including its full path.
- "filename": "/Users/brian/www/mox/mox/views/project.py",
-
- // Optional: lineno
- // The line number as an integer
- "lineno": 26,
-
- // Optional: colno
- // The column number as an integer
- "colno": 8,
-
- // Optional: method
- // The method or function name
- "method": "index",
-
- // Optional: code
- // The line of code
- "code": "_save_last_project(request, project_id, force=True)",
-
- // Optional: context
- // Additional code before and after the "code" line
- "context": {
- // Optional: pre
- // List of lines of code before the "code" line
- "pre": [
- "project = request.context",
- "project_id = project.id"
- ],
-
- // Optional: post
- // List of lines of code after the "code" line
- "post": []
- },
-
- // Optional: args
- // List of values of positional arguments to the method/function call
- // NOTE: as this can contain sensitive data, you may want to scrub the values
- "args": ["", 25],
-
- // Optional: kwargs
- // Object of keyword arguments (name => value) to the method/function call
- // NOTE: as this can contain sensitive data, you may want to scrub the values
- "kwargs": {
- "force": true
- }
- },
- {
- "filename": "/Users/brian/www/mox/mox/views/project.py",
- "lineno": 497,
- "method": "_save_last_project",
- "code": "user = foo"
- }
- ],
-
- // Required: exception
- // An object describing the exception instance.
- "exception": {
- // Required: class
- // The exception class name.
- "class": "NameError",
-
- // Optional: message
- // The exception message, as a string
- "message": "global name 'foo' is not defined",
-
- // Optional: description
- // An alternate human-readable string describing the exception
- // Usually the original exception message will have been machine-generated;
- // you can use this to send something custom
- "description": "Something went wrong while trying to save the user object"
- }
-
- },
-
- // Option 2: "trace_chain"
- // Used for exceptions with inner exceptions or causes
- "trace_chain": [
- // Each element in the list should be a "trace" object, as shown above
- // Must contain at least one element.
- ],
-
- // Option 3: "message"
- // Only one of "trace", "trace_chain", "message", or "crash_report" should be present.
- // Presence of a "message" key means that this payload is a log message.
- "message": {
-
- // Required: body
- // The primary message text, as a string
- "body": "Request over threshold of 10 seconds",
-
- // Can also contain any arbitrary keys of metadata. Their values can be any valid JSON.
- // For example:
-
- "route": "home#index",
- "time_elapsed": 15.23
-
- },
-
- // Option 4: "crash_report"
- // Only one of "trace", "trace_chain", "message", or "crash_report" should be present.
- "crash_report": {
- // Required: raw
- // The raw crash report, as a string
- // Rollbar expects the format generated by rollbar-ios
- "raw": ""
- }
-
- },
-
- // Optional: level
- // The severity level. One of: "critical", "error", "warning", "info", "debug"
- // Defaults to "error" for exceptions and "info" for messages.
- // The level of the *first* occurrence of an item is used as the item's level.
- "level": "error",
-
- // Optional: timestamp
- // When this occurred, as a unix timestamp.
- "timestamp": 1369188822,
-
- // Optional: code_version
- // A string, up to 40 characters, describing the version of the application code
- // Rollbar understands these formats:
- // - semantic version (i.e. "2.1.12")
- // - integer (i.e. "45")
- // - git SHA (i.e. "3da541559918a808c2402bba5012f6c60b27661c")
- // If you have multiple code versions that are relevant, those can be sent inside "client" and "server"
- // (see those sections below)
- // For most cases, just send it here.
- "code_version": "3da541559918a808c2402bba5012f6c60b27661c"
-
- // Optional: platform
- // The platform on which this occurred. Meaningful platform names:
- // "browser", "android", "ios", "flash", "client", "heroku", "google-app-engine"
- // If this is a client-side event, be sure to specify the platform and use a post_client_item access token.
- "platform": "linux",
-
- // Optional: language
- // The name of the language your code is written in.
- "language": "python",
-
- // Optional: framework
- // The name of the framework your code uses
- "framework": "pyramid",
-
- // Optional: context
- // An identifier for which part of your application this event came from.
- // Items can be searched by context (prefix search)
- // For example, in a Rails app, this could be `controller#action`.
- // In a single-page javascript app, it could be the name of the current screen or route.
- "context": "project#index",
-
- // Optional: request
- // Data about the request this event occurred in.
- "request": {
- // Can contain any arbitrary keys. Rollbar understands the following:
-
- // url: full URL where this event occurred
- "url": "https://rollbar.com/project/1",
-
- // method: the request method
- "method": "GET",
-
- // headers: object containing the request headers.
- "headers": {
- // Header names should be formatted like they are in HTTP.
- "Accept": "text/html",
- "Referer": "https://rollbar.com/"
- },
-
- // params: any routing parameters (i.e. for use with Rails Routes)
- "params": {
- "controller": "project",
- "action": "index"
- },
-
- // GET: query string params
- "GET": {},
-
- // query_string: the raw query string
- "query_string": "",
-
- // POST: POST params
- "POST": {},
-
- // body: the raw POST body
- "body": "",
-
- // user_ip: the user's IP address as a string.
- // Can also be the special value "$remote_ip", which will be replaced with the source IP of the API request.
- // Will be indexed, as long as it is a valid IPv4 address.
- "user_ip": "100.51.43.14"
-
- },
-
- // Optional: person
- // The user affected by this event. Will be indexed by ID, username, and email.
- // People are stored in Rollbar keyed by ID. If you send a multiple different usernames/emails for the
- // same ID, the last received values will overwrite earlier ones.
- "person": {
- // Required: id
- // A string up to 40 characters identifying this user in your system.
- "id": "12345",
-
- // Optional: username
- // A string up to 255 characters
- "username": "brianr",
-
- // Optional: email
- // A string up to 255 characters
- "email": "brian@rollbar.com"
- },
-
- // Optional: server
- // Data about the server related to this event.
- "server": {
- // Can contain any arbitrary keys. Rollbar understands the following:
-
- // host: The server hostname. Will be indexed.
- "host": "web4",
-
- // root: Path to the application code root, not including the final slash.
- // Used to collapse non-project code when displaying tracebacks.
- "root": "/Users/brian/www/mox",
-
- // branch: Name of the checked-out source control branch. Defaults to "master"
- "branch": "master",
-
- // Optiona: code_version
- // String describing the running code version on the server
- // See note about "code_version" above
- "code_version": "b6437f45b7bbbb15f5eddc2eace4c71a8625da8c",
-
- // (Deprecated) sha: Git SHA of the running code revision. Use the full sha.
- "sha": "b6437f45b7bbbb15f5eddc2eace4c71a8625da8c"
- },
-
- // Optional: client
- // Data about the client device this event occurred on.
- // As there can be multiple client environments for a given event (i.e. Flash running inside
- // an HTML page), data should be namespaced by platform.
- "client": {
- // Can contain any arbitrary keys. Rollbar understands the following:
-
- "javascript": {
-
- // Optional: browser
- // The user agent string
- "browser": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3)",
-
- // Optional: code_version
- // String describing the running code version in javascript
- // See note about "code_version" above
- "code_version": "b6437f45b7bbbb15f5eddc2eace4c71a8625da8c"
-
- // Optional: source_map_enabled
- // Set to true to enable source map deobfuscation
- // See the "Source Maps" guide for more details.
- "source_map_enabled": false,
-
- // Optional: guess_uncaught_frames
- // Set to true to enable frame guessing
- // See the "Source Maps" guide for more details.
- "guess_uncaught_frames": false
-
- }
- },
-
- // Optional: custom
- // Any arbitrary metadata you want to send. "custom" itself should be an object.
- "custom": {},
-
- // Optional: fingerprint
- // A string controlling how this occurrence should be grouped. Occurrences with the same
- // fingerprint are grouped together. See the "Grouping" guide for more information.
- // Should be a string up to 40 characters long; if longer than 40 characters, we'll use its SHA1 hash.
- // If omitted, we'll determine this on the backend.
- "fingerprint": "50a5ef9dbcf9d0e0af2d4e25338da0d430f20e52",
-
- // Optional: title
- // A string that will be used as the title of the Item occurrences will be grouped into.
- // Max length 255 characters.
- // If omitted, we'll determine this on the backend.
- "title": "NameError when setting last project in views/project.py",
-
- // Optional: uuid
- // A string, up to 36 characters, that uniquely identifies this occurrence.
- // While it can now be any latin1 string, this may change to be a 16 byte field in the future.
- // We recommend using a UUID4 (16 random bytes).
- // The UUID space is unique to each project, and can be used to look up an occurrence later.
- // It is also used to detect duplicate requests. If you send the same UUID in two payloads, the second
- // one will be discarded.
- "uuid": "d4c7acef55bf4c9ea95e4fe9428a8287",
-
- // Optional: notifier
- // Describes the library used to send this event.
- "notifier": {
- // Optional: name
- // Name of the library
- "name": "pyrollbar",
-
- // Optional: version
- // Library version string
- "version": "0.5.5"
- }
-
- }
-}
-```
diff --git a/vendor/rollbar/rollbar/README.md b/vendor/rollbar/rollbar/README.md
deleted file mode 100644
index fe3bed1d..00000000
--- a/vendor/rollbar/rollbar/README.md
+++ /dev/null
@@ -1,92 +0,0 @@
-# Rollbar-PHP [](https://travis-ci.org/rollbar/rollbar-php)
-
-This library detects errors and exceptions in your application and reports them to [Rollbar](https://rollbar.com) for alerts, reporting, and analysis.
-
-Supported PHP versions: 5.3, 5.4, 5.5, 5.6, 7, 7.1, 7.2
-Supported HHVM versions: 3.6, 3.18, 3.21, 3.24, 3.27
-
-# Setup Instructions
-
-1. [Sign up for a Rollbar account](https://rollbar.com/signup)
-2. Follow the [Quick Start](https://docs.rollbar.com/v1.0.0/docs/php#section-quick-start) instructions in our [PHP SDK docs](https://docs.rollbar.com/docs/php) to install rollbar-php and configure it for your platform.
-
-# Usage and Reference
-
-For complete usage instructions and configuration reference, see our [PHP SDK docs](https://docs.rollbar.com/docs/php).
-
-# Release History & Changelog
-
-See our [Releases](https://github.com/rollbar/rollbar-php/releases) page for a list of all releases, including changes.
-
-# Related projects
-
-A range of examples of using Rollbar PHP is available here: [Rollbar PHP Examples](https://github.com/rollbar/rollbar-php-examples).
-
-A Wordpress Plugin is available through Wordpress Admin Panel or through Wordpress Plugin directory: [Rollbar Wordpress](https://wordpress.org/plugins/rollbar/)
-
-A Laravel-specific package is available for integrating with Laravel: [Rollbar Laravel](https://github.com/rollbar/rollbar-php-laravel)
-
-A CakePHP-specific package is avaliable for integrating with CakePHP 2.x:
-[CakeRollbar](https://github.com/tranfuga25s/CakeRollbar)
-
-A Flow-specific package is available for integrating with Neos Flow: [m12/flow-rollbar](https://packagist.org/packages/m12/flow-rollbar)
-
-Yii package: [baibaratsky/yii-rollbar](https://github.com/baibaratsky/yii-rollbar)
-
-Yii2 package: [baibaratsky/yii2-rollbar](https://github.com/baibaratsky/yii2-rollbar)
-
-# Help / Support
-
-If you run into any issues, please email us at [support@rollbar.com](mailto:support@rollbar.com)
-
-For bug reports, please [open an issue on GitHub](https://github.com/rollbar/rollbar-php/issues/new).
-
-# Contributing
-
-1. Fork it
-2. Create your feature branch (`git checkout -b my-new-feature`)
-3. Commit your changes (See Conventional Commits below)
-4. Push to the branch (`git push origin my-new-feature`)
-5. Create new Pull Request
-
-### Conventional Commits
-This repository follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0-beta.4/) guidelines.
-Commit messages should include a prefix describing the commit before the short description.
-Recognized prefixes include: feat, fix, doc, style, refactor, perf, test, build, chore, revert.
-Breaking changes should include 'BREAKING CHANGE'.
-
-Example:
-```
-git commit -m 'feat(bars): add foo support for all bars
-
-fix #123
-BREAKING CHANGE: bars supporting foo break bars supporting qwerty'
-```
-
-Optionally, you can use commitizen to format your commit messages.
-```
-npm install -g commitizen
-npm install -g cz-conventional-changelog
-echo '{ "path": "cz-conventional-changelog" }' > ~/.czrc
-```
-
-And then commit using `git cz`. You'll be prompted for information describing your commit.
-
-# Testing
-Tests are in `tests`.
-To run the tests: `composer test`
-To fix code style issues: `composer fix`
-
-# Tagging
-
-1. `ROLLBAR_PHP_TAG=[version number]`
-2. `git checkout master`
-3. Update version numbers in `src/Payload/Notifier.php` and `tests/NotifierTest.php`.
-4. `git add .`
-5. `git commit -m"Bump version numbers"`.
-6. `git push origin master`
-7. `git tag v$ROLLBAR_PHP_TAG`
-8. `git push --tags`
-
-# License
-Rollbar-PHP is free software released under the MIT License. See [LICENSE.txt](LICENSE.txt) for details.
diff --git a/vendor/rollbar/rollbar/THANKS.md b/vendor/rollbar/rollbar/THANKS.md
deleted file mode 100644
index 16de6cd1..00000000
--- a/vendor/rollbar/rollbar/THANKS.md
+++ /dev/null
@@ -1,23 +0,0 @@
-Many thanks to the following contributors, by github username and in alphabetical order. For the most recent list, see https://github.com/rollbar/rollbar-php/graphs/contributors
-
-- [AlexeyMorozov](https://github.com/AlexeyMorozov)
-- [alexthegeek](https://github.com/alexthegeek)
-- [benjamin-smith](https://github.com/benjamin-smith)
-- [chanind](https://github.com/chanind)
-- [digilist](https://github.com/digilist)
-- [dimkalinux](https://github.com/dimkalinux)
-- [diogopms](https://github.com/diogopms)
-- [elfif](https://github.com/elfif)
-- [ghostal](https://github.com/ghostal)
-- [kidk](https://github.com/kidk)
-- [lindyhopchris](https://github.com/lindyhopchris)
-- [MaffooBristol](https://github.com/MaffooBristol)
-- [plusbryan](https://github.com/plusbryan)
-- [rekky](https://github.com/rekky)
-- [rfink](https://github.com/rfink)
-- [steveh](https://github.com/steveh)
-- [stof](https://github.com/stof)
-- [unix1](https://github.com/unix1)
-- [veloper](https://github.com/veloper)
-- [vilius-g](https://github.com/vilius-g)
-- [violuke](https://github.com/violuke)
diff --git a/vendor/rollbar/rollbar/TODO.md b/vendor/rollbar/rollbar/TODO.md
deleted file mode 100644
index 6155c31e..00000000
--- a/vendor/rollbar/rollbar/TODO.md
+++ /dev/null
@@ -1,6 +0,0 @@
- 1. Include Code Context
- 1. Implement Agent Sender
- 1. Get and sanitize function arguments from backtrace:
- * You can get argument names like so: http://stackoverflow.com/a/2692514/456188
- * You can use `array_combine` to get a kwargs version of the arguments
- * You can then sanitize based on argument name
\ No newline at end of file
diff --git a/vendor/rollbar/rollbar/composer.json b/vendor/rollbar/rollbar/composer.json
deleted file mode 100644
index c9ccce7c..00000000
--- a/vendor/rollbar/rollbar/composer.json
+++ /dev/null
@@ -1,66 +0,0 @@
-{
- "name": "rollbar/rollbar",
- "description": "Monitors errors and exceptions and reports them to Rollbar",
- "type": "library",
- "keywords": ["logging", "debugging", "monitoring", "errors", "exceptions"],
- "license": "MIT",
- "homepage": "http://github.com/rollbar/rollbar-php",
-
- "authors": [
- {
- "name": "Rollbar, Inc.",
- "email": "support@rollbar.com",
- "role": "Developer"
- }
- ],
-
- "support": {
- "email": "support@rollbar.com"
- },
-
- "autoload": {
- "psr-4": {
- "Rollbar\\": "src/"
- }
- },
-
- "autoload-dev": {
- "psr-4": {
- "Rollbar\\": "tests/"
- }
- },
-
- "require": {
- "ext-curl": "*",
- "psr/log": "^1",
- "monolog/monolog": "^1"
- },
-
- "require-dev": {
- "phpunit/phpunit": "4.8.*",
- "mockery/mockery": "0.9.*",
- "squizlabs/php_codesniffer": "2.*",
- "codeclimate/php-test-reporter": "dev-master",
- "packfire/php5.3-compat": "*",
- "phpmd/phpmd" : "@stable"
- },
-
- "suggest": {
- "packfire/php5.3-compat": "for backward compatibility with PHP 5.3",
- "fluent/logger": "Needed to use the 'fluent' handler for fluentd support"
- },
-
- "scripts": {
- "test": [
- "phpunit --coverage-clover build/logs/clover.xml --testsuite 'Rollbar Test Suite'",
- "phpcs --standard=PSR1,PSR2 src tests"
- ],
- "fix": "phpcbf --standard=PSR1,PSR2 src tests",
- "get-js-snippet": "ROLLBAR_JS_TAG=$(curl -s https://api.github.com/repos/rollbar/rollbar.js/releases/latest | sed -n 's/\"tag_name\":.*\"\\(.*\\)\",/\\1/p' | sed 's/ *//'); curl -X GET https://raw.githubusercontent.com/rollbar/rollbar.js/$ROLLBAR_JS_TAG/dist/rollbar.snippet.js > data/rollbar.snippet.js",
- "performance": "phpunit --coverage-clover build/logs/clover.xml --testsuite 'Rollbar Performance Test Suite'"
- },
-
- "config": {
- "process-timeout": 600
- }
-}
diff --git a/vendor/rollbar/rollbar/data/rollbar.snippet.js b/vendor/rollbar/rollbar/data/rollbar.snippet.js
deleted file mode 100644
index 275209c8..00000000
--- a/vendor/rollbar/rollbar/data/rollbar.snippet.js
+++ /dev/null
@@ -1 +0,0 @@
-!function(r){function o(n){if(e[n])return e[n].exports;var t=e[n]={exports:{},id:n,loaded:!1};return r[n].call(t.exports,t,t.exports,o),t.loaded=!0,t.exports}var e={};return o.m=r,o.c=e,o.p="",o(0)}([function(r,o,e){"use strict";var n=e(1),t=e(4);_rollbarConfig=_rollbarConfig||{},_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://cdnjs.cloudflare.com/ajax/libs/rollbar.js/2.6.1/rollbar.min.js",_rollbarConfig.async=void 0===_rollbarConfig.async||_rollbarConfig.async;var a=n.setupShim(window,_rollbarConfig),l=t(_rollbarConfig);window.rollbar=n.Rollbar,a.loadFull(window,document,!_rollbarConfig.async,_rollbarConfig,l)},function(r,o,e){"use strict";function n(r){return function(){try{return r.apply(this,arguments)}catch(r){try{console.error("[Rollbar]: Internal error",r)}catch(r){}}}}function t(r,o){this.options=r,this._rollbarOldOnError=null;var e=s++;this.shimId=function(){return e},"undefined"!=typeof window&&window._rollbarShims&&(window._rollbarShims[e]={handler:o,messages:[]})}function a(r,o){if(r){var e=o.globalAlias||"Rollbar";if("object"==typeof r[e])return r[e];r._rollbarShims={},r._rollbarWrappedError=null;var t=new p(o);return n(function(){o.captureUncaught&&(t._rollbarOldOnError=r.onerror,i.captureUncaughtExceptions(r,t,!0),i.wrapGlobals(r,t,!0)),o.captureUnhandledRejections&&i.captureUnhandledRejections(r,t,!0);var n=o.autoInstrument;return o.enabled!==!1&&(void 0===n||n===!0||"object"==typeof n&&n.network)&&r.addEventListener&&(r.addEventListener("load",t.captureLoad.bind(t)),r.addEventListener("DOMContentLoaded",t.captureDomContentLoaded.bind(t))),r[e]=t,t})()}}function l(r){return n(function(){var o=this,e=Array.prototype.slice.call(arguments,0),n={shim:o,method:r,args:e,ts:new Date};window._rollbarShims[this.shimId()].messages.push(n)})}var i=e(2),s=0,d=e(3),c=function(r,o){return new t(r,o)},p=function(r){return new d(c,r)};t.prototype.loadFull=function(r,o,e,t,a){var l=function(){var o;if(void 0===r._rollbarDidLoad){o=new Error("rollbar.js did not load");for(var e,n,t,l,i=0;e=r._rollbarShims[i++];)for(e=e.messages||[];n=e.shift();)for(t=n.args||[],i=0;iincludedErrno = \Rollbar\Defaults::get()->includedErrno();
-
- $this->levelFactory = new LevelFactory();
- $this->utilities = new Utilities();
-
- $this->updateConfig($configArray);
-
- $this->errorSampleRates = \Rollbar\Defaults::get()->errorSampleRates();
- if (isset($configArray['error_sample_rates'])) {
- $this->errorSampleRates = $configArray['error_sample_rates'];
- }
-
- $this->exceptionSampleRates = \Rollbar\Defaults::get()->exceptionSampleRates();
- if (isset($configArray['exception_sample_rates'])) {
- $this->exceptionSampleRates = $configArray['exception_sample_rates'];
- }
-
- $levels = array(E_WARNING, E_NOTICE, E_USER_ERROR, E_USER_WARNING,
- E_USER_NOTICE, E_STRICT, E_RECOVERABLE_ERROR);
- // PHP 5.3.0
- if (defined('E_DEPRECATED')) {
- $levels = array_merge($levels, array(E_DEPRECATED, E_USER_DEPRECATED));
- }
- $curr = 1;
- for ($i = 0, $num = count($levels); $i < $num; $i++) {
- $level = $levels[$i];
- if (!isset($this->errorSampleRates[$level])) {
- $this->errorSampleRates[$level] = $curr;
- }
- }
- $this->mtRandmax = mt_getrandmax();
- }
-
- public static function listOptions()
- {
- return self::$options;
- }
-
- public function configure($config)
- {
- $this->updateConfig($this->extend($config));
- }
-
- public function extend($config)
- {
- return array_replace_recursive(array(), $this->configArray, $config);
- }
-
- public function getConfigArray()
- {
- return $this->configArray;
- }
-
- protected function updateConfig($config)
- {
- $this->configArray = $config;
-
- $this->setEnabled($config);
- $this->setTransmit($config);
- $this->setLogPayload($config);
- $this->setLogPayloadLogger($config);
- $this->setVerbose($config);
- $this->setVerboseLogger($config);
- $this->setAccessToken($config);
- $this->setDataBuilder($config);
- $this->setTransformer($config);
- $this->setMinimumLevel($config);
- $this->setReportSuppressed($config);
- $this->setFilters($config);
- $this->setSender($config);
- $this->setScrubber($config);
- $this->setBatched($config);
- $this->setBatchSize($config);
- $this->setMaxNestingDepth($config);
- $this->setCustom($config);
- $this->setResponseHandler($config);
- $this->setCheckIgnoreFunction($config);
- $this->setSendMessageTrace($config);
- $this->setRaiseOnError($config);
-
- if (isset($config['included_errno'])) {
- $this->includedErrno = $config['included_errno'];
- }
-
- $this->useErrorReporting = \Rollbar\Defaults::get()->useErrorReporting();
- if (isset($config['use_error_reporting'])) {
- $this->useErrorReporting = $config['use_error_reporting'];
- }
-
- $this->maxItems = \Rollbar\Defaults::get()->maxItems();
- if (isset($config['max_items'])) {
- $this->maxItems = $config['max_items'];
- }
-
- if (isset($config['custom_truncation'])) {
- $this->customTruncation = $config['custom_truncation'];
- }
-
- $this->customDataMethod = \Rollbar\Defaults::get()->customDataMethod();
- if (isset($config['custom_data_method'])) {
- $this->customDataMethod = $config['custom_data_method'];
- }
- }
-
- private function setAccessToken($config)
- {
- if (isset($_ENV['ROLLBAR_ACCESS_TOKEN']) && !isset($config['access_token'])) {
- $config['access_token'] = $_ENV['ROLLBAR_ACCESS_TOKEN'];
- }
- $this->utilities->validateString($config['access_token'], "config['access_token']", 32, false);
- $this->accessToken = $config['access_token'];
- }
-
- private function setEnabled($config)
- {
- if (array_key_exists('enabled', $config) && $config['enabled'] === false) {
- $this->disable();
- } else {
- if (\Rollbar\Defaults::get()->enabled() === false) {
- $this->disable();
- } else {
- $this->enable();
- }
- }
- }
-
- private function setTransmit($config)
- {
- $this->transmit = isset($config['transmit']) ?
- $config['transmit'] :
- \Rollbar\Defaults::get()->transmit();
- }
-
- private function setLogPayload($config)
- {
- $this->logPayload = isset($config['log_payload']) ?
- $config['log_payload'] :
- \Rollbar\Defaults::get()->logPayload();
- }
-
- private function setLogPayloadLogger($config)
- {
- $this->logPayloadLogger = isset($config['log_payload_logger']) ?
- $config['log_payload_logger'] :
- new \Monolog\Logger('rollbar.payload', array(new \Monolog\Handler\ErrorLogHandler()));
-
- if (!($this->logPayloadLogger instanceof \Psr\Log\LoggerInterface)) {
- throw new \Exception('Log Payload Logger must implement \Psr\Log\LoggerInterface');
- }
- }
-
- private function setVerbose($config)
- {
- $this->verbose = isset($config['verbose']) ?
- $config['verbose'] :
- \Rollbar\Defaults::get()->verbose();
- }
-
- private function setVerboseLogger($config)
- {
- if (isset($config['verbose_logger'])) {
- $this->verboseLogger = $config['verbose_logger'];
- } else {
- $handler = new \Monolog\Handler\ErrorLogHandler();
- $handler->setLevel($this->verboseInteger());
- $this->verboseLogger = new \Monolog\Logger('rollbar.verbose', array($handler));
- }
-
- if (!($this->verboseLogger instanceof \Psr\Log\LoggerInterface)) {
- throw new \Exception('Verbose logger must implement \Psr\Log\LoggerInterface');
- }
- }
-
- public function enable()
- {
- $this->enabled = true;
- }
-
- public function disable()
- {
- $this->enabled = false;
- }
-
- private function setDataBuilder($config)
- {
- if (!isset($config['levelFactory'])) {
- $config['levelFactory'] = $this->levelFactory;
- }
-
- if (!isset($config['utilities'])) {
- $config['utilities'] = $this->utilities;
- }
-
- $exp = "Rollbar\DataBuilderInterface";
- $def = "Rollbar\DataBuilder";
- $this->setupWithOptions($config, "dataBuilder", $exp, $def, true);
- }
-
- private function setTransformer($config)
- {
- $expected = "Rollbar\TransformerInterface";
- $this->setupWithOptions($config, "transformer", $expected);
- }
-
- private function setMinimumLevel($config)
- {
- $this->minimumLevel = \Rollbar\Defaults::get()->minimumLevel();
-
- $override = array_key_exists('minimum_level', $config) ? $config['minimum_level'] : null;
- $override = array_key_exists('minimumLevel', $config) ? $config['minimumLevel'] : $override;
-
- if ($override instanceof Level) {
- $this->minimumLevel = $override->toInt();
- } elseif (is_string($override)) {
- $level = $this->levelFactory->fromName($override);
- if ($level !== null) {
- $this->minimumLevel = $level->toInt();
- }
- } elseif (is_int($override)) {
- $this->minimumLevel = $override;
- }
- }
-
- private function setReportSuppressed($config)
- {
- $this->reportSuppressed = isset($config['reportSuppressed']) && $config['reportSuppressed'];
- if (!isset($this->reportSuppressed)) {
- $this->reportSuppressed = isset($config['report_suppressed']) && $config['report_suppressed'];
- }
-
- if (!isset($this->reportSuppressed)) {
- $this->reportSuppressed = \Rollbar\Defaults::get()->reportSuppressed();
- }
- }
-
- private function setFilters($config)
- {
- $this->setupWithOptions($config, "filter", "Rollbar\FilterInterface");
- }
-
- private function setSender($config)
- {
- $expected = "Rollbar\Senders\SenderInterface";
-
- $default = "Rollbar\Senders\CurlSender";
-
- $this->setTransportOptions($config);
- $default = $this->setAgentSenderOptions($config, $default);
- $default = $this->setFluentSenderOptions($config, $default);
-
- $this->setupWithOptions($config, "sender", $expected, $default);
- }
-
- private function setScrubber($config)
- {
- $exp = "Rollbar\ScrubberInterface";
- $def = "Rollbar\Scrubber";
- $this->setupWithOptions($config, "scrubber", $exp, $def, true);
- }
-
- private function setBatched($config)
- {
- if (array_key_exists('batched', $config)) {
- $this->batched = $config['batched'];
- }
- }
-
- private function setRaiseOnError($config)
- {
- if (array_key_exists('raise_on_error', $config)) {
- $this->raiseOnError = $config['raise_on_error'];
- } else {
- $this->raiseOnError = \Rollbar\Defaults::get()->raiseOnError();
- }
- }
-
- private function setBatchSize($config)
- {
- if (array_key_exists('batch_size', $config)) {
- $this->batchSize = $config['batch_size'];
- }
- }
-
- private function setMaxNestingDepth($config)
- {
- if (array_key_exists('max_nesting_depth', $config)) {
- $this->maxNestingDepth = $config['max_nesting_depth'];
- }
- }
-
- public function setCustom($config)
- {
- $this->dataBuilder->setCustom($config);
- }
-
- public function addCustom($key, $data)
- {
- $this->dataBuilder->addCustom($key, $data);
- }
-
- public function removeCustom($key)
- {
- $this->dataBuilder->removeCustom($key);
- }
-
- public function transmitting()
- {
- return $this->transmit;
- }
-
- public function loggingPayload()
- {
- return $this->logPayload;
- }
-
- public function verbose()
- {
- return $this->verbose;
- }
-
- public function verboseInteger()
- {
- if ($this->verbose == self::VERBOSE_NONE) {
- return self::VERBOSE_NONE_INT;
- }
- return \Monolog\Logger::toMonologLevel($this->verbose);
- }
-
- public function getCustom()
- {
- return $this->dataBuilder->getCustom();
- }
-
- public function getAllowedCircularReferenceTypes()
- {
- return $this->allowedCircularReferenceTypes;
- }
-
- public function setCustomTruncation($type)
- {
- $this->customTruncation = $type;
- }
-
- public function getCustomTruncation()
- {
- return $this->customTruncation;
- }
-
- private function setTransportOptions(&$config)
- {
- if (array_key_exists('base_api_url', $config)) {
- $config['senderOptions']['endpoint'] = $config['base_api_url'] . 'item/';
- }
-
- if (array_key_exists('endpoint', $config)) {
- $config['senderOptions']['endpoint'] = $config['endpoint'] . 'item/';
- }
-
- if (array_key_exists('timeout', $config)) {
- $config['senderOptions']['timeout'] = $config['timeout'];
- }
-
- if (array_key_exists('proxy', $config)) {
- $config['senderOptions']['proxy'] = $config['proxy'];
- }
-
- if (array_key_exists('ca_cert_path', $config)) {
- $config['senderOptions']['ca_cert_path'] = $config['ca_cert_path'];
- }
- }
-
- private function setAgentSenderOptions(&$config, $default)
- {
- if (!array_key_exists('handler', $config) || $config['handler'] != 'agent') {
- return $default;
- }
- $default = "Rollbar\Senders\AgentSender";
- if (array_key_exists('agent_log_location', $config)) {
- $config['senderOptions'] = array(
- 'agentLogLocation' => $config['agent_log_location']
- );
- }
- return $default;
- }
-
- private function setFluentSenderOptions(&$config, $default)
- {
- if (!isset($config['handler']) || $config['handler'] != 'fluent') {
- return $default;
- }
- $default = "Rollbar\Senders\FluentSender";
-
- if (isset($config['fluent_host'])) {
- $config['senderOptions']['fluentHost'] = $config['fluent_host'];
- }
-
- if (isset($config['fluent_port'])) {
- $config['senderOptions']['fluentPort'] = $config['fluent_port'];
- }
-
- if (isset($config['fluent_tag'])) {
- $config['senderOptions']['fluentTag'] = $config['fluent_tag'];
- }
-
- return $default;
- }
-
- private function setResponseHandler($config)
- {
- $this->setupWithOptions($config, "responseHandler", "Rollbar\ResponseHandlerInterface");
- }
-
- private function setCheckIgnoreFunction($config)
- {
- // Remain backwards compatible
- if (isset($config['checkIgnore'])) {
- $this->checkIgnore = $config['checkIgnore'];
- }
-
- if (isset($config['check_ignore'])) {
- $this->checkIgnore = $config['check_ignore'];
- }
- }
-
- private function setSendMessageTrace($config)
- {
- if (!isset($config['send_message_trace'])) {
- return;
- }
-
- $this->sendMessageTrace = $config['send_message_trace'];
- }
-
- /**
- * Allows setting up configuration options that might be specified by class
- * name. Any interface used with `setupWithOptions` should be constructed
- * with a single parameter: an associative array with the config options.
- * It is assumed that it will be in the configuration as a sibling to the
- * key the class is named in. The options should have the same key as the
- * classname, but with 'Options' appended. E.g:
- * ```array(
- * "sender" => "MySender",
- * "senderOptions" => array(
- * "speed" => 11,
- * "protocol" => "First Contact"
- * )
- * );```
- * Will be initialized as if you'd used:
- * `new MySender(array("speed"=>11,"protocol"=>"First Contact"));`
- * You can also just pass an instance in directly. (In which case options
- * are ignored)
- * @param $config
- * @param $keyName
- * @param $expectedType
- * @param mixed $defaultClass
- * @param bool $passWholeConfig
- */
- protected function setupWithOptions(
- $config,
- $keyName,
- $expectedType,
- $defaultClass = null,
- $passWholeConfig = false
- ) {
-
- $class = isset($config[$keyName]) ? $config[$keyName] : null;
-
- if (is_null($defaultClass) && is_null($class)) {
- return;
- }
-
- if (is_null($class)) {
- $class = $defaultClass;
- }
- if (is_string($class)) {
- if ($passWholeConfig) {
- $options = $config;
- } else {
- $options = isset($config[$keyName . "Options"]) ?
- $config[$keyName . "Options"] :
- array();
- }
- $this->$keyName = new $class($options);
- } else {
- $this->$keyName = $class;
- }
-
- if (!$this->$keyName instanceof $expectedType) {
- throw new \InvalidArgumentException(
- "$keyName must be a $expectedType"
- );
- }
- }
-
- public function logPayloadLogger()
- {
- return $this->logPayloadLogger;
- }
-
- public function verboseLogger()
- {
- return $this->verboseLogger;
- }
-
- public function getRollbarData($level, $toLog, $context)
- {
- return $this->dataBuilder->makeData($level, $toLog, $context);
- }
-
- public function getDataBuilder()
- {
- return $this->dataBuilder;
- }
-
- public function getLevelFactory()
- {
- return $this->levelFactory;
- }
-
- public function getSender()
- {
- return $this->sender;
- }
-
- public function getScrubber()
- {
- return $this->scrubber;
- }
-
- public function getBatched()
- {
- return $this->batched;
- }
-
- public function getBatchSize()
- {
- return $this->batchSize;
- }
-
- public function getMaxNestingDepth()
- {
- return $this->maxNestingDepth;
- }
-
- public function getMaxItems()
- {
- return $this->maxItems;
- }
-
- public function getMinimumLevel()
- {
- return $this->minimumLevel;
- }
-
- public function getRaiseOnError()
- {
- return $this->raiseOnError;
- }
-
- /**
- * @param Payload $payload
- * @param Level $level
- * @param \Exception | \Throwable $toLog
- * @param array $context
- * @return Payload
- */
- public function transform($payload, $level, $toLog, $context)
- {
- if (count($this->custom) > 0) {
- $this->verboseLogger()->debug("Adding custom data to the payload.");
- $data = $payload->getData();
- $custom = $data->getCustom();
- $custom = array_merge(array(), $this->custom, (array)$custom);
- $data->setCustom($custom);
- $payload->setData($data);
- }
- if (is_null($this->transformer)) {
- return $payload;
- }
-
- $this->verboseLogger()->debug("Applying transformer " . get_class($this->transformer) . " to the payload.");
-
- return $this->transformer->transform($payload, $level, $toLog, $context);
- }
-
- public function getAccessToken()
- {
- return $this->accessToken;
- }
-
- public function enabled()
- {
- return $this->enabled === true;
- }
-
- public function disabled()
- {
- return !$this->enabled();
- }
-
- public function getSendMessageTrace()
- {
- return $this->sendMessageTrace;
- }
-
- public function checkIgnored($payload, $accessToken, $toLog, $isUncaught)
- {
- if (isset($this->checkIgnore)) {
- try {
- if (call_user_func($this->checkIgnore, $isUncaught, $toLog, $payload)) {
- $this->verboseLogger()->info('Occurrence ignored due to custom check_ignore logic');
- return true;
- }
- } catch (\Exception $exception) {
- $this->verboseLogger()->error(
- 'Exception occurred in the custom checkIgnore logic:' . $exception->getMessage()
- );
- $this->checkIgnore = null;
- }
- }
-
- if ($this->payloadLevelTooLow($payload)) {
- $this->verboseLogger()->debug("Occurrence's level is too low");
- return true;
- }
-
- if (!is_null($this->filter)) {
- $filter = $this->filter->shouldSend($payload, $accessToken);
- $this->verboseLogger()->debug("Custom filter result: " . var_export($filter, true));
- return $filter;
- }
-
- return false;
- }
-
- public function internalCheckIgnored($level, $toLog)
- {
- if ($this->shouldSuppress()) {
- $this->verboseLogger()->debug('Ignoring (error reporting has been disabled in PHP config)');
- return true;
- }
-
- if ($this->levelTooLow($this->levelFactory->fromName($level))) {
- $this->verboseLogger()->debug("Occurrence's level is too low");
- return true;
- }
-
- if ($toLog instanceof ErrorWrapper) {
- return $this->shouldIgnoreErrorWrapper($toLog);
- }
-
- if ($toLog instanceof \Exception) {
- return $this->shouldIgnoreException($toLog);
- }
-
- return false;
- }
-
- /**
- * Check if the error should be ignored due to `included_errno` config,
- * `use_error_reporting` config or `error_sample_rates` config.
- *
- * @param errno
- *
- * @return bool
- */
- public function shouldIgnoreError($errno)
- {
- if ($this->useErrorReporting && ($errno & error_reporting()) === 0) {
- // ignore due to error_reporting level
- $this->verboseLogger()->debug("Ignore (error below allowed error_reporting level)");
- return true;
- }
-
- if ($this->includedErrno != -1 && ($errno & $this->includedErrno) != $errno) {
- // ignore
- $this->verboseLogger()->debug("Ignore due to included_errno level");
- return true;
- }
-
- if (isset($this->errorSampleRates[$errno])) {
- // get a float in the range [0, 1)
- // mt_rand() is inclusive, so add 1 to mt_randmax
- $float_rand = mt_rand() / ($this->mtRandmax + 1);
- if ($float_rand > $this->errorSampleRates[$errno]) {
- // skip
- $this->verboseLogger()->debug("Skip due to error sample rating");
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Check if the error should be ignored due to `included_errno` config,
- * `use_error_reporting` config or `error_sample_rates` config.
- *
- * @param \Rollbar\ErrorWrapper $toLog
- *
- * @return bool
- */
- protected function shouldIgnoreErrorWrapper(ErrorWrapper $toLog)
- {
- return $this->shouldIgnoreError($toLog->errorLevel);
- }
-
- /**
- * Check if the exception should be ignored due to configured exception
- * sample rates.
- *
- * @param \Exception $toLog
- *
- * @return bool
- */
- public function shouldIgnoreException(\Exception $toLog)
- {
- // get a float in the range [0, 1)
- // mt_rand() is inclusive, so add 1 to mt_randmax
- $floatRand = mt_rand() / ($this->mtRandmax + 1);
- if ($floatRand > $this->exceptionSampleRate($toLog)) {
- // skip
- $this->verboseLogger()->debug("Skip exception due to exception sample rating");
- return true;
- }
-
- return false;
- }
-
- /**
- * Calculate what's the chance of logging this exception according to
- * exception sampling.
- *
- * @param \Exception $toLog
- *
- * @return float
- */
- public function exceptionSampleRate(\Exception $toLog)
- {
- $sampleRate = 1.0;
- if (count($this->exceptionSampleRates) == 0) {
- return $sampleRate;
- }
-
- $exceptionClasses = array();
-
- $class = get_class($toLog);
- while ($class) {
- $exceptionClasses []= $class;
- $class = get_parent_class($class);
- }
- $exceptionClasses = array_reverse($exceptionClasses);
-
- foreach ($exceptionClasses as $exceptionClass) {
- if (isset($this->exceptionSampleRates["$exceptionClass"])) {
- $sampleRate = $this->exceptionSampleRates["$exceptionClass"];
- }
- }
-
- return $sampleRate;
- }
-
- /**
- * @param Payload $payload
- * @return bool
- */
- private function payloadLevelTooLow($payload)
- {
- return $this->levelTooLow($payload->getData()->getLevel());
- }
-
- /**
- * @param Level $level
- * @return bool
- */
- private function levelTooLow($level)
- {
- return $level->toInt() < $this->minimumLevel;
- }
-
- private function shouldSuppress()
- {
- return error_reporting() === 0 && !$this->reportSuppressed;
- }
-
- public function send(EncodedPayload $payload, $accessToken)
- {
- if ($this->transmitting()) {
- $response = $this->sender->send($payload, $accessToken);
- } else {
- $response = new Response(0, "Not transmitting (transmitting disabled in configuration)");
- $this->verboseLogger()->warning($response->getInfo());
- }
-
- if ($this->loggingPayload()) {
- $this->logPayloadLogger()->debug(
- 'Sending payload with ' . get_class($this->sender) . ":\n" .
- $payload
- );
- }
-
- return $response;
- }
-
- public function sendBatch(&$batch, $accessToken)
- {
- if ($this->transmitting()) {
- return $this->sender->sendBatch($batch, $accessToken);
- } else {
- $response = new Response(0, "Not transmitting (transmitting disabled in configuration)");
- $this->verboseLogger()->warning($response->getInfo());
- return $response;
- }
- }
-
- public function wait($accessToken, $max = 0)
- {
- $this->verboseLogger()->debug("Sender waiting...");
- $this->sender->wait($accessToken, $max);
- }
-
- public function handleResponse($payload, $response)
- {
- if (!is_null($this->responseHandler)) {
- $this->verboseLogger()->debug(
- 'Applying custom response handler: ' . get_class($this->responseHandler)
- );
- $this->responseHandler->handleResponse($payload, $response);
- }
- }
-}
diff --git a/vendor/rollbar/rollbar/src/DataBuilder.php b/vendor/rollbar/rollbar/src/DataBuilder.php
deleted file mode 100644
index d3bdf1ca..00000000
--- a/vendor/rollbar/rollbar/src/DataBuilder.php
+++ /dev/null
@@ -1,1175 +0,0 @@
-setUtilities($config);
-
- $this->setEnvironment($config);
-
- $this->setRawRequestBody($config);
- $this->setDefaultMessageLevel($config);
- $this->setDefaultExceptionLevel($config);
- $this->setDefaultPsrLevels($config);
- $this->setErrorLevels($config);
- $this->setCodeVersion($config);
- $this->setPlatform($config);
- $this->setFramework($config);
- $this->setContext($config);
- $this->setRequestParams($config);
- $this->setRequestBody($config);
- $this->setRequestExtras($config);
- $this->setHost($config);
- $this->setPerson($config);
- $this->setPersonFunc($config);
- $this->setServerRoot($config);
- $this->setServerBranch($config);
- $this->setServerCodeVersion($config);
- $this->setServerExtras($config);
- $this->setCustom($config);
- $this->setFingerprint($config);
- $this->setTitle($config);
- $this->setNotifier($config);
- $this->setBaseException($config);
- $this->setIncludeCodeContext($config);
- $this->setIncludeExcCodeContext($config);
- $this->setSendMessageTrace($config);
- $this->setLocalVarsDump($config);
- $this->setCaptureErrorStacktraces($config);
- $this->setLevelFactory($config);
- $this->setCaptureEmail($config);
- $this->setCaptureUsername($config);
- $this->setCaptureIP($config);
- $this->setCustomDataMethod($config);
- }
-
- protected function setCaptureIP($config)
- {
- $fromConfig = isset($config['capture_ip']) ? $config['capture_ip'] : null;
- $this->captureIP = self::$defaults->captureIP($fromConfig);
- }
-
- protected function setCaptureEmail($config)
- {
- $fromConfig = isset($config['capture_email']) ? $config['capture_email'] : null;
- $this->captureEmail = self::$defaults->captureEmail($fromConfig);
- }
-
- protected function setCaptureUsername($config)
- {
- $fromConfig = isset($config['capture_username']) ? $config['capture_username'] : null;
- $this->captureUsername = self::$defaults->captureUsername($fromConfig);
- }
-
- protected function setEnvironment($config)
- {
- $fromConfig = isset($config['environment']) ? $config['environment'] : self::$defaults->get()->environment();
- $this->utilities->validateString($fromConfig, "config['environment']", null, false);
- $this->environment = $fromConfig;
- }
-
- protected function setDefaultMessageLevel($config)
- {
- $fromConfig = isset($config['messageLevel']) ? $config['messageLevel'] : null;
- $this->messageLevel = self::$defaults->messageLevel($fromConfig);
- }
-
- protected function setDefaultExceptionLevel($config)
- {
- $fromConfig = isset($config['exceptionLevel']) ? $config['exceptionLevel'] : null;
- $this->exceptionLevel = self::$defaults->exceptionLevel($fromConfig);
- }
-
- protected function setDefaultPsrLevels($config)
- {
- $fromConfig = isset($config['psrLevels']) ? $config['psrLevels'] : null;
- $this->psrLevels = self::$defaults->psrLevels($fromConfig);
- }
-
- protected function setErrorLevels($config)
- {
- $fromConfig = isset($config['errorLevels']) ? $config['errorLevels'] : null;
- $this->errorLevels = self::$defaults->errorLevels($fromConfig);
- }
-
- protected function setSendMessageTrace($config)
- {
- $fromConfig = isset($config['send_message_trace']) ? $config['send_message_trace'] : null;
- $this->sendMessageTrace = self::$defaults->sendMessageTrace($fromConfig);
- }
-
- protected function setRawRequestBody($config)
- {
- $fromConfig = isset($config['include_raw_request_body']) ? $config['include_raw_request_body'] : null;
- $this->rawRequestBody = self::$defaults->rawRequestBody($fromConfig);
- }
-
- protected function setLocalVarsDump($config)
- {
- $fromConfig = isset($config['local_vars_dump']) ? $config['local_vars_dump'] : null;
- $this->localVarsDump = self::$defaults->localVarsDump($fromConfig);
- }
-
- protected function setCaptureErrorStacktraces($config)
- {
- $fromConfig = isset($config['capture_error_stacktraces']) ? $config['capture_error_stacktraces'] : null;
- $this->captureErrorStacktraces = self::$defaults->captureErrorStacktraces($fromConfig);
- }
-
- protected function setCodeVersion($config)
- {
- $fromConfig = isset($config['codeVersion']) ? $config['codeVersion'] : null;
- if (!isset($fromConfig)) {
- $fromConfig = isset($config['code_version']) ? $config['code_version'] : null;
- }
- $this->codeVersion = self::$defaults->codeVersion($fromConfig);
- }
-
- protected function setPlatform($config)
- {
- $fromConfig = isset($config['platform']) ? $config['platform'] : null;
- $this->platform = self::$defaults->platform($fromConfig);
- }
-
- protected function setFramework($config)
- {
- $this->framework = isset($config['framework']) ? $config['framework'] : null;
- }
-
- protected function setContext($config)
- {
- $this->context = isset($config['context']) ? $config['context'] : null;
- }
-
- protected function setRequestParams($config)
- {
- $this->requestParams = isset($config['requestParams']) ? $config['requestParams'] : null;
- }
-
- /*
- * @SuppressWarnings(PHPMD.Superglobals)
- */
- protected function setRequestBody($config)
- {
-
- $this->requestBody = isset($config['requestBody']) ? $config['requestBody'] : null;
-
- if (!$this->requestBody && $this->rawRequestBody) {
- $this->requestBody = file_get_contents("php://input");
- if (version_compare(PHP_VERSION, '5.6.0') < 0) {
- $_SERVER['php://input'] = $this->requestBody;
- }
- }
- }
-
- protected function setRequestExtras($config)
- {
- $this->requestExtras = isset($config["requestExtras"]) ? $config["requestExtras"] : null;
- }
-
- protected function setPerson($config)
- {
- $this->person = isset($config['person']) ? $config['person'] : null;
- }
-
- protected function setPersonFunc($config)
- {
- $this->personFunc = isset($config['person_fn']) ? $config['person_fn'] : null;
- }
-
- protected function setServerRoot($config)
- {
- $fromConfig = isset($config['serverRoot']) ? $config['serverRoot'] : null;
- if (!isset($fromConfig)) {
- $fromConfig = isset($config['root']) ? $config['root'] : null;
- }
- $this->serverRoot = self::$defaults->serverRoot($fromConfig);
- }
-
- protected function setServerBranch($config)
- {
- $fromConfig = isset($config['serverBranch']) ? $config['serverBranch'] : null;
- if (!isset($fromConfig)) {
- $fromConfig = isset($config['branch']) ? $config['branch'] : null;
- }
-
- $this->serverBranch = self::$defaults->branch($fromConfig);
-
- if ($this->serverBranch === null) {
- $autodetectBranch = isset($config['autodetect_branch']) ?
- $config['autodetect_branch'] :
- self::$defaults->autodetectBranch();
-
- if ($autodetectBranch) {
- $allowExec = isset($config['allow_exec']) ?
- $config['allow_exec'] :
- self::$defaults->allowExec();
-
- $this->serverBranch = $this->detectGitBranch($allowExec);
- }
- }
- }
-
- protected function setServerCodeVersion($config)
- {
- $this->serverCodeVersion = isset($config['serverCodeVersion']) ? $config['serverCodeVersion'] : null;
- }
-
- protected function setServerExtras($config)
- {
- $this->serverExtras = isset($config['serverExtras']) ? $config['serverExtras'] : null;
- }
-
- public function setCustom($config)
- {
- $this->custom = isset($config['custom']) ? $config['custom'] : \Rollbar\Defaults::get()->custom();
- }
-
- public function setCustomDataMethod($config)
- {
- $this->customDataMethod = isset($config['custom_data_method']) ?
- $config['custom_data_method'] :
- \Rollbar\Defaults::get()->customDataMethod();
- }
-
- protected function setFingerprint($config)
- {
- $this->fingerprint = isset($config['fingerprint']) ? $config['fingerprint'] : null;
- }
-
- protected function setTitle($config)
- {
- $this->title = isset($config['title']) ? $config['title'] : null;
- }
-
- protected function setNotifier($config)
- {
- $fromConfig = isset($config['notifier']) ? $config['notifier'] : null;
- $this->notifier = self::$defaults->notifier($fromConfig);
- }
-
- protected function setBaseException($config)
- {
- $fromConfig = isset($config['baseException']) ? $config['baseException'] : null;
- $this->baseException = self::$defaults->baseException($fromConfig);
- }
-
- protected function setIncludeCodeContext($config)
- {
- $fromConfig = isset($config['include_error_code_context']) ? $config['include_error_code_context'] : null;
- $this->includeCodeContext = self::$defaults->includeCodeContext($fromConfig);
- }
-
- protected function setIncludeExcCodeContext($config)
- {
- $fromConfig =
- isset($config['include_exception_code_context']) ? $config['include_exception_code_context'] : null;
- $this->includeExcCodeContext = self::$defaults->includeExcCodeContext($fromConfig);
- }
-
- protected function setLevelFactory($config)
- {
- $this->levelFactory = isset($config['levelFactory']) ? $config['levelFactory'] : null;
- if (!$this->levelFactory) {
- throw new \InvalidArgumentException(
- 'Missing dependency: LevelFactory not provided to the DataBuilder.'
- );
- }
- }
-
- protected function setUtilities($config)
- {
- $this->utilities = isset($config['utilities']) ? $config['utilities'] : null;
- if (!$this->utilities) {
- throw new \InvalidArgumentException(
- 'Missing dependency: Utilities not provided to the DataBuilder.'
- );
- }
- }
-
- protected function setHost($config)
- {
- $this->host = isset($config['host']) ? $config['host'] : self::$defaults->host();
- }
-
- /**
- * @param string $level
- * @param \Exception | \Throwable | string $toLog
- * @param $context
- * @return Data
- */
- public function makeData($level, $toLog, $context)
- {
- $env = $this->getEnvironment();
- $body = $this->getBody($toLog, $context);
- $data = new Data($env, $body);
- $data->setLevel($this->getLevel($level, $toLog))
- ->setTimestamp($this->getTimestamp())
- ->setCodeVersion($this->getCodeVersion())
- ->setPlatform($this->getPlatform())
- ->setLanguage($this->getLanguage())
- ->setFramework($this->getFramework())
- ->setContext($this->getContext())
- ->setRequest($this->getRequest())
- ->setPerson($this->getPerson())
- ->setServer($this->getServer())
- ->setCustom($this->getCustomForPayload($toLog, $context))
- ->setFingerprint($this->getFingerprint($context))
- ->setTitle($this->getTitle())
- ->setUuid($this->getUuid())
- ->setNotifier($this->getNotifier());
- return $data;
- }
-
- public function getEnvironment()
- {
- return $this->environment;
- }
-
- protected function getBody($toLog, $context)
- {
- $baseException = $this->getBaseException();
- if ($toLog instanceof ErrorWrapper) {
- $content = $this->getErrorTrace($toLog);
- } elseif ($toLog instanceof $baseException) {
- $content = $this->getExceptionTrace($toLog);
- } else {
- $content = $this->getMessage($toLog);
- }
- return new Body($content, $context);
- }
-
- public function getErrorTrace(ErrorWrapper $error)
- {
- return $this->makeTrace($error, $this->includeCodeContext, $error->getClassName());
- }
-
- /**
- * @param \Throwable|\Exception $exc
- * @return Trace|TraceChain
- */
- public function getExceptionTrace($exc)
- {
- $chain = array();
- $chain[] = $this->makeTrace($exc, $this->includeExcCodeContext);
-
- $previous = $exc->getPrevious();
-
- $baseException = $this->getBaseException();
- while ($previous instanceof $baseException) {
- $chain[] = $this->makeTrace($previous, $this->includeExcCodeContext);
- if ($previous->getPrevious() === $previous) {
- break;
- }
- $previous = $previous->getPrevious();
- }
-
- if (count($chain) > 1) {
- return new TraceChain($chain);
- }
-
- return $chain[0];
- }
-
- /**
- * @param \Throwable|\Exception $exception
- * @param Boolean $includeContext whether or not to include context
- * @param string $classOverride
- * @return Trace
- */
- public function makeTrace($exception, $includeContext, $classOverride = null)
- {
- if ($this->captureErrorStacktraces) {
- $frames = $this->makeFrames($exception, $includeContext);
- } else {
- $frames = array();
- }
-
- $excInfo = new ExceptionInfo(
- $classOverride ?: get_class($exception),
- $exception->getMessage()
- );
- return new Trace($frames, $excInfo);
- }
-
- public function makeFrames($exception, $includeContext)
- {
- $frames = array();
-
- foreach ($this->getTrace($exception) as $frameInfo) {
- $filename = isset($frameInfo['file']) ? $frameInfo['file'] : null;
- $lineno = isset($frameInfo['line']) ? $frameInfo['line'] : null;
- $method = isset($frameInfo['function']) ? $frameInfo['function'] : null;
- if (isset($frameInfo['class'])) {
- $method = $frameInfo['class'] . "::" . $method;
- }
- $args = isset($frameInfo['args']) ? $frameInfo['args'] : null;
-
- $frame = new Frame($filename);
- $frame->setLineno($lineno)
- ->setMethod($method);
-
- if ($this->localVarsDump && $args !== null) {
- $frame->setArgs($args);
- }
-
- if ($includeContext) {
- $this->addCodeContextToFrame($frame, $filename, $lineno);
- }
-
- $frames[] = $frame;
- }
-
- $frames = array_reverse($frames);
-
- return $frames;
- }
-
- private function addCodeContextToFrame(Frame $frame, $filename, $line)
- {
- if (!file_exists($filename)) {
- return;
- }
-
- $source = $this->getSourceLines($filename);
-
- $total = count($source);
- $line = max($line - 1, 0);
- $frame->setCode($source[$line]);
- $offset = 6;
- $min = max($line - $offset, 0);
- $pre = null;
- $post = null;
- if ($min !== $line) {
- $pre = array_slice($source, $min, $line - $min);
- }
- $max = min($line + $offset, $total);
- if ($max !== $line) {
- $post = array_slice($source, $line + 1, $max - $line);
- }
- $frame->setContext(new Context($pre, $post));
- }
-
- private function getTrace($exc)
- {
- if ($exc instanceof ErrorWrapper) {
- return $exc->getBacktrace();
- } else {
- $trace = $exc->getTrace();
-
- // Add the Exception's file and line as the last frame of the trace
- array_unshift($trace, array('file' => $exc->getFile(), 'line' => $exc->getLine()));
-
- return $trace;
- }
- }
-
- protected function getMessage($toLog)
- {
- return new Message(
- (string)$toLog,
- $this->sendMessageTrace ?
- debug_backtrace($this->localVarsDump ? 0 : DEBUG_BACKTRACE_IGNORE_ARGS) :
- null
- );
- }
-
- protected function getLevel($level, $toLog)
- {
- if (is_null($level)) {
- if ($toLog instanceof ErrorWrapper) {
- $level = isset($this->errorLevels[$toLog->errorLevel]) ? $this->errorLevels[$toLog->errorLevel] : null;
- } elseif ($toLog instanceof \Exception) {
- $level = $this->exceptionLevel;
- } else {
- $level = $this->messageLevel;
- }
- }
- $level = strtolower($level);
- $level = isset($this->psrLevels[$level]) ? $this->psrLevels[$level] : null;
- return $this->levelFactory->fromName($level);
- }
-
- protected function getTimestamp()
- {
- return time();
- }
-
- protected function getCodeVersion()
- {
- return $this->codeVersion;
- }
-
- protected function getPlatform()
- {
- return $this->platform;
- }
-
- protected function getLanguage()
- {
- return "php";
- // TODO: once the backend understands a more informative language value
- // return "PHP " . phpversion();
- }
-
- protected function getFramework()
- {
- return $this->framework;
- }
-
- protected function getContext()
- {
- return $this->context;
- }
-
- /*
- * @SuppressWarnings(PHPMD.Superglobals)
- */
- protected function getRequest()
- {
- $request = new Request();
-
- $request->setUrl($this->getUrl())
- ->setHeaders($this->getHeaders())
- ->setParams($this->getRequestParams())
- ->setBody($this->getRequestBody())
- ->setUserIp($this->getUserIp());
-
- if (isset($_SERVER)) {
- $request->setMethod(isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : null)
- ->setQueryString(isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : null);
- }
-
- if (isset($_GET)) {
- $request->setGet($_GET);
- }
- if (isset($_POST)) {
- $request->setPost($_POST);
- }
-
- if ($request->getMethod() === 'PUT') {
- $postData = array();
- parse_str($request->getBody(), $postData);
- $request->setPost($postData);
- }
-
- $extras = $this->getRequestExtras();
- if (!$extras) {
- $extras = array();
- }
-
- $request->setExtras($extras);
-
- if (isset($_SESSION) && is_array($_SESSION) && count($_SESSION) > 0) {
- $request->setSession($_SESSION);
- }
- return $request;
- }
-
- public function parseForwardedString($forwarded)
- {
- $result = array();
-
- // Remove Forwarded = 1#forwarded-element header prefix
- $parts = trim(str_replace('Forwarded:', '', $forwarded));
-
- /**
- * Break up the forwarded-element =
- * [ forwarded-pair ] *( ";" [ forwarded-pair ] )
- */
- $parts = explode(';', $parts);
-
- /**
- * Parse forwarded pairs
- */
- foreach ($parts as $forwardedPair) {
- $forwardedPair = trim($forwardedPair);
-
-
- if (stripos($forwardedPair, 'host=') !== false) {
- // Parse 'host' forwarded pair
- $result['host'] = substr($forwardedPair, strlen('host='));
- } elseif (stripos($forwardedPair, 'proto=') !== false) {
- // Parse 'proto' forwarded pair
- $result['proto'] = substr($forwardedPair, strlen('proto='));
- } else {
- // Parse 'for' and 'by' forwarded pairs which are comma separated
- $fpParts = explode(',', $forwardedPair);
- foreach ($fpParts as $fpPart) {
- $fpPart = trim($fpPart);
-
- if (stripos($fpPart, 'for=') !== false) {
- // Parse 'for' forwarded pair
- $result['for'] = isset($result['for']) ? $result['for'] : array();
- $result['for'][] = substr($fpPart, strlen('for='));
- } elseif (stripos($fpPart, 'by=') !== false) {
- // Parse 'by' forwarded pair
- $result['by'] = isset($result['by']) ? $result['by'] : array();
- $result['by'][] = substr($fpPart, strlen('by='));
- }
- }
- }
- }
-
- return $result;
- }
-
- /*
- * @SuppressWarnings(PHPMD.Superglobals)
- */
- public function getUrlProto()
- {
- $proto = '';
-
- if (!empty($_SERVER['HTTP_FORWARDED'])) {
- extract($this->parseForwardedString($_SERVER['HTTP_FORWARDED']));
- }
-
- if (empty($proto)) {
- if (!empty($_SERVER['HTTP_X_FORWARDED_PROTO'])) {
- $proto = explode(',', strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']));
- $proto = $proto[0];
- } elseif (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
- $proto = 'https';
- } else {
- $proto = 'http';
- }
- }
-
- return $proto;
- }
-
- /*
- * @SuppressWarnings(PHPMD.Superglobals)
- */
- public function getUrlHost()
- {
- $host = '';
-
- if (!empty($_SERVER['HTTP_FORWARDED'])) {
- extract($this->parseForwardedString($_SERVER['HTTP_FORWARDED']));
- }
-
- if (empty($host)) {
- if (!empty($_SERVER['HTTP_X_FORWARDED_HOST'])) {
- $host = $_SERVER['HTTP_X_FORWARDED_HOST'];
- } elseif (!empty($_SERVER['HTTP_HOST'])) {
- $parts = explode(':', $_SERVER['HTTP_HOST']);
- $host = $parts[0];
- } elseif (!empty($_SERVER['SERVER_NAME'])) {
- $host = $_SERVER['SERVER_NAME'];
- } else {
- $host = 'unknown';
- }
- }
-
- return $host;
- }
-
- /*
- * @SuppressWarnings(PHPMD.Superglobals)
- */
- public function getUrlPort($proto)
- {
- $port = '';
-
- if (!empty($_SERVER['HTTP_X_FORWARDED_PORT'])) {
- $port = $_SERVER['HTTP_X_FORWARDED_PORT'];
- } elseif (!empty($_SERVER['SERVER_PORT'])) {
- $port = $_SERVER['SERVER_PORT'];
- } elseif ($proto === 'https') {
- $port = 443;
- } else {
- $port = 80;
- }
-
- return $port;
- }
-
- /*
- * @SuppressWarnings(PHPMD.Superglobals)
- */
- public function getUrl()
- {
- $proto = $this->getUrlProto();
- $host = $this->getUrlHost();
- $port = $this->getUrlPort($proto);
-
-
- $url = $proto . '://' . $host;
- if (($proto == 'https' && $port != 443) || ($proto == 'http' && $port != 80)) {
- $url .= ':' . $port;
- }
-
- if (isset($_SERVER)) {
- $path = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '/';
- $url .= $path;
- }
-
- if ($host == 'unknown') {
- $url = null;
- }
-
- return $url;
- }
-
- /*
- * @SuppressWarnings(PHPMD.Superglobals)
- */
- public function getHeaders()
- {
- $headers = array();
- if (isset($_SERVER)) {
- foreach ($_SERVER as $key => $val) {
- if (substr($key, 0, 5) == 'HTTP_') {
- // convert HTTP_CONTENT_TYPE to Content-Type, HTTP_HOST to Host, etc.
- $name = strtolower(substr($key, 5));
- $name = str_replace(' ', '-', ucwords(str_replace('_', ' ', $name)));
- $headers[$name] = $val;
- }
- }
- }
- if (count($headers) > 0) {
- return $headers;
- } else {
- return null;
- }
- }
-
-
- protected function getRequestParams()
- {
- return $this->requestParams;
- }
-
- protected function getRequestBody()
- {
- return $this->requestBody;
- }
-
- /*
- * @SuppressWarnings(PHPMD.Superglobals)
- */
- protected function getUserIp()
- {
- if (!isset($_SERVER) || $this->captureIP === false) {
- return null;
- }
-
- $ipAddress = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : null;
-
- $forwardFor = isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : null;
- if ($forwardFor) {
- // return everything until the first comma
- $parts = explode(',', $forwardFor);
- $ipAddress = $parts[0];
- }
- $realIp = isset($_SERVER['HTTP_X_REAL_IP']) ? $_SERVER['HTTP_X_REAL_IP'] : null;
- if ($realIp) {
- $ipAddress = $realIp;
- }
-
- if ($this->captureIP === DataBuilder::ANONYMIZE_IP) {
- if (filter_var($ipAddress, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {
- $parts = explode('.', $ipAddress);
- $ipAddress = $parts[0] . '.' . $parts[1] . '.' . $parts[2] . '.0';
- } elseif (filter_var($ipAddress, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
- $parts = explode(':', $ipAddress);
- $ipAddress =
- $parts[0] . ':' .
- $parts[1] . ':' .
- $parts[2] . ':' .
- '0000:0000:0000:0000:0000';
- }
- }
-
- return $ipAddress;
- }
-
- protected function getRequestExtras()
- {
- return $this->requestExtras;
- }
-
- /**
- * @return Person
- */
- protected function getPerson()
- {
- $personData = $this->person;
- if (!isset($personData) && is_callable($this->personFunc)) {
- try {
- $personData = call_user_func($this->personFunc);
- } catch (\Exception $exception) {
- Rollbar::scope(array('person_fn' => null))->
- log(Level::ERROR, $exception);
- }
- }
-
- if (!isset($personData['id'])) {
- return null;
- }
-
- $identifier = $personData['id'];
-
- $email = null;
- if ($this->captureEmail && isset($personData['email'])) {
- $email = $personData['email'];
- }
-
- $username = null;
- if ($this->captureUsername && isset($personData['username'])) {
- $username = $personData['username'];
- }
-
- unset($personData['id'], $personData['email'], $personData['username']);
- return new Person($identifier, $username, $email, $personData);
- }
-
- /*
- * @SuppressWarnings(PHPMD.Superglobals)
- */
- protected function getServer()
- {
- $server = new Server();
- $server->setHost($this->getHost())
- ->setRoot($this->getServerRoot())
- ->setBranch($this->getServerBranch())
- ->setCodeVersion($this->getServerCodeVersion());
- $extras = $this->getServerExtras();
- if (!$extras) {
- $extras = array();
- }
-
- $server->setExtras($extras);
- if (isset($_SERVER) && array_key_exists('argv', $_SERVER)) {
- $server->setArgv($_SERVER['argv']);
- }
- return $server;
- }
-
- protected function getHost()
- {
- if (isset($this->host)) {
- return $this->host;
- }
- return gethostname();
- }
-
- protected function getServerRoot()
- {
- return $this->serverRoot;
- }
-
- protected function getServerBranch()
- {
- return $this->serverBranch;
- }
-
- protected function getServerCodeVersion()
- {
- return $this->serverCodeVersion;
- }
-
- protected function getServerExtras()
- {
- return $this->serverExtras;
- }
-
- public function getCustom()
- {
- return $this->custom;
- }
-
- public function getCustomDataMethod()
- {
- return $this->customDataMethod;
- }
-
- protected function getCustomForPayload($toLog, $context)
- {
- $custom = $this->getCustom();
-
- // Make this an array if possible:
- if ($custom instanceof \Serializable) {
- $custom = $custom->serialize();
- } elseif (is_null($custom)) {
- $custom = array();
- } elseif (!is_array($custom)) {
- $custom = get_object_vars($custom);
- }
-
- if ($customDataMethod = $this->getCustomDataMethod()) {
- $customDataMethodContext = isset($context['custom_data_method_context']) ?
- $context['custom_data_method_context'] :
- null;
-
- $customDataMethodResult = $customDataMethod($toLog, $customDataMethodContext);
-
- $custom = array_merge($custom, $customDataMethodResult);
- }
-
- unset($context['custom_data_method_context']);
-
- return $custom;
- }
-
- public function addCustom($key, $data)
- {
- if ($this->custom === null) {
- $this->custom = array();
- }
-
- if (!is_array($this->custom)) {
- throw new \Exception(
- "Custom data configured in Rollbar::init() is not an array."
- );
- }
-
- $this->custom[$key] = $data;
- }
-
- public function removeCustom($key)
- {
- unset($this->custom[$key]);
- }
-
- protected function getFingerprint($context)
- {
- return isset($context['fingerprint']) ? $context['fingerprint'] : $this->fingerprint;
- }
-
- protected function getTitle()
- {
- return $this->title;
- }
-
- protected function getUuid()
- {
- return $this->utilities->uuid4();
- }
-
- protected function getNotifier()
- {
- return $this->notifier;
- }
-
- protected function getBaseException()
- {
- return $this->baseException;
- }
-
- /**
- * Parses an array of code lines from source file with given filename.
- *
- * Attempts to automatically detect the line break character used in the file.
- *
- * @param string $filename
- * @return string[] An array of lines of code from the given source file.
- */
- private function getSourceLines($filename)
- {
- $rawSource = file_get_contents($filename);
-
- $source = explode(PHP_EOL, $rawSource);
-
- if (count($source) === 1) {
- if (substr_count($rawSource, "\n") > substr_count($rawSource, "\r")) {
- $source = explode("\n", $rawSource);
- } else {
- $source = explode("\r", $rawSource);
- }
- }
-
- $source = str_replace(array("\n", "\t", "\r"), '', $source);
-
- return $source;
- }
-
- /**
- * Wrap a PHP error in an ErrorWrapper class and add backtrace information
- *
- * @param string $errno
- * @param string $errstr
- * @param string $errfile
- * @param string $errline
- *
- * @return ErrorWrapper
- */
- public function generateErrorWrapper($errno, $errstr, $errfile, $errline)
- {
- return new ErrorWrapper(
- $errno,
- $errstr,
- $errfile,
- $errline,
- $this->buildErrorTrace($errfile, $errline),
- $this->utilities
- );
- }
-
- /**
- * Fetches the stack trace for fatal and regular errors.
- *
- * @var string $errfile
- * @var string $errline
- *
- * @return Rollbar\ErrorWrapper
- */
- protected function buildErrorTrace($errfile, $errline)
- {
- if ($this->captureErrorStacktraces) {
- $backTrace = $this->fetchErrorTrace();
-
- $backTrace = $this->stripShutdownFrames($backTrace);
-
- // Add the final frame
- array_unshift(
- $backTrace,
- array('file' => $errfile, 'line' => $errline)
- );
- } else {
- $backTrace = array();
- }
-
- return $backTrace;
- }
-
- private function fetchErrorTrace()
- {
- if (function_exists('xdebug_get_function_stack')) {
- return array_reverse(\xdebug_get_function_stack());
- } else {
- return debug_backtrace($this->localVarsDump ? 0 : DEBUG_BACKTRACE_IGNORE_ARGS);
- }
- }
-
- private function stripShutdownFrames($backTrace)
- {
- foreach ($backTrace as $index => $frame) {
- extract($frame);
-
- $fatalHandlerMethod = (isset($method)
- && $method === 'Rollbar\\Handlers\\FatalHandler::handle');
-
- $fatalHandlerClassAndFunction = (isset($class)
- && $class === 'Rollbar\\Handlers\\FatalHandler'
- && isset($function)
- && $function === 'handle');
-
- $errorHandlerMethod = (isset($method)
- && $method === 'Rollbar\\Handlers\\ErrorHandler::handle');
-
- $errorHandlerClassAndFunction = (isset($class)
- && $class === 'Rollbar\\Handlers\\ErrorHandler'
- && isset($function)
- && $function === 'handle');
-
- if ($fatalHandlerMethod ||
- $fatalHandlerClassAndFunction ||
- $errorHandlerMethod ||
- $errorHandlerClassAndFunction ) {
- return array_slice($backTrace, $index+1);
- }
- }
-
- return $backTrace;
- }
-
- public function detectGitBranch($allowExec = true)
- {
- if ($allowExec) {
- static $cachedValue;
- static $hasExecuted = false;
- if (!$hasExecuted) {
- $cachedValue = self::getGitBranch();
- $hasExecuted = true;
- }
- return $cachedValue;
- }
- return null;
- }
-
- private static function getGitBranch()
- {
- try {
- if (function_exists('shell_exec')) {
- $stdRedirCmd = Utilities::isWindows() ? " > NUL" : " 2> /dev/null";
- $output = rtrim(shell_exec('git rev-parse --abbrev-ref HEAD' . $stdRedirCmd));
- if ($output) {
- return $output;
- }
- }
- return null;
- } catch (\Exception $e) {
- return null;
- }
- }
-}
diff --git a/vendor/rollbar/rollbar/src/DataBuilderInterface.php b/vendor/rollbar/rollbar/src/DataBuilderInterface.php
deleted file mode 100644
index 36e4c962..00000000
--- a/vendor/rollbar/rollbar/src/DataBuilderInterface.php
+++ /dev/null
@@ -1,6 +0,0 @@
-psrLevels = array(
- LogLevel::EMERGENCY => "critical",
- "emergency" => "critical",
- LogLevel::ALERT => "critical",
- "alert" => "critical",
- LogLevel::CRITICAL => "critical",
- "critical" => "critical",
- LogLevel::ERROR => "error",
- "error" => "error",
- LogLevel::WARNING => "warning",
- "warning" => "warning",
- LogLevel::NOTICE => "info",
- "notice" => "info",
- LogLevel::INFO => "info",
- "info" => "info",
- LogLevel::DEBUG => "debug",
- "debug" => "debug"
- );
- $this->errorLevels = array(
- E_ERROR => "error",
- E_WARNING => "warning",
- E_PARSE => "critical",
- E_NOTICE => "debug",
- E_CORE_ERROR => "critical",
- E_CORE_WARNING => "warning",
- E_COMPILE_ERROR => "critical",
- E_COMPILE_WARNING => "warning",
- E_USER_ERROR => "error",
- E_USER_WARNING => "warning",
- E_USER_NOTICE => "debug",
- E_STRICT => "info",
- E_RECOVERABLE_ERROR => "error",
- E_DEPRECATED => "info",
- E_USER_DEPRECATED => "info"
- );
- $this->scrubFields = array(
- 'passwd',
- 'password',
- 'secret',
- 'confirm_password',
- 'password_confirmation',
- 'auth_token',
- 'csrf_token',
- 'access_token'
- );
- $this->serverRoot = isset($_ENV["HEROKU_APP_DIR"]) ? $_ENV["HEROKU_APP_DIR"] : null;
- $this->platform = php_uname('a');
- $this->notifier = Notifier::defaultNotifier();
- $this->baseException = version_compare(phpversion(), '7.0', '<') ? '\Exception' : '\Throwable';
- $this->errorSampleRates = array();
- $this->exceptionSampleRates = array();
-
- $this->utilities = $utilities;
- }
-
- public function fromSnakeCase($option)
- {
- $spaced = str_replace('_', ' ', $option);
- $method = lcfirst(str_replace(' ', '', ucwords($spaced)));
-
- if (method_exists($this, $method)) {
- return $this->$method();
- } else {
- throw new \Exception('No default value defined for property ' . $method . '.');
- }
- }
-
- private $utilities;
- private $data;
- private static $singleton = null;
-
- public function psrLevels($value = null)
- {
- return $value !== null ? $value : $this->psrLevels;
- }
-
- public function errorLevels($value = null)
- {
- return $value !== null ? $value : $this->errorLevels;
- }
-
- public function autodetectBranch($value = null)
- {
- return $value !== null ? $value : $this->autodetectBranch;
- }
-
- public function branch($value = null)
- {
- return $value !== null ? $value : $this->branch;
- }
-
- public function serverRoot($value = null)
- {
- return $value !== null ? $value : $this->serverRoot;
- }
-
- public function platform($value = null)
- {
- return $value !== null ? $value : $this->platform;
- }
-
- public function notifier($value = null)
- {
- return $value !== null ? $value : $this->notifier;
- }
-
- public function baseException($value = null)
- {
- return $value !== null ? $value : $this->baseException;
- }
-
- public function codeVersion($value = null)
- {
- return $value !== null ? $value : $this->codeVersion;
- }
-
- public function sendMessageTrace($value = null)
- {
- return $value !== null ? $value : $this->sendMessageTrace;
- }
-
- public function includeCodeContext($value = null)
- {
- return $value !== null ? $value : $this->includeCodeContext;
- }
-
- public function includeExcCodeContext($value = null)
- {
- return $value !== null ? $value : $this->includeExcCodeContext;
- }
-
- public function rawRequestBody($value = null)
- {
- return $value !== null ? $value : $this->rawRequestBody;
- }
-
- public function localVarsDump($value = null)
- {
- return $value !== null ? $value : $this->localVarsDump;
- }
-
- public function errorSampleRates($value = null)
- {
- return $value !== null ? $value : $this->errorSampleRates;
- }
-
- public function exceptionSampleRates($value = null)
- {
- return $value !== null ? $value : $this->exceptionSampleRates;
- }
-
- public function includedErrno($value = null)
- {
- return $value !== null ? $value : $this->includedErrno;
- }
-
- public function includeErrorCodeContext($value = null)
- {
- return $value !== null ? $value : $this->includeErrorCodeContext;
- }
-
- public function includeExceptionCodeContext($value = null)
- {
- return $value !== null ? $value : $this->includeExceptionCodeContext;
- }
-
- public function agentLogLocation($value = null)
- {
- return $value !== null ? $value : $this->agentLogLocation;
- }
-
- public function allowExec($value = null)
- {
- return $value !== null ? $value : $this->allowExec;
- }
-
- public function messageLevel($value = null)
- {
- return $value !== null ? $value : $this->messageLevel;
- }
-
- public function exceptionLevel($value = null)
- {
- return $value !== null ? $value : $this->exceptionLevel;
- }
-
- public function endpoint($value = null)
- {
- return $value !== null ? $value : $this->endpoint;
- }
-
- public function captureErrorStacktraces($value = null)
- {
- return $value !== null ? $value : $this->captureErrorStacktraces;
- }
-
- public function checkIgnore($value = null)
- {
- return $value !== null ? $value : $this->checkIgnore;
- }
-
- public function custom($value = null)
- {
- return $value !== null ? $value : $this->custom;
- }
-
- public function customDataMethod($value = null)
- {
- return $value !== null ? $value : $this->customDataMethod;
- }
-
- public function enabled($value = null)
- {
- return $value !== null ? $value : $this->enabled;
- }
-
- public function transmit($value = null)
- {
- return $value !== null ? $value : $this->transmit;
- }
-
- public function logPayload($value = null)
- {
- return $value !== null ? $value : $this->logPayload;
- }
-
- public function verbose($value = null)
- {
- return $value !== null ? $value : $this->verbose;
- }
-
- public function environment($value = null)
- {
- return $value !== null ? $value : $this->environment;
- }
-
- public function fluentHost($value = null)
- {
- return $value !== null ? $value : $this->fluentHost;
- }
-
- public function fluentPort($value = null)
- {
- return $value !== null ? $value : $this->fluentPort;
- }
-
- public function fluentTag($value = null)
- {
- return $value !== null ? $value : $this->fluentTag;
- }
-
- public function handler($value = null)
- {
- return $value !== null ? $value : $this->handler;
- }
-
- public function host($value = null)
- {
- return $value !== null ? $value : $this->host;
- }
-
- public function timeout($value = null)
- {
- return $value !== null ? $value : $this->timeout;
- }
-
- public function reportSuppressed($value = null)
- {
- return $value !== null ? $value : $this->reportSuppressed;
- }
-
- public function useErrorReporting($value = null)
- {
- return $value !== null ? $value : $this->useErrorReporting;
- }
-
- public function captureIP($value = null)
- {
- return $value !== null ? $value : $this->captureIP;
- }
-
- public function captureEmail($value = null)
- {
- return $value !== null ? $value : $this->captureEmail;
- }
-
- public function captureUsername($value = null)
- {
- return $value !== null ? $value : $this->captureUsername;
- }
-
- public function scrubFields($value = null)
- {
- return $value !== null ? $value : $this->scrubFields;
- }
-
- public function customTruncation($value = null)
- {
- return $value !== null ? $value : $this->customTruncation;
- }
-
- public function maxNestingDepth($value = null)
- {
- return $value !== null ? $value : $this->maxNestingDepth;
- }
-
- public function maxItems($value = null)
- {
- return $value !== null ? $value : $this->maxItems;
- }
-
- public function minimumLevel($value = null)
- {
- return $value !== null ? $value : $this->minimumLevel;
- }
-
- public function raiseOnError($value = null)
- {
- return $value !== null ? $value : $this->raiseOnError;
- }
-
- private $psrLevels;
- private $errorLevels;
- private $autodetectBranch = false;
- private $branch = null;
- private $serverRoot;
- private $platform;
- private $notifier;
- private $baseException;
- private $codeVersion = "";
- private $sendMessageTrace = false;
- private $includeCodeContext = false;
- private $includeExcCodeContext = false;
- private $rawRequestBody = false;
- private $localVarsDump = true;
- private $maxNestingDepth = -1;
- private $errorSampleRates = array();
- private $exceptionSampleRates = array();
- private $includedErrno = ROLLBAR_INCLUDED_ERRNO_BITMASK;
- private $includeErrorCodeContext = null;
- private $includeExceptionCodeContext = null;
- private $agentLogLocation = '/var/tmp';
- private $allowExec = true;
- private $messageLevel = "warning";
- private $exceptionLevel = "error";
- private $endpoint = 'https://api.rollbar.com/api/1/';
- private $captureErrorStacktraces = true;
- private $checkIgnore = null;
- private $custom = null;
- private $customDataMethod = null;
- private $enabled = true;
- private $transmit = true;
- private $logPayload = false;
- private $verbose = \Rollbar\Config::VERBOSE_NONE;
- private $environment = 'production';
- private $fluentHost = '127.0.0.1';
- private $fluentPort = 24224;
- private $fluentTag = 'rollbar';
- private $handler = 'blocking';
- private $host = null;
- private $timeout = 3;
- private $reportSuppressed = false;
- private $useErrorReporting = false;
- private $captureIP = true;
- private $captureEmail = false;
- private $captureUsername = false;
- private $scrubFields;
- private $customTruncation = null;
- private $maxItems = 10;
- private $minimumLevel = 0;
- private $raiseOnError = false;
-}
diff --git a/vendor/rollbar/rollbar/src/ErrorWrapper.php b/vendor/rollbar/rollbar/src/ErrorWrapper.php
deleted file mode 100644
index 6c0942e4..00000000
--- a/vendor/rollbar/rollbar/src/ErrorWrapper.php
+++ /dev/null
@@ -1,67 +0,0 @@
- "E_ERROR",
- E_WARNING => "E_WARNING",
- E_PARSE => "E_PARSE",
- E_NOTICE => "E_NOTICE",
- E_CORE_ERROR => "E_CORE_ERROR",
- E_CORE_WARNING => "E_CORE_WARNING",
- E_COMPILE_ERROR => "E_COMPILE_ERROR",
- E_COMPILE_WARNING => "E_COMPILE_WARNING",
- E_USER_ERROR => "E_USER_ERROR",
- E_USER_WARNING => "E_USER_WARNING",
- E_USER_NOTICE => "E_USER_NOTICE",
- E_STRICT => "E_STRICT",
- E_RECOVERABLE_ERROR => "E_RECOVERABLE_ERROR",
- E_DEPRECATED => "E_DEPRECATED",
- E_USER_DEPRECATED => "E_USER_DEPRECATED"
- );
- }
- return isset(self::$constName[$const]) ? self::$constName[$const] : null;
- }
-
- public $errorLevel;
- public $errorMessage;
- public $errorFile;
- public $errorLine;
- public $backTrace;
-
- public function __construct(
- $errorLevel,
- $errorMessage,
- $errorFile,
- $errorLine,
- $backTrace,
- $utilities
- ) {
-
- parent::__construct($errorMessage, $errorLevel);
- $this->errorLevel = $errorLevel;
- $this->errorMessage = $errorMessage;
- $this->errorFile = $errorFile;
- $this->errorLine = $errorLine;
- $this->backTrace = $backTrace;
- $this->utilities = $utilities;
- }
-
- public function getBacktrace()
- {
- return $this->backTrace;
- }
-
- public function getClassName()
- {
- $constName = self::getConstName($this->errorLevel) ?: "#$this->errorLevel";
- return "$constName";
- }
-}
diff --git a/vendor/rollbar/rollbar/src/FilterInterface.php b/vendor/rollbar/rollbar/src/FilterInterface.php
deleted file mode 100644
index d501b3da..00000000
--- a/vendor/rollbar/rollbar/src/FilterInterface.php
+++ /dev/null
@@ -1,6 +0,0 @@
-logger = $logger;
- }
-
- public function logger()
- {
- return $this->logger;
- }
-
- public function registered()
- {
- return $this->registered;
- }
-
- public function handle()
- {
- if (!$this->registered()) {
- throw new \Exception(get_class($this) . ' has not been set up.');
- }
- }
-
- public function register()
- {
- $this->registered = true;
- }
-}
diff --git a/vendor/rollbar/rollbar/src/Handlers/ErrorHandler.php b/vendor/rollbar/rollbar/src/Handlers/ErrorHandler.php
deleted file mode 100644
index b0156d46..00000000
--- a/vendor/rollbar/rollbar/src/Handlers/ErrorHandler.php
+++ /dev/null
@@ -1,65 +0,0 @@
-previousHandler = set_error_handler(array($this, 'handle'));
-
- parent::register();
- }
-
- public function handle()
- {
- /**
- * Overloading methods with different parameters is not supported in PHP
- * through language structures. This hack allows to simulate that.
- */
- $args = func_get_args();
-
- if (!isset($args[0]) || !isset($args[1])) {
- throw new \Exception('No $errno or $errstr to be passed to the error handler.');
- }
-
- $errno = $args[0];
- $errstr = $args[1];
- $errfile = isset($args[2]) ? $args[2] : null;
- $errline = isset($args[3]) ? $args[3] : null;
-
- parent::handle();
-
- if (!is_null($this->previousHandler)) {
- $stop_processing = call_user_func(
- $this->previousHandler,
- $errno,
- $errstr,
- $errfile,
- $errline
- );
-
- if ($stop_processing) {
- return $stop_processing;
- }
- }
-
- if (is_null($this->logger())) {
- return false;
- }
- if ($this->logger()->shouldIgnoreError($errno)) {
- return false;
- }
-
- $exception = $this->logger()->
- getDataBuilder()->
- generateErrorWrapper($errno, $errstr, $errfile, $errline);
-
- $this->logger()->log(Level::ERROR, $exception, array(), true);
-
- return false;
- }
-}
diff --git a/vendor/rollbar/rollbar/src/Handlers/ExceptionHandler.php b/vendor/rollbar/rollbar/src/Handlers/ExceptionHandler.php
deleted file mode 100644
index b3b19e0a..00000000
--- a/vendor/rollbar/rollbar/src/Handlers/ExceptionHandler.php
+++ /dev/null
@@ -1,44 +0,0 @@
-previousHandler = set_exception_handler(array($this, 'handle'));
-
- parent::register();
- }
-
- public function handle()
- {
- parent::handle();
-
- /**
- * Overloading methods with different parameters is not supported in PHP
- * through language structures. This hack allows to simulate that.
- */
- $args = func_get_args();
-
- if (!isset($args[0])) {
- throw new \Exception('No exception to be passed to the exception handler.');
- }
-
- $exception = $args[0];
-
- $this->logger()->log(Level::ERROR, $exception, array(), true);
-
- if ($this->previousHandler) {
- restore_exception_handler();
- call_user_func($this->previousHandler, $exception);
- return;
- }
-
-
- throw $exception;
- }
-}
diff --git a/vendor/rollbar/rollbar/src/Handlers/FatalHandler.php b/vendor/rollbar/rollbar/src/Handlers/FatalHandler.php
deleted file mode 100644
index 4d5e2e00..00000000
--- a/vendor/rollbar/rollbar/src/Handlers/FatalHandler.php
+++ /dev/null
@@ -1,64 +0,0 @@
-logger())) {
- return;
- }
- $lastError = error_get_last();
-
- if ($this->isFatal($lastError)) {
- $errno = $lastError['type'];
- $errstr = $lastError['message'];
- $errfile = $lastError['file'];
- $errline = $lastError['line'];
-
- $exception = $this->logger()->
- getDataBuilder()->
- generateErrorWrapper($errno, $errstr, $errfile, $errline);
-
- $this->logger()->log(Level::CRITICAL, $exception, array(), true);
- }
- }
-
- /**
- * Check if the error triggered is indeed a fatal error.
- *
- * @var array $lastError Information fetched from error_get_last().
- *
- * @return bool
- */
- protected function isFatal($lastError)
- {
- return
- !is_null($lastError) &&
- in_array($lastError['type'], self::$fatalErrors, true) &&
- // don't log uncaught exceptions as they were handled by exceptionHandler()
- !(isset($lastError['message']) &&
- strpos($lastError['message'], 'Uncaught') === 0);
- }
-}
diff --git a/vendor/rollbar/rollbar/src/LevelFactory.php b/vendor/rollbar/rollbar/src/LevelFactory.php
deleted file mode 100644
index cc10e7e5..00000000
--- a/vendor/rollbar/rollbar/src/LevelFactory.php
+++ /dev/null
@@ -1,52 +0,0 @@
- new Level("critical", 100000),
- Level::ALERT => new Level("critical", 100000),
- Level::CRITICAL => new Level("critical", 100000),
- Level::ERROR => new Level("error", 10000),
- Level::WARNING => new Level("warning", 1000),
- Level::NOTICE => new Level("info", 100),
- Level::INFO => new Level("info", 100),
- Level::DEBUG => new Level("debug", 10),
- Level::IGNORED => new Level("ignore", 0),
- Level::IGNORE => new Level("ignore", 0)
-
- );
- }
- }
-
- /**
- * @param string $name level name
- *
- * @return Level
- */
- public function fromName($name)
- {
- self::init();
- $name = strtolower($name);
- return array_key_exists($name, self::$values) ? self::$values[$name] : null;
- }
-
- /**
- * Check if the provided level is a valid level
- *
- * @param string $level
- *
- * @return string
- */
- public function isValidLevel($level)
- {
- return $this->fromName($level) ? true : false;
- }
-}
diff --git a/vendor/rollbar/rollbar/src/Monolog/Handler/RollbarHandler.php b/vendor/rollbar/rollbar/src/Monolog/Handler/RollbarHandler.php
deleted file mode 100644
index bdb52583..00000000
--- a/vendor/rollbar/rollbar/src/Monolog/Handler/RollbarHandler.php
+++ /dev/null
@@ -1,141 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Rollbar\Monolog\Handler;
-
-use Rollbar\RollbarLogger;
-use Throwable;
-use Monolog\Logger;
-use Monolog\Handler\AbstractProcessingHandler;
-
-/**
- * Sends errors to Rollbar
- *
- * If the context data contains a `payload` key, that is used as an array
- * of payload options to RollbarLogger's log method.
- *
- * Rollbar's context info will contain the context + extra keys from the log record
- * merged, and then on top of that a few keys:
- *
- * - level (rollbar level name)
- * - monolog_level (monolog level name, raw level, as rollbar only has 5 but monolog 8)
- * - channel
- * - datetime (unix timestamp)
- *
- * @author Paul Statezny
- */
-class RollbarHandler extends AbstractProcessingHandler
-{
- /**
- * @var RollbarLogger
- */
- protected $rollbarLogger;
-
- protected $levelMap = array(
- Logger::DEBUG => 'debug',
- Logger::INFO => 'info',
- Logger::NOTICE => 'info',
- Logger::WARNING => 'warning',
- Logger::ERROR => 'error',
- Logger::CRITICAL => 'critical',
- Logger::ALERT => 'critical',
- Logger::EMERGENCY => 'critical',
- );
-
- /**
- * Records whether any log records have been added since the last flush of the rollbar notifier
- *
- * @var bool
- */
- private $hasRecords = false;
-
- protected $initialized = false;
-
- /**
- * @param RollbarLogger $rollbarLogger RollbarLogger object constructed with valid token
- * @param int $level The minimum logging level at which this handler will be triggered
- * @param bool $bubble Whether the messages that are handled can bubble up the stack or not
- */
- public function __construct(RollbarLogger $rollbarLogger, $level = Logger::ERROR, $bubble = true)
- {
- $this->rollbarLogger = $rollbarLogger;
-
- parent::__construct($level, $bubble);
- }
-
- /**
- * {@inheritdoc}
- */
- protected function write(array $record)
- {
- if (!$this->initialized) {
- // __destructor() doesn't get called on Fatal errors
- register_shutdown_function(array($this, 'close'));
- $this->initialized = true;
- }
-
- $context = $record['context'];
- $context = array_merge($context, $record['extra'], array(
- 'level' => $this->levelMap[$record['level']],
- 'monolog_level' => $record['level_name'],
- 'channel' => $record['channel'],
- 'datetime' => $record['datetime']->format('U'),
- ));
-
- if (isset($context['exception']) && $context['exception'] instanceof Throwable) {
- $exception = $context['exception'];
- unset($context['exception']);
- $toLog = $exception;
- } else {
- $toLog = $record['message'];
- }
-
- $this->rollbarLogger->log($context['level'], $toLog, $context);
-
- $this->hasRecords = true;
- }
-
- public function flush()
- {
- if ($this->hasRecords) {
- $this->rollbarLogger->flush();
- $this->hasRecords = false;
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function close()
- {
- $this->flush();
- }
-}
diff --git a/vendor/rollbar/rollbar/src/Payload/Body.php b/vendor/rollbar/rollbar/src/Payload/Body.php
deleted file mode 100644
index 50fe2bb5..00000000
--- a/vendor/rollbar/rollbar/src/Payload/Body.php
+++ /dev/null
@@ -1,63 +0,0 @@
-utilities = new \Rollbar\Utilities();
- $this->setValue($value);
- $this->setExtra($extra);
- }
-
- public function getValue()
- {
- return $this->value;
- }
-
- public function setValue(ContentInterface $value)
- {
- $this->value = $value;
- return $this;
- }
-
- public function setExtra(array $extra)
- {
- $this->extra = $extra;
- return $this;
- }
-
- public function getExtra()
- {
- return $this->extra;
- }
-
- public function serialize()
- {
- $result = array();
- $result[$this->value->getKey()] = $this->value;
-
- if (!empty($this->extra)) {
- $result['extra'] = $this->extra;
- }
-
- $objectHashes = \Rollbar\Utilities::getObjectHashes();
-
- return $this->utilities->serializeForRollbar(
- $result,
- array('extra'),
- $objectHashes
- );
- }
-
- public function unserialize($serialized)
- {
- throw new \Exception('Not implemented yet.');
- }
-}
diff --git a/vendor/rollbar/rollbar/src/Payload/ContentInterface.php b/vendor/rollbar/rollbar/src/Payload/ContentInterface.php
deleted file mode 100644
index 38eb5ea4..00000000
--- a/vendor/rollbar/rollbar/src/Payload/ContentInterface.php
+++ /dev/null
@@ -1,6 +0,0 @@
-utilities = new \Rollbar\Utilities();
- $this->setPre($pre);
- $this->setPost($post);
- }
-
- public function getPre()
- {
- return $this->pre;
- }
-
- public function setPre($pre)
- {
- $this->pre = $pre;
- return $this;
- }
-
- public function getPost()
- {
- return $this->post;
- }
-
- public function setPost($post)
- {
- $this->post = $post;
- return $this;
- }
-
- public function serialize()
- {
- $result = array(
- "pre" => $this->pre,
- "post" => $this->post,
- );
-
- $objectHashes = \Rollbar\Utilities::getObjectHashes();
-
- return $this->utilities->serializeForRollbar($result, null, $objectHashes);
- }
-
- public function unserialize($serialized)
- {
- throw new \Exception('Not implemented yet.');
- }
-}
diff --git a/vendor/rollbar/rollbar/src/Payload/Data.php b/vendor/rollbar/rollbar/src/Payload/Data.php
deleted file mode 100644
index 2b241cf4..00000000
--- a/vendor/rollbar/rollbar/src/Payload/Data.php
+++ /dev/null
@@ -1,263 +0,0 @@
-utilities = new \Rollbar\Utilities();
- $this->setEnvironment($environment);
- $this->setBody($body);
- }
-
- public function getEnvironment()
- {
- return $this->environment;
- }
-
- public function setEnvironment($environment)
- {
- $this->environment = $environment;
- return $this;
- }
-
- public function getBody()
- {
- return $this->body;
- }
-
- public function setBody(Body $body)
- {
- $this->body = $body;
- return $this;
- }
-
- /**
- * @return Level
- */
- public function getLevel()
- {
- return $this->level;
- }
-
- public function setLevel($level)
- {
- $this->level = $level;
- return $this;
- }
-
- public function getTimestamp()
- {
- return $this->timestamp;
- }
-
- public function setTimestamp($timestamp)
- {
- $this->timestamp = $timestamp;
- return $this;
- }
-
- public function getCodeVersion()
- {
- return $this->codeVersion;
- }
-
- public function setCodeVersion($codeVersion)
- {
- $this->codeVersion = $codeVersion;
- return $this;
- }
-
- public function getPlatform()
- {
- return $this->platform;
- }
-
- public function setPlatform($platform)
- {
- $this->platform = $platform;
- return $this;
- }
-
- public function getLanguage()
- {
- return $this->language;
- }
-
- public function setLanguage($language)
- {
- $this->language = $language;
- return $this;
- }
-
- public function getFramework()
- {
- return $this->framework;
- }
-
- public function setFramework($framework)
- {
- $this->framework = $framework;
- return $this;
- }
-
- public function getContext()
- {
- return $this->context;
- }
-
- public function setContext($context)
- {
- $this->context = $context;
- return $this;
- }
-
- /**
- * @return Request
- */
- public function getRequest()
- {
- return $this->request;
- }
-
- public function setRequest(Request $request = null)
- {
- $this->request = $request;
- return $this;
- }
-
- /**
- * @return Person
- */
- public function getPerson()
- {
- return $this->person;
- }
-
- public function setPerson(Person $person = null)
- {
- $this->person = $person;
- return $this;
- }
-
- /**
- * @return Server
- */
- public function getServer()
- {
- return $this->server;
- }
-
- public function setServer(Server $server = null)
- {
- $this->server = $server;
- return $this;
- }
-
- public function getCustom()
- {
- return $this->custom;
- }
-
- public function setCustom(array $custom = null)
- {
- $this->custom = $custom;
- return $this;
- }
-
- public function getFingerprint()
- {
- return $this->fingerprint;
- }
-
- public function setFingerprint($fingerprint)
- {
- $this->fingerprint = $fingerprint;
- return $this;
- }
-
- public function getTitle()
- {
- return $this->title;
- }
-
- public function setTitle($title)
- {
- $this->title = $title;
- return $this;
- }
-
- public function getUuid()
- {
- return $this->uuid;
- }
-
- public function setUuid($uuid)
- {
- $this->uuid = $uuid;
- return $this;
- }
-
- public function getNotifier()
- {
- return $this->notifier;
- }
-
- public function setNotifier(Notifier $notifier)
- {
- $this->notifier = $notifier;
- return $this;
- }
-
- public function serialize()
- {
- $result = array(
- "environment" => $this->environment,
- "body" => $this->body,
- "level" => $this->level,
- "timestamp" => $this->timestamp,
- "code_version" => $this->codeVersion,
- "platform" => $this->platform,
- "language" => $this->language,
- "framework" => $this->framework,
- "context" => $this->context,
- "request" => $this->request,
- "person" => $this->person,
- "server" => $this->server,
- "custom" => $this->custom,
- "fingerprint" => $this->fingerprint,
- "title" => $this->title,
- "uuid" => $this->uuid,
- "notifier" => $this->notifier,
- );
-
- $objectHashes = \Rollbar\Utilities::getObjectHashes();
-
- return $this->utilities->serializeForRollbar($result, null, $objectHashes);
- }
-
- public function unserialize($serialized)
- {
- throw new \Exception('Not implemented yet.');
- }
-}
diff --git a/vendor/rollbar/rollbar/src/Payload/EncodedPayload.php b/vendor/rollbar/rollbar/src/Payload/EncodedPayload.php
deleted file mode 100644
index 9cb64288..00000000
--- a/vendor/rollbar/rollbar/src/Payload/EncodedPayload.php
+++ /dev/null
@@ -1,56 +0,0 @@
-data = $data;
- }
-
- public function data()
- {
- return $this->data;
- }
-
- public function size()
- {
- return $this->size;
- }
-
- public function decreaseSize($amount)
- {
- $this->size -= $amount;
- }
-
- public function encode($data = null)
- {
- if ($data !== null) {
- $this->data = $data;
- }
-
- $this->encoded = json_encode(
- $this->data,
- defined('JSON_PARTIAL_OUTPUT_ON_ERROR') ? JSON_PARTIAL_OUTPUT_ON_ERROR : 0
- );
-
- if ($this->encoded === false) {
- throw new \Exception("Payload data could not be encoded to JSON format.");
- }
-
- $this->size = strlen($this->encoded);
- }
-
- public function __toString()
- {
- return $this->encoded();
- }
-
- public function encoded()
- {
- return $this->encoded;
- }
-}
diff --git a/vendor/rollbar/rollbar/src/Payload/ExceptionInfo.php b/vendor/rollbar/rollbar/src/Payload/ExceptionInfo.php
deleted file mode 100644
index 75c5d34b..00000000
--- a/vendor/rollbar/rollbar/src/Payload/ExceptionInfo.php
+++ /dev/null
@@ -1,68 +0,0 @@
-utilities = new \Rollbar\Utilities();
- $this->setClass($class);
- $this->setMessage($message);
- $this->setDescription($description);
- }
-
- public function getClass()
- {
- return $this->class;
- }
-
- public function setClass($class)
- {
- $this->class = $class;
- return $this;
- }
-
- public function getMessage()
- {
- return $this->message;
- }
-
- public function setMessage($message)
- {
- $this->message = $message;
- return $this;
- }
-
- public function getDescription()
- {
- return $this->description;
- }
-
- public function setDescription($description)
- {
- $this->description = $description;
- return $this;
- }
-
- public function serialize()
- {
- $result = array(
- "class" => $this->class,
- "message" => $this->message,
- "description" => $this->description,
- );
-
- $objectHashes = \Rollbar\Utilities::getObjectHashes();
-
- return $this->utilities->serializeForRollbar($result, null, $objectHashes);
- }
-
- public function unserialize($serialized)
- {
- throw new \Exception('Not implemented yet.');
- }
-}
diff --git a/vendor/rollbar/rollbar/src/Payload/Frame.php b/vendor/rollbar/rollbar/src/Payload/Frame.php
deleted file mode 100644
index 4bd878f7..00000000
--- a/vendor/rollbar/rollbar/src/Payload/Frame.php
+++ /dev/null
@@ -1,118 +0,0 @@
-utilities = new \Rollbar\Utilities();
- $this->setFilename($filename);
- }
-
- public function getFilename()
- {
- return $this->filename;
- }
-
- public function setFilename($filename)
- {
- $this->filename = $filename;
- return $this;
- }
-
- public function getLineno()
- {
- return $this->lineno;
- }
-
- public function setLineno($lineno)
- {
- $this->lineno = $lineno;
- return $this;
- }
-
- public function getColno()
- {
- return $this->colno;
- }
-
- public function setColno($colno)
- {
- $this->colno = $colno;
- return $this;
- }
-
- public function getMethod()
- {
- return $this->method;
- }
-
- public function setMethod($method)
- {
- $this->method = $method;
- return $this;
- }
-
- public function getCode()
- {
- return $this->code;
- }
-
- public function setCode($code)
- {
- $this->code = $code;
- return $this;
- }
-
- public function getContext()
- {
- return $this->context;
- }
-
- public function setContext(Context $context)
- {
- $this->context = $context;
- return $this;
- }
-
- public function getArgs()
- {
- return $this->args;
- }
-
- public function setArgs(array $args)
- {
- $this->args = $args;
- return $this;
- }
-
- public function serialize()
- {
- $result = array(
- "filename" => $this->filename,
- "lineno" => $this->lineno,
- "colno" => $this->colno,
- "method" => $this->method,
- "code" => $this->code,
- "context" => $this->context,
- "args" => $this->args
- );
-
- $objectHashes = \Rollbar\Utilities::getObjectHashes();
-
- return $this->utilities->serializeForRollbar($result, null, $objectHashes);
- }
-
- public function unserialize($serialized)
- {
- throw new \Exception('Not implemented yet.');
- }
-}
diff --git a/vendor/rollbar/rollbar/src/Payload/Level.php b/vendor/rollbar/rollbar/src/Payload/Level.php
deleted file mode 100644
index 887e5b71..00000000
--- a/vendor/rollbar/rollbar/src/Payload/Level.php
+++ /dev/null
@@ -1,79 +0,0 @@
-fromName($name);
-
- if (!$level) {
- throw new \Exception("Level '$level' doesn't exist.");
- }
-
- return $level;
- }
-
- /**
- * @var string
- */
- private $level;
- private $val;
-
- public function __construct($level, $val)
- {
- $this->level = $level;
- $this->val = $val;
- }
-
- public function __toString()
- {
- return $this->level;
- }
-
- public function toInt()
- {
- return $this->val;
- }
-
- public function serialize()
- {
- return $this->level;
- }
-
- public function unserialize($serialized)
- {
- throw new \Exception('Not implemented yet.');
- }
-}
diff --git a/vendor/rollbar/rollbar/src/Payload/Message.php b/vendor/rollbar/rollbar/src/Payload/Message.php
deleted file mode 100644
index 6f93931c..00000000
--- a/vendor/rollbar/rollbar/src/Payload/Message.php
+++ /dev/null
@@ -1,58 +0,0 @@
-utilities = new \Rollbar\Utilities();
- $this->setBody($body);
- $this->setBacktrace($backtrace);
- }
-
- public function getKey()
- {
- return 'message';
- }
-
- public function getBody()
- {
- return $this->body;
- }
-
- public function setBody($body)
- {
- $this->body = $body;
- return $this;
- }
-
- public function getBacktrace()
- {
- return $this->backtrace;
- }
-
- public function setBacktrace($backtrace)
- {
- $this->backtrace = $backtrace;
- return $this;
- }
-
- public function serialize()
- {
- $toSerialize = array(
- "body" => $this->getBody(),
- "backtrace" => $this->getBacktrace()
- );
- return $this->utilities->serializeForRollbar($toSerialize);
- }
-
- public function unserialize($serialized)
- {
- throw new \Exception('Not implemented yet.');
- }
-}
diff --git a/vendor/rollbar/rollbar/src/Payload/Notifier.php b/vendor/rollbar/rollbar/src/Payload/Notifier.php
deleted file mode 100644
index eb413099..00000000
--- a/vendor/rollbar/rollbar/src/Payload/Notifier.php
+++ /dev/null
@@ -1,62 +0,0 @@
-utilities = new \Rollbar\Utilities();
- $this->setName($name);
- $this->setVersion($version);
- }
-
- public function getName()
- {
- return $this->name;
- }
-
- public function setName($name)
- {
- $this->name = $name;
- return $this;
- }
-
- public function getVersion()
- {
- return $this->version;
- }
-
- public function setVersion($version)
- {
- $this->version = $version;
- return $this;
- }
-
- public function serialize()
- {
- $result = array(
- "name" => $this->name,
- "version" => $this->version,
- );
-
- $objectHashes = \Rollbar\Utilities::getObjectHashes();
-
- return $this->utilities->serializeForRollbar($result, null, $objectHashes);
- }
-
- public function unserialize($serialized)
- {
- throw new \Exception('Not implemented yet.');
- }
-}
diff --git a/vendor/rollbar/rollbar/src/Payload/Payload.php b/vendor/rollbar/rollbar/src/Payload/Payload.php
deleted file mode 100644
index 61370bcd..00000000
--- a/vendor/rollbar/rollbar/src/Payload/Payload.php
+++ /dev/null
@@ -1,59 +0,0 @@
-utilities = new \Rollbar\Utilities();
- $this->setData($data);
- $this->setAccessToken($accessToken);
- }
-
- /**
- * @return Data
- */
- public function getData()
- {
- return $this->data;
- }
-
- public function setData(Data $data)
- {
- $this->data = $data;
- return $this;
- }
-
- public function getAccessToken()
- {
- return $this->accessToken;
- }
-
- public function setAccessToken($accessToken)
- {
- $this->accessToken = $accessToken;
- return $this;
- }
-
- public function serialize($maxDepth = -1)
- {
- $objectHashes = array();
- $result = array(
- "data" => $this->data,
- "access_token" => $this->accessToken,
- );
-
- return $this->utilities->serializeForRollbar($result, null, $objectHashes, $maxDepth);
- }
-
- public function unserialize($serialized)
- {
- throw new \Exception('Not implemented yet.');
- }
-}
diff --git a/vendor/rollbar/rollbar/src/Payload/Person.php b/vendor/rollbar/rollbar/src/Payload/Person.php
deleted file mode 100644
index e103dba8..00000000
--- a/vendor/rollbar/rollbar/src/Payload/Person.php
+++ /dev/null
@@ -1,89 +0,0 @@
-utilities = new \Rollbar\Utilities();
- $this->setId($id);
- $this->setUsername($username);
- $this->setEmail($email);
- $this->extra = $extra == null ? array() : $extra;
- }
-
- public function getId()
- {
- return $this->id;
- }
-
- public function setId($id)
- {
- $this->id = $id;
- return $this;
- }
-
- public function getUsername()
- {
- return $this->username;
- }
-
- public function setUsername($username)
- {
- $this->username = $username;
- return $this;
- }
-
- public function getEmail()
- {
- return $this->email;
- }
-
- public function setEmail($email)
- {
- $this->email = $email;
- return $this;
- }
-
- public function __get($name)
- {
- return isset($this->extra[$name]) ? $this->extra[$name] : null;
- }
-
- public function __set($name, $val)
- {
- $this->extra[$name] = $val;
- }
-
- public function serialize()
- {
- $result = array(
- "id" => $this->id,
- "username" => $this->username,
- "email" => $this->email,
- );
- foreach ($this->extra as $key => $val) {
- $result[$key] = $val;
- }
-
- $objectHashes = \Rollbar\Utilities::getObjectHashes();
-
- return $this->utilities->serializeForRollbar($result, array_keys($this->extra), $objectHashes);
- }
-
- public function unserialize($serialized)
- {
- throw new \Exception('Not implemented yet.');
- }
-}
diff --git a/vendor/rollbar/rollbar/src/Payload/Request.php b/vendor/rollbar/rollbar/src/Payload/Request.php
deleted file mode 100644
index afa26aec..00000000
--- a/vendor/rollbar/rollbar/src/Payload/Request.php
+++ /dev/null
@@ -1,162 +0,0 @@
-utilities = new \Rollbar\Utilities();
- }
-
- public function getUrl()
- {
- return $this->url;
- }
-
- public function setUrl($url)
- {
- $this->url = $url;
- return $this;
- }
-
- public function getMethod()
- {
- return $this->method;
- }
-
- public function setMethod($method)
- {
- $this->method = $method;
- return $this;
- }
-
- public function getHeaders()
- {
- return $this->headers;
- }
-
- public function setHeaders(array $headers = null)
- {
- $this->headers = $headers;
- return $this;
- }
-
- public function getParams()
- {
- return $this->params;
- }
-
- public function setParams(array $params = null)
- {
- $this->params = $params;
- return $this;
- }
-
- public function getGet()
- {
- return $this->get;
- }
-
- public function setGet(array $get = null)
- {
- $this->get = $get;
- return $this;
- }
-
- public function getQueryString()
- {
- return $this->queryString;
- }
-
- public function setQueryString($queryString)
- {
- $this->queryString = $queryString;
- return $this;
- }
-
- public function getPost()
- {
- return $this->post;
- }
-
- public function setPost(array $post = null)
- {
- $this->post = $post;
- return $this;
- }
-
- public function getBody()
- {
- return $this->body;
- }
-
- public function setBody($body)
- {
- $this->body = $body;
- return $this;
- }
-
- public function getUserIp()
- {
- return $this->userIp;
- }
-
- public function setUserIp($userIp)
- {
- $this->userIp = $userIp;
- return $this;
- }
-
- public function getExtras()
- {
- return $this->extra;
- }
-
- public function setExtras($extras)
- {
- $this->extra = $extras;
- }
-
- public function setSession($session)
- {
- $this->extra['session'] = $session;
- }
-
- public function serialize()
- {
- $result = array(
- "url" => $this->url,
- "method" => $this->method,
- "headers" => $this->headers,
- "params" => $this->params,
- "GET" => $this->get,
- "query_string" => $this->queryString,
- "POST" => $this->post,
- "body" => $this->body,
- "user_ip" => $this->userIp,
- );
- foreach ($this->extra as $key => $val) {
- $result[$key] = $val;
- }
-
- $objectHashes = \Rollbar\Utilities::getObjectHashes();
-
- return $this->utilities->serializeForRollbar($result, array_keys($this->extra), $objectHashes);
- }
-
- public function unserialize($serialized)
- {
- throw new \Exception('Not implemented yet.');
- }
-}
diff --git a/vendor/rollbar/rollbar/src/Payload/Server.php b/vendor/rollbar/rollbar/src/Payload/Server.php
deleted file mode 100644
index 2265ec12..00000000
--- a/vendor/rollbar/rollbar/src/Payload/Server.php
+++ /dev/null
@@ -1,97 +0,0 @@
-utilities = new \Rollbar\Utilities();
- }
-
- public function getHost()
- {
- return $this->host;
- }
-
- public function setHost($host)
- {
- $this->host = $host;
- return $this;
- }
-
- public function getRoot()
- {
- return $this->root;
- }
-
- public function setRoot($root)
- {
- $this->root = $root;
- return $this;
- }
-
- public function getBranch()
- {
- return $this->branch;
- }
-
- public function setBranch($branch)
- {
- $this->branch = $branch;
- return $this;
- }
-
- public function getCodeVersion()
- {
- return $this->codeVersion;
- }
-
- public function setCodeVersion($codeVersion)
- {
- $this->codeVersion = $codeVersion;
- return $this;
- }
-
- public function setExtras($extras)
- {
- $this->extra = $extras;
- }
-
- public function getExtras()
- {
- return $this->extra;
- }
-
- public function setArgv($argv)
- {
- $this->extra['argv'] = $argv;
- }
-
- public function serialize()
- {
- $result = array(
- "host" => $this->host,
- "root" => $this->root,
- "branch" => $this->branch,
- "code_version" => $this->codeVersion,
- );
- foreach ($this->extra as $key => $val) {
- $result[$key] = $val;
- }
-
- $objectHashes = \Rollbar\Utilities::getObjectHashes();
-
- return $this->utilities->serializeForRollbar($result, array_keys($this->extra), $objectHashes);
- }
-
- public function unserialize($serialized)
- {
- throw new \Exception('Not implemented yet.');
- }
-}
diff --git a/vendor/rollbar/rollbar/src/Payload/Trace.php b/vendor/rollbar/rollbar/src/Payload/Trace.php
deleted file mode 100644
index 649481f2..00000000
--- a/vendor/rollbar/rollbar/src/Payload/Trace.php
+++ /dev/null
@@ -1,56 +0,0 @@
-utilities = new \Rollbar\Utilities();
- $this->setFrames($frames);
- $this->setException($exception);
- }
-
- public function getKey()
- {
- return 'trace';
- }
-
- public function getFrames()
- {
- return $this->frames;
- }
-
- public function setFrames(array $frames)
- {
- $this->frames = $frames;
- return $this;
- }
-
- public function getException()
- {
- return $this->exception;
- }
-
- public function setException(ExceptionInfo $exception)
- {
- $this->exception = $exception;
- return $this;
- }
-
- public function serialize()
- {
- $result = array(
- "frames" => $this->frames,
- "exception" => $this->exception,
- );
- return $this->utilities->serializeForRollbar($result);
- }
-
- public function unserialize($serialized)
- {
- throw new \Exception('Not implemented yet.');
- }
-}
diff --git a/vendor/rollbar/rollbar/src/Payload/TraceChain.php b/vendor/rollbar/rollbar/src/Payload/TraceChain.php
deleted file mode 100644
index 18dfdb24..00000000
--- a/vendor/rollbar/rollbar/src/Payload/TraceChain.php
+++ /dev/null
@@ -1,43 +0,0 @@
-setTraces($traces);
- }
-
- public function getKey()
- {
- return 'trace_chain';
- }
-
- public function getTraces()
- {
- return $this->traces;
- }
-
- public function setTraces($traces)
- {
- $this->traces = $traces;
- return $this;
- }
-
- public function serialize()
- {
- $mapValue = function ($value) {
- if ($value instanceof \Serializable) {
- return $value->serialize();
- }
- return $value;
- };
- return array_map($mapValue, $this->traces);
- }
-
- public function unserialize($serialized)
- {
- throw new \Exception('Not implemented yet.');
- }
-}
diff --git a/vendor/rollbar/rollbar/src/Response.php b/vendor/rollbar/rollbar/src/Response.php
deleted file mode 100644
index 83094c9c..00000000
--- a/vendor/rollbar/rollbar/src/Response.php
+++ /dev/null
@@ -1,54 +0,0 @@
-status = $status;
- $this->info = $info;
- $this->uuid = $uuid;
- }
-
- public function getStatus()
- {
- return $this->status;
- }
-
- public function getInfo()
- {
- return $this->info;
- }
-
- public function getUuid()
- {
- return $this->uuid;
- }
-
- public function wasSuccessful()
- {
- return $this->status >= 200 && $this->status < 300;
- }
-
- public function getOccurrenceUrl()
- {
- if (is_null($this->uuid)) {
- return null;
- }
- if (!$this->wasSuccessful()) {
- return null;
- }
- return "https://rollbar.com/occurrence/uuid/?uuid=" . $this->uuid;
- }
-
- public function __toString()
- {
- $url = $this->getOccurrenceUrl();
- return "Status: $this->status\n" .
- "Body: " . json_encode($this->info) . "\n" .
- "URL: $url";
- }
-}
diff --git a/vendor/rollbar/rollbar/src/ResponseHandlerInterface.php b/vendor/rollbar/rollbar/src/ResponseHandlerInterface.php
deleted file mode 100644
index 002bc38c..00000000
--- a/vendor/rollbar/rollbar/src/ResponseHandlerInterface.php
+++ /dev/null
@@ -1,6 +0,0 @@
-configure($configOrLogger);
- return;
- }
-
- self::$logger = isset($logger) ? $logger : new RollbarLogger($configOrLogger);
- }
-
- public static function enable()
- {
- return self::logger()->enable();
- }
-
- public static function disable()
- {
- return self::logger()->disable();
- }
-
- public static function enabled()
- {
- return self::logger()->enabled();
- }
-
- public static function disabled()
- {
- return self::logger()->disabled();
- }
-
- public static function logger()
- {
- return self::$logger;
- }
-
- public static function scope($config)
- {
- if (is_null(self::$logger)) {
- return new RollbarLogger($config);
- }
- return self::$logger->scope($config);
- }
-
- public static function log($level, $toLog, $extra = array(), $isUncaught = false)
- {
- if (is_null(self::$logger)) {
- return self::getNotInitializedResponse();
- }
- return self::$logger->log($level, $toLog, (array)$extra, $isUncaught);
- }
-
- public static function debug($toLog, $extra = array())
- {
- return self::log(Level::DEBUG, $toLog, $extra);
- }
-
- public static function info($toLog, $extra = array())
- {
- return self::log(Level::INFO, $toLog, $extra);
- }
-
- public static function notice($toLog, $extra = array())
- {
- return self::log(Level::NOTICE, $toLog, $extra);
- }
-
- public static function warning($toLog, $extra = array())
- {
- return self::log(Level::WARNING, $toLog, $extra);
- }
-
- public static function error($toLog, $extra = array())
- {
- return self::log(Level::ERROR, $toLog, $extra);
- }
-
- public static function critical($toLog, $extra = array())
- {
- return self::log(Level::CRITICAL, $toLog, $extra);
- }
-
- public static function alert($toLog, $extra = array())
- {
- return self::log(Level::ALERT, $toLog, $extra);
- }
-
- public static function emergency($toLog, $extra = array())
- {
- return self::log(Level::EMERGENCY, $toLog, $extra);
- }
-
- public static function setupExceptionHandling()
- {
- self::$exceptionHandler = new ExceptionHandler(self::$logger);
- self::$exceptionHandler->register();
- }
-
- public static function setupErrorHandling()
- {
- self::$errorHandler = new ErrorHandler(self::$logger);
- self::$errorHandler->register();
- }
-
- public static function setupFatalHandling()
- {
- self::$fatalHandler = new FatalHandler(self::$logger);
- self::$fatalHandler->register();
- }
-
- private static function getNotInitializedResponse()
- {
- return new Response(0, "Rollbar Not Initialized");
- }
-
- public static function setupBatchHandling()
- {
- register_shutdown_function('Rollbar\Rollbar::flushAndWait');
- }
-
- public static function flush()
- {
- if (is_null(self::$logger)) {
- return;
- }
- self::$logger->flush();
- }
-
- public static function flushAndWait()
- {
- if (is_null(self::$logger)) {
- return;
- }
- self::$logger->flushAndWait();
- }
-
- public static function addCustom($key, $value)
- {
- self::$logger->addCustom($key, $value);
- }
-
- public static function removeCustom($key)
- {
- self::$logger->removeCustom($key);
- }
-
- public static function getCustom()
- {
- self::$logger->getCustom();
- }
-
- public static function configure($config)
- {
- self::$logger->configure($config);
- }
-
- /**
- * Destroys the currently stored $logger allowing for a fresh configuration.
- * This is especially used in testing scenarios.
- */
- public static function destroy()
- {
- self::$logger = null;
- }
-
- // @codingStandardsIgnoreStart
-
- /**
- * Below methods are deprecated and still available only for backwards
- * compatibility. If you're still using them in your application, please
- * transition to using the ::log method as soon as possible.
- */
-
- /**
- * @param \Exception $exc Exception to be logged
- * @param array $extra_data Additional data to be logged with the exception
- * @param array $payload_data This is deprecated as of v1.0.0 and remains for
- * backwards compatibility. The content fo this array will be merged with
- * $extra_data.
- *
- * @return string uuid
- *
- * @deprecated 1.0.0 This method has been replaced by ::log
- */
- public static function report_exception($exc, $extra_data = null, $payload_data = null)
- {
-
- if ($payload_data) {
- $extra_data = array_merge($extra_data, $payload_data);
- }
- return self::log(Level::ERROR, $exc, $extra_data)->getUuid();
- }
-
- /**
- * @param string $message Message to be logged
- * @param string $level One of the values in \Rollbar\Payload\Level::$values
- * @param array $extra_data Additional data to be logged with the exception
- * @param array $payload_data This is deprecated as of v1.0.0 and remains for
- * backwards compatibility. The content fo this array will be merged with
- * $extra_data.
- *
- * @return string uuid
- *
- * @deprecated 1.0.0 This method has been replaced by ::log
- */
- public static function report_message($message, $level = null, $extra_data = null, $payload_data = null)
- {
-
- $level = $level ? $level : Level::ERROR;
- if ($payload_data) {
- $extra_data = array_merge($extra_data, $payload_data);
- }
- return self::log($level, $message, $extra_data)->getUuid();
- }
-
-
- /**
- * Catch any fatal errors that are causing the shutdown
- *
- * @deprecated 1.0.0 This method has been replaced by ::fatalHandler
- */
- public static function report_fatal_error()
- {
- self::$fatalHandler->handle();
- }
-
-
- /**
- * This function must return false so that the default php error handler runs
- *
- * @deprecated 1.0.0 This method has been replaced by ::log
- */
- public static function report_php_error($errno, $errstr, $errfile, $errline)
- {
- self::$errorHandler->handle($errno, $errstr, $errfile, $errline);
- return false;
- }
-
- // @codingStandardsIgnoreEnd
-}
diff --git a/vendor/rollbar/rollbar/src/RollbarJsHelper.php b/vendor/rollbar/rollbar/src/RollbarJsHelper.php
deleted file mode 100644
index f89e6f16..00000000
--- a/vendor/rollbar/rollbar/src/RollbarJsHelper.php
+++ /dev/null
@@ -1,177 +0,0 @@
-config = $config;
- }
-
- /**
- * Shortcut method for building the RollbarJS Javascript
- *
- * @param array $config @see addJs()
- * @param string $nonce @see addJs()
- * @param string $customJs @see addJs()
- *
- * @return string
- */
- public static function buildJs(
- $config,
- $headers = null,
- $nonce = null,
- $customJs = ""
- ) {
- $helper = new self($config);
- return $helper->addJs($headers, $nonce, $customJs);
- }
-
- /**
- * Build Javascript required to include RollbarJS on
- * an HTML page
- *
- * @param array $headers Response headers usually retrieved through
- * headers_list() used to verify if nonce should be added to script
- * tags based on Content-Security-Policy
- * @param string $nonce Content-Security-Policy nonce string if exists
- * @param strong $customJs Additional JavaScript to add at the end of
- * RollbarJs snippet
- *
- * @return string
- */
- public function addJs($headers = null, $nonce = null, $customJs = "")
- {
- return $this->scriptTag(
- $this->configJsTag() . $this->jsSnippet() . ";" . $customJs,
- $headers,
- $nonce
- );
- }
-
- /**
- * Build RollbarJS config script
- *
- * @return string
- */
- public function configJsTag()
- {
- return "var _rollbarConfig = " . json_encode($this->config, JSON_FORCE_OBJECT) . ";";
- }
-
- /**
- * Build rollbar.snippet.js string
- *
- * @return string
- */
- public function jsSnippet()
- {
- return file_get_contents(
- $this->snippetPath()
- );
- }
-
- /**
- * @return string Path to the rollbar.snippet.js
- */
- public function snippetPath()
- {
- return realpath(__DIR__ . "/../data/rollbar.snippet.js");
- }
-
- /**
- * Should JS snippet be added to the HTTP response
- *
- * @param int $status
- * @param array $headers
- *
- * @return boolean
- */
- public function shouldAddJs($status, $headers)
- {
- return
- $status == 200 &&
- $this->isHtml($headers) &&
- !$this->hasAttachment($headers);
-
- /**
- * @todo not sure if below two conditions will be applicable
- */
- /* !env[JS_IS_INJECTED_KEY] */
- /* && !streaming?(env) */
- }
-
- /**
- * Is the HTTP response a valid HTML response
- *
- * @param array $headers
- *
- * @return boolean
- */
- public function isHtml($headers)
- {
- return in_array('Content-Type: text/html', $headers);
- }
-
- /**
- * Does the HTTP response include an attachment
- *
- * @param array $headers
- *
- * @return boolean
- */
- public function hasAttachment($headers)
- {
- return in_array('Content-Disposition: attachment', $headers);
- }
-
- /**
- * Is `nonce` attribute on the script tag needed?
- *
- * @param array $headers
- *
- * @return boolean
- */
- public function shouldAppendNonce($headers)
- {
- foreach ($headers as $header) {
- if (strpos($header, 'Content-Security-Policy') !== false &&
- strpos($header, "'unsafe-inline'") !== false) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Build safe HTML script tag
- *
- * @param string $content
- * @param array $headers
- * @param
- *
- * @return string
- */
- public function scriptTag($content, $headers = null, $nonce = null)
- {
- if ($headers !== null && $this->shouldAppendNonce($headers)) {
- if (!$nonce) {
- throw new \Exception(
- 'Content-Security-Policy is script-src '.
- 'inline-unsafe but nonce value not provided.'
- );
- }
-
- return "\n";
- }
- return "\n";
- }
-}
diff --git a/vendor/rollbar/rollbar/src/RollbarLogger.php b/vendor/rollbar/rollbar/src/RollbarLogger.php
deleted file mode 100644
index ab5dbe50..00000000
--- a/vendor/rollbar/rollbar/src/RollbarLogger.php
+++ /dev/null
@@ -1,249 +0,0 @@
-config = new Config($config);
- $this->levelFactory = new LevelFactory();
- $this->truncation = new Truncation($this->config);
- $this->queue = array();
- }
-
- public function enable()
- {
- return $this->config->enable();
- }
-
- public function disable()
- {
- return $this->config->disable();
- }
-
- public function enabled()
- {
- return $this->config->enabled();
- }
-
- public function disabled()
- {
- return $this->config->disabled();
- }
-
- public function configure(array $config)
- {
- $this->config->configure($config);
- }
-
- public function scope(array $config)
- {
- return new RollbarLogger($this->extend($config));
- }
-
- public function extend(array $config)
- {
- return $this->config->extend($config);
- }
-
- public function addCustom($key, $data)
- {
- $this->config->addCustom($key, $data);
- }
-
- public function removeCustom($key)
- {
- $this->config->removeCustom($key);
- }
-
- public function getCustom()
- {
- return $this->config->getCustom();
- }
-
- public function log($level, $toLog, array $context = array(), $isUncaught = false)
- {
- if ($this->disabled()) {
- $this->verboseLogger()->notice('Rollbar is disabled');
- return new Response(0, "Disabled");
- }
-
- if (!$this->levelFactory->isValidLevel($level)) {
- $exception = new \Psr\Log\InvalidArgumentException("Invalid log level '$level'.");
- $this->verboseLogger()->error($exception->getMessage());
- throw $exception;
- }
-
- $this->verboseLogger()->info("Attempting to log: [$level] " . $toLog);
-
- if ($this->config->internalCheckIgnored($level, $toLog)) {
- $this->verboseLogger()->info('Occurrence ignored');
- return new Response(0, "Ignored");
- }
-
- $accessToken = $this->getAccessToken();
- $payload = $this->getPayload($accessToken, $level, $toLog, $context);
-
- if ($this->config->checkIgnored($payload, $accessToken, $toLog, $isUncaught)) {
- $this->verboseLogger()->info('Occurrence ignored');
- $response = new Response(0, "Ignored");
- } else {
- $serialized = $payload->serialize($this->config->getMaxNestingDepth());
-
- $scrubbed = $this->scrub($serialized);
-
- $encoded = $this->encode($scrubbed);
-
- $truncated = $this->truncate($encoded);
-
- $response = $this->send($truncated, $accessToken);
- }
-
- $this->handleResponse($payload, $response);
-
- if ($response->getStatus() === 0) {
- $this->verboseLogger()->error('Occurrence rejected by the SDK: ' . $response);
- } elseif ($response->getStatus() >= 400) {
- $info = $response->getInfo();
- $this->verboseLogger()->error('Occurrence rejected by the API: ' . $info['message']);
- } else {
- $this->verboseLogger()->info('Occurrence successfully logged');
- }
-
- if ((is_a($toLog, 'Throwable') || is_a($toLog, 'Exception')) && $this->config->getRaiseOnError()) {
- throw $toLog;
- }
-
- return $response;
- }
-
- public function flush()
- {
- if ($this->getQueueSize() > 0) {
- $batch = $this->queue;
- $this->queue = array();
- return $this->config->sendBatch($batch, $this->getAccessToken());
- }
- $this->verboseLogger()->debug('Queue flushed');
- return new Response(0, "Queue empty");
- }
-
- public function flushAndWait()
- {
- $this->flush();
- $this->config->wait($this->getAccessToken());
- }
-
- public function shouldIgnoreError($errno)
- {
- return $this->config->shouldIgnoreError($errno);
- }
-
- public function getQueueSize()
- {
- return count($this->queue);
- }
-
- protected function send(\Rollbar\Payload\EncodedPayload $payload, $accessToken)
- {
- if ($this->reportCount >= $this->config->getMaxItems()) {
- $response = new Response(
- 0,
- "Maximum number of items per request has been reached. If you " .
- "want to report more items, please use `max_items` " .
- "configuration option."
- );
- $this->verboseLogger()->warning($response->getInfo());
- return $response;
- } else {
- $this->reportCount++;
- }
-
- if ($this->config->getBatched()) {
- $response = new Response(0, "Pending");
- if ($this->getQueueSize() >= $this->config->getBatchSize()) {
- $response = $this->flush();
- }
- $this->queue[] = $payload;
- $this->verboseLogger()->debug("Added payload to the queue (running in `batched` mode).");
- return $response;
- }
-
- return $this->config->send($payload, $accessToken);
- }
-
- protected function getPayload($accessToken, $level, $toLog, $context)
- {
- $data = $this->config->getRollbarData($level, $toLog, $context);
- $payload = new Payload($data, $accessToken);
- return $this->config->transform($payload, $level, $toLog, $context);
- }
-
- protected function getAccessToken()
- {
- return $this->config->getAccessToken();
- }
-
- public function getDataBuilder()
- {
- return $this->config->getDataBuilder();
- }
-
- public function outputLogger()
- {
- return $this->config->outputLogger();
- }
-
- public function verboseLogger()
- {
- return $this->config->verboseLogger();
- }
-
- protected function handleResponse($payload, $response)
- {
- $this->config->handleResponse($payload, $response);
- }
-
- /**
- * @param array $serializedPayload
- * @return array
- */
- protected function scrub(array &$serializedPayload)
- {
- $serializedPayload['data'] = $this->config->getScrubber()->scrub($serializedPayload['data']);
- return $serializedPayload;
- }
-
- /**
- * @param \Rollbar\Payload\EncodedPayload $payload
- * @return \Rollbar\Payload\EncodedPayload
- */
- protected function truncate(\Rollbar\Payload\EncodedPayload &$payload)
- {
- return $this->truncation->truncate($payload);
- }
-
- /**
- * @param array &$payload
- * @return \Rollbar\Payload\EncodedPayload
- */
- protected function encode(array &$payload)
- {
- $encoded = new EncodedPayload($payload);
- $encoded->encode();
- return $encoded;
- }
-}
diff --git a/vendor/rollbar/rollbar/src/Scrubber.php b/vendor/rollbar/rollbar/src/Scrubber.php
deleted file mode 100644
index ae365473..00000000
--- a/vendor/rollbar/rollbar/src/Scrubber.php
+++ /dev/null
@@ -1,134 +0,0 @@
-setScrubFields($config);
- $this->setWhitelist($config);
- }
-
- protected function setScrubFields($config)
- {
- $fromConfig = isset($config['scrubFields']) ? $config['scrubFields'] : null;
- if (!isset($fromConfig)) {
- $fromConfig = isset($config['scrub_fields']) ? $config['scrub_fields'] : null;
- }
- $this->scrubFields = self::$defaults->scrubFields($fromConfig);
- }
-
- public function getScrubFields()
- {
- return $this->scrubFields;
- }
-
- protected function setWhitelist($config)
- {
- $fromConfig = isset($config['scrubWhitelist']) ? $config['scrubWhitelist'] : null;
- if (!isset($fromConfig)) {
- $fromConfig = isset($config['scrub_whitelist']) ? $config['scrub_whitelist'] : null;
- }
- $this->whitelist = $fromConfig ? $fromConfig : array();
- }
-
- public function getWhitelist()
- {
- return $this->whitelist;
- }
-
- /**
- * Scrub a data structure including arrays and query strings.
- *
- * @param mixed $data Data to be scrubbed.
- * @param array $fields Sequence of field names to scrub.
- * @param string $replacement Character used for scrubbing.
- * @param string $path Path of traversal in the array
- */
- public function scrub(&$data, $replacement = '********', $path = '')
- {
- $fields = $this->getScrubFields();
-
- if (!$fields || !$data) {
- return $data;
- }
-
- // Scrub fields is case insensitive, so force all fields to lowercase
- $fields = array_change_key_case(array_flip($fields), CASE_LOWER);
-
- return $this->internalScrub($data, $fields, $replacement, $path);
- }
-
- public function internalScrub(&$data, $fields, $replacement, $path)
- {
- if (is_array($data)) {
-// scrub arrays
- $data = $this->scrubArray($data, $fields, $replacement, $path);
- } elseif (is_string($data)) {
-// scrub URLs and query strings
- $query = parse_url($data, PHP_URL_QUERY);
- if ($query) {
- $data = str_replace(
- $query,
- $this->scrubQueryString($query, $fields),
- $data
- );
- } else {
- parse_str($data, $parsedData);
- if (http_build_query($parsedData) === $data) {
- $data = $this->scrubQueryString($data, $fields);
- }
- }
- }
- return $data;
- }
-
- protected function scrubArray(&$arr, $fields, $replacement = '********', $path = '')
- {
- if (!$fields || !$arr) {
- return $arr;
- }
-
- $scrubber = $this;
- $scrubberFn = function (
- &$val,
- $key
- ) use (
- $fields,
- $replacement,
- &$scrubberFn,
- $scrubber,
- &$path
- ) {
- $parent = $path;
- $current = !$path ? $key : $path . '.' . $key;
-
- if (in_array($current, $scrubber->getWhitelist())) {
- return;
- }
-
- if (isset($fields[strtolower($key)])) {
- $val = $replacement;
- } else {
- $val = $scrubber->internalScrub($val, $fields, $replacement, $current);
- }
-
- $current = $parent;
- };
-
- array_walk($arr, $scrubberFn);
-
- return $arr;
- }
-
- protected function scrubQueryString($query, $fields, $replacement = 'xxxxxxxx')
- {
- parse_str($query, $parsed);
- $scrubbed = $this->internalScrub($parsed, $fields, $replacement, '');
- return http_build_query($scrubbed);
- }
-}
diff --git a/vendor/rollbar/rollbar/src/ScrubberInterface.php b/vendor/rollbar/rollbar/src/ScrubberInterface.php
deleted file mode 100644
index 389f2e30..00000000
--- a/vendor/rollbar/rollbar/src/ScrubberInterface.php
+++ /dev/null
@@ -1,6 +0,0 @@
-agentLogLocation = \Rollbar\Defaults::get()->agentLogLocation();
- $this->utilities = new \Rollbar\Utilities();
- if (array_key_exists('agentLogLocation', $opts)) {
- $this->utilities->validateString($opts['agentLogLocation'], 'opts["agentLogLocation"]', null, false);
- $this->agentLogLocation = $opts['agentLogLocation'];
- }
- }
-
- /**
- * @SuppressWarnings(PHPMD.UnusedFormalParameter)
- */
- public function send(EncodedPayload $payload, $accessToken)
- {
- if (empty($this->agentLog)) {
- $this->loadAgentFile();
- }
- fwrite($this->agentLog, $payload->encoded() . "\n");
-
- $data = $payload->data();
- $uuid = $data['data']['uuid'];
- return new Response(0, "Written to agent file", $uuid);
- }
-
- /**
- * @SuppressWarnings(PHPMD.UnusedFormalParameter)
- */
- public function sendBatch($batch, $accessToken)
- {
- if (empty($this->agentLog)) {
- $this->loadAgentFile();
- }
- foreach ($batch as $payload) {
- fwrite($this->agentLog, $payload->encoded() . "\n");
- }
- }
-
- /**
- * @SuppressWarnings(PHPMD.UnusedFormalParameter)
- */
- public function wait($accessToken, $max)
- {
- return;
- }
-
- private function loadAgentFile()
- {
- $filename = $this->agentLogLocation . '/rollbar-relay.' . getmypid() . '.' . microtime(true) . '.rollbar';
- $this->agentLog = fopen($filename, 'a');
- }
-
- public function toString()
- {
- return "agent log: " . $this->agentLogLocation;
- }
-}
diff --git a/vendor/rollbar/rollbar/src/Senders/CurlSender.php b/vendor/rollbar/rollbar/src/Senders/CurlSender.php
deleted file mode 100644
index 5da80acc..00000000
--- a/vendor/rollbar/rollbar/src/Senders/CurlSender.php
+++ /dev/null
@@ -1,191 +0,0 @@
-endpoint = \Rollbar\Defaults::get()->endpoint() . 'item/';
- $this->timeout = \Rollbar\Defaults::get()->timeout();
-
- $this->utilities = new \Rollbar\Utilities();
- if (isset($_ENV['ROLLBAR_ENDPOINT']) && !isset($opts['endpoint'])) {
- $opts['endpoint'] = $_ENV['ROLLBAR_ENDPOINT'];
- }
- if (array_key_exists('endpoint', $opts)) {
- $this->utilities->validateString($opts['endpoint'], 'opts["endpoint"]', null, false);
- $this->endpoint = $opts['endpoint'];
- }
- if (array_key_exists('timeout', $opts)) {
- $this->utilities->validateInteger($opts['timeout'], 'opts["timeout"]', 0, null, false);
- $this->timeout = $opts['timeout'];
- }
- if (array_key_exists('proxy', $opts)) {
- $this->proxy = $opts['proxy'];
- }
-
- if (array_key_exists('verifyPeer', $opts)) {
- $this->utilities->validateBoolean($opts['verifyPeer'], 'opts["verifyPeer"]', false);
- $this->verifyPeer = $opts['verifyPeer'];
- }
- if (array_key_exists('ca_cert_path', $opts)) {
- $this->caCertPath = $opts['ca_cert_path'];
- }
- }
-
- public function getEndpoint()
- {
- return $this->endpoint;
- }
-
- public function send(EncodedPayload $payload, $accessToken)
- {
- $handle = curl_init();
-
- $this->setCurlOptions($handle, $payload, $accessToken);
- $result = curl_exec($handle);
- $statusCode = curl_getinfo($handle, CURLINFO_HTTP_CODE);
-
- $result = $result === false ?
- curl_error($handle) :
- json_decode($result, true);
-
- curl_close($handle);
-
- $data = $payload->data();
- $uuid = $data['data']['uuid'];
-
- return new Response($statusCode, $result, $uuid);
- }
-
- public function sendBatch($batch, $accessToken)
- {
- if ($this->multiHandle === null) {
- $this->multiHandle = curl_multi_init();
- }
-
- if ($this->maxBatchRequests > 0) {
- $this->wait($accessToken, $this->maxBatchRequests);
- }
-
- $this->batchRequests = array_merge($this->batchRequests, $batch);
- $this->maybeSendMoreBatchRequests($accessToken);
- $this->checkForCompletedRequests($accessToken);
- }
-
- public function wait($accessToken, $max = 0)
- {
- if (count($this->inflightRequests) <= $max) {
- return;
- }
- while (1) {
- $this->checkForCompletedRequests($accessToken);
- if (count($this->inflightRequests) <= $max) {
- break;
- }
- curl_multi_select($this->multiHandle); // or do: usleep(10000);
- }
- }
-
- private function maybeSendMoreBatchRequests($accessToken)
- {
- $max = $this->maxBatchRequests - count($this->inflightRequests);
- if ($max <= 0) {
- return;
- }
- $idx = 0;
- $len = count($this->batchRequests);
- for (; $idx < $len && $idx < $max; $idx++) {
- $payload = $this->batchRequests[$idx];
- $handle = curl_init();
- $this->setCurlOptions($handle, $payload, $accessToken);
- curl_multi_add_handle($this->multiHandle, $handle);
- $handleArrayKey = (int)$handle;
- $this->inflightRequests[$handleArrayKey] = true;
- }
- $this->batchRequests = array_slice($this->batchRequests, $idx);
- }
-
- public function setCurlOptions($handle, EncodedPayload $payload, $accessToken)
- {
- curl_setopt($handle, CURLOPT_URL, $this->endpoint);
- curl_setopt($handle, CURLOPT_POST, true);
- curl_setopt($handle, CURLOPT_POSTFIELDS, $payload->encoded());
- curl_setopt($handle, CURLOPT_VERBOSE, false);
- curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, $this->verifyPeer);
- curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($handle, CURLOPT_TIMEOUT, $this->timeout);
- curl_setopt($handle, CURLOPT_HTTPHEADER, array('X-Rollbar-Access-Token: ' . $accessToken));
- curl_setopt($handle, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
-
- if (!is_null($this->caCertPath)) {
- curl_setopt($handle, CURLOPT_CAINFO, $this->caCertPath);
- }
-
- if ($this->proxy) {
- $proxy = is_array($this->proxy) ? $this->proxy : array('address' => $this->proxy);
- if (isset($proxy['address'])) {
- curl_setopt($handle, CURLOPT_PROXY, $proxy['address']);
- curl_setopt($handle, CURLOPT_FOLLOWLOCATION, true);
- }
- if (isset($proxy['username']) && isset($proxy['password'])) {
- curl_setopt($handle, CURLOPT_PROXYUSERPWD, $proxy['username'] . ':' . $proxy['password']);
- }
- }
- }
-
- private function checkForCompletedRequests($accessToken)
- {
- do {
- $curlResponse = curl_multi_exec($this->multiHandle, $active);
- } while ($curlResponse == CURLM_CALL_MULTI_PERFORM);
- while ($active && $curlResponse == CURLM_OK) {
- if (curl_multi_select($this->multiHandle, 0.01) == -1) {
- $this->maybeSendMoreBatchRequests($accessToken);
- return;
- }
- do {
- $curlResponse = curl_multi_exec($this->multiHandle, $active);
- } while ($curlResponse == CURLM_CALL_MULTI_PERFORM);
- }
- $this->removeFinishedRequests($accessToken);
- }
-
- private function removeFinishedRequests($accessToken)
- {
- while ($info = curl_multi_info_read($this->multiHandle)) {
- $handle = $info['handle'];
- $handleArrayKey = (int)$handle;
- if (isset($this->inflightRequests[$handleArrayKey])) {
- unset($this->inflightRequests[$handleArrayKey]);
- curl_multi_remove_handle($this->multiHandle, $handle);
- }
- curl_close($handle);
- }
- $this->maybeSendMoreBatchRequests($accessToken);
- }
-
- public function toString()
- {
- return "Rollbar API endpoint: " . $this->getEndpoint();
- }
-}
diff --git a/vendor/rollbar/rollbar/src/Senders/FluentSender.php b/vendor/rollbar/rollbar/src/Senders/FluentSender.php
deleted file mode 100644
index 1c1fff13..00000000
--- a/vendor/rollbar/rollbar/src/Senders/FluentSender.php
+++ /dev/null
@@ -1,119 +0,0 @@
-fluentHost = \Rollbar\Defaults::get()->fluentHost();
- $this->fluentPort = \Rollbar\Defaults::get()->fluentPort();
- $this->fluentTag = \Rollbar\Defaults::get()->fluentTag();
-
- $this->utilities = new \Rollbar\Utilities();
- if (isset($opts['fluentHost'])) {
- $this->utilities->validateString($opts['fluentHost'], 'opts["fluentHost"]', null, false);
- $this->fluentHost = $opts['fluentHost'];
- }
-
- if (isset($opts['fluentPort'])) {
- $this->utilities->validateInteger($opts['fluentPort'], 'opts["fluentPort"]', null, null, false);
- $this->fluentPort = $opts['fluentPort'];
- }
-
- if (isset($opts['fluentTag'])) {
- $this->utilities->validateString($opts['fluentTag'], 'opts["fluentTag"]', null, false);
- $this->fluentTag = $opts['fluentTag'];
- }
- }
-
-
- /**
- * @param \Rollbar\Payload\EncodedPayload $scrubbedPayload
- * @param $accessToken
- * @return Response
- *
- * @SuppressWarnings(PHPMD.UnusedFormalParameter) Unsued parameter is
- * intended here to comply to SenderInterface
- */
- public function send(EncodedPayload $payload, $accessToken)
- {
- if (empty($this->fluentLogger)) {
- $this->loadFluentLogger();
- }
-
- $scrubbedPayload = $payload->data();
-
- $success = $this->fluentLogger->post($this->fluentTag, $scrubbedPayload);
- $status = $success ? 200 : 400;
- $info = $success ? 'OK' : 'Bad Request';
- $uuid = $scrubbedPayload['data']['uuid'];
-
- return new Response($status, $info, $uuid);
- }
-
- public function sendBatch($batch, $accessToken)
- {
- $responses = array();
- foreach ($batch as $payload) {
- $responses[] = $this->send($payload, $accessToken);
- }
- return $responses;
- }
-
- /**
- * @SuppressWarnings(PHPMD.UnusedFormalParameter)
- */
- public function wait($accessToken, $max)
- {
- return;
- }
-
- /**
- * Loads the fluent logger
- */
- protected function loadFluentLogger()
- {
- $this->fluentLogger = new FluentLogger($this->fluentHost, $this->fluentPort);
- }
-
- public function toString()
- {
- return "fluentd " . $this->fluentHost . ":" . $this->fluentPort .
- " tag: " . $this->fluentTag;
- }
-}
diff --git a/vendor/rollbar/rollbar/src/Senders/SenderInterface.php b/vendor/rollbar/rollbar/src/Senders/SenderInterface.php
deleted file mode 100644
index 957e6c68..00000000
--- a/vendor/rollbar/rollbar/src/Senders/SenderInterface.php
+++ /dev/null
@@ -1,12 +0,0 @@
-truncation = $truncation;
- }
-
- public function execute(EncodedPayload $payload)
- {
- return $payload;
- }
-
- public function applies(EncodedPayload $payload)
- {
- return true;
- }
-}
diff --git a/vendor/rollbar/rollbar/src/Truncation/FramesStrategy.php b/vendor/rollbar/rollbar/src/Truncation/FramesStrategy.php
deleted file mode 100644
index 9823e4e4..00000000
--- a/vendor/rollbar/rollbar/src/Truncation/FramesStrategy.php
+++ /dev/null
@@ -1,51 +0,0 @@
-data();
-
- if (isset($data['data']['body']['trace_chain'])) {
- foreach ($data['data']['body']['trace_chain'] as $offset => $value) {
- $data['data']['body']['trace_chain'][$offset]['frames'] = $this->selectFrames($value['frames']);
- }
-
- $payload->encode($data);
- } elseif (isset($data['data']['body']['trace']['frames'])) {
- $data['data']['body']['trace']['frames'] = $this->selectFrames($data['data']['body']['trace']['frames']);
- $payload->encode($data);
- }
-
- return $payload;
- }
-
- public function selectFrames($frames, $range = self::FRAMES_OPTIMIZATION_RANGE)
- {
- if (count($frames) <= $range * 2) {
- return $frames;
- }
-
- return array_merge(
- array_splice($frames, 0, $range),
- array_splice($frames, -$range, $range)
- );
- }
-
- public function applies(EncodedPayload $payload)
- {
- $payload = $payload->data();
-
- if (isset($payload['data']['body']['trace_chain']) ||
- isset($payload['data']['body']['trace']['frames'])) {
- return true;
- }
-
- return false;
- }
-}
diff --git a/vendor/rollbar/rollbar/src/Truncation/IStrategy.php b/vendor/rollbar/rollbar/src/Truncation/IStrategy.php
deleted file mode 100644
index 7e6bcbdf..00000000
--- a/vendor/rollbar/rollbar/src/Truncation/IStrategy.php
+++ /dev/null
@@ -1,18 +0,0 @@
-data();
-
- $modified = false;
-
- $traceData = array();
-
- if (isset($data['data']['body']['trace'])) {
- $traceData = &$data['data']['body']['trace'];
- } elseif (isset($data['data']['body']['trace_chain'])) {
- $traceData = &$data['data']['body']['trace_chain'];
- }
-
- if (isset($traceData['exception'])) {
- /**
- * Delete exception description
- */
- unset($traceData['exception']['description']);
-
- /**
- * Truncate exception message
- */
- $traceData['exception']['message'] = substr(
- $traceData['exception']['message'],
- 0,
- static::EXCEPTION_MESSAGE_LIMIT
- );
-
- $modified = true;
- }
-
- /**
- * Limit trace frames
- */
- if (!empty($traceData['frames'])) {
- $framesStrategy = new FramesStrategy($this->truncation);
- $traceData['frames'] = $framesStrategy->selectFrames(
- $traceData['frames'],
- static::EXCEPTION_FRAMES_RANGE
- );
-
- $modified = true;
- }
-
- if ($modified) {
- $payloadClass = get_class($payload);
- $payload = new $payloadClass($data);
- $payload->encode();
- }
-
- return $payload;
- }
-}
diff --git a/vendor/rollbar/rollbar/src/Truncation/RawStrategy.php b/vendor/rollbar/rollbar/src/Truncation/RawStrategy.php
deleted file mode 100644
index d02f8412..00000000
--- a/vendor/rollbar/rollbar/src/Truncation/RawStrategy.php
+++ /dev/null
@@ -1,11 +0,0 @@
-data();
- $modified = false;
-
- foreach (static::getThresholds() as $threshold) {
- $maxPayloadSize = \Rollbar\Truncation\Truncation::MAX_PAYLOAD_SIZE;
-
- if (!$this->truncation->needsTruncating($payload, $this)) {
- break;
- }
-
- if ($this->traverse($data, $threshold, $payload)) {
- $modified = true;
- }
- }
-
- if ($modified) {
- $payload->encode($data);
- }
-
- return $payload;
- }
-
- protected function traverse(&$data, $threshold, $payload)
- {
- $modified = false;
-
- foreach ($data as $key => &$value) {
- if (is_array($value)) {
- if ($this->traverse($value, $threshold, $payload)) {
- $modified = true;
- }
- } else {
- if (is_string($value) && (($strlen = strlen($value)) > $threshold)) {
- $value = substr($value, 0, $threshold);
- $modified = true;
- $payload->decreaseSize($strlen - $threshold);
- }
- }
- }
-
- return $modified;
- }
-}
diff --git a/vendor/rollbar/rollbar/src/Truncation/Truncation.php b/vendor/rollbar/rollbar/src/Truncation/Truncation.php
deleted file mode 100644
index dcc6ea1f..00000000
--- a/vendor/rollbar/rollbar/src/Truncation/Truncation.php
+++ /dev/null
@@ -1,77 +0,0 @@
-config = $config;
-
- if ($custom = $config->getCustomTruncation()) {
- $this->registerStrategy($custom);
- }
- }
-
- public function registerStrategy($type)
- {
- if (!class_exists($type) || !is_subclass_of($type, "Rollbar\Truncation\AbstractStrategy")) {
- throw new \Exception(
- "Truncation strategy '$type' doesn't exist or is not a subclass " .
- "of Rollbar\Truncation\AbstractStrategy"
- );
- }
- array_unshift(static::$truncationStrategies, $type);
- }
-
- /**
- * Applies truncation strategies in order to keep the payload size under
- * configured limit.
- *
- * @param \Rollbar\Payload\EncodedPayload $payload
- * @param string $strategy
- *
- * @return \Rollbar\Payload\EncodedPayload
- */
- public function truncate(EncodedPayload $payload)
- {
- foreach (static::$truncationStrategies as $strategy) {
- $strategy = new $strategy($this);
-
- if (!$strategy->applies($payload)) {
- continue;
- }
-
- if (!$this->needsTruncating($payload, $strategy)) {
- break;
- }
-
- $this->config->verboseLogger()->debug('Applying truncation strategy ' . get_class($strategy));
-
- $payload = $strategy->execute($payload);
- }
-
- return $payload;
- }
-
- /**
- * Check if the payload is too big to be sent
- *
- * @param array $payload
- *
- * @return boolean
- */
- public function needsTruncating(EncodedPayload $payload, $strategy)
- {
- return $payload->size() > self::MAX_PAYLOAD_SIZE;
- }
-}
diff --git a/vendor/rollbar/rollbar/src/Utilities.php b/vendor/rollbar/rollbar/src/Utilities.php
deleted file mode 100644
index 8027ff34..00000000
--- a/vendor/rollbar/rollbar/src/Utilities.php
+++ /dev/null
@@ -1,212 +0,0 @@
-= $minValue");
- }
- if (!is_null($maxValue) && $input > $maxValue) {
- throw new \InvalidArgumentException("\$$name must be <= $maxValue");
- }
- }
-
- public static function serializeForRollbar(
- $obj,
- array $customKeys = null,
- &$objectHashes = array(),
- $maxDepth = -1,
- $depth = 0
- ) {
-
- $returnVal = array();
-
- if (is_object($obj)) {
- if (self::serializedAlready($obj, $objectHashes)) {
- return self::circularReferenceLabel($obj);
- } else {
- self::markSerialized($obj, $objectHashes);
- }
- }
-
- if ($maxDepth > 0 && $depth > $maxDepth) {
- return null;
- }
-
- foreach ($obj as $key => $val) {
- if (is_object($val)) {
- $val = self::serializeObject(
- $val,
- $customKeys,
- $objectHashes,
- $maxDepth,
- $depth
- );
- } elseif (is_array($val)) {
- $val = self::serializeForRollbar(
- $val,
- $customKeys,
- $objectHashes,
- $maxDepth,
- $depth+1
- );
- }
-
- if ($customKeys !== null && in_array($key, $customKeys)) {
- $returnVal[$key] = $val;
- } elseif (!is_null($val)) {
- $returnVal[$key] = $val;
- }
- }
-
- return $returnVal;
- }
-
- private static function serializeObject(
- $obj,
- array $customKeys = null,
- &$objectHashes = array(),
- $maxDepth = -1,
- $depth = 0
- ) {
- $serialized = null;
-
- if (self::serializedAlready($obj, $objectHashes)) {
- $serialized = self::circularReferenceLabel($obj);
- } else {
- if ($obj instanceof \Serializable) {
- self::markSerialized($obj, $objectHashes);
- $serialized = $obj->serialize();
- } else {
- $serialized = array(
- 'class' => get_class($obj)
- );
-
- if ($obj instanceof \Iterator) {
- $serialized['value'] = 'non-serializable';
- } else {
- $serialized['value'] = self::serializeForRollbar(
- $obj,
- $customKeys,
- $objectHashes,
- $maxDepth,
- $depth+1
- );
- }
- }
- }
-
- return $serialized;
- }
-
- private static function serializedAlready($obj, &$objectHashes)
- {
- if (!isset($objectHashes[spl_object_hash($obj)])) {
- return false;
- }
-
- return true;
- }
-
- private static function markSerialized($obj, &$objectHashes)
- {
- $objectHashes[spl_object_hash($obj)] = true;
- self::$ObjectHashes = $objectHashes;
- }
-
- private static function circularReferenceLabel($obj)
- {
- return '';
- }
-
- // from http://www.php.net/manual/en/function.uniqid.php#94959
- public static function uuid4()
- {
- mt_srand();
- return sprintf(
- '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
- // 32 bits for "time_low"
- mt_rand(0, 0xffff),
- mt_rand(0, 0xffff),
- // 16 bits for "time_mid"
- mt_rand(0, 0xffff),
- // 16 bits for "time_hi_and_version",
- // four most significant bits holds version number 4
- mt_rand(0, 0x0fff) | 0x4000,
- // 16 bits, 8 bits for "clk_seq_hi_res",
- // 8 bits for "clk_seq_low",
- // two most significant bits holds zero and one for variant DCE1.1
- mt_rand(0, 0x3fff) | 0x8000,
- // 48 bits for "node"
- mt_rand(0, 0xffff),
- mt_rand(0, 0xffff),
- mt_rand(0, 0xffff)
- );
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/AgentTest.php b/vendor/rollbar/rollbar/tests/AgentTest.php
deleted file mode 100644
index 94c4335a..00000000
--- a/vendor/rollbar/rollbar/tests/AgentTest.php
+++ /dev/null
@@ -1,63 +0,0 @@
-path)) {
- mkdir($this->path);
- }
- }
-
- public function testAgent()
- {
- Rollbar\Rollbar::init(array(
- 'access_token' => $this->getTestAccessToken(),
- 'environment' => 'testing',
- 'agent_log_location' => $this->path,
- 'handler' => 'agent'
- ), false, false, false);
- $logger = Rollbar\Rollbar::logger();
- $logger->info("this is a test");
- $file = fopen($this->path . '/rollbar-relay.' . getmypid() . '.' . microtime(true) . '.rollbar', 'r');
- $line = fgets($file);
- $this->assertContains('this is a test', $line);
- }
-
- public function tearDown()
- {
- parent::tearDown();
- $this->rrmdir($this->path);
- }
-
- private function rrmdir($dir)
- {
- if (!is_dir($dir)) {
- return;
- }
-
- $objects = scandir($dir);
- foreach ($objects as $object) {
- if ($object != "." && $object != "..") {
- if (filetype($dir . "/" . $object) == "dir") {
- $this->rrmdir($dir . "/" . $object);
- } else {
- unlink($dir . "/" . $object);
- }
- }
- }
- reset($objects);
- rmdir($dir);
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/BackwardsCompatibilityConfigTest.php b/vendor/rollbar/rollbar/tests/BackwardsCompatibilityConfigTest.php
deleted file mode 100644
index e3d41da3..00000000
--- a/vendor/rollbar/rollbar/tests/BackwardsCompatibilityConfigTest.php
+++ /dev/null
@@ -1,63 +0,0 @@
- $this->getTestAccessToken(),
- 'agent_log_location' => '/var/log/rollbar-php',
- 'base_api_url' => 'http://dev:8090/api/1/',
- 'batch_size' => 50,
- 'batched' => true,
- 'branch' => 'other',
- 'capture_error_stacktraces' => true,
- 'checkIgnore' => function () {
- $check = isset($_SERVER['HTTP_USER_AGENT']) &&
- strpos($_SERVER['HTTP_USER_AGENT'], 'Baiduspider') !== false;
- if ($check) {
- // ignore baidu spider
- return true;
- }
-
- // no other ignores
- return false;
- },
- 'code_version' => '1.2.3',
- 'environment' => 'production',
- 'error_sample_rates' => array(
- E_WARNING => 0.5,
- E_ERROR => 1
- ),
- 'handler' => 'blocking',
- 'host' => 'my_host',
- 'include_error_code_context' => true,
- 'included_errno' => E_ERROR | E_WARNING,
- 'logger' => new FakeLog(),
- 'person' => array(
- 'id' => "1",
- 'username' => 'test-user',
- 'email' => 'test@rollbar.com'
- ),
- 'person_fn' => function () {
- return array(
- 'id' => "1",
- 'username' => 'test-user',
- 'email' => 'test@rollbar.com'
- );
- },
- 'root' => '/Users/brian/www/app',
- 'scrub_fields' => array('test'),
- 'timeout' => 10,
- 'report_suppressed' => true,
- 'use_error_reporting' => true,
- 'proxy' => array(
- 'address' => '127.0.0.1:8080',
- 'username' => 'my_user',
- 'password' => 'my_password'
- )
- ));
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/BaseRollbarTest.php b/vendor/rollbar/rollbar/tests/BaseRollbarTest.php
deleted file mode 100644
index 8c008e7a..00000000
--- a/vendor/rollbar/rollbar/tests/BaseRollbarTest.php
+++ /dev/null
@@ -1,20 +0,0 @@
-assertEquals($value, $body->getValue());
-
- $mock2 = m::mock("Rollbar\Payload\ContentInterface");
- $this->assertEquals($mock2, $body->setValue($mock2)->getValue());
- }
-
- public function testExtra()
- {
- $value = m::mock("Rollbar\Payload\ContentInterface")
- ->shouldReceive("serialize")
- ->andReturn("{CONTENT}")
- ->shouldReceive("getKey")
- ->andReturn("content_interface")
- ->mock();
- $expected = array(
- "hello" => "world"
- );
- $body = new Body($value, $expected);
- $this->assertEquals($body->getExtra(), $expected);
- }
-
- public function testSerialize()
- {
- $value = m::mock("Rollbar\Payload\ContentInterface")
- ->shouldReceive("serialize")
- ->andReturn("{CONTENT}")
- ->shouldReceive("getKey")
- ->andReturn("content_interface")
- ->mock();
- $body = new Body($value, array('foo' => 'bar'));
- $encoded = json_encode($body->serialize());
- $this->assertEquals(
- "{\"content_interface\":\"{CONTENT}\",\"extra\":{\"foo\":\"bar\"}}",
- $encoded
- );
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/ConfigTest.php b/vendor/rollbar/rollbar/tests/ConfigTest.php
deleted file mode 100644
index fecb96af..00000000
--- a/vendor/rollbar/rollbar/tests/ConfigTest.php
+++ /dev/null
@@ -1,732 +0,0 @@
-error = new ErrorWrapper(
- E_ERROR,
- "test",
- null,
- null,
- null,
- new Utilities
- );
- }
-
- public function tearDown()
- {
- parent::tearDown();
- m::close();
- }
-
- private $env = "rollbar-php-testing";
-
- public function testAccessToken()
- {
- $config = new Config(array(
- 'access_token' => $this->getTestAccessToken(),
- 'environment' => $this->env
- ));
- $this->assertEquals($this->getTestAccessToken(), $config->getAccessToken());
- }
-
- public function testEnabled()
- {
- $config = new Config(array(
- 'access_token' => $this->getTestAccessToken(),
- 'environment' => $this->env
- ));
- $this->assertTrue($config->enabled());
-
- $config = new Config(array(
- 'access_token' => $this->getTestAccessToken(),
- 'environment' => $this->env,
- 'enabled' => false
- ));
- $this->assertFalse($config->enabled());
- }
-
- public function testTransmit()
- {
- $config = new Config(array(
- 'access_token' => $this->getTestAccessToken(),
- 'environment' => $this->env
- ));
- $this->assertTrue($config->transmitting());
-
- $config = new Config(array(
- 'access_token' => $this->getTestAccessToken(),
- 'environment' => $this->env,
- 'transmit' => false
- ));
- $this->assertFalse($config->transmitting());
- }
-
- public function testLogPayload()
- {
- $config = new Config(array(
- 'access_token' => $this->getTestAccessToken(),
- 'environment' => $this->env
- ));
- $this->assertFalse($config->loggingPayload());
-
- $config = new Config(array(
- 'access_token' => $this->getTestAccessToken(),
- 'environment' => $this->env,
- 'log_payload' => true
- ));
- $this->assertTrue($config->loggingPayload());
- }
-
- public function testLoggingPayload()
- {
- $logPayloadLoggerMock = $this->getMockBuilder('\Psr\Log\LoggerInterface')->getMock();
- $logPayloadLoggerMock->expects($this->once())
- ->method('debug')
- ->with(
- $this->matchesRegularExpression(
- '/Sending payload with .*:\n\{"data":/'
- )
- );
- $senderMock = $this->getMockBuilder('\Rollbar\Senders\SenderInterface')
- ->getMock();
- $senderMock->method('send')->willReturn(true);
-
- $payload = new \Rollbar\Payload\EncodedPayload(array('data'=>array()));
- $payload->encode();
-
- $config = new Config(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php",
- "log_payload" => true,
- "log_payload_logger" => $logPayloadLoggerMock,
- "sender" => $senderMock
- ));
- $config->send($payload, $this->getTestAccessToken());
- }
-
- public function testConfigureLogPayloadLogger()
- {
- $config = new Config(array(
- 'access_token' => $this->getTestAccessToken(),
- 'environment' => $this->env
- ));
- $this->assertInstanceOf('\Monolog\Logger', $config->logPayloadLogger());
- $handlers = $config->logPayloadLogger()->getHandlers();
- $handler = $handlers[0];
- $this->assertInstanceOf('\Monolog\Handler\ErrorLogHandler', $handler);
- $this->assertEquals(\Monolog\Logger::DEBUG, $handler->getLevel());
-
- $config = new Config(array(
- 'access_token' => $this->getTestAccessToken(),
- 'environment' => $this->env,
- 'log_payload_logger' => new \Psr\Log\NullLogger()
- ));
- $this->assertInstanceOf('\Psr\Log\NullLogger', $config->logPayloadLogger());
- }
-
- public function testVerbose()
- {
- $config = new Config(array(
- 'access_token' => $this->getTestAccessToken(),
- 'environment' => $this->env
- ));
- // assert the appropriate default logger
- $this->assertEquals(Config::VERBOSE_NONE, $config->verbose());
- $this->assertInstanceOf('\Monolog\Logger', $config->verboseLogger());
- // assert the appropriate default handler
- $handlers = $config->verboseLogger()->getHandlers();
- $handler = $handlers[0];
- $this->assertInstanceOf('\Monolog\Handler\ErrorLogHandler', $handler);
- // assert the appropriate default handler level
- $this->assertEquals($config->verboseInteger(), $handler->getLevel());
-
- // assert the verbosity level in the handler matches the level in the config
- $config->configure(array('verbose' => \Psr\Log\LogLevel::DEBUG));
- $handlers = $config->verboseLogger()->getHandlers();
- $handler = $handlers[0];
- $this->assertEquals($config->verboseInteger(), $handler->getLevel());
- }
-
- public function testVerboseInfo()
- {
- $config = new Config(array(
- 'access_token' => $this->getTestAccessToken(),
- 'environment' => $this->env,
- 'verbose' => \Psr\Log\LogLevel::INFO
- ));
-
- $handlerMock = $this->getMockBuilder('\Monolog\Handler\ErrorLogHandler')
- ->setMethods(array('handle'))
- ->getMock();
-
- $handlerMock->expects($this->once())->method('handle');
-
- $config->verboseLogger()->setHandlers(array($handlerMock));
-
- $this->assertTrue($config->verboseLogger()->info('Test trace'));
- }
-
- public function testVerboseInteger()
- {
- $config = new Config(array(
- 'access_token' => $this->getTestAccessToken(),
- 'environment' => $this->env,
- 'verbose' => Config::VERBOSE_NONE
- ));
- $this->assertEquals(1000, $config->verboseInteger());
-
- $config->configure(array('verbose' => \Psr\Log\LogLevel::DEBUG));
- $this->assertEquals(100, $config->verboseInteger());
- }
-
- public function testConfigureVerboseLogger()
- {
- $config = new Config(array(
- 'access_token' => $this->getTestAccessToken(),
- 'environment' => $this->env
- ));
- $this->assertInstanceOf('\Monolog\Logger', $config->verboseLogger());
-
- $config = new Config(array(
- 'access_token' => $this->getTestAccessToken(),
- 'environment' => $this->env,
- 'verbose_logger' => new \Psr\Log\NullLogger()
- ));
- $this->assertInstanceOf('\Psr\Log\NullLogger', $config->verboseLogger());
- }
-
- public function testAccessTokenFromEnvironment()
- {
- $_ENV['ROLLBAR_ACCESS_TOKEN'] = $this->getTestAccessToken();
- $config = new Config(array(
- 'environment' => 'testing'
- ));
- $this->assertEquals($this->getTestAccessToken(), $config->getAccessToken());
- }
-
- public function testDataBuilder()
- {
- $arr = array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => $this->env
- );
- $config = new Config($arr);
- $this->assertInstanceOf('Rollbar\DataBuilder', $config->getDataBuilder());
- }
-
- public function testExtend()
- {
- $arr = array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => $this->env
- );
- $config = new Config($arr);
- $extended = $config->extend(array("one" => 1, "arr" => array()));
- $expected = array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => $this->env,
- "one" => 1,
- "arr" => array()
- );
- $this->assertEquals($expected, $extended);
- }
-
- public function testConfigure()
- {
- $arr = array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => $this->env
- );
- $config = new Config($arr);
- $config->configure(array("one" => 1, "arr" => array()));
- $expected = array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => $this->env,
- "one" => 1,
- "arr" => array()
- );
- $this->assertEquals($expected, $config->getConfigArray());
- }
-
- public function testExplicitDataBuilder()
- {
- $fdb = new FakeDataBuilder(array());
- $arr = array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => $this->env,
- "dataBuilder" => $fdb
- );
- $config = new Config($arr);
- $expected = array(Level::EMERGENCY, "oops", array());
- $config->getRollbarData($expected[0], $expected[1], $expected[2]);
- $this->assertEquals($expected, array_pop(FakeDataBuilder::$logged));
- }
-
- public function testTransformer()
- {
- $p = m::mock("Rollbar\Payload\Payload");
- $pPrime = m::mock("Rollbar\Payload\Payload");
- $transformer = m::mock("Rollbar\TransformerInterface");
- $transformer->shouldReceive('transform')
- ->once()
- ->with($p, "error", "message", "extra_data")
- ->andReturn($pPrime)
- ->mock();
- $config = new Config(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => $this->env,
- "transformer" => $transformer
- ));
- $this->assertEquals($pPrime, $config->transform($p, "error", "message", "extra_data"));
- }
-
- public function testMinimumLevel()
- {
- $config = new Config(array(
- 'access_token' => $this->getTestAccessToken(),
- 'environment' => $this->env
- ));
-
- $this->assertPayloadNotIgnored($config, $this->prepareMockPayload(Level::DEBUG()));
-
- $config->configure(array('minimum_level' => Level::WARNING()));
-
- $this->assertPayloadIgnored($config, $this->prepareMockPayload(Level::DEBUG()));
- $this->assertPayloadNotIgnored($config, $this->prepareMockPayload(Level::WARNING()));
-
- $config = new Config(array(
- 'access_token' => $this->getTestAccessToken(),
- 'environment' => $this->env,
- 'minimumLevel' => Level::ERROR()
- ));
-
- $this->assertPayloadIgnored($config, $this->prepareMockPayload(Level::WARNING()));
- $this->assertPayloadNotIgnored($config, $this->prepareMockPayload(Level::ERROR()));
- }
-
- public function assertPayloadIgnored($config, $payload)
- {
- $this->assertTrue($config->checkIgnored($payload, null, $this->error, false));
- }
-
- public function assertPayloadNotIgnored($config, $payload)
- {
- $this->assertFalse($config->checkIgnored($payload, null, $this->error, false));
- }
-
- private function prepareMockPayload($level)
- {
- $data = m::mock("Rollbar\Payload\Data")
- ->shouldReceive('getLevel')
- ->andReturn($level)
- ->mock();
- return new Payload($data, $this->getTestAccessToken());
- }
-
- public function testReportSuppressed()
- {
- $this->assertTrue(true, "Don't know how to unit test this. PRs welcome");
- }
-
- public function testFilter()
- {
- $d = m::mock("Rollbar\Payload\Data")
- ->shouldReceive("getLevel")
- ->andReturn(Level::CRITICAL())
- ->mock();
- $p = m::mock("Rollbar\Payload\Payload")
- ->shouldReceive("getData")
- ->andReturn($d)
- ->mock();
- $filter = m::mock("Rollbar\FilterInterface")
- ->shouldReceive("shouldSend")
- ->twice()
- ->andReturn(true, false)
- ->mock();
- $c = new Config(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => $this->env,
- "filter" => $filter
- ));
- $this->assertTrue($c->checkIgnored($p, "fake_access_token", $this->error, false));
- $this->assertFalse($c->checkIgnored($p, "fake_access_token", $this->error, false));
- }
-
- public function testSender()
- {
- $p = m::mock("Rollbar\Payload\EncodedPayload");
- $sender = m::mock("Rollbar\Senders\SenderInterface")
- ->shouldReceive("send")
- ->with($p, $this->getTestAccessToken())
- ->once()
- ->mock();
- $c = new Config(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => $this->env,
- "sender" => $sender
- ));
- $c->send($p, $this->getTestAccessToken());
- }
-
- public function testEndpoint()
- {
- $config = new Config(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => $this->env,
- "endpoint" => "http://localhost/api/1/"
- ));
-
- $this->assertEquals(
- "http://localhost/api/1/item/",
- $config->getSender()->getEndpoint()
- );
- }
-
- public function testCustom()
- {
- $config = new Config(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => $this->env,
- "custom" => array(
- "foo" => "bar",
- "fuzz" => "buzz"
- )
- ));
-
- $dataBuilder = $config->getDataBuilder();
-
- $result = $dataBuilder->makeData(
- Level::INFO,
- "Test message with custom data added dynamically.",
- array()
- );
-
- $custom = $result->getCustom();
-
- $this->assertEquals("bar", $custom["foo"]);
- $this->assertEquals("buzz", $custom["fuzz"]);
- }
-
- public function testMaxItems()
- {
- $config = new Config(array(
- "access_token" => $this->getTestAccessToken()
- ));
-
- $this->assertEquals(Defaults::get()->maxItems(), $config->getMaxItems());
-
- $config = new Config(array(
- "access_token" => $this->getTestAccessToken(),
- "max_items" => Defaults::get()->maxItems()+1
- ));
-
- $this->assertEquals(Defaults::get()->maxItems()+1, $config->getMaxItems());
- }
-
- public function testCustomDataMethod()
- {
- $logger = new RollbarLogger(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => $this->env,
- "custom_data_method" => function ($toLog, $customDataMethodContext) {
-
- return array(
- 'data_from_my_custom_method' => $customDataMethodContext['foo']
- );
- }
- ));
-
- $dataBuilder = $logger->getDataBuilder();
-
- $result = $dataBuilder->makeData(
- Level::ERROR,
- new \Exception(),
- array(
- 'custom_data_method_context' => array('foo' => 'bar')
- )
- )->getCustom();
-
- $this->assertEquals('bar', $result['data_from_my_custom_method']);
- }
-
- public function testEndpointDefault()
- {
- $config = new Config(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => $this->env
- ));
-
- $this->assertEquals(
- "https://api.rollbar.com/api/1/item/",
- $config->getSender()->getEndpoint()
- );
- }
-
- public function testBaseApiUrl()
- {
- $config = new Config(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => $this->env,
- "base_api_url" => "http://localhost/api/1/"
- ));
-
- $this->assertEquals(
- "http://localhost/api/1/item/",
- $config->getSender()->getEndpoint()
- );
- }
-
- public function testBaseApiUrlDefault()
- {
- $config = new Config(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => $this->env
- ));
-
- $this->assertEquals(
- "https://api.rollbar.com/api/1/item/",
- $config->getSender()->getEndpoint()
- );
- }
-
- public function testRaiseOnError()
- {
- $config = new Config(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => $this->env,
- "raise_on_error" => true
- ));
-
- $this->assertTrue($config->getRaiseOnError());
- }
-
- public function testSendMessageTrace()
- {
- $c = new Config(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => $this->env,
- "send_message_trace" => true
- ));
-
- $this->assertTrue($c->getSendMessageTrace());
-
- $c = new Config(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => $this->env
- ));
-
- $this->assertFalse($c->getSendMessageTrace());
- }
-
- public function testCheckIgnore()
- {
- $called = false;
- $config = new Config(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => $this->env,
- "check_ignore" => function () use (&$called) {
- $called = true;
- }
- ));
- $levelFactory = $config->getLevelFactory();
-
- $data = new Data($this->env, new Body(new Message("test")));
- $data->setLevel($levelFactory->fromName(Level::ERROR));
-
- $config->checkIgnored(
- new Payload(
- $data,
- $config->getAccessToken()
- ),
- $this->getTestAccessToken(),
- $this->error,
- false
- );
-
- $this->assertTrue($called);
- }
-
- public function testCheckIgnoreParameters()
- {
- $called = false;
- $isUncaughtPassed = null;
- $errorPassed = null;
-
- $config = new Config(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => $this->env,
- "check_ignore" => function (
- $isUncaught,
- $exc
- ) use (
- &$called,
- &$isUncaughtPassed,
- &$errorPassed
-) {
- $called = true;
- $isUncaughtPassed = $isUncaught;
- $errorPassed = $exc;
- }
- ));
-
- $levelFactory = $config->getLevelFactory();
-
- $data = new Data($this->env, new Body(new Message("test")));
- $data->setLevel($levelFactory->fromName(Level::ERROR));
-
- $config->checkIgnored(
- new Payload(
- $data,
- $config->getAccessToken()
- ),
- $this->getTestAccessToken(),
- $this->error,
- true
- );
-
- $this->assertTrue($called);
- $this->assertTrue($isUncaughtPassed);
- $this->assertEquals($this->error, $errorPassed);
- }
-
- public function testCaptureErrorStacktraces()
- {
- $logger = new RollbarLogger(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => $this->env,
- "capture_error_stacktraces" => false
- ));
-
- $dataBuilder = $logger->getDataBuilder();
-
- $result = $dataBuilder->makeData(
- Level::ERROR,
- new \Exception(),
- array()
- );
-
- $this->assertEmpty($result->getBody()->getValue()->getFrames());
- }
-
- /**
- * @dataProvider useErrorReportingProvider
- */
- public function testUseErrorReporting($use_error_reporting, $error_reporting, $expected)
- {
- $called = false;
-
- $config = new Config(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => $this->env,
- "check_ignore" => function () use (&$called) {
- $called = true;
- },
- "use_error_reporting" => $use_error_reporting
- ));
-
- if ($error_reporting !== null) {
- $errorReportingTemp = error_reporting();
- error_reporting($error_reporting);
- }
-
- $result = $config->internalCheckIgnored(
- Level::ERROR,
- $this->error
- );
-
- $this->assertEquals($expected, $result);
-
- if ($error_reporting) {
- error_reporting($errorReportingTemp);
- }
- }
-
- public function useErrorReportingProvider()
- {
- return array(
- "use_error_reporting off" => array(
- false, // "use_error_reporting"
- null, // "error_reporting"
- false
- ),
- "use_error_reporting on & errno not covered" => array(
- true, // "use_error_reporting"
- E_WARNING, // "error_reporting"
- true
- ),
- "use_error_reporting on & errno covered" => array(
- true, // "use_error_reporting"
- E_ERROR, // "error_reporting"
- false
- )
- );
- }
-
- /**
- * @dataProvider providerExceptionSampleRate
- */
- public function testExceptionSampleRate($exception, $expected)
- {
- $config = new Config(array(
- "access_token" => "ad865e76e7fb496fab096ac07b1dbabb",
- "environment" => "testing-php",
- "exception_sample_rates" => array(
- get_class($exception) => $expected
- )
- ));
-
- $sampleRate = $config->exceptionSampleRate($exception);
-
- $this->assertEquals($expected, $sampleRate);
- }
-
- public function providerExceptionSampleRate()
- {
- return array(
- array(
- new \Exception,
- 1.0
- ),
- array(
- new SilentExceptionSampleRate,
- 0.0
- ),
- array(
- new FiftyFiftyExceptionSampleRate,
- 0.5
- ),
- array(
- new FiftyFityChildExceptionSampleRate,
- 0.5
- ),
- array(
- new QuarterExceptionSampleRate,
- 0.25
- ),
- array(
- new VerboseExceptionSampleRate,
- 1.0
- ),
- );
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/ContextTest.php b/vendor/rollbar/rollbar/tests/ContextTest.php
deleted file mode 100644
index cc66db67..00000000
--- a/vendor/rollbar/rollbar/tests/ContextTest.php
+++ /dev/null
@@ -1,38 +0,0 @@
-assertEquals($pre, $context->getPre());
-
- $pre2 = array("lineone", "linetwo");
- $this->assertEquals($pre2, $context->setPre($pre2)->getPre());
- }
-
- public function testContextPost()
- {
- $post = array("four", "five");
- $context = new Context(array(), $post);
- $this->assertEquals($post, $context->getPost());
-
- $post2 = array("six", "seven", "eight");
- $this->assertEquals($post2, $context->setPost($post2)->getPost());
- }
-
- public function testEncode()
- {
- $context = new Context(array(), array());
- $encoded = json_encode($context->serialize());
- $this->assertEquals('{"pre":[],"post":[]}', $encoded);
-
- $context = new Context(array("one"), array("three"));
- $encoded = json_encode($context->serialize());
- $this->assertEquals('{"pre":["one"],"post":["three"]}', $encoded);
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/CurlSenderTest.php b/vendor/rollbar/rollbar/tests/CurlSenderTest.php
deleted file mode 100644
index 4f2e0d0b..00000000
--- a/vendor/rollbar/rollbar/tests/CurlSenderTest.php
+++ /dev/null
@@ -1,30 +0,0 @@
- $this->getTestAccessToken(),
- "environment" => "testing-php",
- "endpoint" => "fake-endpoint"
- ));
- $response = $logger->log(Level::WARNING, "Testing PHP Notifier", array());
-
- $this->assertTrue(
- in_array(
- $response->getInfo(),
- array(
- "Couldn't resolve host 'fake-endpointitem'", // hack for PHP 5.3
- "Could not resolve host: fake-endpointitem",
- "Empty reply from server"
- )
- )
- );
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/DataBuilderTest.php b/vendor/rollbar/rollbar/tests/DataBuilderTest.php
deleted file mode 100644
index ae84c6c4..00000000
--- a/vendor/rollbar/rollbar/tests/DataBuilderTest.php
+++ /dev/null
@@ -1,1006 +0,0 @@
-dataBuilder = new DataBuilder(array(
- 'accessToken' => $this->getTestAccessToken(),
- 'environment' => 'tests',
- 'levelFactory' => new LevelFactory,
- 'utilities' => new Utilities
- ));
- }
-
- public function testMakeData()
- {
- $output = $this->dataBuilder->makeData(Level::ERROR, "testing", array());
- $this->assertEquals('tests', $output->getEnvironment());
- }
-
- /**
- * @dataProvider getUrlProvider
- */
- public function testGetUrl($protoData, $hostData, $portData)
- {
- // Set up proto
- $pre_SERVER = $_SERVER;
-
- $_SERVER = array_merge(
- $_SERVER,
- $protoData[0],
- $hostData[0],
- $portData[0]
- );
- $expectedProto = $protoData[1];
- $expectedHost = $hostData[1];
- $expectedPort = $portData[1];
- $expectedPort = ($expectedPort == 80 || $expectedPort == 443) ? "" : $expectedPort;
-
- $expected = '';
- $expected = $expectedProto . "://" . $expectedHost .
- ($expectedPort ? $expected . ':' . $expectedPort : $expected) .
- '/';
-
- if ($expectedHost == 'unknown') {
- $expected = null;
- }
-
- // When DataBuilder builds the data
- $response = $this->dataBuilder->makeData(Level::ERROR, "testing", array());
- $result = $response->getRequest()->getUrl();
-
- $_SERVER = $pre_SERVER;
-
- $this->assertEquals($expected, $result);
- }
-
- public function getUrlProvider()
- {
- $protoData = $this->getUrlProtoProvider();
- $hostData = $this->getUrlHostProvider();
- $portData = $this->getUrlPortProvider();
-
- $testData = array();
-
- $dataName = 0;
-
- foreach ($protoData as $protoTest) {
- foreach ($hostData as $hostTest) {
- foreach ($portData as $portTest) {
- if ($dataName >= 96 && $dataName <= 99) {
- continue;
- }
-
- $testData []= array(
- $protoTest, // test param 1
- $hostTest, // test param 2
- $portTest // test param 3,
- );
-
- $dataName++;
- }
- }
- }
-
- return $testData;
- }
-
- /**
- * @dataProvider parseForwardedStringProvider
- */
- public function testParseForwardedString($forwaded, $expected)
- {
- $output = $this->dataBuilder->parseForwardedString($forwaded);
- $this->assertEquals($expected, $output);
- }
-
- public function parseForwardedStringProvider()
- {
- return array(
- array( // test 1
- 'Forwarded: for="_mdn" ',
- array(
- 'for' => array('"_mdn"')
- )
- ),
- array( // test 2
- 'Forwarded: for="_mdn", for="_mdn2" ',
- array(
- 'for' => array('"_mdn"', '"_mdn2"')
- )
- ),
- array( // test 3
- 'Forwarded: For="[2001:db8:cafe::17]:4711"',
- array(
- 'for' => array('"[2001:db8:cafe::17]:4711"')
- )
- ),
- array( // test 4
- 'Forwarded: for=192.0.2.60; proto=http; by=203.0.113.43',
- array(
- 'for' => array('192.0.2.60'),
- 'by' => array('203.0.113.43'),
- 'proto' => 'http'
- )
- ),
- array( // test 5
- 'Forwarded: for=192.0.2.43, for=198.51.100.17;'.
- 'by=192.0.2.44, by=198.51.100.18',
- array(
- 'for' => array('192.0.2.43','198.51.100.17'),
- 'by' => array('192.0.2.44','198.51.100.18')
- )
- ),
- array( // test 6
- 'Forwarded: for=192.0.2.60; host=hostname; by=203.0.113.43; proto=https',
- array(
- 'for' => array('192.0.2.60'),
- 'by' => array('203.0.113.43'),
- 'host' => 'hostname',
- 'proto' => 'https'
- )
- )
- );
- }
-
- /**
- * @dataProvider getUrlProtoProvider
- */
- public function testGetUrlProto($data, $expected)
- {
- $pre_SERVER = $_SERVER;
- $_SERVER = array_merge($_SERVER, $data);
-
- $output = $this->dataBuilder->getUrlProto();
-
- $this->assertEquals($expected, $output);
-
- $_SERVER = $pre_SERVER;
- }
-
- public function getUrlProtoProvider()
- {
- return array(
- array( // test 1: HTTP_FORWARDED
- array(
- 'HTTP_FORWARDED' => 'Forwarded: for=192.0.2.60; proto=http; by=203.0.113.43',
- ),
- 'http'
- ),
- array( // test 2: HTTP_X_FORWARDED
- array(
- 'HTTP_X_FORWARDED_PROTO' => 'http',
- ),
- 'http'
- ),
- array( // test 2: HTTP_X_FORWARDED with commas
- array(
- 'HTTP_X_FORWARDED_PROTO' => 'http,https',
- ),
- 'http'
- ),
- array( // test 3: HTTPS server global
- array(
- 'HTTPS' => 'on',
- ),
- 'https'
- ),
- array( // test 4: default
- array(),
- 'http'
- ),
- array( // test 5: HTTP_FORWARDED https
- array(
- 'HTTP_FORWARDED' => 'Forwarded: for=192.0.2.60; proto=https; by=203.0.113.43',
- ),
- 'https'
- ),
- );
- }
-
- /**
- * @dataProvider getUrlHostProvider
- */
- public function testGetUrlHost($data, $expected)
- {
- $pre_SERVER = $_SERVER;
- $_SERVER = array_merge($_SERVER, $data);
-
- $output = $this->dataBuilder->getUrlHost();
-
- $_SERVER = $pre_SERVER;
-
- $this->assertEquals($expected, $output);
- }
-
- public function getUrlHostProvider()
- {
- return array(
- array( // test 1: HTTP_FORWARDED
- array(
- 'HTTP_FORWARDED' => 'Forwarded: for=192.0.2.60; host=test-hostname.com; by=203.0.113.43',
- ),
- 'test-hostname.com'
- ),
- array( // test 2: HTTP_X_FORWARDED
- array(
- 'HTTP_X_FORWARDED_HOST' => 'test-hostname.com',
- ),
- 'test-hostname.com'
- ),
- array( // test 3: HTTP_HOST server global
- array(
- 'HTTP_HOST' => 'test-hostname.com',
- ),
- 'test-hostname.com'
- ),
- array( // test 4: default
- array(),
- 'unknown'
- ),
- array( // test 5: SERVER_name
- array(
- 'SERVER_NAME' => 'test-hostname.com',
- ),
- 'test-hostname.com'
- ),
- array( // test 6: HTTP_HOST server global with port
- array(
- 'HTTP_HOST' => 'test-hostname.com:8080',
- ),
- 'test-hostname.com'
- ),
- );
- }
-
- public function testGetHeaders()
- {
- $pre_SERVER = $_SERVER;
- $_SERVER = array(
- 'HTTP_ACCEPT' => 'blah/blah',
- 'HTTP_USER_AGENT' => 'fake 2.0',
- 'REMOTE_USER' => 'bob',
- );
- $expected = array(
- 'Accept' => 'blah/blah',
- 'User-Agent' => 'fake 2.0',
- );
- $output = $this->dataBuilder->getHeaders();
- $_SERVER = $pre_SERVER;
- $this->assertEquals($expected, $output);
- }
-
- /**
- * @dataProvider getUrlPortProvider
- */
- public function testGetUrlPort($data, $expected)
- {
- $pre_SERVER = $_SERVER;
- $_SERVER = array_merge($_SERVER, $data);
-
- $output = $this->dataBuilder->getUrlPort(
- isset($_SERVER['$proto']) ? $_SERVER['$proto'] : null
- );
-
- $_SERVER = $pre_SERVER;
-
- $this->assertEquals($expected, $output);
- }
-
- public function getUrlPortProvider()
- {
- return array(
- array( // test 1: HTTP_X_FORWARDED
- array(
- 'HTTP_X_FORWARDED_PORT' => '8080',
- ),
- 8080
- ),
- array( // test 2: SERVER_PORT server global
- array(
- 'SERVER_PORT' => '8080',
- ),
- 8080
- ),
- array( // test 3: default
- array(),
- 80
- ),
- array( // test 4: $proto param
- array(
- '$proto' => 'https',
- ),
- 443
- )
- );
- }
-
- public function testBranchKey()
- {
- $dataBuilder = new DataBuilder(array(
- 'accessToken' => $this->getTestAccessToken(),
- 'environment' => 'tests',
- 'branch' => 'test-branch',
- 'levelFactory' => new LevelFactory,
- 'utilities' => new Utilities
- ));
-
- $output = $dataBuilder->makeData(Level::ERROR, "testing", array());
- $this->assertEquals('test-branch', $output->getServer()->getBranch());
- }
-
- public function testCodeVersion()
- {
- $dataBuilder = new DataBuilder(array(
- 'accessToken' => $this->getTestAccessToken(),
- 'environment' => 'tests',
- 'code_version' => '3.4.1',
- 'levelFactory' => new LevelFactory,
- 'utilities' => new Utilities
- ));
- $output = $dataBuilder->makeData(Level::ERROR, "testing", array());
- $this->assertEquals('3.4.1', $output->getCodeVersion());
- }
-
- public function testHost()
- {
- $dataBuilder = new DataBuilder(array(
- 'accessToken' => $this->getTestAccessToken(),
- 'environment' => 'tests',
- 'host' => 'my host',
- 'levelFactory' => new LevelFactory,
- 'utilities' => new Utilities
- ));
- $output = $dataBuilder->makeData(Level::ERROR, "testing", array());
- $this->assertEquals('my host', $output->getServer()->getHost());
- }
-
- public function testGetMessage()
- {
- $dataBuilder = new DataBuilder(array(
- 'accessToken' => $this->getTestAccessToken(),
- 'environment' => 'tests',
- 'levelFactory' => new LevelFactory,
- 'utilities' => new Utilities
- ));
-
- $result = $dataBuilder->makeData(Level::ERROR, "testing", array());
- $this->assertNull($result->getBody()->getValue()->getBacktrace());
- }
-
- public function testGetMessageSendMessageTrace()
- {
-
- $dataBuilder = new DataBuilder(array(
- 'accessToken' => $this->getTestAccessToken(),
- 'environment' => 'tests',
- 'send_message_trace' => true,
- 'levelFactory' => new LevelFactory,
- 'utilities' => new Utilities
- ));
-
- $result = $dataBuilder->makeData(Level::ERROR, "testing", array());
- $this->assertNotEmpty($result->getBody()->getValue()->getBacktrace());
- }
-
- public function testGetMessageTraceArguments()
- {
- // Negative test
- $c = new Config(array(
- 'access_token' => $this->getTestAccessToken(),
- 'environment' => 'tests',
- 'send_message_trace' => true
- ));
- $dataBuilder = $c->getDataBuilder();
- $expected = 'testing';
-
- $result = $dataBuilder->makeData(Level::ERROR, $expected, array());
- $frames = $result->getBody()->getValue()->getBacktrace();
-
- $this->assertEquals(
- $expected,
- $frames[0]['args'][0],
- "Arguments in stack frames NOT included when they should be."
- );
-
- // Positive test
- $c = new Config(array(
- 'access_token' => $this->getTestAccessToken(),
- 'environment' => 'tests',
- 'send_message_trace' => true,
- 'local_vars_dump' => false
- ));
- $dataBuilder = $c->getDataBuilder();
-
- $result = $dataBuilder->makeData(Level::ERROR, $expected, array());
- $frames = $result->getBody()->getValue()->getBacktrace();
-
- $this->assertArrayNotHasKey(
- 'args',
- $frames[0],
- "Arguments in stack frames included when they should have not been."
- );
- }
-
- public function testExceptionTraceArguments()
- {
- // Negative test
- $dataBuilder = new DataBuilder(array(
- 'accessToken' => $this->getTestAccessToken(),
- 'environment' => 'tests',
- 'levelFactory' => new LevelFactory,
- 'utilities' => new Utilities
- ));
- $exception = $this->exceptionTraceArgsHelper('trace args message');
- $frames = $dataBuilder->getExceptionTrace($exception)->getFrames();
- $this->assertNull(
- $frames[count($frames)-1]->getArgs(),
- "Frames arguments available in trace when they should not be."
- );
-
- // Positive test
- $dataBuilder = new DataBuilder(array(
- 'accessToken' => $this->getTestAccessToken(),
- 'environment' => 'tests',
- 'local_vars_dump' => true,
- 'levelFactory' => new LevelFactory,
- 'utilities' => new Utilities
- ));
- $expected = 'trace args message';
- $exception = $this->exceptionTraceArgsHelper($expected);
- $frames = $dataBuilder->getExceptionTrace($exception)->getFrames();
- $args = $frames[count($frames)-2]->getArgs();
-
- $this->assertEquals(
- $expected,
- $args[0],
- "Frames arguments NOT available in trace when they should be."
- );
- }
-
- /**
- * The purpose of this method is to provide a frame with an expected
- * argument in testExceptionTraceArguments.
- *
- * @param string $message Argument expected in the last frame of the trace
- *
- * @return \Exception
- */
- private function exceptionTraceArgsHelper($message)
- {
- return new \Exception($message);
- }
-
- public function testExceptionFramesWithoutContext()
- {
- $dataBuilder = new DataBuilder(array(
- 'accessToken' => $this->getTestAccessToken(),
- 'environment' => 'tests',
- 'include_error_code_context' => true,
- 'include_exception_code_context' => false,
- 'levelFactory' => new LevelFactory,
- 'utilities' => new Utilities
- ));
- $output = $dataBuilder->getExceptionTrace(new \Exception())->getFrames();
- $this->assertNull($output[1]->getContext());
- }
-
- public function testExceptionFramesWithoutContextDefault()
- {
- $dataBuilder = new DataBuilder(array(
- 'accessToken' => $this->getTestAccessToken(),
- 'environment' => 'tests',
- 'levelFactory' => new LevelFactory,
- 'utilities' => new Utilities
- ));
- $output = $dataBuilder->getExceptionTrace(new \Exception())->getFrames();
- $this->assertNull($output[1]->getContext());
- }
-
- public function testExceptionFramesWithContext()
- {
- $dataBuilder = new DataBuilder(array(
- 'accessToken' => $this->getTestAccessToken(),
- 'environment' => 'tests',
- 'include_exception_code_context' => true,
- 'levelFactory' => new LevelFactory,
- 'utilities' => new Utilities
- ));
- $output = $dataBuilder->getExceptionTrace(new \Exception())->getFrames();
- $this->assertNotEmpty($output[count($output)-1]->getContext());
- }
-
- public function testFramesWithoutContext()
- {
- $utilities = new Utilities;
-
- $dataBuilder = new DataBuilder(array(
- 'accessToken' => $this->getTestAccessToken(),
- 'environment' => 'tests',
- 'include_error_code_context' => false,
- 'include_exception_code_context' => true,
- 'levelFactory' => new LevelFactory,
- 'utilities' => $utilities
- ));
- $testFilePath = __DIR__ . '/DataBuilderTest.php';
- $backtrace = array(
- array(
- 'file' => $testFilePath,
- 'function' => 'testFramesWithoutContext',
- 'line' => 42
- ),
- array(
- 'file' => $testFilePath,
- 'function' => 'testFramesWithContext',
- 'line' => 99
- ),
- );
- $output = $dataBuilder->getErrorTrace(
- new ErrorWrapper(
- E_ERROR,
- 'bork',
- null,
- null,
- $backtrace,
- $utilities
- )
- )->getFrames();
-
- $this->assertNull($output[0]->getContext());
- }
-
- public function testFramesWithContext()
- {
- $utilities = new Utilities;
-
- $testFilePath = __DIR__ . '/DataBuilderTest.php';
-
- $dataBuilder = new DataBuilder(array(
- 'accessToken' => $this->getTestAccessToken(),
- 'environment' => 'tests',
- 'include_error_code_context' => true,
- 'include_exception_code_context' => false,
- 'levelFactory' => new LevelFactory,
- 'utilities' => $utilities
- ));
-
- $backTrace = array(
- array(
- 'file' => $testFilePath,
- 'function' => 'testFramesWithoutContext'
- ),
- array(
- 'file' => $testFilePath,
- 'function' => 'testFramesWithContext'
- ),
- );
-
- $file = fopen($testFilePath, 'r');
- $lineNumber = 0;
- while (!feof($file)) {
- $lineNumber++;
- $line = fgets($file);
-
- if ($line == ' public function testFramesWithoutContext()
-') {
- $backTrace[0]['line'] = $lineNumber;
- } elseif ($line == ' public function testFramesWithContext()
-') {
- $backTrace[1]['line'] = $lineNumber;
- }
- }
- fclose($file);
-
- $output = $dataBuilder->getErrorTrace(
- new ErrorWrapper(
- E_ERROR,
- 'bork',
- null,
- null,
- $backTrace,
- $utilities
- )
- )->getFrames();
- $pre = $output[1]->getContext()->getPre();
-
- $expected = array();
- $fileContent = file($backTrace[0]['file']);
- for ($i = 7; $i > 1; $i--) {
- $expectedLine = $fileContent[$backTrace[0]['line']-$i];
- $expected[] = $expectedLine;
- }
-
- $this->assertEquals(
- str_replace(array("\r", "\n"), '', $expected),
- str_replace(array("\r", "\n"), '', $pre)
- );
- }
-
- public function testFramesWithoutContextDefault()
- {
- $testFilePath = __DIR__ . '/DataBuilderTest.php';
-
- $utilities = new Utilities;
-
- $dataBuilder = new DataBuilder(array(
- 'accessToken' => $this->getTestAccessToken(),
- 'environment' => 'tests',
- 'levelFactory' => new LevelFactory,
- 'utilities' => $utilities
- ));
-
- $backTrace = array(
- array(
- 'file' => $testFilePath,
- 'function' => 'testFramesWithoutContext'
- ),
- array(
- 'file' => $testFilePath,
- 'function' => 'testFramesWithContext'
- ),
- );
-
- $file = fopen($testFilePath, 'r');
- $lineNumber = 0;
- while (!feof($file)) {
- $lineNumber++;
- $line = fgets($file);
-
- if ($line == ' public function testFramesWithoutContext()
-') {
- $backTrace[0]['line'] = $lineNumber;
- } elseif ($line == ' public function testFramesWithContext()
-') {
- $backTrace[1]['line'] = $lineNumber;
- }
- }
- fclose($file);
-
- $output = $dataBuilder->getErrorTrace(
- new ErrorWrapper(
- E_ERROR,
- 'bork',
- null,
- null,
- $backTrace,
- $utilities
- )
- )->getFrames();
- $this->assertNull($output[0]->getContext());
- }
-
- public function testPerson()
- {
- $dataBuilder = new DataBuilder(array(
- 'accessToken' => $this->getTestAccessToken(),
- 'environment' => 'tests',
- 'person' => array(
- 'id' => '123',
- 'username' => 'tester',
- 'email' => 'test@test.com'
- ),
- 'levelFactory' => new LevelFactory,
- 'utilities' => new Utilities
- ));
- $output = $dataBuilder->makeData(Level::ERROR, "testing", array());
- $this->assertEquals('123', $output->getPerson()->getId());
- $this->assertNull($output->getPerson()->getUsername());
- $this->assertNull($output->getPerson()->getEmail());
- }
-
- public function testPersonCaptureEmailUsername()
- {
- $config = new Config(array(
- 'access_token' => $this->getTestAccessToken(),
- 'environment' => 'tests',
- 'person' => array(
- 'id' => '123',
- 'username' => 'tester',
- 'email' => 'test@test.com'
- ),
- 'capture_email' => true,
- 'capture_username' => true
- ));
- $dataBuilder = $config->getDataBuilder();
-
- $output = $dataBuilder->makeData(Level::ERROR, "testing", array());
-
- $this->assertEquals('123', $output->getPerson()->getId());
- $this->assertEquals('tester', $output->getPerson()->getUsername());
- $this->assertEquals('test@test.com', $output->getPerson()->getEmail());
- }
-
- public function testPersonFunc()
- {
- $dataBuilder = new DataBuilder(array(
- 'accessToken' => $this->getTestAccessToken(),
- 'environment' => 'tests',
- 'person_fn' => function () {
- return array(
- 'id' => '123',
- 'email' => 'test@test.com'
- );
- },
- 'levelFactory' => new LevelFactory,
- 'utilities' => new Utilities
- ));
- $output = $dataBuilder->makeData(Level::ERROR, "testing", array());
- $this->assertEquals('123', $output->getPerson()->getId());
- }
-
- public function testPersonFuncException()
- {
- \Rollbar\Rollbar::init(array(
- 'access_token' => $this->getTestAccessToken(),
- 'environment' => 'tests'
- ));
- $logger = \Rollbar\Rollbar::scope(array(
- 'person_fn' => function () {
- throw new \Exception("Exception from person_fn");
- }
- ));
-
- try {
- $logger->log(Level::ERROR, "testing exceptions in person_fn", array());
- $this->assertTrue(true); // assert that exception was not thrown
- } catch (\Exception $exception) {
- $this->fail("Exception in person_fn was not caught.");
- }
- }
-
- public function testRoot()
- {
- $dataBuilder = new DataBuilder(array(
- 'accessToken' => $this->getTestAccessToken(),
- 'environment' => 'tests',
- 'root' => '/var/www/app',
- 'levelFactory' => new LevelFactory,
- 'utilities' => new Utilities
- ));
- $output = $dataBuilder->makeData(Level::ERROR, "testing", array());
- $this->assertEquals('/var/www/app', $output->getServer()->getRoot());
- }
-
- public function testSetRequestBody()
- {
- $_POST['arg1'] = "val1";
- $_POST['arg2'] = "val2";
- $streamInput = http_build_query($_POST);
-
- stream_wrapper_unregister("php");
- stream_wrapper_register("php", "\Rollbar\TestHelpers\MockPhpStream");
-
- file_put_contents('php://input', $streamInput);
-
- $dataBuilder = new DataBuilder(array(
- 'accessToken' => $this->getTestAccessToken(),
- 'environment' => 'tests',
- 'levelFactory' => new LevelFactory,
- 'utilities' => new Utilities,
- 'include_raw_request_body' => true,
- ));
- $output = $dataBuilder->makeData(Level::ERROR, "testing", array());
- $requestBody = $output->getRequest()->getBody();
-
- $this->assertEquals($streamInput, $requestBody);
- if (version_compare(PHP_VERSION, '5.6.0') < 0) {
- $this->assertEquals($streamInput, $_SERVER['php://input']);
- }
-
- stream_wrapper_restore("php");
- }
-
- public function testPostDataPutRequest()
- {
- $_SERVER['REQUEST_METHOD'] = 'PUT';
-
- $expected = 'val1';
- $streamInput = http_build_query(array(
- 'arg1' => $expected
- ));
-
- stream_wrapper_unregister("php");
- stream_wrapper_register("php", "\Rollbar\TestHelpers\MockPhpStream");
-
- file_put_contents('php://input', $streamInput);
-
- $config = array(
- 'accessToken' => $this->getTestAccessToken(),
- 'environment' => 'tests',
- 'levelFactory' => new LevelFactory,
- 'utilities' => new Utilities,
- 'include_raw_request_body' => true
- );
-
- $dataBuilder = new DataBuilder($config);
-
- $data = $dataBuilder->makeData(Level::ERROR, "testing", array());
- $post = $data->getRequest()->getPost();
-
- $this->assertEquals($expected, $post['arg1']);
-
- unset($_SERVER['REQUEST_METHOD']);
- stream_wrapper_restore("php");
- }
-
- public function testGenerateErrorWrapper()
- {
- $result = $this->dataBuilder->generateErrorWrapper(E_ERROR, 'bork', null, null);
-
- $this->assertTrue($result instanceof ErrorWrapper);
- }
-
- /**
- * @dataProvider captureErrorStacktracesProvider
- */
- public function testCaptureErrorStacktracesException(
- $captureErrorStacktraces,
- $expected
- ) {
-
- $dataBuilder = new DataBuilder(array(
- 'accessToken' => $this->getTestAccessToken(),
- 'environment' => 'tests',
- 'capture_error_stacktraces' => $captureErrorStacktraces,
- 'levelFactory' => new LevelFactory,
- 'utilities' => new Utilities
- ));
-
- $result = $dataBuilder->makeData(
- Level::ERROR,
- new \Exception(),
- array()
- );
- $frames = $result->getBody()->getValue()->getFrames();
-
- $this->assertEquals($expected, count($frames) === 0);
- }
-
- public function testFramesOrder()
- {
- $dataBuilder = new DataBuilder(array(
- 'accessToken' => $this->getTestAccessToken(),
- 'environment' => 'tests',
- 'include_exception_code_context' => true,
- 'levelFactory' => new LevelFactory,
- 'utilities' => new Utilities
- ));
- $frames = $dataBuilder->makeFrames(new \Exception(), false);
- $this->assertStringEndsWith(
- 'tests/DataBuilderTest.php',
- $frames[count($frames)-1]->getFilename()
- );
- $this->assertEquals(882, $frames[count($frames)-1]->getLineno());
- $this->assertEquals('Rollbar\DataBuilderTest::testFramesOrder', $frames[count($frames)-2]->getMethod());
- }
-
- /**
- * @dataProvider captureErrorStacktracesProvider
- */
- public function testCaptureErrorStacktracesError(
- $captureErrorStacktraces,
- $expected
- ) {
-
- $dataBuilder = new DataBuilder(array(
- 'accessToken' => $this->getTestAccessToken(),
- 'environment' => 'tests',
- 'capture_error_stacktraces' => $captureErrorStacktraces,
- 'levelFactory' => new LevelFactory,
- 'utilities' => new Utilities
- ));
-
- $result = $dataBuilder->generateErrorWrapper(E_ERROR, 'bork', null, null);
- $frames = $result->getBacktrace();
-
- $this->assertEquals($expected, count($frames) == 0);
- }
-
- public function captureErrorStacktracesProvider()
- {
- return array(
- array(false,true),
- array(true,false)
- );
- }
-
- /**
- * @dataProvider getUserIpProvider
- */
- public function testGetUserIp($ipAddress, $expected, $captureIP)
- {
- $_SERVER['REMOTE_ADDR'] = $ipAddress;
-
- $config = array(
- 'access_token' => $this->getTestAccessToken(),
- 'environment' => 'tests'
- );
-
- if ($captureIP !== null) {
- $config['capture_ip'] = $captureIP;
- }
-
- $config = new Config($config);
-
- $dataBuilder = $config->getDataBuilder();
- $output = $dataBuilder->makeData(Level::ERROR, "testing", array());
-
- $this->assertEquals($expected, $output->getRequest()->getUserIp());
-
- unset($_SERVER['REMOTE_ADDR']);
-
- $_SERVER['HTTP_X_FORWARDED_FOR'] = $ipAddress;
- $_SERVER['REMOTE_ADDR'] = 'dont use this, this time';
- $output = $dataBuilder->makeData(Level::ERROR, "testing", array());
- $this->assertEquals($expected, $output->getRequest()->getUserIp());
-
- unset($_SERVER['REMOTE_ADDR']);
- unset($_SERVER['HTTP_X_FORWARDED_FOR']);
-
- $_SERVER['HTTP_X_REAL_IP'] = $ipAddress;
- $_SERVER['REMOTE_ADDR'] = 'dont use this, this time';
- $output = $dataBuilder->makeData(Level::ERROR, "testing", array());
- $this->assertEquals($expected, $output->getRequest()->getUserIp());
-
- unset($_SERVER['REMOTE_ADDR']);
- unset($_SERVER['HTTP_X_REAL_IP']);
- }
-
- public function getUserIpProvider()
- {
- return array(
- array('127.0.0.1', '127.0.0.1', null),
- array('127.0.0.1', null, false),
- array('127.0.0.1', '127.0.0.0', DataBuilder::ANONYMIZE_IP),
- array(
- '2001:0db8:85a3:0000:0000:8a2e:0370:7334',
- '2001:0db8:85a3:0000:0000:0000:0000:0000',
- DataBuilder::ANONYMIZE_IP
- ),
- array(
- '2001:db8:85a3::',
- '2001:db8:85a3:0000:0000:0000:0000:0000',
- DataBuilder::ANONYMIZE_IP
- )
- );
- }
-
- public function testGitBranch()
- {
- $config = new Config(array(
- 'access_token' => $this->getTestAccessToken(),
- 'environment' => 'tests'
- ));
-
- $dataBuilder = $config->getDataBuilder();
-
- $val = rtrim(shell_exec('git rev-parse --abbrev-ref HEAD'));
- $this->assertEquals($val, $dataBuilder->detectGitBranch());
- }
-
- public function testGitBranchNoExec()
- {
- $config = new Config(array(
- 'access_token' => $this->getTestAccessToken(),
- 'environment' => 'tests'
- ));
-
- $dataBuilder = $config->getDataBuilder();
-
- $this->assertEquals(null, $dataBuilder->detectGitBranch(false));
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/DataTest.php b/vendor/rollbar/rollbar/tests/DataTest.php
deleted file mode 100644
index 147df24b..00000000
--- a/vendor/rollbar/rollbar/tests/DataTest.php
+++ /dev/null
@@ -1,194 +0,0 @@
-body = m::mock("Rollbar\Payload\Body");
- $this->data = new Data("test", $this->body);
- }
-
- public function testEnvironmentMustBeString()
- {
- $data = new Data("env", $this->body);
- $this->assertEquals("env", $data->getEnvironment());
-
- $this->assertEquals("test", $data->setEnvironment("test")->getEnvironment());
- }
-
- public function testBody()
- {
- $data = new Data("env", $this->body);
- $this->assertEquals($this->body, $data->getBody());
-
- $body2 = m::mock("Rollbar\Payload\Body");
- $this->assertEquals($body2, $data->setBody($body2)->getBody());
- }
-
- public function testLevel()
- {
- $levelFactory = new LevelFactory;
- $level = Level::ERROR;
-
- $this->assertEquals(
- $levelFactory->fromName($level),
- $this->data->setLevel($level)->getLevel()
- );
- }
-
- public function testTimestamp()
- {
- $timestamp = time();
- $this->assertEquals($timestamp, $this->data->setTimestamp($timestamp)->getTimestamp());
- }
-
- public function testCodeVersion()
- {
- $codeVersion = "v0.18.1";
- $this->assertEquals($codeVersion, $this->data->setCodeVersion($codeVersion)->getCodeVersion());
- }
-
- public function testPlatform()
- {
- $platform = "Linux";
- $this->assertEquals($platform, $this->data->setPlatform($platform)->getPlatform());
- }
-
- public function testLanguage()
- {
- $language = "PHP";
- $this->assertEquals($language, $this->data->setLanguage($language)->getLanguage());
- }
-
- public function testFramework()
- {
- $framework = "Laravel";
- $this->assertEquals($framework, $this->data->setFramework($framework)->getFramework());
- }
-
- public function testContext()
- {
- $context = "SuperController->getResource()";
- $this->assertEquals($context, $this->data->setContext($context)->getContext());
- }
-
- public function testRequest()
- {
- $request = m::mock("Rollbar\Payload\Request");
- $this->assertEquals($request, $this->data->setRequest($request)->getRequest());
- }
-
- public function testPerson()
- {
- $person = m::mock("Rollbar\Payload\Person");
- ;
- $this->assertEquals($person, $this->data->setPerson($person)->getPerson());
- }
-
- public function testServer()
- {
- $server = m::mock("Rollbar\Payload\Server");
- $this->assertEquals($server, $this->data->setServer($server)->getServer());
- }
-
- public function testCustom()
- {
- $custom = array(
- "x" => 1,
- "y" => 2,
- "z" => 3,
- );
- $this->assertEquals($custom, $this->data->setCustom($custom)->getCustom());
- }
-
- public function testFingerprint()
- {
- $fingerprint = "bad-error-with-database";
- $this->assertEquals($fingerprint, $this->data->setFingerprint($fingerprint)->getFingerprint());
- }
-
- public function testTitle()
- {
- $title = "End of the World as we know it";
- $this->assertEquals($title, $this->data->setTitle($title)->getTitle());
- }
-
- public function testUuid()
- {
- $uuid = "21EC2020-3AEA-4069-A2DD-08002B30309D";
- $this->assertEquals($uuid, $this->data->setUuid($uuid)->getUuid());
- }
-
- public function testNotifier()
- {
- $notifier = m::mock("Rollbar\Payload\Notifier");
- $this->assertEquals($notifier, $this->data->setNotifier($notifier)->getNotifier());
- }
-
- public function testEncode()
- {
- $time = time();
- $level = $this->mockSerialize("Rollbar\Payload\Level", "{LEVEL}");
- $body = $this->mockSerialize($this->body, "{BODY}");
- $request = $this->mockSerialize("Rollbar\Payload\Request", "{REQUEST}");
- $person = $this->mockSerialize("Rollbar\Payload\Person", "{PERSON}");
- $server = $this->mockSerialize("Rollbar\Payload\Server", "{SERVER}");
- $notifier = $this->mockSerialize("Rollbar\Payload\Notifier", "{NOTIFIER}");
-
- $data = $this->data
- ->setEnvironment("testing")
- ->setBody($body)
- ->setLevel($level)
- ->setTimestamp($time)
- ->setCodeVersion("v0.17.3")
- ->setPlatform("LAMP")
- ->setLanguage("PHP 5.4")
- ->setFramework("CakePHP")
- ->setContext("AppController->updatePerson")
- ->setRequest($request)
- ->setPerson($person)
- ->setServer($server)
- ->setCustom(array("x" => "hello", "extra" => array('key'=>'val')))
- ->setFingerprint("big-fingerprint")
- ->setTitle("The Title")
- ->setUuid("123e4567-e89b-12d3-a456-426655440000")
- ->setNotifier($notifier);
-
- $encoded = json_encode($data->serialize());
-
- $this->assertContains("\"environment\":\"testing\"", $encoded);
- $this->assertContains("\"body\":\"{BODY}\"", $encoded);
- $this->assertContains("\"level\":\"{LEVEL}\"", $encoded);
- $this->assertContains("\"timestamp\":$time", $encoded);
- $this->assertContains("\"code_version\":\"v0.17.3\"", $encoded);
- $this->assertContains("\"platform\":\"LAMP\"", $encoded);
- $this->assertContains("\"language\":\"PHP 5.4\"", $encoded);
- $this->assertContains("\"framework\":\"CakePHP\"", $encoded);
- $this->assertContains("\"context\":\"AppController->updatePerson\"", $encoded);
- $this->assertContains("\"request\":\"{REQUEST}\"", $encoded);
- $this->assertContains("\"person\":\"{PERSON}\"", $encoded);
- $this->assertContains("\"server\":\"{SERVER}\"", $encoded);
- $this->assertContains("\"custom\":{\"x\":\"hello\",\"extra\":{\"key\":\"val\"}}", $encoded);
- $this->assertContains("\"fingerprint\":\"big-fingerprint\"", $encoded);
- $this->assertContains("\"title\":\"The Title\"", $encoded);
- $this->assertContains("\"uuid\":\"123e4567-e89b-12d3-a456-426655440000\"", $encoded);
- $this->assertContains("\"notifier\":\"{NOTIFIER}\"", $encoded);
- }
-
- private function mockSerialize($mock, $returnVal)
- {
- if (is_string($mock)) {
- $mock = m::mock("$mock, \Serializable");
- }
- return $mock->shouldReceive("serialize")
- ->andReturn($returnVal)
- ->mock();
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/DefaultsTest.php b/vendor/rollbar/rollbar/tests/DefaultsTest.php
deleted file mode 100644
index 484360a1..00000000
--- a/vendor/rollbar/rollbar/tests/DefaultsTest.php
+++ /dev/null
@@ -1,302 +0,0 @@
-defaults = new Defaults(new Utilities());
- }
-
- public function testGet()
- {
- $defaults = Defaults::get();
- $this->assertInstanceOf("Rollbar\Defaults", $defaults);
- }
-
- public function testMessageLevel()
- {
- $this->assertEquals("warning", $this->defaults->messageLevel());
- $this->assertEquals("error", $this->defaults->messageLevel(Level::ERROR));
- }
-
- public function testExceptionLevel()
- {
- $this->assertEquals("error", $this->defaults->exceptionLevel());
- $this->assertEquals("warning", $this->defaults->exceptionLevel(Level::WARNING));
- }
-
- public function testErrorLevels()
- {
- $expected = array(
- E_ERROR => "error",
- E_WARNING => "warning",
- E_PARSE => "critical",
- E_NOTICE => "debug",
- E_CORE_ERROR => "critical",
- E_CORE_WARNING => "warning",
- E_COMPILE_ERROR => "critical",
- E_COMPILE_WARNING => "warning",
- E_USER_ERROR => "error",
- E_USER_WARNING => "warning",
- E_USER_NOTICE => "debug",
- E_STRICT => "info",
- E_RECOVERABLE_ERROR => "error",
- E_DEPRECATED => "info",
- E_USER_DEPRECATED => "info"
- );
- $this->assertEquals($expected, $this->defaults->errorLevels());
- }
-
- public function testPsrLevels()
- {
- $expected = $this->defaultPsrLevels = array(
- LogLevel::EMERGENCY => "critical",
- "emergency" => "critical",
- LogLevel::ALERT => "critical",
- "alert" => "critical",
- LogLevel::CRITICAL => "critical",
- "critical" => "critical",
- LogLevel::ERROR => "error",
- "error" => "error",
- LogLevel::WARNING => "warning",
- "warning" => "warning",
- LogLevel::NOTICE => "info",
- "notice" => "info",
- LogLevel::INFO => "info",
- "info" => "info",
- LogLevel::DEBUG => "debug",
- "debug" => "debug"
- );
- $this->assertEquals($expected, $this->defaults->psrLevels());
- }
-
- public function testBranch()
- {
- $val = 'some-branch';
- $this->assertEquals($val, $this->defaults->branch($val));
- }
-
- public function testServerRoot()
- {
- $_ENV["HEROKU_APP_DIR"] = "abc123";
- $defaults = new Defaults(new Utilities);
- $this->assertEquals("abc123", $defaults->serverRoot());
- }
-
- public function testPlatform()
- {
- $this->assertEquals(php_uname('a'), $this->defaults->platform());
- }
-
- public function testNotifier()
- {
- $this->assertEquals(Notifier::defaultNotifier(), $this->defaults->notifier());
- }
-
- public function testBaseException()
- {
- if (version_compare(phpversion(), '7.0', '<')) {
- $expected = "\Exception";
- } else {
- $expected = "\Throwable";
- }
- $base = $this->defaults->baseException();
- $this->assertEquals($expected, $base);
- }
-
- public function testScrubFields()
- {
- $expected = array(
- 'passwd',
- 'password',
- 'secret',
- 'confirm_password',
- 'password_confirmation',
- 'auth_token',
- 'csrf_token',
- 'access_token'
- );
- $this->assertEquals($expected, $this->defaults->scrubFields());
- }
-
- public function testSendMessageTrace()
- {
- $this->assertFalse($this->defaults->sendMessageTrace());
- }
-
- public function testAgentLogLocation()
- {
- $this->assertEquals('/var/tmp', $this->defaults->agentLogLocation());
- }
-
- public function testAllowExec()
- {
- $this->assertEquals(true, $this->defaults->allowExec());
- }
-
- public function testEndpoint()
- {
- $this->assertEquals('https://api.rollbar.com/api/1/', $this->defaults->endpoint());
- }
-
- public function testCaptureErrorStacktraces()
- {
- $this->assertTrue($this->defaults->captureErrorStacktraces());
- }
-
- public function testCheckIgnore()
- {
- $this->assertNull($this->defaults->checkIgnore());
- }
-
- public function testCodeVersion()
- {
- $this->assertEquals("", $this->defaults->codeVersion());
- }
-
- public function testCustom()
- {
- $this->assertNull($this->defaults->custom());
- }
-
- public function testEnabled()
- {
- $this->assertTrue($this->defaults->enabled());
- }
-
- public function testTransmit()
- {
- $this->assertTrue($this->defaults->transmit());
- }
-
- public function testLogPayload()
- {
- $this->assertFalse($this->defaults->logPayload());
- }
-
- public function testEnvironment()
- {
- $this->assertEquals('production', $this->defaults->environment());
- }
-
- public function testErrorSampleRates()
- {
- $this->assertEmpty($this->defaults->errorSampleRates());
- }
-
- public function testExceptionSampleRates()
- {
- $this->assertEmpty($this->defaults->exceptionSampleRates());
- }
-
- public function testFluentHost()
- {
- $this->assertEquals('127.0.0.1', $this->defaults->fluentHost());
- }
-
- public function testFluentPort()
- {
- $this->assertEquals(24224, $this->defaults->fluentPort());
- }
-
- public function testFluentTag()
- {
- $this->assertEquals('rollbar', $this->defaults->fluentTag());
- }
-
- public function testHandler()
- {
- $this->assertEquals('blocking', $this->defaults->handler());
- }
-
- public function testHost()
- {
- $this->assertNull($this->defaults->host());
- }
-
- public function testIncludedErrno()
- {
- $this->assertEquals(
- ROLLBAR_INCLUDED_ERRNO_BITMASK,
- $this->defaults->includedErrno()
- );
- }
-
- public function testTimeout()
- {
- $this->assertEquals(3, $this->defaults->timeout());
- }
-
- public function testReportSuppressed()
- {
- $this->assertFalse($this->defaults->reportSuppressed());
- }
-
- public function testUseErrorReporting()
- {
- $this->assertFalse($this->defaults->useErrorReporting());
- }
-
- public function testCaptureEmail()
- {
- $this->assertFalse($this->defaults->captureEmail());
- }
-
- public function testCaptureUsername()
- {
- $this->assertFalse($this->defaults->captureUsername());
- }
-
- public function testMaxItems()
- {
- $this->assertEquals(10, $this->defaults->maxItems());
- }
-
- public function testRaiseOnError()
- {
- $this->assertEquals(false, $this->defaults->raiseOnError());
- }
-
- public function testDefaultsForConfigOptions()
- {
- foreach (\Rollbar\Config::listOptions() as $option) {
- if ($option == 'access_token' ||
- $option == 'logger' ||
- $option == 'person' ||
- $option == 'person_fn' ||
- $option == 'scrub_whitelist' ||
- $option == 'proxy' ||
- $option == 'include_raw_request_body' ||
- $option == 'verbose_logger' ||
- $option == 'log_payload_logger') {
- continue;
- } elseif ($option == 'base_api_url') {
- $option = 'endpoint';
- } elseif ($option == 'capture_ip') {
- $option = 'captureIP';
- } elseif ($option == 'root') {
- $option = 'server_root';
- }
-
- $this->defaults->fromSnakeCase($option);
- }
- }
-
- public function testFromSnakeCase()
- {
- $this->assertEquals(
- 'warning',
- \Rollbar\Defaults::get()->fromSnakeCase('message_level')
- );
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/ErrorWrapperTest.php b/vendor/rollbar/rollbar/tests/ErrorWrapperTest.php
deleted file mode 100644
index ae3dad07..00000000
--- a/vendor/rollbar/rollbar/tests/ErrorWrapperTest.php
+++ /dev/null
@@ -1,42 +0,0 @@
-assertEquals("FAKE BACKTRACE", $errWrapper->getBacktrace());
- }
-
- public function testGetClassName()
- {
- $errWrapper = new ErrorWrapper(
- E_ERROR,
- "Message Content",
- null,
- null,
- null,
- new Utilities
- );
- $this->assertEquals("E_ERROR", $errWrapper->getClassName());
-
- $errWrapper = new ErrorWrapper(
- 3,
- "Fake Error Number",
- null,
- null,
- null,
- new Utilities
- );
- $this->assertEquals("#3", $errWrapper->getClassName());
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/ExceptionInfoTest.php b/vendor/rollbar/rollbar/tests/ExceptionInfoTest.php
deleted file mode 100644
index 310966da..00000000
--- a/vendor/rollbar/rollbar/tests/ExceptionInfoTest.php
+++ /dev/null
@@ -1,34 +0,0 @@
-assertEquals($class, $exc->getClass());
-
- $this->assertEquals("TestClass", $exc->setClass("TestClass")->getClass());
- }
-
- public function testMessage()
- {
- $message = "A message";
- $exc = new ExceptionInfo("C", $message);
- $this->assertEquals($message, $exc->getMessage());
-
- $this->assertEquals("Another", $exc->setMessage("Another")->getMessage());
- }
-
- public function testDescription()
- {
- $description = "long form";
- $exc = new ExceptionInfo("C", "s", $description);
- $this->assertEquals($description, $exc->getDescription());
-
- $this->assertEquals("longer form", $exc->setDescription("longer form")->getDescription());
- $this->assertNull($exc->setDescription(null)->getDescription());
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/FakeDataBuilder.php b/vendor/rollbar/rollbar/tests/FakeDataBuilder.php
deleted file mode 100644
index 5fdf9d32..00000000
--- a/vendor/rollbar/rollbar/tests/FakeDataBuilder.php
+++ /dev/null
@@ -1,23 +0,0 @@
-markTestSkipped(
- 'Suggested package fluent/logger not installed, skip FluentTest'
- );
- }
-
- $socket = socket_create_listen(null);
- socket_getsockname($socket, $address, $port);
-
- Rollbar::init(array(
- 'access_token' => 'ad865e76e7fb496fab096ac07b1dbabb',
- 'environment' => 'testing'
- ), false, false, false);
- $logger = Rollbar::scope(array(
- 'batched' => false,
- 'fluent_host' => $address,
- 'fluent_port' => $port,
- 'handler' => 'fluent'
- ));
- $this->assertEquals(200, $logger->log(Level::INFO, 'this is a test', array())->getStatus());
-
- socket_close($socket);
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/FrameTest.php b/vendor/rollbar/rollbar/tests/FrameTest.php
deleted file mode 100644
index 133ac3c1..00000000
--- a/vendor/rollbar/rollbar/tests/FrameTest.php
+++ /dev/null
@@ -1,95 +0,0 @@
-exception = m::mock("Rollbar\Payload\ExceptionInfo");
- $this->frame = new Frame("tests/FrameTest.php", $this->exception);
- }
-
- public function testFilename()
- {
- $frame = new Frame("filename.php");
- $this->assertEquals("filename.php", $frame->getFilename());
- $frame->setFilename("other.php");
- $this->assertEquals("other.php", $frame->getFilename());
- }
-
- public function testLineno()
- {
- $this->frame->setLineno(5);
- $this->assertEquals(5, $this->frame->getLineno());
- }
-
- public function testColno()
- {
- $this->frame->setColno(5);
- $this->assertEquals(5, $this->frame->getColno());
- }
-
- public function testMethod()
- {
- $this->frame->setMethod("method");
- $this->assertEquals("method", $this->frame->getMethod());
- }
-
- public function testCode()
- {
- $this->frame->setCode("code->whatever()");
- $this->assertEquals("code->whatever()", $this->frame->getCode());
- }
-
- public function testContext()
- {
- $context = m::mock("Rollbar\Payload\Context");
- $this->frame->setContext($context);
- $this->assertEquals($context, $this->frame->getContext());
- }
-
- public function testArgs()
- {
- $this->frame->setArgs(array());
- $this->assertEquals(array(), $this->frame->getArgs());
-
- $this->frame->setArgs(array(1, "hi"));
- $this->assertEquals(array(1, "hi"), $this->frame->getArgs());
- }
-
- public function testEncode()
- {
- $context = m::mock("Rollbar\Payload\Context, \Serializable")
- ->shouldReceive("serialize")
- ->andReturn("{CONTEXT}")
- ->mock();
- $this->exception
- ->shouldReceive("serialize")
- ->andReturn("{EXC}")
- ->mock();
- $this->frame->setFilename("rollbar.php")
- ->setLineno(1024)
- ->setColno(42)
- ->setMethod("testEncode()")
- ->setCode('$frame->setFilename("rollbar.php")')
- ->setContext($context)
- ->setArgs(array("hello", "world"));
-
- $actual = json_encode($this->frame->serialize());
- $expected = '{' .
- '"filename":"rollbar.php",' .
- '"lineno":1024,"colno":42,' .
- '"method":"testEncode()",' .
- '"code":"$frame->setFilename(\"rollbar.php\")",' .
- '"context":"{CONTEXT}",' .
- '"args":["hello","world"]' .
- '}';
-
- $this->assertEquals($expected, $actual);
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/Handlers/ErrorHandlerTest.php b/vendor/rollbar/rollbar/tests/Handlers/ErrorHandlerTest.php
deleted file mode 100644
index 798df1e4..00000000
--- a/vendor/rollbar/rollbar/tests/Handlers/ErrorHandlerTest.php
+++ /dev/null
@@ -1,82 +0,0 @@
-useErrorHandler to deal with stopping the
- * PHPUnit's error handler instead of set_error_handler()
- */
-class ErrorHandlerTest extends BaseRollbarTest
-{
- public function __construct($name = null, $data = array(), $dataName = null)
- {
- self::$simpleConfig['access_token'] = $this->getTestAccessToken();
- self::$simpleConfig['included_errno'] = E_ALL;
- self::$simpleConfig['environment'] = 'test';
-
- parent::__construct($name, $data, $dataName);
- }
-
- private static $simpleConfig = array();
-
- public function testPreviousErrorHandler()
- {
- $testCase = $this;
-
- set_error_handler(function () use ($testCase) {
-
- $testCase->assertTrue(true, "Previous error handler invoked.");
-
- set_error_handler(null);
- });
-
- Rollbar::init(self::$simpleConfig);
-
- @trigger_error(E_USER_ERROR);
- }
-
- public function testRegister()
- {
- $handler = $this->getMockBuilder('Rollbar\\Handlers\\ErrorHandler')
- ->setConstructorArgs(array(new RollbarLogger(self::$simpleConfig)))
- ->setMethods(array('handle'))
- ->getMock();
-
- $handler->expects($this->once())
- ->method('handle');
-
- $handler->register();
-
- trigger_error(E_USER_ERROR);
- }
-
- public function testHandle()
- {
- $logger = $this->getMockBuilder('Rollbar\\RollbarLogger')
- ->setConstructorArgs(array(self::$simpleConfig))
- ->setMethods(array('log'))
- ->getMock();
-
- $logger->expects($this->once())
- ->method('log');
-
- /**
- * Disable PHPUnit's error handler as it would get triggered as the
- * previously set error handler. No need for that here.
- */
- $phpunitHandler = set_error_handler(function () {
- });
-
- $handler = new ErrorHandler($logger);
- $handler->register();
-
- $handler->handle(E_USER_ERROR, "", "", "");
-
- /**
- * Clean up the error handler set up for this test.
- */
- set_error_handler($phpunitHandler);
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/Handlers/ExceptionHandlerTest.php b/vendor/rollbar/rollbar/tests/Handlers/ExceptionHandlerTest.php
deleted file mode 100644
index e6e1a8fb..00000000
--- a/vendor/rollbar/rollbar/tests/Handlers/ExceptionHandlerTest.php
+++ /dev/null
@@ -1,90 +0,0 @@
-getTestAccessToken();
- self::$simpleConfig['included_errno'] = E_ALL;
- self::$simpleConfig['environment'] = 'test';
-
- parent::__construct($name, $data, $dataName);
- }
-
- private static $simpleConfig = array();
-
- /**
- * It's impossible to throw an uncaught exception with PHPUnit and thus
- * trigger the exception handler automatically. To overcome this limitation,
- * this test invokes the handle() methd manually with an assertion in the
- * previously set exception handler.
- */
- public function testPreviousExceptionHandler()
- {
- $testCase = $this;
-
- set_exception_handler(function () use ($testCase) {
-
- $testCase->assertTrue(true, "Previous exception handler invoked.");
- });
-
- $handler = new ExceptionHandler(new RollbarLogger(self::$simpleConfig));
- $handler->register();
-
- $handler->handle(new \Exception());
- }
-
- /**
- * It's impossible to throw an uncaught exception with PHPUnit and thus
- * trigger the exception handler automatically. To overcome this limitation,
- * this test fetches the exception handler set by the setup method with
- * set_exception_handler() and invokes it manually with a mock expectation.
- */
- public function testSetup()
- {
- $handler = $this->getMockBuilder('Rollbar\\Handlers\\ExceptionHandler')
- ->setConstructorArgs(array(new RollbarLogger(self::$simpleConfig)))
- ->setMethods(array('handle'))
- ->getMock();
-
- $handler->expects($this->once())
- ->method('handle');
-
- $handler->register();
-
- $setExceptionHandler = set_exception_handler(function () {
- });
-
- $handler = $setExceptionHandler[0];
- $method = $setExceptionHandler[1];
-
- $handler->$method();
- }
-
- public function testHandle()
- {
- set_exception_handler(function () {
- });
-
- $logger = $this->getMockBuilder('Rollbar\\RollbarLogger')
- ->setConstructorArgs(array(self::$simpleConfig))
- ->setMethods(array('log'))
- ->getMock();
-
- $logger->expects($this->once())
- ->method('log');
-
- $handler = new ExceptionHandler($logger);
- $handler->register();
-
- $handler->handle(new \Exception());
-
- set_exception_handler(function () {
- });
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/Handlers/FatalHandlerTest.php b/vendor/rollbar/rollbar/tests/Handlers/FatalHandlerTest.php
deleted file mode 100644
index 8c293fb8..00000000
--- a/vendor/rollbar/rollbar/tests/Handlers/FatalHandlerTest.php
+++ /dev/null
@@ -1,81 +0,0 @@
-getTestAccessToken();
- self::$simpleConfig['included_errno'] = E_ALL;
- self::$simpleConfig['environment'] = 'test';
-
- parent::__construct($name, $data, $dataName);
- }
-
- private static $simpleConfig = array();
-
- /**
- * This is only applicable to PHP < 7. Fatal errors are thrown as Error-type
- * exceptions starting from PHP 7 and thus will be handled by the exception
- * handler. For older PHP, fatal errors need to be handled through the
- * shutdown functions - this tests is.
- */
- public function testRegisterAndHandle()
- {
- if (version_compare(PHP_VERSION, '7', '>=')) {
- $this->markTestSkipped("Fatal Errors are not used on PHP 7+.");
- }
-
- if (defined('HHVM_VERSION')) {
- $this->markTestSkipped("Fatal Errors are not used on HHVM.");
- }
-
- $test = new FatalHandlerTest('FatalHandlerTest');
- $test->setName('handleInternal');
- $test->setRunTestInSeparateProcess(true);
- $test->setPreserveGlobalState(false);
-
- $result = $test->run();
-
- $errors = $result->errors();
-
- $trace = $errors[0]->thrownException()->getTrace();
-
- $stdOut = $trace[0]['args'][2];
-
- /**
- * Assert that the standard output contains the log message generated
- * by StdOutLogger test helper used in handleInternal.
- */
- $expected = "[Rollbar\TestHelpers\StdOutLogger: critical] exception ".
- "'Rollbar\ErrorWrapper' with message 'Call to a member ".
- "function noMethod()";
-
- $this->assertTrue(
- strpos($stdOut, $expected) !== false,
- 'Failed asserting that the fatal error has triggered a log entry.'
- );
- }
-
- /**
- * Perform the test with a special StdOutLogger helper. Rollbar messages
- * will be printed to std out and later picked up for an assertion in
- * testRegisterAndHandle test. This way we can verify that the fatal handler
- * triggers the log() method of the provider logger.
- */
- public function handleInternal()
- {
- $logger = new StdOutLogger(self::$simpleConfig);
-
- $handler = new FatalHandler($logger);
- $handler->register();
-
- // Trigger the fatal error
- $null = null;
- $null->noMethod();
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/LevelFactoryTest.php b/vendor/rollbar/rollbar/tests/LevelFactoryTest.php
deleted file mode 100644
index ae5ee21d..00000000
--- a/vendor/rollbar/rollbar/tests/LevelFactoryTest.php
+++ /dev/null
@@ -1,61 +0,0 @@
-levelFactory = new LevelFactory();
- }
-
- /**
- * @dataProvider isValidLevelProvider
- */
- public function testIsValidLevelProvider($level, $expected)
- {
- $this->assertEquals(
- $expected,
- $this->levelFactory->isValidLevel($level)
- );
- }
-
- public function isValidLevelProvider()
- {
- $data = $this->fromNameProvider();
- foreach ($data as &$testParams) {
- $testParams []= true;
- }
- $data []= array('test-stub', false);
- return $data;
- }
-
- /**
- * @dataProvider fromNameProvider
- */
- public function testFromName($level)
- {
- $this->assertInstanceOf(
- 'Rollbar\Payload\Level',
- $this->levelFactory->fromName($level)
- );
- }
-
- public function fromNameProvider()
- {
- return array(
- array(Level::EMERGENCY),
- array(Level::ALERT),
- array(Level::CRITICAL),
- array(Level::ERROR),
- array(Level::WARNING),
- array(Level::NOTICE),
- array(Level::INFO),
- array(Level::DEBUG),
- array(Level::IGNORED),
- array(Level::IGNORE),
- );
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/LevelTest.php b/vendor/rollbar/rollbar/tests/LevelTest.php
deleted file mode 100644
index 77dea9ae..00000000
--- a/vendor/rollbar/rollbar/tests/LevelTest.php
+++ /dev/null
@@ -1,25 +0,0 @@
-assertNotNull($level);
- $this->assertSame(Level::CRITICAL(), $level);
- $this->assertSame(Level::critical(), $level);
-
- $level = Level::Info();
- $this->assertNotNull($level);
- $this->assertSame(Level::INFO(), $level);
- $this->assertSame('"info"', json_encode($level->serialize()));
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/MessageTest.php b/vendor/rollbar/rollbar/tests/MessageTest.php
deleted file mode 100644
index 902904ec..00000000
--- a/vendor/rollbar/rollbar/tests/MessageTest.php
+++ /dev/null
@@ -1,27 +0,0 @@
- 'value 1');
- $msg = new Message("Test", $expected);
- $this->assertEquals($expected, $msg->getBacktrace());
- }
-
- public function testBody()
- {
- $msg = new Message("Test");
- $this->assertEquals("Test", $msg->getBody());
-
- $this->assertEquals("Test2", $msg->setBody("Test2")->getBody());
- }
-
- public function testMessageKey()
- {
- $msg = new Message("Test");
- $this->assertEquals("message", $msg->getKey());
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/Monolog/Handler/RollbarHandlerTest.php b/vendor/rollbar/rollbar/tests/Monolog/Handler/RollbarHandlerTest.php
deleted file mode 100644
index 6e5463a0..00000000
--- a/vendor/rollbar/rollbar/tests/Monolog/Handler/RollbarHandlerTest.php
+++ /dev/null
@@ -1,95 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Rollbar\Monolog\Handler;
-
-require dirname(__FILE__) . '/../../../vendor/monolog/monolog/tests/Monolog/TestCase.php';
-
-use Exception;
-use Monolog\TestCase;
-use Monolog\Logger;
-use Rollbar\Monolog\Handler\RollbarHandler;
-use PHPUnit_Framework_MockObject_MockObject as MockObject;
-use Rollbar\RollbarLogger;
-
-/**
- * @author Erik Johansson
- * @see https://rollbar.com/docs/notifier/rollbar-php/
- *
- * @coversDefaultClass Monolog\Handler\RollbarHandler
- *
- * @requires PHP 7
- */
-class RollbarHandlerTest extends TestCase
-{
- /**
- * @var MockObject
- */
- private $rollbarLogger;
-
- /**
- * @var array
- */
- private $reportedExceptionArguments = null;
-
- protected function setUp()
- {
- parent::setUp();
-
- $this->setupRollbarLoggerMock();
- }
-
- /**
- * When reporting exceptions to Rollbar the
- * level has to be set in the payload data
- */
- public function testExceptionLogLevel()
- {
- $handler = $this->createHandler();
-
- $handler->handle($this->createExceptionRecord(Logger::DEBUG));
-
- $this->assertEquals('debug', $this->reportedExceptionArguments['payload']['level']);
- }
-
- private function setupRollbarLoggerMock()
- {
- $config = array(
- 'access_token' => 'ad865e76e7fb496fab096ac07b1dbabb',
- 'environment' => 'test'
- );
-
- $this->rollbarLogger = $this->getMockBuilder('Rollbar\RollbarLogger')
- ->setConstructorArgs(array($config))
- ->setMethods(array('log'))
- ->getMock();
-
- $this->rollbarLogger
- ->expects($this->any())
- ->method('log')
- ->willReturnCallback(function ($exception, $context, $payload) {
- $this->reportedExceptionArguments = compact('exception', 'context', 'payload');
- });
- }
-
- private function createHandler()
- {
- return new RollbarHandler($this->rollbarLogger, Logger::DEBUG);
- }
-
- private function createExceptionRecord($level = Logger::DEBUG, $message = 'test', $exception = null)
- {
- return $this->getRecord($level, $message, array(
- 'exception' => $exception ?: new Exception(),
- ));
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/NotifierTest.php b/vendor/rollbar/rollbar/tests/NotifierTest.php
deleted file mode 100644
index 1405358e..00000000
--- a/vendor/rollbar/rollbar/tests/NotifierTest.php
+++ /dev/null
@@ -1,34 +0,0 @@
-assertEquals($name, $notifier->getName());
-
- $name2 = "RollbarPHP";
- $this->assertEquals($name2, $notifier->setName($name2)->getName());
- }
-
- public function testVersion()
- {
- $version = Notifier::VERSION;
- $notifier = new Notifier("PHP-Rollbar", $version);
- $this->assertEquals($version, $notifier->getVersion());
-
- $version2 = "0.9";
- $this->assertEquals($version2, $notifier->setVersion($version2)->getVersion());
- }
-
- public function testEncode()
- {
- $notifier = Notifier::defaultNotifier();
- $encoded = json_encode($notifier->serialize());
- $this->assertEquals('{"name":"rollbar-php","version":"1.8.1"}', $encoded);
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/Payload/EncodedPayloadTest.php b/vendor/rollbar/rollbar/tests/Payload/EncodedPayloadTest.php
deleted file mode 100644
index 462e3389..00000000
--- a/vendor/rollbar/rollbar/tests/Payload/EncodedPayloadTest.php
+++ /dev/null
@@ -1,78 +0,0 @@
- "bar"
- );
-
- $encoded = new EncodedPayload($data);
- $encoded->encode();
-
- $this->assertEquals($expected, $encoded);
-
- $expected = '{"new":"bar"}';
- $encoded->encode(array("new" => "bar"));
-
- $this->assertEquals($expected, $encoded);
- }
-
- /**
- * @requires PHP 5.5
- */
- public function testEncodeMalformedData()
- {
- $encoded = new EncodedPayload(array(
- 'data' => array(
- 'body' => array(
- 'exception' => array(
- 'trace' => array(
- 'frames' => fopen('/dev/null', 'r')
- ),
- ),
- 'ecodable1' => true
- ),
- 'ecodable2' => true
- )
- ));
- $encoded->encode();
-
- $result = json_decode($encoded->encoded(), true);
-
- if (defined('HHVM_VERSION')) {
- $this->assertEmpty($result['data']['body']['exception']['trace']['frames']);
- } else {
- $this->assertNull($result['data']['body']['exception']['trace']['frames']);
- }
- }
-
- /**
- * @expectedException \Exception
- * @expectedExceptionMessage Payload data could not be encoded to JSON format.
- */
- public function testEncodeMalformedDataPHP54()
- {
- if (version_compare(phpversion(), "5.4")) {
- $this->markTestSkipped("PHP = 5.4");
- }
-
- $encoded = new EncodedPayload(array(
- 'data' => array(
- 'body' => array(
- 'exception' => array(
- 'trace' => array(
- 'frames' => fopen('/dev/null', 'r')
- ),
- ),
- 'ecodable1' => true
- ),
- 'ecodable2' => true
- )
- ));
- $encoded->encode();
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/PayloadTest.php b/vendor/rollbar/rollbar/tests/PayloadTest.php
deleted file mode 100644
index b526f350..00000000
--- a/vendor/rollbar/rollbar/tests/PayloadTest.php
+++ /dev/null
@@ -1,68 +0,0 @@
-shouldReceive('getAccessToken')
- ->andReturn('012345678901234567890123456789ab')
- ->mock();
-
- $payload = new Payload($data, $config->getAccessToken());
-
- $this->assertEquals($data, $payload->getData());
-
- $data2 = m::mock("Rollbar\Payload\Data");
- $this->assertEquals($data2, $payload->setData($data2)->getData());
- }
-
- public function testPayloadAccessToken()
- {
- $accessToken = "012345678901234567890123456789ab";
- $data = m::mock("Rollbar\Payload\Data");
- $config = m::mock("Rollbar\Config")
- ->shouldReceive('getAccessToken')
- ->andReturn($accessToken)
- ->mock();
-
- $payload = new Payload($data, $accessToken);
- $this->assertEquals($accessToken, $payload->getAccessToken());
-
- $accessToken = "012345678901234567890123456789ab";
- $config = m::mock("Rollbar\Config")
- ->shouldReceive('getAccessToken')
- ->andReturn($accessToken)
- ->mock();
- $payload = new Payload($data, $accessToken);
- $this->assertEquals($accessToken, $payload->getAccessToken());
-
- $at2 = "ab012345678901234567890123456789";
- $this->assertEquals($at2, $payload->setAccessToken($at2)->getAccessToken());
- }
-
- public function testEncode()
- {
- $accessToken = $this->getTestAccessToken();
- $data = m::mock('Rollbar\Payload\Data, \Serializable')
- ->shouldReceive('serialize')
- ->andReturn(new \ArrayObject())
- ->mock();
- m::mock('Rollbar\DataBuilder')
- ->shouldReceive('getScrubFields')
- ->andReturn(array())
- ->shouldReceive('scrub')
- ->andReturn(new \ArrayObject())
- ->mock();
-
- $payload = new Payload($data, $accessToken);
- $encoded = json_encode($payload->serialize());
- $json = '{"data":{},"access_token":"'.$accessToken.'"}';
- $this->assertEquals($json, $encoded);
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/Performance/MassivePayload.php b/vendor/rollbar/rollbar/tests/Performance/MassivePayload.php
deleted file mode 100644
index 7d97e7a6..00000000
--- a/vendor/rollbar/rollbar/tests/Performance/MassivePayload.php
+++ /dev/null
@@ -1,41 +0,0 @@
-generateStringData();
-
- $data = $framesTest->executeProvider();
- $data = $data['truncate middle using trace key'][0];
- foreach ($data['data']['body']['trace']['frames'] as $i => $frame) {
- $data['data']['body']['trace']['frames'][$i] = $stringData;
- }
-
- return $data;
- }
-
- public function generateStringData()
- {
- $stringsTest = new StringsStrategyTest();
-
- $data = $stringsTest->executeProvider();
-
- $thresholds = StringsStrategy::getThresholds();
- $biggestThreshold = $thresholds[0];
-
- $data = $data['truncate strings to ' . $biggestThreshold][0];
-
- return $data['data']['body']['message']['body']['value'];
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/Performance/TestHelpers/EncodedPayload.php b/vendor/rollbar/rollbar/tests/Performance/TestHelpers/EncodedPayload.php
deleted file mode 100644
index 2b9e916a..00000000
--- a/vendor/rollbar/rollbar/tests/Performance/TestHelpers/EncodedPayload.php
+++ /dev/null
@@ -1,22 +0,0 @@
-strategiesUsed = array();
-
- $this->payloadSize = $payload->size();
-
- $memUsageBefore = memory_get_peak_usage(true);
- $timeBefore = microtime(true) * 1000;
-
- \Rollbar\Performance\TestHelpers\EncodedPayload::resetEncodingCount();
-
- $result = parent::truncate($payload);
-
- $timeAfter = microtime(true) * 1000;
- $memUsageAfter = memory_get_peak_usage(true);
-
- $this->memoryUsage = $memUsageAfter - $memUsageBefore;
- $this->timeUsage = $timeAfter - $timeBefore;
- $this->strategiesUsed = array_unique($this->strategiesUsed);
-
- $this->lastRunOutput = $this->composeLastRunOutput();
-
- return $result;
- }
-
- public function needsTruncating(\Rollbar\Payload\EncodedPayload $payload, $strategy)
- {
- $result = parent::needsTruncating($payload, $strategy);
-
- if ($result) {
- $this->strategiesUsed []= is_string($strategy) ? $strategy : get_class($strategy);
- }
-
- return $result;
- }
-
- public function getLastRun()
- {
- return $this->lastRunOutput;
- }
-
- public function composeLastRunOutput()
- {
- $output = "\n";
-
- $output .= "Payload size: " .
- $this->payloadSize . " bytes = " .
- round($this->payloadSize / 1024 / 1024, 2) . " MB \n";
-
- $output .= "Strategies used: \n" .
- (count($this->strategiesUsed) ? join(", \n", $this->strategiesUsed) : "none") . "\n";
-
- $output .= "Encoding triggered: " .
- \Rollbar\Performance\TestHelpers\EncodedPayload::getEncodingCount() . "\n";
-
- $output .= "Memory usage: " .
- $this->memoryUsage . " bytes = " .
- round($this->memoryUsage / 1024 / 1024, 2) . " MB\n";
-
- $output .= "Execution time: " . $this->timeUsage . " ms\n";
-
- return $output;
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/Performance/TruncationTest.php b/vendor/rollbar/rollbar/tests/Performance/TruncationTest.php
deleted file mode 100644
index 43bebe48..00000000
--- a/vendor/rollbar/rollbar/tests/Performance/TruncationTest.php
+++ /dev/null
@@ -1,227 +0,0 @@
- $this->getTestAccessToken()));
- $this->truncate = new Truncation($config);
- }
-
- /**
- *
- * = Optimization notes =
- *
- * == testTruncatePerformance for StringsStrategyTest - truncate strings to 1024 ==
- *
- * === Before any optimizations ===
- * Payload size: 524330 bytes = 0.5 MB
- * Strategies used:
- * Rollbar\Truncation\RawStrategy,
- * Rollbar\Truncation\FramesStrategy,
- * Rollbar\Truncation\StringsStrategy
- * Encoding triggered: 6
- * Memory usage: 0 bytes = 0 MB
- * Execution time: 9.833740234375 ms
- *
- * === After removing RawStrategy and MinBodyStrategy ===
- * Payload size: 524330 bytes = 0.5 MB
- * Strategies used:
- * Rollbar\Truncation\FramesStrategy,
- * Rollbar\Truncation\StringsStrategy
- * Encoding triggered: 4
- * Memory usage: 0 bytes = 0 MB
- * Execution time: 6.991943359375 ms
- *
- * === After adding applies() in strategies ===
- * Payload size: 524330 bytes = 0.5 MB
- * Strategies used:
- * Rollbar\Truncation\StringsStrategy
- * Encoding triggered: 3
- * Memory usage: 0 bytes = 0 MB
- * Execution time: 6.03076171875 ms
- *
- * === After limiting json_encode invocations ===
- * Payload size: 524330 bytes = 0.5 MB
- * Strategies used:
- * Rollbar\Truncation\StringsStrategy
- * Encoding triggered: 1
- * Memory usage: 0 bytes = 0 MB
- * Execution time: 3.761962890625 ms
- *
- * === After replacing array_walk_recurisve with traverse ===
- * Payload size: 524330 bytes = 0.5 MB
- * Strategies used:
- * Rollbar\Truncation\StringsStrategy
- * Encoding triggered: 1
- * Memory usage: 0 bytes = 0 MB
- * Execution time: 2.003173828125 ms
- *
- *
- *
- *
- *
- *
- *
- *
- * == testTruncatePerformance for FramesStrategyTest - nothing to truncate using trace key ==
- *
- * === Before any optimizations ===
- * Payload size: 52 bytes = 0 MB
- * Strategies used:
- * Encoding triggered: 1
- * Memory usage: 0 bytes = 0 MB
- * Execution time: 0.002685546875 ms
- *
- * === After removing RawStrategy and MinBodyStrategy ===
- * Payload size: 52 bytes = 0 MB
- * Strategies used:
- * Encoding triggered: 1
- * Memory usage: 0 bytes = 0 MB
- * Execution time: 0.0029296875 ms
- *
- * === After adding applies() in strategies ===
- * Payload size: 52 bytes = 0 MB
- * Strategies used:
- * Encoding triggered: 1
- * Memory usage: 0 bytes = 0 MB
- * Execution time: 0.010986328125 ms
- *
- * === After limiting json_encode invocations ===
- * Payload size: 52 bytes = 0 MB
- * Strategies used:
- * Encoding triggered: 0
- * Memory usage: 0 bytes = 0 MB
- * Execution time: 0.01513671875 ms
- *
- * === After replacing array_walk_recurisve with traverse ===
- * Payload size: 52 bytes = 0 MB
- * Strategies used:
- * none
- * Encoding triggered: 0
- * Memory usage: 0 bytes = 0 MB
- * Execution time: 0.004150390625 ms
- *
- *
- *
- *
- *
- *
- * == testTruncatePerformance for MassivePayloadTest ==
- *
- * === Before any optimizations ===
- * Payload size: 79166622 bytes = 75.5 MB
- * Strategies used:
- * Rollbar\Truncation\RawStrategy,
- * Rollbar\Truncation\FramesStrategy,
- * Rollbar\Truncation\StringsStrategy,
- * Rollbar\Truncation\MinBodyStrategy
- * Encoding triggered: 7
- * Memory usage: 174063616 bytes = 166 MB
- * Execution time: 2382.2009277344 ms
- *
- * === After removing RawStrategy and MinBodyStrategy ===
- * Payload size: 79166622 bytes = 75.5 MB
- * Strategies used:
- * Rollbar\Truncation\FramesStrategy,
- * Rollbar\Truncation\StringsStrategy
- * Encoding triggered: 5
- * Memory usage: 174063616 bytes = 166 MB
- * Execution time: 2074.6579589844 ms
- *
- * === After adding applies() in strategies ===
- * Payload size: 79166622 bytes = 75.5 MB
- * Strategies used:
- * Rollbar\Truncation\FramesStrategy,
- * Rollbar\Truncation\StringsStrategy
- * Encoding triggered: 5
- * Memory usage: 174063616 bytes = 166 MB
- * Execution time: 1998.2878417969 ms
- *
- * === After limiting json_encode invocations ===
- * Payload size: 79166622 bytes = 75.5 MB
- * Strategies used:
- * Rollbar\Truncation\FramesStrategy,
- * Rollbar\Truncation\StringsStrategy
- * Encoding triggered: 2
- * Memory usage: 181329920 bytes = 172.93 MB
- * Execution time: 1204.74609375 ms
- *
- * === After replacing array_walk_recurisve with traverse ===
- * Payload size: 79166622 bytes = 75.5 MB
- * Strategies used:
- * Rollbar\Truncation\FramesStrategy,
- * Rollbar\Truncation\StringsStrategy
- * Encoding triggered: 2
- * Memory usage: 78643200 bytes = 75 MB
- * Execution time: 838.8759765625 ms
- *
- *
- */
-
- /**
- * @dataProvider truncateProvider
- */
- public function testTruncate($dataName, $data)
- {
- echo "\n== \Rollbar\Performance\TruncationTest::testTruncate for $dataName ==\n";
-
- $payload = new EncodedPayload($data);
- $payload->encode();
-
- $payload = $this->truncate->truncate($payload);
-
- echo $this->truncate->getLastRun();
- }
-
- public function truncateProvider()
- {
- $stringsTest = new StringsStrategyTest();
- $framesTest = new FramesStrategyTest();
- $minBodyTest = new MinBodyStrategyTest();
- $massivePayloadTest = new MassivePayload();
-
- $stringsTestData = $stringsTest->executeProvider();
- $stringsTestData = $stringsTestData['truncate strings to 1024'][0];
-
- $framesTestData = $framesTest->executeProvider();
- $framesTestData = $framesTestData['nothing to truncate using trace key'][0];
-
- $data = array(
- array(
- "StringsStrategyTest - truncate strings to 1024",
- $stringsTestData
- ),
- array(
- "FramesStrategyTest - nothing to truncate using trace key",
- $framesTestData
- ),
- array(
- "MassivePayloadTest",
- $massivePayloadTest->executeProvider()
- ),
- array(
- "OneLongString",
- $stringsTest->payloadStructureProvider(
- str_repeat("A", \Rollbar\Truncation\Truncation::MAX_PAYLOAD_SIZE+1)
- )
- )
- );
-
- return $data;
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/PersonTest.php b/vendor/rollbar/rollbar/tests/PersonTest.php
deleted file mode 100644
index ddd5c50e..00000000
--- a/vendor/rollbar/rollbar/tests/PersonTest.php
+++ /dev/null
@@ -1,57 +0,0 @@
-assertEquals($id, $person->getId());
-
- $id2 = "RollbarPHP";
- $this->assertEquals($id2, $person->setId($id2)->getId());
- }
-
- public function testUsername()
- {
- $username = "user@rollbar.com";
- $person = new Person("15", $username);
- $this->assertEquals($username, $person->getUsername());
-
- $username2 = "user-492";
- $this->assertEquals($username2, $person->setUsername($username2)->getUsername());
- }
-
- public function testEmail()
- {
- $email = "1.0.0";
- $person = new Person("Rollbar_Master", null, $email);
- $this->assertEquals($email, $person->getEmail());
-
- $email2 = "1.0.1";
- $this->assertEquals($email2, $person->setEmail($email2)->getEmail());
- }
-
- public function testExtra()
- {
- $person = new Person("42");
- $person->test = "testing";
- $this->assertEquals("testing", $person->test);
- }
-
- public function testEncode()
- {
- $person = new Person("1024");
- $person->setUsername("username")
- ->setEmail("user@gmail.com");
- $person->Settings = array(
- "send_email" => true
- );
- $encoded = json_encode($person->serialize());
- $expected ='{"id":"1024","username":"username","email":"user@gmail.com","Settings":{"send_email":true}}';
- $this->assertEquals($expected, $encoded);
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/ReadmeTest.php b/vendor/rollbar/rollbar/tests/ReadmeTest.php
deleted file mode 100644
index ce64c92c..00000000
--- a/vendor/rollbar/rollbar/tests/ReadmeTest.php
+++ /dev/null
@@ -1,149 +0,0 @@
- $this->getTestAccessToken(),
- 'environment' => 'production'
- )
- );
-
- try {
- throw new \Exception('test exception');
- } catch (\Exception $e) {
- Rollbar::log(Level::ERROR, $e);
- }
-
- // Message at level 'info'
- Rollbar::log(Level::INFO, 'testing info level');
-
- // With extra data (3rd arg) and custom payload options (4th arg)
- Rollbar::log(
- Level::INFO,
- 'testing extra data',
- array("some_key" => "some value") // key-value additional data
- );
-
- // If you want to check if logging with Rollbar was successful
- $response = Rollbar::log(Level::INFO, 'testing wasSuccessful()');
- if (!$response->wasSuccessful()) {
- throw new \Exception('logging with Rollbar failed');
- }
-
- // raises an E_NOTICE which will *not* be reported by the error handler
- // $foo = $bar;
-
- // will be reported by the exception handler
- throw new \Exception('testing exception handler');
- }
-
- public function testSetup1()
- {
- $config = array(
- // required
- 'access_token' => $this->getTestAccessToken(),
- // optional - environment name. any string will do.
- 'environment' => 'production',
- // optional - path to directory your code is in. used for linking stack traces.
- 'root' => '/Users/brian/www/myapp'
- );
- Rollbar::init($config);
-
- $this->assertTrue(true);
- }
-
- public function testSetup2()
- {
- $config = array(
- // required
- 'access_token' => $this->getTestAccessToken(),
- // optional - environment name. any string will do.
- 'environment' => 'production',
- // optional - path to directory your code is in. used for linking stack traces.
- 'root' => '/Users/brian/www/myapp'
- );
-
- $set_exception_handler = false;
- $set_error_handler = false;
- Rollbar::init($config, $set_exception_handler, $set_error_handler);
-
- $this->assertTrue(true);
- }
-
- public function testBasicUsage()
- {
- Rollbar::init(
- array(
- 'access_token' => $this->getTestAccessToken(),
- 'environment' => 'test'
- )
- );
-
- try {
- do_something();
- } catch (\Exception $e) {
- $result1 = Rollbar::log(Level::ERROR, $e);
- // or
- $result2 = Rollbar::log(Level::ERROR, $e, array("my" => "extra", "data" => 42));
- }
-
- $this->assertEquals(200, $result1->getStatus());
- $this->assertEquals(200, $result2->getStatus());
- }
-
- public function testBasicUsage2()
- {
- Rollbar::init(
- array(
- 'access_token' => $this->getTestAccessToken(),
- 'environment' => 'test'
- )
- );
-
- $result1 = Rollbar::log(Level::WARNING, 'could not connect to mysql server');
- $result2 = Rollbar::log(
- Level::INFO,
- 'Here is a message with some additional data',
- array('x' => 10, 'code' => 'blue')
- );
-
- $this->assertEquals(200, $result1->getStatus());
- $this->assertEquals(200, $result2->getStatus());
- }
-
- public function testMonolog()
- {
- Rollbar::init(
- array(
- 'access_token' => $this->getTestAccessToken(),
- 'environment' => 'development'
- )
- );
-
- // create a log channel
- $log = new Logger('RollbarHandler');
- $log->pushHandler(new RollbarHandler(Rollbar::logger(), Logger::WARNING));
-
- // add records to the log
- $log->addWarning('Foo');
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/RequestTest.php b/vendor/rollbar/rollbar/tests/RequestTest.php
deleted file mode 100644
index c79ebdb7..00000000
--- a/vendor/rollbar/rollbar/tests/RequestTest.php
+++ /dev/null
@@ -1,167 +0,0 @@
-setUrl($url);
- $this->assertEquals($url, $request->getUrl());
-
- $url2 = "www.google.com";
- $this->assertEquals($url2, $request->setUrl($url2)->getUrl());
- }
-
- public function testMethod()
- {
- $method = "POST";
- $request = new Request();
- $request->setMethod($method);
- $this->assertEquals($method, $request->getMethod());
-
- $method2 = "GET";
- $this->assertEquals($method2, $request->setMethod($method2)->getMethod());
- }
-
- public function testHeaders()
- {
- $headers = array("Auth-X" => "abc352", "Hello" => "World");
- $request = new Request();
- $request->setHeaders($headers);
- $this->assertEquals($headers, $request->getHeaders());
-
- $headers2 = array("Goodbye" => "And thanks for all the fish");
- $this->assertEquals($headers2, $request->setHeaders($headers2)->getHeaders());
- }
-
- public function testParams()
- {
- $params = array(
- "controller" => "project",
- "action" => "index"
- );
- $request = new Request();
- $request->setParams($params);
- $this->assertEquals($params, $request->getParams());
-
- $params2 = array("War" => "and Peace");
- $this->assertEquals($params2, $request->setParams($params2)->getParams());
- }
-
- public function testGet()
- {
- $get = array("query" => "where's waldo?", "page" => 15);
- $request = new Request();
- $request->setGet($get);
- $this->assertEquals($get, $request->getGet());
-
- $get2 = array("skip" => "4", "bucket_size" => "25");
- $this->assertEquals($get2, $request->setGet($get2)->getGet());
- }
-
- public function testQueryString()
- {
- $queryString = "?slug=Rollbar&update=true";
- $request = new Request();
- $request->setQueryString($queryString);
- $this->assertEquals($queryString, $request->getQueryString());
-
- $queryString2 = "?search=Hello%2a";
- $actual = $request->setQueryString($queryString2)->getQueryString();
- $this->assertEquals($queryString2, $actual);
- }
-
- public function testPost()
- {
- $post = array("Big" => "Data");
- $request = new Request();
- $request->setPost($post);
- $this->assertEquals($post, $request->getPost());
-
- $post2 = array(
- "data" => array(
- "Data" => "Parameters"
- ),
- "access_token" => $this->getTestAccessToken()
- );
- $this->assertEquals($post2, $request->setPost($post2)->getPost());
- }
-
- public function testBody()
- {
- $body = "a long string\nwith new lines and stuff";
- $request = new Request();
- $request->setBody($body);
- $this->assertEquals($body, $request->getBody());
-
- $body2 = "In the city of York there existed a society of magicians...";
- $this->assertEquals($body2, $request->setBody($body2)->getBody());
- }
-
- public function testUserIp()
- {
- $userIp = "192.0.1.12";
- $request = new Request();
- $request->setUserIp($userIp);
- $this->assertEquals($userIp, $request->getUserIp());
-
- $userIp2 = "172.68.205.3";
- $this->assertEquals($userIp2, $request->setUserIp($userIp2)->getUserIp());
- }
-
- public function testExtra()
- {
- $request = new Request();
- $request->setExtras(array("test" => "testing"));
- $extras = $request->getExtras();
- $this->assertEquals("testing", $extras["test"]);
- }
-
- public function testEncode()
- {
- $request = new Request();
- $request->setUrl("www.rollbar.com/account/project")
- ->setMethod("GET")
- ->setHeaders(array(
- "CSRF-TOKEN" => "42",
- "X-SPEED" => "THEFLASH"
- ))
- ->setParams(array(
- "controller" => "ProjectController",
- "method" => "index"
- ))
- ->setGet(array(
- "fetch_account" => "true",
- "error_level" => "11"
- ))
- ->setQueryString("?fetch_account=true&error_level=11")
- ->setUserIp("170.16.58.0");
-
- $request->setExtras(array("test" => "testing"));
-
- $expected = '{' .
- '"url":"www.rollbar.com\\/account\\/project",' .
- '"method":"GET",' .
- '"headers":{' .
- '"CSRF-TOKEN":"42","X-SPEED":"THEFLASH"' .
- '},' .
- '"params":{' .
- '"controller":"ProjectController",' .
- '"method":"index"' .
- '},' .
- '"GET":{' .
- '"fetch_account":"true",' .
- '"error_level":"11"' .
- '},' .
- '"query_string":"?fetch_account=true&error_level=11",' .
- '"user_ip":"170.16.58.0",' .
- '"test":"testing"' .
- '}';
-
- $this->assertEquals($expected, json_encode($request->serialize()));
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/ResponseTest.php b/vendor/rollbar/rollbar/tests/ResponseTest.php
deleted file mode 100644
index ab10128b..00000000
--- a/vendor/rollbar/rollbar/tests/ResponseTest.php
+++ /dev/null
@@ -1,41 +0,0 @@
-5));
- $this->assertEquals(200, $r->getStatus());
- }
-
- public function testInfo()
- {
- $r = new Response(200, "FAKE INFO");
- $this->assertEquals("FAKE INFO", $r->getInfo());
- }
-
- public function testUuid()
- {
- $r = new Response(200, "FAKE INFO", "abc123");
- $this->assertEquals("abc123", $r->getUuid());
- }
-
- public function testWasSuccessful()
- {
- $response = new Response(200, null);
- $this->assertTrue($response->wasSuccessful());
- $response = new Response(199, null);
- $this->assertFalse($response->wasSuccessful());
- $response = new Response(300, null);
- $this->assertFalse($response->wasSuccessful());
- }
-
- public function testUrl()
- {
- $expected = "https://rollbar.com/occurrence/uuid/?uuid=abc123";
- $response = new Response(200, "fake", "abc123");
- $this->assertEquals($expected, $response->getOccurrenceUrl());
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/RollbarJsHelperTest.php b/vendor/rollbar/rollbar/tests/RollbarJsHelperTest.php
deleted file mode 100644
index d7e6cffd..00000000
--- a/vendor/rollbar/rollbar/tests/RollbarJsHelperTest.php
+++ /dev/null
@@ -1,316 +0,0 @@
-jsHelper = new RollbarJsHelper(array());
- $this->testSnippetPath = realpath(__DIR__ . "/../data/rollbar.snippet.js");
- }
-
- public function testSnippetPath()
- {
- $this->assertEquals(
- $this->testSnippetPath,
- $this->jsHelper->snippetPath()
- );
- }
-
- /**
- * @dataProvider shouldAddJsProvider
- */
- public function testShouldAddJs($setup, $expected)
- {
- $mock = \Mockery::mock('Rollbar\RollbarJsHelper');
-
- $status = $setup['status'];
-
- $mock->shouldReceive('isHtml')
- ->andReturn($setup['isHtml']);
-
- $mock->shouldReceive('hasAttachment')
- ->andReturn($setup['hasAttachment']);
-
- $mock->shouldReceive('shouldAddJs')
- ->passthru();
-
- $this->assertEquals($expected, $mock->shouldAddJs($status, array()));
- }
-
- public function shouldAddJsProvider()
- {
- return array(
- array(
- array(
- 'status' => 200,
- 'isHtml' => true,
- 'hasAttachment' => false
- ),
- true
- ),
- array(
- array(
- 'status' => 500,
- 'isHtml' => true,
- 'hasAttachment' => false
- ),
- false
- ),
- array(
- array(
- 'status' => 200,
- 'isHtml' => false,
- 'hasAttachment' => false
- ),
- false
- ),
- array(
- array(
- 'status' => 200,
- 'isHtml' => true,
- 'hasAttachment' => true
- ),
- false
- ),
- );
- }
-
- /**
- * @dataProvider isHtmlProvider
- */
- public function testIsHtml($headers, $expected)
- {
- $this->assertEquals(
- $expected,
- $this->jsHelper->isHtml($headers)
- );
- }
-
- public function isHtmlProvider()
- {
- return array(
- array(
- array(
- 'Content-Type: text/html'
- ),
- true
- ),
- array(
- array(
- 'Content-Type: text/plain'
- ),
- false
- ),
- );
- }
-
- /**
- * @dataProvider hasAttachmentProvider
- */
- public function testHasAttachment($headers, $expected)
- {
- $this->assertEquals(
- $expected,
- $this->jsHelper->hasAttachment($headers)
- );
- }
-
- public function hasAttachmentProvider()
- {
- return array(
- array(
- array(
- 'Content-Disposition: attachment'
- ),
- true
- ),
- array(
- array(
- ),
- false
- ),
- );
- }
-
- public function testJsSnippet()
- {
- $expected = file_get_contents($this->testSnippetPath);
-
- $this->assertEquals($expected, $this->jsHelper->jsSnippet());
- }
-
- /**
- * @dataProvider shouldAppendNonceProvider
- */
- public function testShouldAppendNonce($headers, $expected)
- {
- $this->assertEquals(
- $expected,
- $this->jsHelper->shouldAppendNonce($headers)
- );
- }
-
- public function shouldAppendNonceProvider()
- {
- return array(
- array(
- array(
- "Content-Security-Policy: script-src 'unsafe-inline'"
- ),
- true
- ),
- array(
- array(
- "Content-Type: text/html"
- ),
- false
- ),
- array(
- array(
- "Content-Security-Policy: default-src 'self'"
- ),
- false
- ),
- );
- }
-
- /**
- * @dataProvider scriptTagProvider
- */
- public function testScriptTag($content, $headers, $nonce, $expected)
- {
- if ($expected === 'Exception') {
- try {
- $result = $this->jsHelper->scriptTag($content, $headers, $nonce);
-
- $this->fail();
- } catch (\Exception $e) {
- $this->assertTrue(true);
- return;
- }
- } else {
- $result = $this->jsHelper->scriptTag($content, $headers, $nonce);
-
- $this->assertEquals($expected, $result);
- }
- }
-
- public function scriptTagProvider()
- {
- return array(
- 'nonce script' => array(
- 'var test = "value 1";',
- array(
- "Content-Security-Policy: script-src 'unsafe-inline'"
- ),
- '123',
- "\n"
- ),
- 'script-src inline-unsafe throws Exception' => array(
- 'var test = "value 1";',
- array(
- "Content-Security-Policy: script-src 'inline-unsafe'"
- ),
- null,
- 'Exception'
- ),
- array(
- 'var test = "value 1";',
- array(),
- null,
- "\n"
- ),
- );
- }
-
- public function testConfigJsTag()
- {
- $config = array(
- 'config1' => 'value 1'
- );
-
- $expectedJson = json_encode($config);
- $expected = "var _rollbarConfig = $expectedJson;";
-
- $helper = new RollbarJsHelper($config);
- $result = $helper->configJsTag();
-
- $this->assertEquals($expected, $result);
- }
-
- /**
- * @dataProvider addJsProvider
- */
- public function testBuildJs($config, $headers, $nonce, $expected)
- {
- $result = RollbarJsHelper::buildJs(
- $config,
- $headers,
- $nonce,
- "var customJs = true;"
- );
-
- $this->assertEquals($expected, $result);
- }
-
- /**
- * @dataProvider addJsProvider
- */
- public function testAddJs($config, $headers, $nonce, $expected)
- {
- $helper = new RollbarJsHelper($config);
-
- $result = $helper->addJs(
- $headers,
- $nonce,
- "var customJs = true;"
- );
-
- $this->assertEquals($expected, $result);
- }
-
- public function addJsProvider()
- {
- $this->setUp();
- $expectedJs = file_get_contents($this->testSnippetPath);
- return array(
- array(
- array(), // 'config'
- array(), // 'headers'
- null, // 'nonce'
- "\n"
- ),
- array(
- array(
- 'foo' => 'bar'
- ),
- array(),
- null,
- "\n"
- ),
- array(
- array(),
- array(
- 'Content-Security-Policy: script-src \'unsafe-inline\''
- ),
- 'stub-nonce',
- "\n"
- ),
- );
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/RollbarLoggerTest.php b/vendor/rollbar/rollbar/tests/RollbarLoggerTest.php
deleted file mode 100644
index 5c4d4e29..00000000
--- a/vendor/rollbar/rollbar/tests/RollbarLoggerTest.php
+++ /dev/null
@@ -1,815 +0,0 @@
- $this->getTestAccessToken(),
- "environment" => "testing-php"
- ));
-
- $logger->addCustom("foo", "bar");
-
- $dataBuilder = $logger->getDataBuilder();
-
- $result = $dataBuilder->makeData(
- Level::INFO,
- "This test message should have custom data attached.",
- array()
- );
-
- $customData = $result->getCustom();
- $this->assertEquals("bar", $customData["foo"]);
-
- $logger = new RollbarLogger(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php",
- "custom" => array(
- "baz" => "xyz"
- )
- ));
-
- $logger->addCustom("foo", "bar");
-
- $dataBuilder = $logger->getDataBuilder();
-
- $result = $dataBuilder->makeData(
- Level::INFO,
- "This test message should have custom data attached.",
- array()
- );
-
- $customData = $result->getCustom();
- $this->assertEquals("bar", $customData["foo"]);
- }
-
- public function testRemoveCustom()
- {
- $logger = new RollbarLogger(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php",
- "custom" => array(
- "foo" => "bar",
- "bar" => "xyz"
- )
- ));
-
- $logger->removeCustom("foo");
-
- $dataBuilder = $logger->getDataBuilder();
-
- $result = $dataBuilder->makeData(
- Level::INFO,
- "This test message should have custom data attached.",
- array()
- );
-
- $customData = $result->getCustom();
- $this->assertFalse(isset($customData["foo"]));
- $this->assertEquals("xyz", $customData["bar"]);
- }
-
- public function testGetCustom()
- {
- $logger = new RollbarLogger(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php",
- "custom" => array(
- "foo" => "bar",
- "bar" => "xyz"
- )
- ));
-
- $custom = $logger->getCustom();
-
- $this->assertEquals("bar", $custom["foo"]);
- $this->assertEquals("xyz", $custom["bar"]);
- }
-
- public function testConfigure()
- {
- $l = new RollbarLogger(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php"
- ));
- $l->configure(array("extraData" => 15));
- $extended = $l->scope(array())->extend(array());
- $this->assertEquals(15, $extended['extraData']);
- }
-
- public function testLog()
- {
- $l = new RollbarLogger(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php"
- ));
- $response = $l->log(Level::WARNING, "Testing PHP Notifier", array());
- $this->assertEquals(200, $response->getStatus());
- }
-
- public function testNotLoggingPayload()
- {
- $logPayloadLoggerMock = $this->getMockBuilder('\Psr\Log\LoggerInterface')->getMock();
- $logPayloadLoggerMock->expects($this->never())->method('debug');
-
- $logger = new RollbarLogger(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php",
- "log_payload" => false,
- "log_payload_logger" => $logPayloadLoggerMock
- ));
- $response = $logger->log(Level::WARNING, "Testing PHP Notifier");
-
- $this->assertEquals(200, $response->getStatus());
- }
-
- public function testDefaultVerbose()
- {
- return $this->testNotVerbose();
- }
-
- public function testNotVerbose()
- {
- $logger = new RollbarLogger(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php",
- "verbose" => \Rollbar\Config::VERBOSE_NONE
- ));
-
- $verboseLogger = $logger->verboseLogger();
- $originalHandler = $verboseLogger->getHandlers();
- $originalHandler = $originalHandler[0];
-
- $handlerMock = $this->getMockBuilder('\Monolog\Handler\ErrorLogHandler')
- ->setMethods(array('handle'))
- ->getMock();
-
- $handlerMock->setLevel($originalHandler->getLevel());
-
- $handlerMock->expects($this->never())->method('handle');
-
- $verboseLogger->setHandlers(array($handlerMock));
-
- $logger->info('Internal message');
- }
-
- public function testVerbose()
- {
- $logger = new RollbarLogger(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php",
- "verbose" => \Psr\Log\LogLevel::DEBUG
- ));
-
- $verboseLogger = $logger->verboseLogger();
- $originalHandler = $verboseLogger->getHandlers();
- $originalHandler = $originalHandler[0];
-
- $handlerMock = $this->getMockBuilder('\Monolog\Handler\ErrorLogHandler')
- ->setMethods(array('handle'))
- ->getMock();
- $handlerMock->setLevel($originalHandler->getLevel());
-
- $handlerMock->expects($this->atLeastOnce())->method('handle');
-
- $verboseLogger->setHandlers(array($handlerMock));
-
- $logger->info('Internal message');
- }
-
- public function testEnabled()
- {
- $logger = new RollbarLogger(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php"
- ));
-
- $response = $logger->log(Level::WARNING, "Testing PHP Notifier", array());
- $this->assertEquals(200, $response->getStatus());
-
- $logger = new RollbarLogger(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php",
- "enabled" => false
- ));
- $response = $logger->log(Level::WARNING, "Testing PHP Notifier", array());
- $this->assertEquals(0, $response->getStatus());
- $this->assertEquals("Disabled", $response->getInfo());
- }
-
- public function testTransmit()
- {
- $logger = new RollbarLogger(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php"
- ));
- $response = $logger->log(Level::WARNING, "Testing PHP Notifier");
- $this->assertEquals(200, $response->getStatus());
-
- $logger = new RollbarLogger(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php",
- "transmit" => false
- ));
- $response = $logger->log(Level::WARNING, "Testing PHP Notifier");
- $this->assertEquals(0, $response->getStatus());
- $this->assertEquals("Not transmitting (transmitting disabled in configuration)", $response->getInfo());
- }
-
- public function testTransmitBatched()
- {
- $senderMock = $this->getMockBuilder('Rollbar\Senders\SenderInterface')->getMock();
- $senderMock->expects($this->once())->method('sendBatch');
-
- // transmit on (default)
- $logger = new RollbarLogger(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php",
- "batched" => true,
- "sender" => $senderMock
- ));
- $response = $logger->log(Level::WARNING, "Testing PHP Notifier");
- $this->assertEquals(0, $response->getStatus());
- $this->assertEquals("Pending", $response->getInfo());
- $logger->flush();
-
- // transmit off
- $senderMock = $this->getMockBuilder('Rollbar\Senders\SenderInterface')->getMock();
- $senderMock->expects($this->never())->method('sendBatch');
-
- $logger->configure(array(
- 'transmit' => false,
- 'sender' => $senderMock
- ));
-
- $response = $logger->log(Level::WARNING, "Testing PHP Notifier");
- $this->assertEquals(0, $response->getStatus());
- $this->assertEquals("Pending", $response->getInfo());
- $response = $logger->flush();
- $this->assertEquals(0, $response->getStatus());
- $this->assertEquals("Not transmitting (transmitting disabled in configuration)", $response->getInfo());
- }
-
- public function testLogMalformedPayloadData()
- {
- $logger = new RollbarLogger(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php",
- "transformer" => '\Rollbar\TestHelpers\MalformedPayloadDataTransformer'
- ));
-
- $response = $logger->log(
- Level::ERROR,
- "Forced payload's data to false value.",
- array()
- );
-
- $this->assertEquals(400, $response->getStatus());
- }
-
- public function testFlush()
- {
- $senderMock = $this->getMockBuilder('Rollbar\Senders\SenderInterface')->getMock();
- $senderMock->expects($this->once())->method('sendBatch')->with(
- $this->containsOnlyInstancesOf('Rollbar\Payload\EncodedPayload'),
- $this->anything()
- );
-
- $logger = new RollbarLogger(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php",
- "batched" => true,
- "sender" => $senderMock
- ));
-
- $response = $logger->flush();
- $this->assertEquals(0, $response->getStatus());
- $this->assertEquals("Queue empty", $response->getInfo());
-
- $response = $logger->log(Level::INFO, "Batched message");
- $this->assertEquals(0, $response->getStatus());
- $this->assertEquals("Pending", $response->getInfo());
-
- $response = $logger->flush();
- }
-
- public function testContext()
- {
- $l = new RollbarLogger(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php"
- ));
- $response = $l->log(
- Level::ERROR,
- new \Exception("Testing PHP Notifier"),
- array(
- "foo" => "bar"
- )
- );
- $this->assertEquals(200, $response->getStatus());
- }
-
- public function testLogStaticLevel()
- {
- $l = new RollbarLogger(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php"
- ));
- $response = $l->log(Level::warning(), "Testing PHP Notifier", array());
- $this->assertEquals(200, $response->getStatus());
- }
-
- public function testErrorSampleRates()
- {
- $l = new RollbarLogger(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php",
- "error_sample_rates" => array(
- E_ERROR => 0
- )
- ));
- $response = $l->log(
- Level::ERROR,
- new ErrorWrapper(
- E_ERROR,
- '',
- null,
- null,
- array(),
- new Utilities
- ),
- array()
- );
- $this->assertEquals(0, $response->getStatus());
- }
-
- public function testExceptionSampleRates()
- {
- $l = new RollbarLogger(array(
- "access_token" => "ad865e76e7fb496fab096ac07b1dbabb",
- "environment" => "testing-php",
- "exception_sample_rates" => array(
- 'Rollbar\TestHelpers\Exceptions\SilentExceptionSampleRate' => 0.0
- )
- ));
- $response = $l->log(Level::ERROR, new SilentExceptionSampleRate);
-
- $this->assertEquals(0, $response->getStatus());
-
- $response = $l->log(Level::ERROR, new \Exception);
-
- $this->assertEquals(200, $response->getStatus());
- }
-
- public function testIncludedErrNo()
- {
- $l = new RollbarLogger(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php",
- "included_errno" => E_ERROR | E_WARNING
- ));
- $response = $l->log(
- Level::ERROR,
- new ErrorWrapper(
- E_USER_ERROR,
- '',
- null,
- null,
- array(),
- new Utilities
- ),
- array()
- );
- $this->assertEquals(0, $response->getStatus());
- }
-
- private function scrubTestHelper($config = array(), $context = array())
- {
- $scrubFields = array('sensitive');
-
- $defaultConfig = array(
- 'access_token' => $this->getTestAccessToken(),
- 'environment' => 'tests',
- 'scrub_fields' => $scrubFields
- );
-
- $config = new Config(array_replace_recursive($defaultConfig, $config));
-
- $dataBuilder = $config->getDataBuilder();
- $data = $dataBuilder->makeData(Level::ERROR, "testing", $context);
- $payload = new Payload($data, $config->getAccessToken());
-
- $scrubbed = $payload->serialize();
- $scrubber = $config->getScrubber();
-
- $result = $scrubber->scrub($scrubbed);
-
- return $result;
- }
-
- /**
- * @param string $dataName Human-readable name of the type of data under test
- * @param array $result The result of the code under test
- * @param string $scrubField The key that will be asserted for scrubbing
- * @param boolean $recursive Check recursive scrubbing
- * @param string $replacement Character used for scrubbing
- */
- private function scrubTestAssert(
- $dataName,
- $result,
- $scrubField = 'sensitive',
- $recursive = true,
- $replacement = '*'
- ) {
-
- $this->assertEquals(
- str_repeat($replacement, 8),
- $result[$scrubField],
- "$dataName did not get scrubbed."
- );
-
- if ($recursive) {
- $this->assertEquals(
- str_repeat($replacement, 8),
- $result['recursive'][$scrubField],
- "$dataName did not get scrubbed recursively."
- );
- }
- }
-
- public function scrubDataProvider()
- {
- return array(
- array( // test 1
- array( // $testData
- 'nonsensitive' => 'value 1',
- 'sensitive' => 'value 2',
- 'recursive' => array(
- 'sensitive' => 'value 1',
- 'nonsensitive' => 'value 2'
- )
- )
- )
- );
- }
-
- /**
- * @dataProvider scrubDataProvider
- */
- public function testScrubGET($testData)
- {
- $_GET = $testData;
- $result = $this->scrubTestHelper();
- $this->scrubTestAssert('$_GET', $result['data']['request']['GET']);
- }
-
-
- /**
- * @dataProvider scrubDataProvider
- */
- public function testGetRequestScrubPOST($testData)
- {
- $_POST = $testData;
- $result = $this->scrubTestHelper();
- $this->scrubTestAssert('$_POST', $result['data']['request']['POST']);
- }
-
- /**
- * @dataProvider scrubDataProvider
- */
- public function testGetRequestScrubSession($testData)
- {
- $_SESSION = $testData;
- $result = $this->scrubTestHelper();
- $this->scrubTestAssert('$_SESSION', $result['data']['request']['session']);
- }
-
- public function testGetScrubbedHeaders()
- {
- $_SERVER['HTTP_CONTENT_TYPE'] = 'text/html; charset=utf-8';
- $_SERVER['HTTP_SENSITIVE'] = 'Scrub this';
-
- $scrubField = 'Sensitive';
-
- $result = $this->scrubTestHelper(array('scrub_fields' => array($scrubField)));
- $this->scrubTestAssert(
- 'Headers',
- $result['data']['request']['headers'],
- $scrubField, // field names in headers are slight different convenstion
- false // non-recursive
- );
- }
-
- /**
- * @dataProvider scrubDataProvider
- */
- public function testGetRequestScrubExtras($testData)
- {
- $extras = array(
- 'extraField1' => $testData
- );
-
- $result = $this->scrubTestHelper(array('requestExtras' => $extras));
-
- $this->scrubTestAssert(
- "Request extras",
- $result['data']['request']['extraField1']
- );
- }
-
- /**
- * @dataProvider scrubDataProvider
- */
- public function testMakeDataScrubServerExtras($testData)
- {
- $extras = array(
- 'extraField1' => $testData
- );
-
- $result = $this->scrubTestHelper(array('serverExtras' => $extras));
-
- $this->scrubTestAssert(
- "Server extras",
- $result['data']['server']['extraField1']
- );
- }
-
- /**
- * @dataProvider scrubDataProvider
- */
- public function testMakeDataScrubCustom($testData)
- {
- $custom = $testData;
- $result = $this->scrubTestHelper(array('custom' => $custom));
-
- $this->scrubTestAssert(
- "Custom",
- $result['data']['custom']
- );
- }
-
- /**
- * @dataProvider scrubDataProvider
- */
- public function testMakeDataScrubPerson($testData)
- {
- $testData['id'] = '123';
- $result = $this->scrubTestHelper(
- array(
- 'person' => $testData,
- 'scrub_whitelist' => array(
- 'data.person.recursive.sensitive'
- )
- )
- );
-
- $this->assertEquals(
- str_repeat('*', 8),
- $result['data']['person']['sensitive'],
- "Person did not get scrubbed."
- );
-
- $this->assertNotEquals(
- str_repeat('*', 8),
- $result['data']['person']['recursive']['sensitive'],
- "Person recursive.sensitive DID get scrubbed even though it's whitelisted."
- );
- }
-
- /**
- * @dataProvider scrubDataProvider
- */
- public function testGetRequestScrubBodyContext($testData)
- {
- $bodyContext = array(
- 'context1' => $testData
- );
-
- $result = $this->scrubTestHelper(
- array('custom' => $bodyContext),
- $bodyContext
- );
-
- $this->scrubTestAssert(
- "Request body context",
- $result['data']['body']['extra']['context1']
- );
- }
-
- public function scrubQueryStringDataProvider()
- {
- $data = $this->scrubDataProvider();
-
- foreach ($data as &$test) {
- $test[0] = http_build_query($test[0]);
- }
-
- return $data;
- }
-
- /**
- * @dataProvider scrubQueryStringDataProvider
- */
- public function testGetUrlScrub($testData)
- {
- $_SERVER['SERVER_NAME'] = 'localhost';
- $_SERVER['REQUEST_URI'] = "/index.php?$testData";
-
- $result = $this->scrubTestHelper();
- $parsed = array();
- parse_str(parse_url($result['data']['request']['url'], PHP_URL_QUERY), $parsed);
-
- $this->scrubTestAssert(
- "Url",
- $parsed,
- 'sensitive',
- true,
- 'x' // query string is scrubbed with "x" rather than "*"
- );
- }
-
- /**
- * @dataProvider scrubQueryStringDataProvider
- */
- public function testGetRequestScrubQueryString($testData)
- {
- $_SERVER['QUERY_STRING'] = "?$testData";
-
- $result = $this->scrubTestHelper();
- $parsed = array();
- parse_str($result['data']['request']['query_string'], $parsed);
-
- $this->scrubTestAssert(
- "Query string",
- $parsed,
- 'sensitive',
- true,
- 'x' // query string is scrubbed with "x" rather than "*"
- );
- }
-
- public function testPsr3Emergency()
- {
- $l = new RollbarLogger(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php"
- ));
-
- // Test that no \Psr\Log\InvalidArgumentException is thrown
- $l->emergency("Testing PHP Notifier");
- }
-
- public function testPsr3Alert()
- {
- $l = new RollbarLogger(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php"
- ));
-
- // Test that no \Psr\Log\InvalidArgumentException is thrown
- $l->alert("Testing PHP Notifier");
- }
-
- public function testPsr3Critical()
- {
- $l = new RollbarLogger(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php"
- ));
-
- // Test that no \Psr\Log\InvalidArgumentException is thrown
- $l->critical("Testing PHP Notifier");
- }
-
- public function testPsr3Error()
- {
- $l = new RollbarLogger(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php"
- ));
-
- // Test that no \Psr\Log\InvalidArgumentException is thrown
- $l->error("Testing PHP Notifier");
- }
-
- public function testPsr3Warning()
- {
- $l = new RollbarLogger(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php"
- ));
-
- // Test that no \Psr\Log\InvalidArgumentException is thrown
- $l->warning("Testing PHP Notifier");
- }
-
- public function testPsr3Notice()
- {
- $l = new RollbarLogger(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php"
- ));
-
- // Test that no \Psr\Log\InvalidArgumentException is thrown
- $l->notice("Testing PHP Notifier");
- }
-
- public function testPsr3Info()
- {
- $l = new RollbarLogger(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php"
- ));
-
- // Test that no \Psr\Log\InvalidArgumentException is thrown
- $l->info("Testing PHP Notifier");
- }
-
- public function testPsr3Debug()
- {
- $l = new RollbarLogger(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php"
- ));
-
- // Test that no \Psr\Log\InvalidArgumentException is thrown
- $l->debug("Testing PHP Notifier");
- }
-
- /**
- * @dataProvider maxItemsProvider
- */
- public function testMaxItems($maxItemsConfig)
- {
- $config = array('access_token' => $this->getTestAccessToken());
- if ($maxItemsConfig !== null) {
- $config['max_items'] = $maxItemsConfig;
- }
-
- Rollbar::init($config);
- $logger = Rollbar::logger();
-
- $maxItems = $maxItemsConfig === null ? Defaults::get()->maxItems() : $maxItemsConfig;
-
- for ($i = 0; $i < $maxItems; $i++) {
- $response = $logger->log(Level::INFO, 'testing info level');
- $this->assertEquals(200, $response->getStatus());
- }
-
- $response = $logger->log(Level::INFO, 'testing info level');
-
- $this->assertEquals(0, $response->getStatus());
- $this->assertEquals(
- "Maximum number of items per request has been reached. If you " .
- "want to report more items, please use `max_items` " .
- "configuration option.",
- $response->getInfo()
- );
- }
-
- public function maxItemsProvider()
- {
- return array(
- 'use default max_items' => array(null),
- 'use provided max_items' => array(3)
- );
- }
-
- /**
- * @expectedException Exception
- */
- public function testRaiseOnError()
- {
- $logger = new RollbarLogger(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => 'test',
- "raise_on_error" => true
- ));
-
- try {
- throw new \Exception();
- } catch (\Exception $ex) {
- $logger->log(Level::ERROR, $ex);
- }
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/RollbarTest.php b/vendor/rollbar/rollbar/tests/RollbarTest.php
deleted file mode 100644
index 726c32b4..00000000
--- a/vendor/rollbar/rollbar/tests/RollbarTest.php
+++ /dev/null
@@ -1,254 +0,0 @@
-getTestAccessToken();
- self::$simpleConfig['environment'] = 'test';
- }
-
- private static $simpleConfig = array();
-
- public static function setupBeforeClass()
- {
- Rollbar::destroy();
- }
-
- public function testInitWithConfig()
- {
- Rollbar::init(self::$simpleConfig);
-
- $this->assertInstanceOf('Rollbar\RollbarLogger', Rollbar::logger());
- $this->assertAttributeEquals(new Config(self::$simpleConfig), 'config', Rollbar::logger());
- }
-
- public function testInitWithLogger()
- {
- $logger = $this->getMockBuilder('Rollbar\RollbarLogger')->disableOriginalConstructor()->getMock();
-
- Rollbar::init($logger);
-
- $this->assertSame($logger, Rollbar::logger());
- }
-
- public function testInitConfigureLogger()
- {
- $logger = $this->getMockBuilder('Rollbar\RollbarLogger')->disableOriginalConstructor()->getMock();
- $logger->expects($this->once())->method('configure')->with(self::$simpleConfig);
-
- Rollbar::init($logger);
- Rollbar::init(self::$simpleConfig);
- }
-
- public function testInitReplaceLogger()
- {
- Rollbar::init(self::$simpleConfig);
-
- $this->assertInstanceOf('Rollbar\RollbarLogger', Rollbar::logger());
-
- $logger = $this->getMockBuilder('Rollbar\RollbarLogger')->disableOriginalConstructor()->getMock();
-
- Rollbar::init($logger);
-
- $this->assertSame($logger, Rollbar::logger());
- }
-
- public function testLogException()
- {
- Rollbar::init(self::$simpleConfig);
-
- try {
- throw new \Exception('test exception');
- } catch (\Exception $e) {
- Rollbar::log(Level::ERROR, $e);
- }
-
- $this->assertTrue(true);
- }
-
- public function testLogMessage()
- {
- Rollbar::init(self::$simpleConfig);
-
- $response = Rollbar::log(Level::INFO, 'testing info level');
-
- $this->assertTrue(true);
- }
-
- public function testLogExtraData()
- {
- Rollbar::init(self::$simpleConfig);
-
- $logger = Rollbar::logger();
- $reflection = new \ReflectionClass(get_class($logger));
- $method = $reflection->getMethod('getPayload');
- $method->setAccessible(true);
-
- $payload = $method->invokeArgs(
- $logger,
- array(
- self::$simpleConfig['access_token'],
- Level::INFO,
- 'testing extra data',
- array("some_key" => "some value") // key-value additional data
- )
- );
-
- $extra = $payload->getData()->getBody()->getExtra();
-
- $this->assertEquals(
- "some value",
- $extra['some_key']
- );
- }
-
- public function testDebug()
- {
- $this->shortcutMethodTestHelper(Level::DEBUG);
- }
-
- public function testInfo()
- {
- $this->shortcutMethodTestHelper(Level::INFO);
- }
-
- public function testNotice()
- {
- $this->shortcutMethodTestHelper(Level::NOTICE);
- }
-
- public function testWarning()
- {
- $this->shortcutMethodTestHelper(Level::WARNING);
- }
-
- public function testError()
- {
- $this->shortcutMethodTestHelper(Level::ERROR);
- }
-
- public function testCritical()
- {
- $this->shortcutMethodTestHelper(Level::CRITICAL);
- }
-
- public function testAlert()
- {
- $this->shortcutMethodTestHelper(Level::ALERT);
- }
-
- public function testEmergency()
- {
- $this->shortcutMethodTestHelper(Level::EMERGENCY);
- }
-
- protected function shortcutMethodTestHelper($level)
- {
- $message = "shortcutMethodTestHelper: $level";
-
- $result = Rollbar::$level($message);
- $expected = Rollbar::log($level, $message);
-
- $this->assertEquals($expected, $result);
- }
-
- /**
- * Below are backwards compatibility tests with v0.18.2
- */
- public function testBackwardsSimpleMessageVer()
- {
- Rollbar::init(self::$simpleConfig);
-
- $uuid = Rollbar::report_message("Hello world");
- $this->assertStringMatchesFormat('%x-%x-%x-%x-%x', $uuid);
- }
-
- public function testBackwardsSimpleError()
- {
- set_error_handler(function () {
- }); // disable PHPUnit's error handler
-
- Rollbar::init(self::$simpleConfig);
-
- $result = Rollbar::report_php_error(E_ERROR, "Runtime error", "the_file.php", 1);
- // always returns false.
- $this->assertFalse($result);
- }
-
- public function testBackwardsSimpleException()
- {
- Rollbar::init(self::$simpleConfig);
-
- $uuid = null;
- try {
- throw new \Exception("test exception");
- } catch (\Exception $e) {
- $uuid = Rollbar::report_exception($e);
- }
-
- $this->assertStringMatchesFormat('%x-%x-%x-%x-%x', $uuid);
- }
-
- public function testBackwardsFlush()
- {
- Rollbar::init(self::$simpleConfig);
-
- Rollbar::flush();
- $this->assertTrue(true);
- }
-
- public function testConfigure()
- {
- $expected = 'expectedEnv';
-
- Rollbar::init(self::$simpleConfig);
-
- // functionality under test
- Rollbar::configure(array(
- 'environment' => $expected
- ));
-
- // assertion
- $logger = Rollbar::logger();
- $dataBuilder = $logger->getDataBuilder();
- $data = $dataBuilder->makeData(Level::ERROR, "testing", array());
- $payload = new Payload($data, self::$simpleConfig['access_token']);
-
- $this->assertEquals($expected, $payload->getData()->getEnvironment());
- }
-
- public function testEnable()
- {
- Rollbar::init(self::$simpleConfig);
- $this->assertTrue(Rollbar::enabled());
-
- Rollbar::disable();
- $this->assertTrue(Rollbar::disabled());
-
- Rollbar::enable();
- $this->assertTrue(Rollbar::enabled());
-
- Rollbar::init(array_merge(
- self::$simpleConfig,
- array('enabled' => false)
- ));
- $this->assertTrue(Rollbar::disabled());
-
- Rollbar::configure(array('enabled' => true));
- $this->assertTrue(Rollbar::enabled());
-
- Rollbar::configure(array('enabled' => false));
- $this->assertTrue(Rollbar::disabled());
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/ScrubberTest.php b/vendor/rollbar/rollbar/tests/ScrubberTest.php
deleted file mode 100644
index 9e0e7ba1..00000000
--- a/vendor/rollbar/rollbar/tests/ScrubberTest.php
+++ /dev/null
@@ -1,396 +0,0 @@
- array(
- 'https://rollbar.com', // $testData
- array(), // $scrubfields
- 'https://rollbar.com' // $expected
- ),
- 'mix of scrub and no scrub' => array(
- 'https://rollbar.com?arg1=val1&arg2=val2&arg3=val3', // $testData
- array('arg2'), // $scrubFields
- 'https://rollbar.com?arg1=val1&arg2=xxxxxxxx&arg3=val3' // $expected
- ),
- );
- }
-
- /**
- * @dataProvider scrubWhitelistProvider
- */
- public function testScrubWhitelist($testData, $scrubFields, $whitelist, $expected)
- {
- $scrubber = new Scrubber(array(
- 'scrubFields' => $scrubFields,
- 'scrubWhitelist' => $whitelist
- ));
- $result = $scrubber->scrub($testData);
- $this->assertEquals(
- $expected,
- $result,
- "Looks like whitelisting is not working correctly."
- );
- }
-
- public function scrubWhitelistProvider()
- {
- return array(
- array(
- array(
- 'toScrub' => 'some value 1',
- 'firstLevelArray' => array(
- 'secondLevelArray' => array(
- 'thirdLevelProp' => 'some value 3',
- 'toScrub' => 'some value 3',
- 'thirdLevelArray' => array(
- 'toScrub' => 'some value 4'
- )
- ),
- 'secondLevelProp' => 'some value 2',
- 'toScrub' => 'some value 2'
- )
- ),
-
- array('toScrub'),
-
- array(
- 'firstLevelArray.secondLevelArray.toScrub',
- 'firstLevelArray.secondLevelArray.thirdLevelArray.toScrub'
- ),
-
- array(
- 'toScrub' => '********',
- 'firstLevelArray' => array(
- 'secondLevelArray' => array(
- 'thirdLevelProp' => 'some value 3',
- 'toScrub' => 'some value 3',
- 'thirdLevelArray' => array(
- 'toScrub' => 'some value 4'
- )
- ),
- 'secondLevelProp' => 'some value 2',
- 'toScrub' => '********'
- )
- ),
- )
- );
- }
-
- /**
- * @dataProvider scrubDataProvider
- */
- public function testScrub($testData, $scrubFields, $expected)
- {
- $scrubber = new Scrubber(array(
- 'scrubFields' => $scrubFields
- ));
- $result = $scrubber->scrub($testData);
- $this->assertEquals($expected, $result, "Looks like some fields did not get scrubbed correctly.");
- }
-
- public function scrubDataProvider()
- {
- return array_merge(array(
- 'flat data array' =>
- $this->scrubFlatDataProvider(),
- 'recursive data array' =>
- $this->scrubRecursiveDataProvider(),
- 'string encoded values' =>
- $this->scrubFlatStringDataProvider(),
- 'string encoded recursive values' =>
- $this->scrubRecursiveStringDataProvider(),
- 'string encoded recursive values in recursive array' =>
- $this->scrubRecursiveStringRecursiveDataProvider()
- ), $this->scrubUrlDataProvider(), $this->scrubJSONNumbersProvider());
- }
-
- private function scrubJSONNumbersProvider()
- {
- return array(
- 'plain array' => array(
- '[1023,1924]',
- array(
- 'sensitive'
- ),
- '[1023,1924]'
- ),
- 'param equals array' => array(
- 'b=[1023,1924]',
- array(
- 'sensitive'
- ),
- 'b=[1023,1924]'
- )
- );
- }
-
- private function scrubFlatDataProvider()
- {
- return array(
- array( // $testData
- 'non sensitive data' => '123',
- 'sensitive data' => '456'
- ),
- array( // $scrubFields
- 'sensitive data'
- ),
- array( // $expected
- 'non sensitive data' => '123',
- 'sensitive data' => '********'
- )
- );
- }
-
- private function scrubRecursiveDataProvider()
- {
- return array(
- array( // $testData
- 'non sensitive data 1' => '123',
- 'non sensitive data 2' => '456',
- 'non sensitive data 3' => '4&56',
- 'non sensitive data 4' => 'a=4&56',
- 'non sensitive data 6' => '?baz&foo=bar',
- 'non sensitive data 7' => 'a=stuff&foo=superSecret',
- 'sensitive data' => '456',
- array(
- 'non sensitive data 3' => '789',
- 'non sensitive data 5' => '789&5=',
- 'recursive sensitive data' => 'qwe',
- 'non sensitive data 3' => 'rty',
- array(
- 'recursive sensitive data' => array(),
- )
- ),
- ),
- array( // $scrubFields
- 'sensitive data',
- 'recursive sensitive data',
- 'foo'
- ),
- array( // $expected
- 'non sensitive data 1' => '123',
- 'non sensitive data 2' => '456',
- 'non sensitive data 3' => '4&56',
- 'non sensitive data 4' => 'a=4&56',
- 'non sensitive data 6' => '?baz=&foo=xxxxxxxx',
- 'non sensitive data 7' => 'a=stuff&foo=xxxxxxxx',
- 'sensitive data' => '********',
- array(
- 'non sensitive data 3' => '789',
- 'non sensitive data 5' => '789&5=',
- 'recursive sensitive data' => '********',
- 'non sensitive data 3' => 'rty',
- array(
- 'recursive sensitive data' => '********',
- )
- ),
- ),
- );
- }
-
- private function scrubFlatStringDataProvider()
- {
- return array(
- // $testData
- '?' . http_build_query(
- array(
- 'arg1' => 'val 1',
- 'sensitive' => 'scrubit',
- 'arg2' => 'val 3'
- )
- ),
- array( // $scrubFields
- 'sensitive'
- ),
- // $expected
- '?' . http_build_query(
- array(
- 'arg1' => 'val 1',
- 'sensitive' => 'xxxxxxxx',
- 'arg2' => 'val 3'
- )
- ),
- );
- }
-
- private function scrubRecursiveStringDataProvider()
- {
- return array(
- // $testData
- '?' . http_build_query(
- array(
- 'arg1' => 'val 1',
- 'sensitive' => 'scrubit',
- 'arg2' => array(
- 'arg3' => 'val 3',
- 'sensitive' => 'scrubit'
- )
- )
- ),
- array( // $scrubFields
- 'sensitive'
- ),
- // $expected
- '?' . http_build_query(
- array(
- 'arg1' => 'val 1',
- 'sensitive' => 'xxxxxxxx',
- 'arg2' => array(
- 'arg3' => 'val 3',
- 'sensitive' => 'xxxxxxxx'
- )
- )
- ),
- );
- }
-
- private function scrubRecursiveStringRecursiveDataProvider()
- {
- return array(
- array( // $testData
- 'non sensitive data 1' => '123',
- 'non sensitive data 2' => '456',
- 'sensitive data' => '456',
- array(
- 'non sensitive data 3' => '789',
- 'recursive sensitive data' => 'qwe',
- 'non sensitive data 3' => '?' . http_build_query(
- array(
- 'arg1' => 'val 1',
- 'sensitive' => 'scrubit',
- 'arg2' => array(
- 'arg3' => 'val 3',
- 'sensitive' => 'scrubit',
- 'SENSITIVE' => 'scrubit',
- 'sensitive2' => 'scrubit'
- )
- )
- ),
- array(
- 'recursive sensitive data' => array(),
- )
- ),
- ),
- array( // $scrubFields
- 'sensitive data',
- 'recursive sensitive data',
- 'sensitive',
- 'SENSITIVE2'
- ),
- array( // $expected
- 'non sensitive data 1' => '123',
- 'non sensitive data 2' => '456',
- 'sensitive data' => '********',
- array(
- 'non sensitive data 3' => '789',
- 'recursive sensitive data' => '********',
- 'non sensitive data 3' => '?' . http_build_query(
- array(
- 'arg1' => 'val 1',
- 'sensitive' => 'xxxxxxxx',
- 'arg2' => array(
- 'arg3' => 'val 3',
- 'sensitive' => 'xxxxxxxx',
- 'SENSITIVE' => 'xxxxxxxx',
- 'sensitive2' => 'xxxxxxxx'
- )
- )
- ),
- array(
- 'recursive sensitive data' => '********',
- )
- ),
- )
- );
- }
-
- /**
- * @dataProvider scrubArrayDataProvider
- */
- public function testScrubArray($testData, $scrubFields, $expected)
- {
- $scrubber = new Scrubber(array(
- 'scrubFields' => $scrubFields
- ));
- $result = $scrubber->scrub($testData);
- $this->assertEquals($expected, $result, "Looks like some fields did not get scrubbed correctly.");
- }
-
- public function scrubArrayDataProvider()
- {
- return array(
- 'flat data array' => array(
- array( // $testData
- 'non sensitive data' => '123',
- 'sensitive data' => '456',
- 'UPPERCASE SENSITIVE DATA' => '789',
- 'also sensitive data' => '012'
- ),
- array( // $scrubFields
- 'sensitive data',
- 'uppercase sensitive data',
- 'ALSO SENSITIVE DATA'
- ),
- array( // $expected
- 'non sensitive data' => '123',
- 'sensitive data' => '********',
- 'UPPERCASE SENSITIVE DATA' => '********',
- 'also sensitive data' => '********'
- )
- ),
- 'recursive data array' => array(
- array( // $testData
- 'non sensitive data 1' => '123',
- 'non sensitive data 2' => '456',
- 'sensitive data' => '456',
- array(
- 'non sensitive data 3' => '789',
- 'recursive sensitive data' => 'qwe',
- 'non sensitive data 3' => 'rty',
- array(
- 'recursive sensitive data' => array(),
- )
- ),
- ),
- array( // $scrubFields
- 'sensitive data',
- 'recursive sensitive data'
- ),
- array( // $expected
- 'non sensitive data 1' => '123',
- 'non sensitive data 2' => '456',
- 'sensitive data' => '********',
- array(
- 'non sensitive data 3' => '789',
- 'recursive sensitive data' => '********',
- 'non sensitive data 3' => 'rty',
- array(
- 'recursive sensitive data' => '********',
- )
- ),
- ),
- )
- );
- }
-
- public function testScrubReplacement()
- {
- $testData = array('scrubit' => '123');
-
- $scrubber = new Scrubber(array(
- 'scrubFields' => array('scrubit')
- ));
-
- $result = $scrubber->scrub($testData, "@@@@@@@@");
-
- $this->assertEquals("@@@@@@@@", $result['scrubit']);
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/ServerTest.php b/vendor/rollbar/rollbar/tests/ServerTest.php
deleted file mode 100644
index 065555ad..00000000
--- a/vendor/rollbar/rollbar/tests/ServerTest.php
+++ /dev/null
@@ -1,83 +0,0 @@
-setHost($val);
- $this->assertEquals($val, $server->getHost());
-
- $val2 = "TEST2";
- $this->assertEquals($val2, $server->setHost($val2)->getHost());
- }
-
- public function testRoot()
- {
- $val = "TEST";
- $server = new Server();
- $server->setRoot($val);
- $this->assertEquals($val, $server->getRoot());
-
- $val2 = "TEST2";
- $this->assertEquals($val2, $server->setRoot($val2)->getRoot());
- }
-
- public function testBranch()
- {
- $val = "TEST";
- $server = new Server();
- $server->setBranch($val);
- $this->assertEquals($val, $server->getBranch());
-
- $val2 = "TEST2";
- $this->assertEquals($val2, $server->setBranch($val2)->getBranch());
- }
-
- public function testCodeVersion()
- {
- $val = "TEST";
- $server = new Server();
- $server->setCodeVersion($val);
- $this->assertEquals($val, $server->getCodeVersion());
-
- $val2 = "TEST2";
- $this->assertEquals($val2, $server->setCodeVersion($val2)->getCodeVersion());
- }
-
- public function testExtra()
- {
- $server = new Server();
- $server->setExtras(array("test" => "testing"));
- $extras = $server->getExtras();
- $this->assertEquals("testing", $extras["test"]);
- }
-
- public function testEncode()
- {
- $server = new Server();
- $server->setHost("server2-ec-us")
- ->setRoot("/home/app/testingRollbar")
- ->setBranch("master")
- ->setCodeVersion("#dca015");
- $extras = array("test" => array(1, 2, "3", array()));
- $server->setExtras($extras);
- $expected = '{' .
- '"host":"server2-ec-us",' .
- '"root":"\\/home\\/app\\/testingRollbar",' .
- '"branch":"master",' .
- '"code_version":"#dca015",' .
- '"test":' .
- '[' .
- '1,' .
- '2,' .
- '"3",' .
- '[]' .
- ']' .
- '}';
- $this->assertEquals($expected, json_encode($server->serialize()));
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/TestHelpers/CustomTruncation.php b/vendor/rollbar/rollbar/tests/TestHelpers/CustomTruncation.php
deleted file mode 100644
index 1d63745f..00000000
--- a/vendor/rollbar/rollbar/tests/TestHelpers/CustomTruncation.php
+++ /dev/null
@@ -1,26 +0,0 @@
-encode(array(
- "data" => array(
- "body" => array(
- "message" => array(
- "body" => array(
- "value" => 'Custom truncation test string'
- )
- )
- )
- )
- ));
-
- return $payload;
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/TestHelpers/CycleCheck/ChildCycleCheck.php b/vendor/rollbar/rollbar/tests/TestHelpers/CycleCheck/ChildCycleCheck.php
deleted file mode 100644
index 38701346..00000000
--- a/vendor/rollbar/rollbar/tests/TestHelpers/CycleCheck/ChildCycleCheck.php
+++ /dev/null
@@ -1,11 +0,0 @@
-parent = $parent;
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/TestHelpers/CycleCheck/ChildCycleCheckSerializable.php b/vendor/rollbar/rollbar/tests/TestHelpers/CycleCheck/ChildCycleCheckSerializable.php
deleted file mode 100644
index d37be843..00000000
--- a/vendor/rollbar/rollbar/tests/TestHelpers/CycleCheck/ChildCycleCheckSerializable.php
+++ /dev/null
@@ -1,27 +0,0 @@
-parent = $parent;
- }
-
- public function serialize()
- {
- $objectHashes = \Rollbar\Utilities::GetObjectHashes();
- return array(
- "parent" => \Rollbar\Utilities::serializeForRollbar(
- $this->parent,
- null,
- $objectHashes
- )
- );
- }
-
- public function unserialize($serialized)
- {
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/TestHelpers/CycleCheck/ParentCycleCheck.php b/vendor/rollbar/rollbar/tests/TestHelpers/CycleCheck/ParentCycleCheck.php
deleted file mode 100644
index edddf9be..00000000
--- a/vendor/rollbar/rollbar/tests/TestHelpers/CycleCheck/ParentCycleCheck.php
+++ /dev/null
@@ -1,11 +0,0 @@
-child = new ChildCycleCheck($this);
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/TestHelpers/CycleCheck/ParentCycleCheckSerializable.php b/vendor/rollbar/rollbar/tests/TestHelpers/CycleCheck/ParentCycleCheckSerializable.php
deleted file mode 100644
index 233c15db..00000000
--- a/vendor/rollbar/rollbar/tests/TestHelpers/CycleCheck/ParentCycleCheckSerializable.php
+++ /dev/null
@@ -1,27 +0,0 @@
-child = new ChildCycleCheck($this);
- }
-
- public function serialize()
- {
- $objectHashes = \Rollbar\Utilities::GetObjectHashes();
- return array(
- "child" => \Rollbar\Utilities::serializeForRollbar(
- $this->child,
- null,
- $objectHashes
- )
- );
- }
-
- public function unserialize($serialized)
- {
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/TestHelpers/Exceptions/FiftyFiftyExceptionSampleRate.php b/vendor/rollbar/rollbar/tests/TestHelpers/Exceptions/FiftyFiftyExceptionSampleRate.php
deleted file mode 100644
index 6ceffee3..00000000
--- a/vendor/rollbar/rollbar/tests/TestHelpers/Exceptions/FiftyFiftyExceptionSampleRate.php
+++ /dev/null
@@ -1,5 +0,0 @@
-makePartial();
- $mock->shouldReceive("serialize")->andReturn(false);
- $levelFactory = new \Rollbar\LevelFactory();
- $mock->setLevel($levelFactory->fromName($level));
- $payload->setData($mock);
- return $payload;
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/TestHelpers/MockPhpStream.php b/vendor/rollbar/rollbar/tests/TestHelpers/MockPhpStream.php
deleted file mode 100644
index 0b4ec668..00000000
--- a/vendor/rollbar/rollbar/tests/TestHelpers/MockPhpStream.php
+++ /dev/null
@@ -1,55 +0,0 @@
-length = strlen(self::$data);
- }
- $length = min($count, self::$length - self::$index);
- $data = substr(self::$data, self::$index);
- self::$index = self::$index + $length;
- return $data;
- }
-
- public function stream_eof()
- {
- return (self::$index >= self::$length ? true : false);
- }
-
- public function stream_write($data)
- {
- self::$data = $data;
- self::$length = strlen(self::$data);
- self::$index = 0;
- return self::$length;
- }
-
- // @codingStandardsIgnoreEnd
-}
diff --git a/vendor/rollbar/rollbar/tests/TestHelpers/StdOutLogger.php b/vendor/rollbar/rollbar/tests/TestHelpers/StdOutLogger.php
deleted file mode 100644
index 6361c441..00000000
--- a/vendor/rollbar/rollbar/tests/TestHelpers/StdOutLogger.php
+++ /dev/null
@@ -1,14 +0,0 @@
-trace1 = m::mock("Rollbar\Payload\Trace");
- $this->trace2 = m::mock("Rollbar\Payload\Trace");
- }
-
- public function testTraces()
- {
- $chain = array($this->trace1);
- $traceChain = new TraceChain($chain);
- $this->assertEquals($chain, $traceChain->getTraces());
-
- $traceChain = new TraceChain($chain);
- $chain = array($this->trace1, $this->trace2);
- $traceChain->setTraces($chain);
- $this->assertEquals($chain, $traceChain->getTraces());
- }
-
- public function testKey()
- {
- $chain = new TraceChain(array($this->trace1));
- $this->assertEquals("trace_chain", $chain->getKey());
- }
-
- public function testEncode()
- {
- $trace1 = m::mock("Rollbar\Payload\Trace")
- ->shouldReceive("serialize")
- ->andReturn("TRACE1")
- ->mock();
- $trace2 = m::mock("Rollbar\Payload\Trace")
- ->shouldReceive("serialize")
- ->andReturn("TRACE2")
- ->mock();
- $chain = new TraceChain(array($trace1, $trace2));
- $this->assertEquals('["TRACE1","TRACE2"]', json_encode($chain->serialize()));
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/TraceTest.php b/vendor/rollbar/rollbar/tests/TraceTest.php
deleted file mode 100644
index 8c957bbf..00000000
--- a/vendor/rollbar/rollbar/tests/TraceTest.php
+++ /dev/null
@@ -1,61 +0,0 @@
-assertEquals(array(), $trace->getFrames());
- $this->assertEquals($exc, $trace->getException());
-
- $trace = new Trace($frames, $exc);
- $this->assertEquals($frames, $trace->getFrames());
- $this->assertEquals($exc, $trace->getException());
- }
-
- public function testFrames()
- {
- $frames = array(
- new Frame("one.php"),
- new Frame("two.php")
- );
- $exc = m::mock("Rollbar\Payload\ExceptionInfo");
- $trace = new Trace(array(), $exc);
- $this->assertEquals($frames, $trace->setFrames($frames)->getFrames());
- }
-
- public function testException()
- {
- $exc = m::mock("Rollbar\Payload\ExceptionInfo");
- $trace = new Trace(array(), $exc);
- $this->assertEquals($exc, $trace->getException());
-
- $exc2 = m::mock("Rollbar\Payload\ExceptionInfo");
- $this->assertEquals($exc2, $trace->setException($exc2)->getException());
- }
-
- public function testEncode()
- {
- $value = m::mock("Rollbar\Payload\ExceptionInfo, \Serializable")
- ->shouldReceive("serialize")
- ->andReturn("{EXCEPTION}")
- ->mock();
- $trace = new Trace(array(), $value);
- $encoded = json_encode($trace->serialize());
- $this->assertEquals("{\"frames\":[],\"exception\":\"{EXCEPTION}\"}", $encoded);
- }
-
- public function testTraceKey()
- {
- $trace = new Trace(array(), m::mock("Rollbar\Payload\ExceptionInfo"));
- $this->assertEquals("trace", $trace->getKey());
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/Truncation/FramesStrategyTest.php b/vendor/rollbar/rollbar/tests/Truncation/FramesStrategyTest.php
deleted file mode 100644
index e1dbad93..00000000
--- a/vendor/rollbar/rollbar/tests/Truncation/FramesStrategyTest.php
+++ /dev/null
@@ -1,108 +0,0 @@
- $this->getTestAccessToken()));
- $truncation = new Truncation($config);
-
- $strategy = new FramesStrategy($truncation);
-
- $data = new EncodedPayload($data);
- $data->encode();
-
- $result = $strategy->execute($data);
-
- $this->assertEquals($expected, $result->data());
- }
-
- public function executeProvider()
- {
- $data = array(
- 'nothing to truncate using trace key' => array(
- array('data' => array('body' =>
- array('trace' => array('frames' => range(1, 6)))
- )),
- array('data' => array('body' =>
- array('trace' => array('frames' => range(1, 6)))
- ))
- ),
- 'nothing to truncate using trace_chain key' => array(
- array('data' => array('body' =>
- array('trace_chain' => array(array('frames' => range(1, 6))))
- )),
- array('data' => array('body' =>
- array('trace_chain' => array(array('frames' => range(1, 6))))
- ))
- ),
- 'truncate middle using trace key' => array(
- array('data' => array('body' =>
- array(
- 'trace' => array(
- 'frames' => range(
- 1,
- FramesStrategy::FRAMES_OPTIMIZATION_RANGE * 2 + 1
- )
- )
- )
- )),
- array('data' => array('body' =>
- array(
- 'trace' => array(
- 'frames' => array_merge(
- range(1, FramesStrategy::FRAMES_OPTIMIZATION_RANGE),
- range(
- FramesStrategy::FRAMES_OPTIMIZATION_RANGE + 2,
- FramesStrategy::FRAMES_OPTIMIZATION_RANGE * 2 + 1
- )
- )
- )
- )
- ))
-
- ),
- 'truncate middle using trace_chain key' => array(
- array('data' => array('body' =>
- array(
- 'trace_chain' => array(
- array(
- 'frames' => range(
- 1,
- FramesStrategy::FRAMES_OPTIMIZATION_RANGE * 2 + 1
- )
- )
- )
- )
- )),
- array('data' => array('body' =>
- array(
- 'trace_chain' => array(
- array(
- 'frames' => array_merge(
- range(1, FramesStrategy::FRAMES_OPTIMIZATION_RANGE),
- range(
- FramesStrategy::FRAMES_OPTIMIZATION_RANGE + 2,
- FramesStrategy::FRAMES_OPTIMIZATION_RANGE * 2 + 1
- )
- )
- )
- )
- )
- ))
-
- )
- );
-
- return $data;
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/Truncation/MinBodyStrategyTest.php b/vendor/rollbar/rollbar/tests/Truncation/MinBodyStrategyTest.php
deleted file mode 100644
index 9c216da4..00000000
--- a/vendor/rollbar/rollbar/tests/Truncation/MinBodyStrategyTest.php
+++ /dev/null
@@ -1,74 +0,0 @@
- $this->getTestAccessToken()));
- $truncation = new Truncation($config);
-
- $strategy = new MinBodyStrategy($truncation);
-
- $data = new EncodedPayload($data);
- $data->encode();
-
- $result = $strategy->execute($data);
-
- $this->assertEquals($expected, $result->data());
- }
-
- public function executeProvider()
- {
- $data = array();
-
- $traceData = array(
- 'exception' => array(
- 'description' => 'Test description',
- 'message' => str_repeat(
- 'A',
- MinBodyStrategy::EXCEPTION_MESSAGE_LIMIT+1
- )
- ),
- 'frames' => array('Frame 1', 'Frame 2', 'Frame 3')
- );
-
- $expected = $traceData;
- unset($expected['exception']['description']);
- $expected['exception']['message'] = str_repeat(
- 'A',
- MinBodyStrategy::EXCEPTION_MESSAGE_LIMIT
- );
- $expected['frames'] = array('Frame 1', 'Frame 3');
-
-
- $data['trace data set'] = array(
- $this->payloadStructureProvider(array('trace' => $traceData)),
- $this->payloadStructureProvider(array('trace' => $expected))
- );
-
- $data['trace_chain data set'] = array(
- $this->payloadStructureProvider(array('trace_chain' => $traceData)),
- $this->payloadStructureProvider(array('trace_chain' => $expected))
- );
- return $data;
- }
-
- protected function payloadStructureProvider($body)
- {
- return array(
- "data" => array(
- "body" => $body
- )
- );
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/Truncation/RawStrategyTest.php b/vendor/rollbar/rollbar/tests/Truncation/RawStrategyTest.php
deleted file mode 100644
index 69b9a59b..00000000
--- a/vendor/rollbar/rollbar/tests/Truncation/RawStrategyTest.php
+++ /dev/null
@@ -1,30 +0,0 @@
- 'test data');
-
- $config = new Config(array('access_token' => $this->getTestAccessToken()));
- $truncation = new Truncation($config);
-
- $strategy = new RawStrategy($truncation);
-
- $data = new EncodedPayload($payload);
- $data->encode();
-
- $result = $strategy->execute($data);
-
- $this->assertEquals(
- strlen(json_encode($payload)),
- $result->size()
- );
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/Truncation/StringsStrategyTest.php b/vendor/rollbar/rollbar/tests/Truncation/StringsStrategyTest.php
deleted file mode 100644
index 14420e6f..00000000
--- a/vendor/rollbar/rollbar/tests/Truncation/StringsStrategyTest.php
+++ /dev/null
@@ -1,107 +0,0 @@
- $this->getTestAccessToken()));
- $truncation = new Truncation($config);
-
- $strategy = new StringsStrategy($truncation);
-
- $data = new EncodedPayload($data);
- $data->encode();
-
- return $strategy->execute($data)->data();
- }
-
- /**
- * @dataProvider executeTruncateNothingProvider
- */
- public function testExecuteTruncateNothing($data, $expected)
- {
- $result = $this->execute($data);
- $this->assertEquals($expected, $result);
- }
-
- public function executeTruncateNothingProvider()
- {
- $data = array();
-
- $data["truncate nothing"] = array(
- $this->payloadStructureProvider(str_repeat("A", 10)),
- $this->payloadStructureProvider(str_repeat("A", 10))
- );
-
- return $data;
- }
-
- /**
- * @dataProvider executeArrayProvider
- */
- public function testExecuteArray($data, $expectedThreshold)
- {
- $result = $this->execute($data);
-
- $resultAnalysis = array();
-
- foreach ($result['data']['body']['message']['body']['value'] as $key => $toTrim) {
- $this->assertTrue(
- strlen($toTrim) <= $expectedThreshold,
- "The string '$toTrim' was expected to be trimmed to " . $expectedThreshold . " characters. " .
- "Actual length: " . strlen($toTrim)
- );
- }
- }
-
- public function executeArrayProvider()
- {
- $data = array();
-
- $thresholds = StringsStrategy::getThresholds();
- foreach ($thresholds as $threshold) {
- $data['truncate strings to ' . $threshold] = $this->thresholdTestProvider($threshold);
- }
-
- return $data;
- }
-
- public function thresholdTestProvider($threshold)
- {
- $stringLengthToTrim = $threshold*2;
-
- $payload = $this->payloadStructureProvider(array());
- $payload['data']['body']['message']['body']['value2'] = array();
-
- while (strlen(json_encode($payload)) <= Truncation::MAX_PAYLOAD_SIZE) {
- $payload['data']['body']['message']['body']['value'] []=
- str_repeat('A', $stringLengthToTrim);
- $payload['data']['body']['message']['body']['value2'] []=
- str_repeat('A', $stringLengthToTrim);
- }
-
- return array($payload, $threshold);
- }
-
- public function payloadStructureProvider($message)
- {
- return array(
- "data" => array(
- "body" => array(
- "message" => array(
- "body" => array(
- "value" => $message
- )
- )
- )
- )
- );
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/Truncation/TruncationTest.php b/vendor/rollbar/rollbar/tests/Truncation/TruncationTest.php
deleted file mode 100644
index 9e9f8f3c..00000000
--- a/vendor/rollbar/rollbar/tests/Truncation/TruncationTest.php
+++ /dev/null
@@ -1,91 +0,0 @@
- $this->getTestAccessToken()));
- $this->truncate = new \Rollbar\Truncation\Truncation($config);
- }
-
- public function testCustomTruncation()
- {
- $config = new Config(array(
- 'access_token' => $this->getTestAccessToken(),
- 'custom_truncation' => 'Rollbar\TestHelpers\CustomTruncation'
- ));
- $this->truncate = new \Rollbar\Truncation\Truncation($config);
-
- $data = new EncodedPayload(array(
- "data" => array(
- "body" => array(
- "message" => array(
- "body" => array(
- "value" => str_repeat('A', 1000 * 1000)
- )
- )
- )
- )
- ));
- $data->encode();
-
- $result = $this->truncate->truncate($data);
-
- $this->assertFalse(strpos($data, 'Custom truncation test string') === false);
- }
-
- /**
- * @dataProvider truncateProvider
- */
- public function testTruncateNoPerformance($data)
- {
-
- $data = new \Rollbar\Payload\EncodedPayload($data);
- $data->encode();
-
- $result = $this->truncate->truncate($data);
-
- $size = strlen(json_encode($result));
-
- $this->assertTrue(
- $size <= \Rollbar\Truncation\Truncation::MAX_PAYLOAD_SIZE,
- "Truncation failed. Payload size exceeds MAX_PAYLOAD_SIZE."
- );
- }
-
- public function truncateProvider()
- {
-
- $stringsTest = new StringsStrategyTest();
- $framesTest = new FramesStrategyTest();
-
- $framesTestData = $framesTest->executeProvider();
-
- // Fill up frames with data to go over the allowed payload size limit
- $frames = &$framesTestData['truncate middle using trace key'][0]['data']['body']['trace']['frames'];
- $stringValue = str_repeat('A', 1024 * 10);
- foreach ($frames as $key => $data) {
- $frames[$key] = $stringValue;
- }
-
- $frames = &$framesTestData['truncate middle using trace_chain key'][0]['data']['body']['trace_chain']['frames'];
- foreach ($frames as $key => $data) {
- $frames[$key] = $stringValue;
- }
-
- $data = array_merge(
- $stringsTest->executeTruncateNothingProvider(),
- $stringsTest->executearrayProvider(),
- $framesTestData
- );
-
- return $data;
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/UtilitiesTest.php b/vendor/rollbar/rollbar/tests/UtilitiesTest.php
deleted file mode 100644
index f004ac30..00000000
--- a/vendor/rollbar/rollbar/tests/UtilitiesTest.php
+++ /dev/null
@@ -1,175 +0,0 @@
-fail("Above should throw");
- } catch (\InvalidArgumentException $e) {
- $this->assertEquals($e->getMessage(), "\$null must not be null");
- }
-
- try {
- Utilities::validateString(1, "number");
- $this->fail("Above should throw");
- } catch (\InvalidArgumentException $e) {
- $this->assertEquals($e->getMessage(), "\$number must be a string");
- }
-
- try {
- Utilities::validateString("1", "str", 2);
- $this->fail("Above should throw");
- } catch (\InvalidArgumentException $e) {
- $this->assertEquals($e->getMessage(), "\$str must be 2 characters long, was '1'");
- }
- }
-
- public function testValidateInteger()
- {
- Utilities::validateInteger(null);
- Utilities::validateInteger(0);
- Utilities::validateInteger(1, "one", 0, 2);
-
- try {
- Utilities::validateInteger(null, "null", null, null, false);
- $this->fail("Above should throw");
- } catch (\InvalidArgumentException $e) {
- $this->assertEquals($e->getMessage(), "\$null must not be null");
- }
-
- try {
- Utilities::validateInteger(0, "zero", 1);
- $this->fail("Above should throw");
- } catch (\InvalidArgumentException $e) {
- $this->assertEquals($e->getMessage(), "\$zero must be >= 1");
- }
-
- try {
- Utilities::validateInteger(0, "zero", null, -1);
- $this->fail("Above should throw");
- } catch (\InvalidArgumentException $e) {
- $this->assertEquals($e->getMessage(), "\$zero must be <= -1");
- }
- }
-
- public function testValidateBooleanThrowsException()
- {
- $this->setExpectedException(get_class(new \InvalidArgumentException()));
- Utilities::validateBoolean(null, "foo", false);
- }
-
- public function testValidateBooleanWithInvalidBoolean()
- {
- $this->setExpectedException(get_class(new \InvalidArgumentException()));
- Utilities::validateBoolean("not a boolean");
- }
-
- public function testValidateBoolean()
- {
- Utilities::validateBoolean(true, "foo", false);
- Utilities::validateBoolean(true);
- Utilities::validateBoolean(null);
- }
-
- public function testSerializeForRollbar()
- {
- $obj = array(
- "one_two" => array(1, 2),
- "class" => "Numbers",
- "php_unit_test" => "testSerializeForRollbar",
- "myCustomKey" => null,
- "myNullValue" => null,
- );
- $result = Utilities::serializeForRollbar($obj, array("myCustomKey"));
-
- $this->assertArrayNotHasKey("OneTwo", $result);
- $this->assertArrayHasKey("one_two", $result);
-
- $this->assertArrayHasKey("class", $result);
-
- $this->assertArrayNotHasKey("PHPUnitTest", $result);
- $this->assertArrayHasKey("php_unit_test", $result);
-
- $this->assertArrayNotHasKey("my_custom_key", $result);
- $this->assertArrayHasKey("myCustomKey", $result);
- $this->assertNull($result["myCustomKey"]);
-
- $this->assertArrayNotHasKey("myNullValue", $result);
- $this->assertArrayNotHasKey("my_null_value", $result);
- }
-
- public function testSerializationCycleChecking()
- {
- $config = new Config(array("access_token"=>$this->getTestAccessToken()));
- $data = $config->getRollbarData(\Rollbar\Payload\Level::WARNING, "String", array(new ParentCycleCheck()));
- $payload = new \Rollbar\Payload\Payload($data, $this->getTestAccessToken());
- $obj = array(
- "one_two" => array(1, 2),
- "payload" => $payload,
- "obj" => new ParentCycleCheck(),
- "serializedObj" => new ParentCycleCheckSerializable(),
- );
- $objectHashes = array();
-
- $result = Utilities::serializeForRollbar($obj, null, $objectHashes);
-
- $this->assertRegExp(
- '/assertRegExp(
- '/assertRegExp(
- '/ array(
- 'two' => array(
- 'three' => array(
- 'four' => array(1, 2),
- ),
- ),
- ),
- );
-
- $objectHashes = array();
- $result = Utilities::serializeForRollbar($obj, null, $objectHashes, 2);
- $this->assertArrayHasKey('one', $result);
- $this->assertArrayHasKey('two', $result['one']);
- $this->assertArrayNotHasKey('three', $result['one']['two']);
-
- $objectHashes = array();
- $result = Utilities::serializeForRollbar($obj, null, $objectHashes, 3);
- $this->assertArrayHasKey('one', $result);
- $this->assertArrayHasKey('two', $result['one']);
- $this->assertArrayHasKey('three', $result['one']['two']);
- $this->assertArrayNotHasKey('four', $result['one']['two']['three']);
-
- $result = Utilities::serializeForRollbar($obj);
- $this->assertArrayHasKey('one', $result);
- $this->assertArrayHasKey('two', $result['one']);
- $this->assertArrayHasKey('three', $result['one']['two']);
- $this->assertArrayHasKey('four', $result['one']['two']['three']);
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/VerboseTest.php b/vendor/rollbar/rollbar/tests/VerboseTest.php
deleted file mode 100644
index 3fc2cb6c..00000000
--- a/vendor/rollbar/rollbar/tests/VerboseTest.php
+++ /dev/null
@@ -1,1135 +0,0 @@
-
- * @author Rollbar, Inc.
- */
-class VerbosityTest extends BaseRollbarTest
-{
-
- /**
- * Prepare session
- *
- * @return void
- */
- public function setUp()
- {
- $_SESSION = array();
- parent::setUp();
- }
-
- /**
- * Clean up Rollbar and the verbose logger handler mock for
- * the next test
- *
- * @return void
- */
- public function tearDown()
- {
- $this->verboseHandlerMock = null;
- Rollbar::destroy();
- parent::tearDown();
- }
-
- /**
- * Test verbosity of \Rollbar\RollbarLogger::log with
- * `enabled` == true.
- *
- * @return void
- */
- public function testRollbarLoggerEnabled()
- {
- $unitTest = $this;
- $this->rollbarLogTest(
- array( // config
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php",
- "enabled" => true
- ),
- function () use ($unitTest) {
- // verbosity expectations
- $unitTest->expectLog(
- 0,
- '/Attempting to log: \[warning\] Testing PHP Notifier/',
- \Psr\Log\LogLevel::INFO
- );
- $unitTest->expectLog(
- 1,
- '/Occurrence/',
- \Psr\Log\LogLevel::INFO
- );
- }
- );
- }
-
- /**
- * Test verbosity of \Rollbar\RollbarLogger::log with
- * `enabled` == false.
- *
- * @return void
- */
- public function testRollbarLoggerDisabled()
- {
- $unitTest = $this;
- $this->rollbarLogTest(
- array( // config
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php",
- "enabled" => false
- ),
- function () use ($unitTest) {
- // verbosity expectations
- $unitTest->expectLog(0, '/Rollbar is disabled/', \Psr\Log\LogLevel::NOTICE);
- }
- );
- }
-
- /**
- * Test verbosity of \Rollbar\RollbarLogger::log with
- * an invalid log level passed in the method call.
- *
- * @return void
- */
- public function testRollbarLoggerInvalidLogLevel()
- {
- $unitTest = $this;
- $this->rollbarLogTest(
- array( // config
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php"
- ),
- function () use ($unitTest) {
- // verbosity expectations
- $unitTest->expectLog(0, '/Invalid log level \'nolevel\'\./', \Psr\Log\LogLevel::ERROR);
- },
- 'nolevel' // rollbar message level
- );
- }
-
- /**
- * Test verbosity of \Rollbar\RollbarLogger::log when an
- * occurrence gets ignored for whatever reason.
- *
- * @return void
- */
- public function testRollbarLoggerInternalCheckIgnored()
- {
- $unitTest = $this;
- $errorReporting = \error_reporting();
- $this->rollbarLogTest(
- array( // config
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php"
- ),
- function () use ($unitTest) {
- // verbosity expectations
- $unitTest->expectLog(2, '/Occurrence ignored/', \Psr\Log\LogLevel::INFO);
- },
- \Psr\Log\LogLevel::INFO, // rollbar message level
- function () {
- // test setup
- \error_reporting(0);
- },
- function () use ($errorReporting) {
- // test teardown
- \error_reporting($errorReporting);
- }
- );
- }
-
- /**
- * Test verbosity of \Rollbar\RollbarLogger::log when an
- * occurrence gets ignored due to check ignore
- *
- * @return void
- */
- public function testRollbarLoggerCheckIgnored()
- {
- $unitTest = $this;
- $this->rollbarLogTest(
- array( // config
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php",
- "check_ignore" => function () {
- return true;
- }
- ),
- function () use ($unitTest) {
- // verbosity expectations
- $unitTest->expectLog(2, '/Occurrence ignored/', \Psr\Log\LogLevel::INFO);
- },
- \Psr\Log\LogLevel::INFO // rollbar message level
- );
- }
-
- /**
- * Test verbosity of \Rollbar\RollbarLogger::log when
- * `max_items` is reached.
- *
- * @return void
- */
- public function testRollbarLoggerSendMaxItems()
- {
- $unitTest = $this;
- $this->rollbarLogTest(
- array( // config
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php",
- "max_items" => 0
- ),
- function () use ($unitTest) {
- // verbosity expectations
- $unitTest->expectLog(
- 1,
- '/Maximum number of items per request has been reached.*/',
- \Psr\Log\LogLevel::WARNING
- );
- },
- \Psr\Log\LogLevel::INFO // rollbar message level
- );
- }
-
- /**
- * Test verbosity of \Rollbar\RollbarLogger::log for adding
- * occurrences to the queue when `batched` == true.
- *
- * @return void
- */
- public function testRollbarLoggerSendBatched()
- {
- $unitTest = $this;
- $this->rollbarLogTest(
- array( // config
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php",
- "batched" => true
- ),
- function () use ($unitTest) {
- // verbosity expectations
- $unitTest->expectLog(
- 1,
- '/Added payload to the queue \(running in `batched` mode\)\./',
- \Psr\Log\LogLevel::DEBUG
- );
- },
- \Psr\Log\LogLevel::INFO // rollbar message level
- );
- }
-
- /**
- * Test verbosity of \Rollbar\RollbarLogger::flush
- *
- * @return void
- */
- public function testRollbarLoggerFlush()
- {
- $unitTest = $this;
- $rollbarLogger = $this->verboseRollbarLogger(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php"
- ));
-
- $this->configurableObjectVerbosityTest(
- $rollbarLogger,
- function () use ($rollbarLogger) {
- // logic under test
- $rollbarLogger->flush();
- },
- function () use ($unitTest) {
- // verbosity expectations
- $unitTest->expectLog(
- 0,
- '/Queue flushed/',
- \Psr\Log\LogLevel::DEBUG
- );
- }
- );
- }
-
- /**
- * Test verbosity of \Rollbar\RollbarLogger::log for reports
- * rejected by the SDK (response status == 0).
- *
- * @return void
- */
- public function testRollbarLoggerResponseStatusZero()
- {
- $unitTest = $this;
- $this->rollbarLogTest(
- array( // config
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php",
- "check_ignore" => function () {
- return true;
- }
- ),
- function () use ($unitTest) {
- // verbosity expectations
- $unitTest->expectLog(
- 3,
- '/Occurrence rejected by the SDK: .*/',
- \Psr\Log\LogLevel::ERROR
- );
- },
- \Psr\Log\LogLevel::INFO // rollbar message level
- );
- }
-
- /**
- * Test verbosity of \Rollbar\RollbarLogger::log for reports
- * rejected by the API (response status >= 400).
- *
- * @return void
- */
- public function testRollbarLoggerResponseStatusError()
- {
- $unitTest = $this;
- $this->rollbarLogTest(
- array( // config
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php",
- "endpoint" => "https://api.rollbar.com/api/foo/"
- ),
- function () use ($unitTest) {
- // verbosity expectations
- $unitTest->expectLog(
- 1,
- '/Occurrence rejected by the API: .*/',
- \Psr\Log\LogLevel::ERROR
- );
- },
- \Psr\Log\LogLevel::INFO // rollbar message level
- );
- }
-
- /**
- * Test verbosity of \Rollbar\RollbarLogger::log for reports
- * successfully processed.
- *
- * @return void
- */
- public function testRollbarLoggerResponseStatusSuccess()
- {
- $unitTest = $this;
- $this->rollbarLogTest(
- array( // config
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php"
- ),
- function () use ($unitTest) {
- // verbosity expectations
- $unitTest->expectLog(
- 1,
- '/Occurrence successfully logged/',
- \Psr\Log\LogLevel::INFO
- );
- },
- \Psr\Log\LogLevel::INFO // rollbar message level
- );
- }
-
- /**
- * Test verbosity of \Rollbar\Config::internalCheckIgnored
- * when error_reporting === 0.
- *
- * @return void
- */
- public function testRollbarConfigInternalCheckIgnoredShouldSuppress()
- {
- $unitTest = $this;
- $config = $this->verboseRollbarConfig(array( // config
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php"
- ));
- $errorReporting = \error_reporting();
-
- $this->configurableObjectVerbosityTest(
-
- $config,
- function () use ($config) {
- // logic under test
- $config->internalCheckIgnored(\Psr\Log\LogLevel::WARNING, "Some message");
- },
- function () use ($unitTest) {
- // verbosity expectations
- $unitTest->expectLog(
- 0,
- '/Ignoring \(error reporting has been disabled in PHP config\)/',
- \Psr\Log\LogLevel::DEBUG
- );
- },
- function () {
- // test setup
- \error_reporting(0);
- },
- function () use ($errorReporting) {
- // test cleanup
-
- \error_reporting($errorReporting);
- }
- );
- }
-
- /**
- * Test verbosity of \Rollbar\Config::internalCheckIgnored when an
- * occurrence gets ignored due to occurrence level being
- * too low (`minimum_level` < log_level).
- *
- * @return void
- */
- public function testRollbarConfigInternalCheckIgnoredLevelTooLow()
- {
- $unitTest = $this;
- $config = $this->verboseRollbarConfig(array( // config
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php",
- "minimum_level" => \Psr\Log\LogLevel::ERROR
- ));
-
- $this->configurableObjectVerbosityTest(
-
- $config,
- function () use ($config) {
- // logic under test
- $config->internalCheckIgnored(\Psr\Log\LogLevel::WARNING, "Some message");
- },
- function () use ($unitTest) {
- // verbosity expectations
- $unitTest->expectLog(
- 0,
- '/Occurrence\'s level is too low/',
- \Psr\Log\LogLevel::DEBUG
- );
- }
- );
- }
-
- /**
- * Test verbosity of \Rollbar\Config::shouldIgnoreError when
- * `use_error_reporting` == true and the error level is
- * below allowed error_reporting() level.
- *
- * @return void
- */
- public function testRollbarConfigShouldIgnoreErrorErrorReporting()
- {
- $unitTest = $this;
- $config = $this->verboseRollbarConfig(array( // config
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php",
- "use_error_reporting" => true
- ));
- $errorReporting = \error_reporting();
-
- $this->configurableObjectVerbosityTest(
-
- $config,
- function () use ($config) {
- // logic under test
- $config->shouldIgnoreError(\E_WARNING);
- },
- function () use ($unitTest) {
- // verbosity expectations
- $unitTest->expectLog(
- 0,
- '/Ignore \(error below allowed error_reporting level\)/',
- \Psr\Log\LogLevel::DEBUG
- );
- },
- function () {
- // test setup
- \error_reporting(\E_ERROR);
- },
- function () use ($errorReporting) {
- // test tear down
- \error_reporting($errorReporting);
- }
- );
- }
-
- /**
- * Test verbosity of \Rollbar\Config::shouldIgnoreError when
- * `included_errno` is set.
- *
- * @return void
- */
- public function testRollbarConfigShouldIgnoreErrorIncludedErrno()
- {
- $unitTest = $this;
- $config = $this->verboseRollbarConfig(array( // config
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php",
- "included_errno" => \E_WARNING
- ));
- $errorReporting = \error_reporting();
-
- $this->configurableObjectVerbosityTest(
-
- $config,
- function () use ($config) {
- // logic under test
- $config->shouldIgnoreError(\E_ERROR);
- },
- function () use ($unitTest) {
- // verbosity expectations
- $unitTest->expectLog(
- 0,
- '/Ignore due to included_errno level/',
- \Psr\Log\LogLevel::DEBUG
- );
- },
- function () {
- // test setup
- \error_reporting(0);
- },
- function () use ($errorReporting) {
- // test tear down
- \error_reporting($errorReporting);
- }
- );
- }
-
- /**
- * Test verbosity of \Rollbar\Config::shouldIgnoreError when
- * the error is skipped due to error sample rates.
- *
- * @return void
- */
- public function testRollbarConfigShouldIgnoreErrorErrorSampleRates()
- {
- $unitTest = $this;
- $config = $this->verboseRollbarConfig(array( // config
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php",
- "error_sample_rates" => array(
- \E_WARNING => 0
- )
- ));
-
- $this->configurableObjectVerbosityTest(
-
- $config,
- function () use ($config) {
- // logic under test
- $config->shouldIgnoreError(\E_WARNING);
- },
- function () use ($unitTest) {
- // verbosity expectations
- $unitTest->expectLog(
- 0,
- '/Skip due to error sample rating/',
- \Psr\Log\LogLevel::DEBUG
- );
- }
- );
- }
-
- /**
- * Test verbosity of \Rollbar\Config::shouldIgnoreException when
- * the exception is skipped due to exception sample rates.
- *
- * @return void
- */
- public function testRollbarConfigShouldIgnoreException()
- {
- $unitTest = $this;
- $config = $this->verboseRollbarConfig(array( // config
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php",
- "exception_sample_rates" => array(
- 'Exception' => 0
- )
- ));
-
- $this->configurableObjectVerbosityTest(
-
- $config,
- function () use ($config) {
- // logic under test
- $config->shouldIgnoreException(new \Exception());
- },
- function () use ($unitTest) {
- // verbosity expectations
- $unitTest->expectLog(
- 0,
- '/Skip exception due to exception sample rating/',
- \Psr\Log\LogLevel::DEBUG
- );
- }
- );
- }
-
- /**
- * Test verbosity of \Rollbar\Config::checkIgnored due to custom
- * `check_ignore` logic.
- *
- * @return void
- */
- public function testRollbarConfigCheckIgnored()
- {
- $unitTest = $this;
- $config = $this->verboseRollbarConfig(array( // config
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php",
- "check_ignore" => function () {
- return true;
- }
- ));
-
- $this->configurableObjectVerbosityTest(
-
- $config,
- function () use ($config, $unitTest) {
- // logic under test
- $dataMock = $unitTest->getMockBuilder('\Rollbar\Payload\Data')
- ->disableOriginalConstructor()
- ->getMock();
- $dataMock->method('getLevel')->willReturn(\Rollbar\Payload\Level::INFO());
- $payloadMock = $unitTest->getMockBuilder('\Rollbar\Payload\Payload')
- ->disableOriginalConstructor()
- ->getMock();
- $payloadMock->method('getData')->willReturn($dataMock);
- $config->checkIgnored(
- $payloadMock,
- $unitTest->getTestAccessToken(),
- $payloadMock,
- false
- );
- },
- function () use ($unitTest) {
- // verbosity expectations
- $unitTest->expectLog(
- 0,
- '/Occurrence ignored due to custom check_ignore logic/',
- \Psr\Log\LogLevel::INFO
- );
- }
- );
- }
-
- /**
- * Test verbosity of \Rollbar\Config::checkIgnored due an exception
- * in the custom check_ginore logic.
- *
- * @return void
- */
- public function testRollbarConfigCheckIgnoredException()
- {
- $unitTest = $this;
- $config = $this->verboseRollbarConfig(array( // config
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php",
- "check_ignore" => function () {
- throw new \Exception();
- }
- ));
-
- $this->configurableObjectVerbosityTest(
-
- $config,
- function () use ($config, $unitTest) {
- // logic under test
- $data = $config->getRollbarData(\Rollbar\Payload\Level::INFO, 'some message', array());
- $payload = new \Rollbar\Payload\Payload($data, $unitTest->getTestAccessToken());
- $config->checkIgnored($payload, $unitTest->getTestAccessToken(), 'some message', false);
- },
- function () use ($unitTest) {
- // verbosity expectations
- $unitTest->expectLog(
- 0,
- '/Exception occurred in the custom checkIgnore logic:.*/',
- \Psr\Log\LogLevel::ERROR
- );
- }
- );
- }
-
- /**
- * Test verbosity of \Rollbar\Config::checkIgnored due the message
- * being below `minimum_level`.
- *
- * @return void
- */
- public function testRollbarConfigCheckIgnoredPayloadLevelTooLow()
- {
- $unitTest = $this;
- $config = $this->verboseRollbarConfig(array( // config
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php",
- "minimum_level" => \Rollbar\Payload\Level::ERROR
- ));
-
- $this->configurableObjectVerbosityTest(
-
- $config,
- function () use ($config, $unitTest) {
- // logic under test
- $data = $config->getRollbarData(\Rollbar\Payload\Level::INFO, 'some message', array());
- $payload = new \Rollbar\Payload\Payload($data, $unitTest->getTestAccessToken());
- $config->checkIgnored($payload, $unitTest->getTestAccessToken(), 'some message', false);
- },
- function () use ($unitTest) {
- // verbosity expectations
- $unitTest->expectLog(
- 0,
- '/Occurrence\'s level is too low/',
- \Psr\Log\LogLevel::DEBUG
- );
- }
- );
- }
-
- /**
- * Test verbosity of \Rollbar\Config::checkIgnored due the
- * custom `filter`.
- *
- * @return void
- */
- public function testRollbarConfigCheckIgnoredFilter()
- {
- $unitTest = $this;
- $filterMock = $this->getMockBuilder('\Rollbar\FilterInterface')->getMock();
- $filterMock->method('shouldSend')->willReturn(true);
-
- $config = $this->verboseRollbarConfig(array( // config
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php",
- "filter" => $filterMock
- ));
-
- $this->configurableObjectVerbosityTest(
-
- $config,
- function () use ($config, $unitTest) {
- // logic under test
- $data = $config->getRollbarData(\Rollbar\Payload\Level::INFO, 'some message', array());
- $payload = new \Rollbar\Payload\Payload($data, $unitTest->getTestAccessToken());
- $config->checkIgnored($payload, $unitTest->getTestAccessToken(), 'some message', false);
- },
- function () use ($unitTest) {
- // verbosity expectations
- $unitTest->expectLog(
- 0,
- '/Custom filter result: true/',
- \Psr\Log\LogLevel::DEBUG
- );
- }
- );
- }
-
- /**
- * Test verbosity of \Rollbar\Config::send due the
- * custom `transmit` == false.
- *
- * @return void
- */
- public function testRollbarConfigSendTransmit()
- {
- $unitTest = $this;
- $config = $this->verboseRollbarConfig(array( // config
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php",
- "transmit" => false
- ));
-
- $this->configurableObjectVerbosityTest(
-
- $config,
- function () use ($config, $unitTest) {
- // logic under test
- $encoded = new \Rollbar\Payload\EncodedPayload(array());
- $config->send($encoded, $unitTest->getTestAccessToken());
- },
- function () use ($unitTest) {
- // verbosity expectations
- $unitTest->expectLog(
- 0,
- '/Not transmitting \(transmitting disabled in configuration\)/',
- \Psr\Log\LogLevel::WARNING
- );
- }
- );
- }
-
- /**
- * Test verbosity of \Rollbar\Config::sendBatch due the
- * custom `transmit` == false.
- *
- * @return void
- */
- public function testRollbarConfigSendBatchTransmit()
- {
- $unitTest = $this;
- $config = $this->verboseRollbarConfig(array( // config
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php",
- "transmit" => false,
- "batched" => true
- ));
-
- $this->configurableObjectVerbosityTest(
-
- $config,
- function () use ($config) {
- // logic under test
- $batch = array();
- $config->sendBatch($batch, null);
- },
- function () use ($unitTest) {
- // verbosity expectations
- $unitTest->expectLog(
- 0,
- '/Not transmitting \(transmitting disabled in configuration\)/',
- \Psr\Log\LogLevel::WARNING
- );
- }
- );
- }
-
- /**
- * Test verbosity of \Rollbar\Config::handleResponse with
- * custom `responseHandler`.
- *
- * @return void
- */
- public function testRollbarConfigHandleResponse()
- {
- $unitTest = $this;
- $responseHandlerMock = $this->getMockBuilder('\Rollbar\ResponseHandlerInterface')->getMock();
- $config = $this->verboseRollbarConfig(array( // config
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php",
- "responseHandler" => $responseHandlerMock
- ));
-
- $this->configurableObjectVerbosityTest(
-
- $config,
- function () use ($config, $unitTest) {
- // logic under test
- $payloadMock = $unitTest->getMockBuilder('\Rollbar\Payload')
- ->disableOriginalConstructor()
- ->getMock();
- $responseMock = $unitTest->getMockBuilder('\Rollbar\Response')
- ->disableOriginalConstructor()
- ->getMock();
- $config->handleResponse($payloadMock, $responseMock);
- },
- function () use ($unitTest) {
- // verbosity expectations
- $unitTest->expectLog(
- 0,
- '/Applying custom response handler: .*/',
- \Psr\Log\LogLevel::DEBUG
- );
- }
- );
- }
-
- /**
- * Test verbosity of \Rollbar\Truncation\Truncation::registerStrategy
- * in truncate method.
- *
- * @return void
- */
- public function testRollbarTruncation()
- {
- $unitTest = $this;
- $rollbarLogger = $this->verboseRollbarLogger(array(
- "access_token" => $this->getTestAccessToken(),
- "environment" => "testing-php"
- ));
-
- $this->configurableObjectVerbosityTest(
-
- $rollbarLogger,
- function () use ($rollbarLogger) {
- // logic under test
- $rollbarLogger->log(
- \Rollbar\Payload\Level::INFO,
- \str_repeat("x", \Rollbar\Truncation\Truncation::MAX_PAYLOAD_SIZE),
- array()
- );
- },
- function () use ($unitTest) {
- // verbosity expectations
- $unitTest->expectLog(
- 1,
- '/Applying truncation strategy .*/',
- \Psr\Log\LogLevel::DEBUG
- );
- }
- );
- }
-
- /**
- * @var mock $verboseHandlerMock The verboser log handler used for
- * verbose logging in tests.
- */
- private $verboseHandlerMock;
-
- /**
- * Test helper for creating \Rollbar\RollbarLogger or
- * \Rollbar\Config objects. It also sets up
- * the $this->verboseHandlerMock to the one used in
- * the created object.
- *
- * @param array $config Config array used to configure
- * the $object.
- * @param \Rollbar\RollbarLogger|\Rollbar\Config $object
- * Object to be set up for the test.
- */
- private function prepareForLogMocking($config, $object)
- {
- $verboseLogger = new \Monolog\Logger('rollbar.verbose.test');
-
- $object->configure(array_merge($config, array(
- 'verbose_logger' => $verboseLogger
- )));
-
- $verbose = isset($config['verbose']) ?
- $config['verbose'] :
- \Rollbar\Config::VERBOSE_NONE;
-
- if ($verbose == \Rollbar\Config::VERBOSE_NONE) {
- $verbose = \Rollbar\Config::VERBOSE_NONE_INT;
- } else {
- $verbose = \Monolog\Logger::toMonologLevel($verbose);
- }
-
- $handlerMock = $this->getMockBuilder('\Monolog\Handler\AbstractHandler')
- ->setMethods(array('handle'))
- ->getMock();
- $handlerMock->setLevel($verbose);
-
- $verboseLogger->setHandlers(array($handlerMock));
-
- $this->verboseHandlerMock = $handlerMock;
-
- return $object;
- }
-
- /**
- * This is a convenience method for creating properly configured
- * Rollbar config objects for testing verbosity. It also sets up
- * the $this->verboseHandlerMock to the one used in the created
- * Rollbar logger.
- *
- * @param array $config Configuration options for Rollbar
- * @return \Rollbar\Config
- */
- private function verboseRollbarConfig($config)
- {
- return $this->prepareForLogMocking(
- $config,
- new \Rollbar\Config($config)
- );
- }
-
- /**
- * This is a convenience method for creating properly configured
- * Rollbar logger objects for testing verbosity. It also sets up
- * the $this->verboseHandlerMock to the one used in the created
- * Rollbar logger.
- *
- * @param array $config Configuration options for Rollbar
- * @return \Rollbar\RollbarLogger
- */
- private function verboseRollbarLogger($config)
- {
- return $this->prepareForLogMocking(
- $config,
- new \Rollbar\RollbarLogger($config)
- );
- }
-
- /**
- * Convenience method for asserting verbose logging calls on the
- * handler mock.
- *
- * @param string $messageRegEx Regular expression against which the
- * log message will be asserted.
- * @param string $level The level of the log recorded which will
- * be asserted.
- */
- private function withLogParams($messageRegEx, $level)
- {
- return $this->callback(function ($record) use ($messageRegEx, $level) {
- return
- \preg_match($messageRegEx, $record['message']) &&
- strtolower($record['level_name']) == strtolower($level);
- });
- }
-
- /**
- * Convenience method to expect verbose log messages
- * on the verbose log handler mock.
- *
- * @param integer $at The incrementing number indicating the order
- * of the log message.
- * @param string $messageRegEx Regex against which the log message
- * will be asserted.
- * @param string $level The log level against which the log will
- * be asserted.
- * @param mock|null $handlerMock (optional) The handler mock on which to set the
- * expectations.
- */
- public function expectLog($at, $messageRegEx, $level, $handlerMock = null)
- {
- if ($handlerMock === null) {
- $handlerMock = $this->verboseHandlerMock;
- }
-
- $handlerMock
- ->expects($this->at($at))
- ->method('handle')
- ->with(
- $this->withLogParams($messageRegEx, $level)
- );
- }
-
- /**
- * Convenience method to expect a quiet verbose log handler mock.
- *
- * @param mock|null $handlerMock (optional) The handler mock on which to set the
- * expectations.
- */
- public function expectQuiet($handlerMock = null)
- {
- if ($handlerMock === null) {
- $handlerMock = $this->verboseHandlerMock;
- }
-
- $handlerMock
- ->expects($this->never())
- ->method('handle');
- }
-
- /**
- * Test helper providing a quiet and verbose scenario testing
- * for given functionality. Passing `verbose` config option
- * to the initial config is not needed as the method takes
- * care of performing assertions in both quiet and verbose scenarios.
- *
- * @param \Rollbar\RollbarLogger|\Rollbar\Config $object Object under test.
- * @param callback $test Logic under test
- * @param callback $verboseExpectations A callback with
- * expectations to be set on the verbose logger handler mock
- * in the verbose scenario.
- * @param callback $pre (optional) Logic to be executed before test.
- * @param callback $post (optional) Logic to be executed after the test
- */
- private function configurableObjectVerbosityTest(
- $object,
- $test,
- $verboseExpectations,
- $pre = null,
- $post = null
- ) {
- $unitTest = $this;
- // Quiet scenario
- $this->prepareForLogMocking(
- array('verbose' => \Rollbar\Config::VERBOSE_NONE),
- $object
- );
- $this->withTestLambdas(
- $test,
- function () use ($unitTest) {
- $unitTest->expectQuiet();
- },
- $pre,
- $post
- );
-
- // Verbose scenario
- $this->prepareForLogMocking(
- array('verbose' => \Psr\Log\LogLevel::DEBUG),
- $object
- );
- $this->withTestLambdas(
- $test,
- $verboseExpectations,
- $pre,
- $post
- );
- }
-
- /**
- * Test helper for performing verbosity tests
- *
- * @param callback $test Logic under test.
- * @param callback $expectations Logic with expectations.
- * @param callback $pre (optional) Test set up.
- * @param callback $post (optional) Test tear down.
- */
- private function withTestLambdas(
- $test,
- $expectations,
- $pre = null,
- $post = null
- ) {
- if ($pre !== null) {
- $pre();
- }
-
- $expectations();
-
- $test();
-
- if ($post !== null) {
- $post();
- }
- }
-
- /**
- * Convenience test helper for a Rollbar logger log test with
- * a verbose logger handler mock. Passing `verbose` config option
- * to the initial config is not needed as
- * `configurableObjectVerbosityTest` takes care of performing
- * assertions in both quiet and verbose scenarios.
- *
- * @param array $config Configuration for Rollbar logger.
- * @param callback $expectations A callback with expectations to be
- * set on the verbose logger handler mock.
- * @param string $messageLevel (optional) The level of the Rollbar log
- * message invoked.
- * @param callback $pre (optional) Logic to be executed before test.
- * @param callback $post (optional) Logic to be executed after the test
- */
- private function rollbarLogTest(
- $config,
- $expectations,
- $messageLevel = Level::WARNING,
- $pre = null,
- $post = null
- ) {
- $rollbarLogger = $this->verboseRollbarLogger($config);
-
- $this->configurableObjectVerbosityTest(
- $rollbarLogger,
- function () use ($rollbarLogger, $messageLevel) {
- try {
- $rollbarLogger->log($messageLevel, "Testing PHP Notifier", array());
- } catch (\Exception $exception) {
- } // discard exceptions - that's what's under test here
- },
- $expectations,
- $pre,
- $post
- );
- }
-}
diff --git a/vendor/rollbar/rollbar/tests/bootstrap.php b/vendor/rollbar/rollbar/tests/bootstrap.php
deleted file mode 100644
index 1832e2ea..00000000
--- a/vendor/rollbar/rollbar/tests/bootstrap.php
+++ /dev/null
@@ -1,4 +0,0 @@
-.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- * Neither the name of Sebastian Bergmann nor the names of his
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/sebastian/comparator/README.md b/vendor/sebastian/comparator/README.md
deleted file mode 100644
index 2409c347..00000000
--- a/vendor/sebastian/comparator/README.md
+++ /dev/null
@@ -1,39 +0,0 @@
-[](https://travis-ci.org/sebastianbergmann/comparator)
-
-# Comparator
-
-This component provides the functionality to compare PHP values for equality.
-
-## Installation
-
-You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/):
-
- composer require sebastian/comparator
-
-If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:
-
- composer require --dev sebastian/comparator
-
-## Usage
-
-```php
-getComparatorFor($date1, $date2);
-
-try {
- $comparator->assertEquals($date1, $date2);
- print "Dates match";
-}
-
-catch (ComparisonFailure $failure) {
- print "Dates don't match";
-}
-```
-
diff --git a/vendor/sebastian/comparator/build.xml b/vendor/sebastian/comparator/build.xml
deleted file mode 100644
index 552ebce6..00000000
--- a/vendor/sebastian/comparator/build.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/vendor/sebastian/comparator/build/travis-ci.xml b/vendor/sebastian/comparator/build/travis-ci.xml
deleted file mode 100644
index 751a3bc3..00000000
--- a/vendor/sebastian/comparator/build/travis-ci.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
- ../tests
-
-
-
diff --git a/vendor/sebastian/comparator/composer.json b/vendor/sebastian/comparator/composer.json
deleted file mode 100644
index 38db40e8..00000000
--- a/vendor/sebastian/comparator/composer.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- "name": "sebastian/comparator",
- "description": "Provides the functionality to compare PHP values for equality",
- "keywords": ["comparator","compare","equality"],
- "homepage": "http://www.github.com/sebastianbergmann/comparator",
- "license": "BSD-3-Clause",
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- },
- {
- "name": "Jeff Welch",
- "email": "whatthejeff@gmail.com"
- },
- {
- "name": "Volker Dusch",
- "email": "github@wallbash.com"
- },
- {
- "name": "Bernhard Schussek",
- "email": "bschussek@2bepublished.at"
- }
- ],
- "require": {
- "php": ">=5.3.3",
- "sebastian/diff": "~1.2",
- "sebastian/exporter": "~1.2 || ~2.0"
- },
- "require-dev": {
- "phpunit/phpunit": "~4.4"
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "extra": {
- "branch-alias": {
- "dev-master": "1.2.x-dev"
- }
- }
-}
-
diff --git a/vendor/sebastian/comparator/phpunit.xml.dist b/vendor/sebastian/comparator/phpunit.xml.dist
deleted file mode 100644
index e1eaf2c8..00000000
--- a/vendor/sebastian/comparator/phpunit.xml.dist
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
- tests
-
-
-
-
-
-
-
-
- src
-
-
-
-
diff --git a/vendor/sebastian/comparator/src/ArrayComparator.php b/vendor/sebastian/comparator/src/ArrayComparator.php
deleted file mode 100644
index 16f805d3..00000000
--- a/vendor/sebastian/comparator/src/ArrayComparator.php
+++ /dev/null
@@ -1,132 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-/**
- * Compares arrays for equality.
- */
-class ArrayComparator extends Comparator
-{
- /**
- * Returns whether the comparator can compare two values.
- *
- * @param mixed $expected The first value to compare
- * @param mixed $actual The second value to compare
- * @return bool
- */
- public function accepts($expected, $actual)
- {
- return is_array($expected) && is_array($actual);
- }
-
- /**
- * Asserts that two values are equal.
- *
- * @param mixed $expected First value to compare
- * @param mixed $actual Second value to compare
- * @param float $delta Allowed numerical distance between two values to consider them equal
- * @param bool $canonicalize Arrays are sorted before comparison when set to true
- * @param bool $ignoreCase Case is ignored when set to true
- * @param array $processed List of already processed elements (used to prevent infinite recursion)
- *
- * @throws ComparisonFailure
- */
- public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = array())
- {
- if ($canonicalize) {
- sort($expected);
- sort($actual);
- }
-
- $remaining = $actual;
- $expString = $actString = "Array (\n";
- $equal = true;
-
- foreach ($expected as $key => $value) {
- unset($remaining[$key]);
-
- if (!array_key_exists($key, $actual)) {
- $expString .= sprintf(
- " %s => %s\n",
- $this->exporter->export($key),
- $this->exporter->shortenedExport($value)
- );
-
- $equal = false;
-
- continue;
- }
-
- try {
- $comparator = $this->factory->getComparatorFor($value, $actual[$key]);
- $comparator->assertEquals($value, $actual[$key], $delta, $canonicalize, $ignoreCase, $processed);
-
- $expString .= sprintf(
- " %s => %s\n",
- $this->exporter->export($key),
- $this->exporter->shortenedExport($value)
- );
- $actString .= sprintf(
- " %s => %s\n",
- $this->exporter->export($key),
- $this->exporter->shortenedExport($actual[$key])
- );
- } catch (ComparisonFailure $e) {
- $expString .= sprintf(
- " %s => %s\n",
- $this->exporter->export($key),
- $e->getExpectedAsString()
- ? $this->indent($e->getExpectedAsString())
- : $this->exporter->shortenedExport($e->getExpected())
- );
-
- $actString .= sprintf(
- " %s => %s\n",
- $this->exporter->export($key),
- $e->getActualAsString()
- ? $this->indent($e->getActualAsString())
- : $this->exporter->shortenedExport($e->getActual())
- );
-
- $equal = false;
- }
- }
-
- foreach ($remaining as $key => $value) {
- $actString .= sprintf(
- " %s => %s\n",
- $this->exporter->export($key),
- $this->exporter->shortenedExport($value)
- );
-
- $equal = false;
- }
-
- $expString .= ')';
- $actString .= ')';
-
- if (!$equal) {
- throw new ComparisonFailure(
- $expected,
- $actual,
- $expString,
- $actString,
- false,
- 'Failed asserting that two arrays are equal.'
- );
- }
- }
-
- protected function indent($lines)
- {
- return trim(str_replace("\n", "\n ", $lines));
- }
-}
diff --git a/vendor/sebastian/comparator/src/Comparator.php b/vendor/sebastian/comparator/src/Comparator.php
deleted file mode 100644
index 54831673..00000000
--- a/vendor/sebastian/comparator/src/Comparator.php
+++ /dev/null
@@ -1,64 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-use SebastianBergmann\Exporter\Exporter;
-
-/**
- * Abstract base class for comparators which compare values for equality.
- */
-abstract class Comparator
-{
- /**
- * @var Factory
- */
- protected $factory;
-
- /**
- * @var Exporter
- */
- protected $exporter;
-
- public function __construct()
- {
- $this->exporter = new Exporter;
- }
-
- /**
- * @param Factory $factory
- */
- public function setFactory(Factory $factory)
- {
- $this->factory = $factory;
- }
-
- /**
- * Returns whether the comparator can compare two values.
- *
- * @param mixed $expected The first value to compare
- * @param mixed $actual The second value to compare
- * @return bool
- */
- abstract public function accepts($expected, $actual);
-
- /**
- * Asserts that two values are equal.
- *
- * @param mixed $expected First value to compare
- * @param mixed $actual Second value to compare
- * @param float $delta Allowed numerical distance between two values to consider them equal
- * @param bool $canonicalize Arrays are sorted before comparison when set to true
- * @param bool $ignoreCase Case is ignored when set to true
- *
- * @throws ComparisonFailure
- */
- abstract public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false);
-}
diff --git a/vendor/sebastian/comparator/src/ComparisonFailure.php b/vendor/sebastian/comparator/src/ComparisonFailure.php
deleted file mode 100644
index 2c254538..00000000
--- a/vendor/sebastian/comparator/src/ComparisonFailure.php
+++ /dev/null
@@ -1,129 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-use SebastianBergmann\Diff\Differ;
-
-/**
- * Thrown when an assertion for string equality failed.
- */
-class ComparisonFailure extends \RuntimeException
-{
- /**
- * Expected value of the retrieval which does not match $actual.
- * @var mixed
- */
- protected $expected;
-
- /**
- * Actually retrieved value which does not match $expected.
- * @var mixed
- */
- protected $actual;
-
- /**
- * The string representation of the expected value
- * @var string
- */
- protected $expectedAsString;
-
- /**
- * The string representation of the actual value
- * @var string
- */
- protected $actualAsString;
-
- /**
- * @var bool
- */
- protected $identical;
-
- /**
- * Optional message which is placed in front of the first line
- * returned by toString().
- * @var string
- */
- protected $message;
-
- /**
- * Initialises with the expected value and the actual value.
- *
- * @param mixed $expected Expected value retrieved.
- * @param mixed $actual Actual value retrieved.
- * @param string $expectedAsString
- * @param string $actualAsString
- * @param bool $identical
- * @param string $message A string which is prefixed on all returned lines
- * in the difference output.
- */
- public function __construct($expected, $actual, $expectedAsString, $actualAsString, $identical = false, $message = '')
- {
- $this->expected = $expected;
- $this->actual = $actual;
- $this->expectedAsString = $expectedAsString;
- $this->actualAsString = $actualAsString;
- $this->message = $message;
- }
-
- /**
- * @return mixed
- */
- public function getActual()
- {
- return $this->actual;
- }
-
- /**
- * @return mixed
- */
- public function getExpected()
- {
- return $this->expected;
- }
-
- /**
- * @return string
- */
- public function getActualAsString()
- {
- return $this->actualAsString;
- }
-
- /**
- * @return string
- */
- public function getExpectedAsString()
- {
- return $this->expectedAsString;
- }
-
- /**
- * @return string
- */
- public function getDiff()
- {
- if (!$this->actualAsString && !$this->expectedAsString) {
- return '';
- }
-
- $differ = new Differ("\n--- Expected\n+++ Actual\n");
-
- return $differ->diff($this->expectedAsString, $this->actualAsString);
- }
-
- /**
- * @return string
- */
- public function toString()
- {
- return $this->message . $this->getDiff();
- }
-}
diff --git a/vendor/sebastian/comparator/src/DOMNodeComparator.php b/vendor/sebastian/comparator/src/DOMNodeComparator.php
deleted file mode 100644
index db624b79..00000000
--- a/vendor/sebastian/comparator/src/DOMNodeComparator.php
+++ /dev/null
@@ -1,107 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-use DOMDocument;
-use DOMNode;
-
-/**
- * Compares DOMNode instances for equality.
- */
-class DOMNodeComparator extends ObjectComparator
-{
- /**
- * Returns whether the comparator can compare two values.
- *
- * @param mixed $expected The first value to compare
- * @param mixed $actual The second value to compare
- * @return bool
- */
- public function accepts($expected, $actual)
- {
- return $expected instanceof DOMNode && $actual instanceof DOMNode;
- }
-
- /**
- * Asserts that two values are equal.
- *
- * @param mixed $expected First value to compare
- * @param mixed $actual Second value to compare
- * @param float $delta Allowed numerical distance between two values to consider them equal
- * @param bool $canonicalize Arrays are sorted before comparison when set to true
- * @param bool $ignoreCase Case is ignored when set to true
- * @param array $processed List of already processed elements (used to prevent infinite recursion)
- *
- * @throws ComparisonFailure
- */
- public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = array())
- {
- $expectedAsString = $this->nodeToText($expected, true, $ignoreCase);
- $actualAsString = $this->nodeToText($actual, true, $ignoreCase);
-
- if ($expectedAsString !== $actualAsString) {
- if ($expected instanceof DOMDocument) {
- $type = 'documents';
- } else {
- $type = 'nodes';
- }
-
- throw new ComparisonFailure(
- $expected,
- $actual,
- $expectedAsString,
- $actualAsString,
- false,
- sprintf("Failed asserting that two DOM %s are equal.\n", $type)
- );
- }
- }
-
- /**
- * Returns the normalized, whitespace-cleaned, and indented textual
- * representation of a DOMNode.
- *
- * @param DOMNode $node
- * @param bool $canonicalize
- * @param bool $ignoreCase
- * @return string
- */
- private function nodeToText(DOMNode $node, $canonicalize, $ignoreCase)
- {
- if ($canonicalize) {
- $document = new DOMDocument;
- $document->loadXML($node->C14N());
-
- $node = $document;
- }
-
- if ($node instanceof DOMDocument) {
- $document = $node;
- } else {
- $document = $node->ownerDocument;
- }
-
- $document->formatOutput = true;
- $document->normalizeDocument();
-
- if ($node instanceof DOMDocument) {
- $text = $node->saveXML();
- } else {
- $text = $document->saveXML($node);
- }
-
- if ($ignoreCase) {
- $text = strtolower($text);
- }
-
- return $text;
- }
-}
diff --git a/vendor/sebastian/comparator/src/DateTimeComparator.php b/vendor/sebastian/comparator/src/DateTimeComparator.php
deleted file mode 100644
index f9a1f2cc..00000000
--- a/vendor/sebastian/comparator/src/DateTimeComparator.php
+++ /dev/null
@@ -1,77 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-/**
- * Compares DateTimeInterface instances for equality.
- */
-class DateTimeComparator extends ObjectComparator
-{
- /**
- * Returns whether the comparator can compare two values.
- *
- * @param mixed $expected The first value to compare
- * @param mixed $actual The second value to compare
- * @return bool
- */
- public function accepts($expected, $actual)
- {
- return ($expected instanceof \DateTime || $expected instanceof \DateTimeInterface) &&
- ($actual instanceof \DateTime || $actual instanceof \DateTimeInterface);
- }
-
- /**
- * Asserts that two values are equal.
- *
- * @param mixed $expected First value to compare
- * @param mixed $actual Second value to compare
- * @param float $delta Allowed numerical distance between two values to consider them equal
- * @param bool $canonicalize Arrays are sorted before comparison when set to true
- * @param bool $ignoreCase Case is ignored when set to true
- * @param array $processed List of already processed elements (used to prevent infinite recursion)
- *
- * @throws ComparisonFailure
- */
- public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = array())
- {
- $delta = new \DateInterval(sprintf('PT%sS', abs($delta)));
-
- $expectedLower = clone $expected;
- $expectedUpper = clone $expected;
-
- if ($actual < $expectedLower->sub($delta) ||
- $actual > $expectedUpper->add($delta)) {
- throw new ComparisonFailure(
- $expected,
- $actual,
- $this->dateTimeToString($expected),
- $this->dateTimeToString($actual),
- false,
- 'Failed asserting that two DateTime objects are equal.'
- );
- }
- }
-
- /**
- * Returns an ISO 8601 formatted string representation of a datetime or
- * 'Invalid DateTimeInterface object' if the provided DateTimeInterface was not properly
- * initialized.
- *
- * @param \DateTimeInterface $datetime
- * @return string
- */
- private function dateTimeToString($datetime)
- {
- $string = $datetime->format('Y-m-d\TH:i:s.uO');
-
- return $string ? $string : 'Invalid DateTimeInterface object';
- }
-}
diff --git a/vendor/sebastian/comparator/src/DoubleComparator.php b/vendor/sebastian/comparator/src/DoubleComparator.php
deleted file mode 100644
index 7f7501ec..00000000
--- a/vendor/sebastian/comparator/src/DoubleComparator.php
+++ /dev/null
@@ -1,56 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-/**
- * Compares doubles for equality.
- */
-class DoubleComparator extends NumericComparator
-{
- /**
- * Smallest value available in PHP.
- *
- * @var float
- */
- const EPSILON = 0.0000000001;
-
- /**
- * Returns whether the comparator can compare two values.
- *
- * @param mixed $expected The first value to compare
- * @param mixed $actual The second value to compare
- * @return bool
- */
- public function accepts($expected, $actual)
- {
- return (is_double($expected) || is_double($actual)) && is_numeric($expected) && is_numeric($actual);
- }
-
- /**
- * Asserts that two values are equal.
- *
- * @param mixed $expected First value to compare
- * @param mixed $actual Second value to compare
- * @param float $delta Allowed numerical distance between two values to consider them equal
- * @param bool $canonicalize Arrays are sorted before comparison when set to true
- * @param bool $ignoreCase Case is ignored when set to true
- *
- * @throws ComparisonFailure
- */
- public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false)
- {
- if ($delta == 0) {
- $delta = self::EPSILON;
- }
-
- parent::assertEquals($expected, $actual, $delta, $canonicalize, $ignoreCase);
- }
-}
diff --git a/vendor/sebastian/comparator/src/ExceptionComparator.php b/vendor/sebastian/comparator/src/ExceptionComparator.php
deleted file mode 100644
index 52336464..00000000
--- a/vendor/sebastian/comparator/src/ExceptionComparator.php
+++ /dev/null
@@ -1,51 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-/**
- * Compares Exception instances for equality.
- */
-class ExceptionComparator extends ObjectComparator
-{
- /**
- * Returns whether the comparator can compare two values.
- *
- * @param mixed $expected The first value to compare
- * @param mixed $actual The second value to compare
- * @return bool
- */
- public function accepts($expected, $actual)
- {
- return $expected instanceof \Exception && $actual instanceof \Exception;
- }
-
- /**
- * Converts an object to an array containing all of its private, protected
- * and public properties.
- *
- * @param object $object
- * @return array
- */
- protected function toArray($object)
- {
- $array = parent::toArray($object);
-
- unset(
- $array['file'],
- $array['line'],
- $array['trace'],
- $array['string'],
- $array['xdebug_message']
- );
-
- return $array;
- }
-}
diff --git a/vendor/sebastian/comparator/src/Factory.php b/vendor/sebastian/comparator/src/Factory.php
deleted file mode 100644
index ed3d5e14..00000000
--- a/vendor/sebastian/comparator/src/Factory.php
+++ /dev/null
@@ -1,107 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-/**
- * Factory for comparators which compare values for equality.
- */
-class Factory
-{
- /**
- * @var Comparator[]
- */
- private $comparators = array();
-
- /**
- * @var Factory
- */
- private static $instance;
-
- /**
- * Constructs a new factory.
- */
- public function __construct()
- {
- $this->register(new TypeComparator);
- $this->register(new ScalarComparator);
- $this->register(new NumericComparator);
- $this->register(new DoubleComparator);
- $this->register(new ArrayComparator);
- $this->register(new ResourceComparator);
- $this->register(new ObjectComparator);
- $this->register(new ExceptionComparator);
- $this->register(new SplObjectStorageComparator);
- $this->register(new DOMNodeComparator);
- $this->register(new MockObjectComparator);
- $this->register(new DateTimeComparator);
- }
-
- /**
- * @return Factory
- */
- public static function getInstance()
- {
- if (self::$instance === null) {
- self::$instance = new self;
- }
-
- return self::$instance;
- }
-
- /**
- * Returns the correct comparator for comparing two values.
- *
- * @param mixed $expected The first value to compare
- * @param mixed $actual The second value to compare
- * @return Comparator
- */
- public function getComparatorFor($expected, $actual)
- {
- foreach ($this->comparators as $comparator) {
- if ($comparator->accepts($expected, $actual)) {
- return $comparator;
- }
- }
- }
-
- /**
- * Registers a new comparator.
- *
- * This comparator will be returned by getInstance() if its accept() method
- * returns TRUE for the compared values. It has higher priority than the
- * existing comparators, meaning that its accept() method will be tested
- * before those of the other comparators.
- *
- * @param Comparator $comparator The registered comparator
- */
- public function register(Comparator $comparator)
- {
- array_unshift($this->comparators, $comparator);
-
- $comparator->setFactory($this);
- }
-
- /**
- * Unregisters a comparator.
- *
- * This comparator will no longer be returned by getInstance().
- *
- * @param Comparator $comparator The unregistered comparator
- */
- public function unregister(Comparator $comparator)
- {
- foreach ($this->comparators as $key => $_comparator) {
- if ($comparator === $_comparator) {
- unset($this->comparators[$key]);
- }
- }
- }
-}
diff --git a/vendor/sebastian/comparator/src/MockObjectComparator.php b/vendor/sebastian/comparator/src/MockObjectComparator.php
deleted file mode 100644
index a16903c6..00000000
--- a/vendor/sebastian/comparator/src/MockObjectComparator.php
+++ /dev/null
@@ -1,45 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-/**
- * Compares PHPUnit_Framework_MockObject_MockObject instances for equality.
- */
-class MockObjectComparator extends ObjectComparator
-{
- /**
- * Returns whether the comparator can compare two values.
- *
- * @param mixed $expected The first value to compare
- * @param mixed $actual The second value to compare
- * @return bool
- */
- public function accepts($expected, $actual)
- {
- return $expected instanceof \PHPUnit_Framework_MockObject_MockObject && $actual instanceof \PHPUnit_Framework_MockObject_MockObject;
- }
-
- /**
- * Converts an object to an array containing all of its private, protected
- * and public properties.
- *
- * @param object $object
- * @return array
- */
- protected function toArray($object)
- {
- $array = parent::toArray($object);
-
- unset($array['__phpunit_invocationMocker']);
-
- return $array;
- }
-}
\ No newline at end of file
diff --git a/vendor/sebastian/comparator/src/NumericComparator.php b/vendor/sebastian/comparator/src/NumericComparator.php
deleted file mode 100644
index 3e04a830..00000000
--- a/vendor/sebastian/comparator/src/NumericComparator.php
+++ /dev/null
@@ -1,68 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-/**
- * Compares numerical values for equality.
- */
-class NumericComparator extends ScalarComparator
-{
- /**
- * Returns whether the comparator can compare two values.
- *
- * @param mixed $expected The first value to compare
- * @param mixed $actual The second value to compare
- * @return bool
- */
- public function accepts($expected, $actual)
- {
- // all numerical values, but not if one of them is a double
- // or both of them are strings
- return is_numeric($expected) && is_numeric($actual) &&
- !(is_double($expected) || is_double($actual)) &&
- !(is_string($expected) && is_string($actual));
- }
-
- /**
- * Asserts that two values are equal.
- *
- * @param mixed $expected First value to compare
- * @param mixed $actual Second value to compare
- * @param float $delta Allowed numerical distance between two values to consider them equal
- * @param bool $canonicalize Arrays are sorted before comparison when set to true
- * @param bool $ignoreCase Case is ignored when set to true
- *
- * @throws ComparisonFailure
- */
- public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false)
- {
- if (is_infinite($actual) && is_infinite($expected)) {
- return;
- }
-
- if ((is_infinite($actual) xor is_infinite($expected)) ||
- (is_nan($actual) or is_nan($expected)) ||
- abs($actual - $expected) > $delta) {
- throw new ComparisonFailure(
- $expected,
- $actual,
- '',
- '',
- false,
- sprintf(
- 'Failed asserting that %s matches expected %s.',
- $this->exporter->export($actual),
- $this->exporter->export($expected)
- )
- );
- }
- }
-}
diff --git a/vendor/sebastian/comparator/src/ObjectComparator.php b/vendor/sebastian/comparator/src/ObjectComparator.php
deleted file mode 100644
index 3c00aadd..00000000
--- a/vendor/sebastian/comparator/src/ObjectComparator.php
+++ /dev/null
@@ -1,105 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-/**
- * Compares objects for equality.
- */
-class ObjectComparator extends ArrayComparator
-{
- /**
- * Returns whether the comparator can compare two values.
- *
- * @param mixed $expected The first value to compare
- * @param mixed $actual The second value to compare
- * @return bool
- */
- public function accepts($expected, $actual)
- {
- return is_object($expected) && is_object($actual);
- }
-
- /**
- * Asserts that two values are equal.
- *
- * @param mixed $expected First value to compare
- * @param mixed $actual Second value to compare
- * @param float $delta Allowed numerical distance between two values to consider them equal
- * @param bool $canonicalize Arrays are sorted before comparison when set to true
- * @param bool $ignoreCase Case is ignored when set to true
- * @param array $processed List of already processed elements (used to prevent infinite recursion)
- *
- * @throws ComparisonFailure
- */
- public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = array())
- {
- if (get_class($actual) !== get_class($expected)) {
- throw new ComparisonFailure(
- $expected,
- $actual,
- $this->exporter->export($expected),
- $this->exporter->export($actual),
- false,
- sprintf(
- '%s is not instance of expected class "%s".',
- $this->exporter->export($actual),
- get_class($expected)
- )
- );
- }
-
- // don't compare twice to allow for cyclic dependencies
- if (in_array(array($actual, $expected), $processed, true) ||
- in_array(array($expected, $actual), $processed, true)) {
- return;
- }
-
- $processed[] = array($actual, $expected);
-
- // don't compare objects if they are identical
- // this helps to avoid the error "maximum function nesting level reached"
- // CAUTION: this conditional clause is not tested
- if ($actual !== $expected) {
- try {
- parent::assertEquals(
- $this->toArray($expected),
- $this->toArray($actual),
- $delta,
- $canonicalize,
- $ignoreCase,
- $processed
- );
- } catch (ComparisonFailure $e) {
- throw new ComparisonFailure(
- $expected,
- $actual,
- // replace "Array" with "MyClass object"
- substr_replace($e->getExpectedAsString(), get_class($expected) . ' Object', 0, 5),
- substr_replace($e->getActualAsString(), get_class($actual) . ' Object', 0, 5),
- false,
- 'Failed asserting that two objects are equal.'
- );
- }
- }
- }
-
- /**
- * Converts an object to an array containing all of its private, protected
- * and public properties.
- *
- * @param object $object
- * @return array
- */
- protected function toArray($object)
- {
- return $this->exporter->toArray($object);
- }
-}
diff --git a/vendor/sebastian/comparator/src/ResourceComparator.php b/vendor/sebastian/comparator/src/ResourceComparator.php
deleted file mode 100644
index 95d649fb..00000000
--- a/vendor/sebastian/comparator/src/ResourceComparator.php
+++ /dev/null
@@ -1,52 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-/**
- * Compares resources for equality.
- */
-class ResourceComparator extends Comparator
-{
- /**
- * Returns whether the comparator can compare two values.
- *
- * @param mixed $expected The first value to compare
- * @param mixed $actual The second value to compare
- * @return bool
- */
- public function accepts($expected, $actual)
- {
- return is_resource($expected) && is_resource($actual);
- }
-
- /**
- * Asserts that two values are equal.
- *
- * @param mixed $expected First value to compare
- * @param mixed $actual Second value to compare
- * @param float $delta Allowed numerical distance between two values to consider them equal
- * @param bool $canonicalize Arrays are sorted before comparison when set to true
- * @param bool $ignoreCase Case is ignored when set to true
- *
- * @throws ComparisonFailure
- */
- public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false)
- {
- if ($actual != $expected) {
- throw new ComparisonFailure(
- $expected,
- $actual,
- $this->exporter->export($expected),
- $this->exporter->export($actual)
- );
- }
- }
-}
diff --git a/vendor/sebastian/comparator/src/ScalarComparator.php b/vendor/sebastian/comparator/src/ScalarComparator.php
deleted file mode 100644
index 772be63d..00000000
--- a/vendor/sebastian/comparator/src/ScalarComparator.php
+++ /dev/null
@@ -1,90 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-/**
- * Compares scalar or NULL values for equality.
- */
-class ScalarComparator extends Comparator
-{
- /**
- * Returns whether the comparator can compare two values.
- *
- * @param mixed $expected The first value to compare
- * @param mixed $actual The second value to compare
- * @return bool
- * @since Method available since Release 3.6.0
- */
- public function accepts($expected, $actual)
- {
- return ((is_scalar($expected) xor null === $expected) &&
- (is_scalar($actual) xor null === $actual))
- // allow comparison between strings and objects featuring __toString()
- || (is_string($expected) && is_object($actual) && method_exists($actual, '__toString'))
- || (is_object($expected) && method_exists($expected, '__toString') && is_string($actual));
- }
-
- /**
- * Asserts that two values are equal.
- *
- * @param mixed $expected First value to compare
- * @param mixed $actual Second value to compare
- * @param float $delta Allowed numerical distance between two values to consider them equal
- * @param bool $canonicalize Arrays are sorted before comparison when set to true
- * @param bool $ignoreCase Case is ignored when set to true
- *
- * @throws ComparisonFailure
- */
- public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false)
- {
- $expectedToCompare = $expected;
- $actualToCompare = $actual;
-
- // always compare as strings to avoid strange behaviour
- // otherwise 0 == 'Foobar'
- if (is_string($expected) || is_string($actual)) {
- $expectedToCompare = (string) $expectedToCompare;
- $actualToCompare = (string) $actualToCompare;
-
- if ($ignoreCase) {
- $expectedToCompare = strtolower($expectedToCompare);
- $actualToCompare = strtolower($actualToCompare);
- }
- }
-
- if ($expectedToCompare != $actualToCompare) {
- if (is_string($expected) && is_string($actual)) {
- throw new ComparisonFailure(
- $expected,
- $actual,
- $this->exporter->export($expected),
- $this->exporter->export($actual),
- false,
- 'Failed asserting that two strings are equal.'
- );
- }
-
- throw new ComparisonFailure(
- $expected,
- $actual,
- // no diff is required
- '',
- '',
- false,
- sprintf(
- 'Failed asserting that %s matches expected %s.',
- $this->exporter->export($actual),
- $this->exporter->export($expected)
- )
- );
- }
- }
-}
diff --git a/vendor/sebastian/comparator/src/SplObjectStorageComparator.php b/vendor/sebastian/comparator/src/SplObjectStorageComparator.php
deleted file mode 100644
index 2dc980ff..00000000
--- a/vendor/sebastian/comparator/src/SplObjectStorageComparator.php
+++ /dev/null
@@ -1,69 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-/**
- * Compares \SplObjectStorage instances for equality.
- */
-class SplObjectStorageComparator extends Comparator
-{
- /**
- * Returns whether the comparator can compare two values.
- *
- * @param mixed $expected The first value to compare
- * @param mixed $actual The second value to compare
- * @return bool
- */
- public function accepts($expected, $actual)
- {
- return $expected instanceof \SplObjectStorage && $actual instanceof \SplObjectStorage;
- }
-
- /**
- * Asserts that two values are equal.
- *
- * @param mixed $expected First value to compare
- * @param mixed $actual Second value to compare
- * @param float $delta Allowed numerical distance between two values to consider them equal
- * @param bool $canonicalize Arrays are sorted before comparison when set to true
- * @param bool $ignoreCase Case is ignored when set to true
- *
- * @throws ComparisonFailure
- */
- public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false)
- {
- foreach ($actual as $object) {
- if (!$expected->contains($object)) {
- throw new ComparisonFailure(
- $expected,
- $actual,
- $this->exporter->export($expected),
- $this->exporter->export($actual),
- false,
- 'Failed asserting that two objects are equal.'
- );
- }
- }
-
- foreach ($expected as $object) {
- if (!$actual->contains($object)) {
- throw new ComparisonFailure(
- $expected,
- $actual,
- $this->exporter->export($expected),
- $this->exporter->export($actual),
- false,
- 'Failed asserting that two objects are equal.'
- );
- }
- }
- }
-}
diff --git a/vendor/sebastian/comparator/src/TypeComparator.php b/vendor/sebastian/comparator/src/TypeComparator.php
deleted file mode 100644
index 73d65cf2..00000000
--- a/vendor/sebastian/comparator/src/TypeComparator.php
+++ /dev/null
@@ -1,59 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-/**
- * Compares values for type equality.
- */
-class TypeComparator extends Comparator
-{
- /**
- * Returns whether the comparator can compare two values.
- *
- * @param mixed $expected The first value to compare
- * @param mixed $actual The second value to compare
- * @return bool
- */
- public function accepts($expected, $actual)
- {
- return true;
- }
-
- /**
- * Asserts that two values are equal.
- *
- * @param mixed $expected First value to compare
- * @param mixed $actual Second value to compare
- * @param float $delta Allowed numerical distance between two values to consider them equal
- * @param bool $canonicalize Arrays are sorted before comparison when set to true
- * @param bool $ignoreCase Case is ignored when set to true
- *
- * @throws ComparisonFailure
- */
- public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false)
- {
- if (gettype($expected) != gettype($actual)) {
- throw new ComparisonFailure(
- $expected,
- $actual,
- // we don't need a diff
- '',
- '',
- false,
- sprintf(
- '%s does not match expected type "%s".',
- $this->exporter->shortenedExport($actual),
- gettype($expected)
- )
- );
- }
- }
-}
diff --git a/vendor/sebastian/comparator/tests/ArrayComparatorTest.php b/vendor/sebastian/comparator/tests/ArrayComparatorTest.php
deleted file mode 100644
index ee44615b..00000000
--- a/vendor/sebastian/comparator/tests/ArrayComparatorTest.php
+++ /dev/null
@@ -1,163 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-/**
- * @coversDefaultClass SebastianBergmann\Comparator\ArrayComparator
- *
- */
-class ArrayComparatorTest extends \PHPUnit_Framework_TestCase
-{
- private $comparator;
-
- protected function setUp()
- {
- $this->comparator = new ArrayComparator;
- $this->comparator->setFactory(new Factory);
- }
-
- public function acceptsFailsProvider()
- {
- return array(
- array(array(), null),
- array(null, array()),
- array(null, null)
- );
- }
-
- public function assertEqualsSucceedsProvider()
- {
- return array(
- array(
- array('a' => 1, 'b' => 2),
- array('b' => 2, 'a' => 1)
- ),
- array(
- array(1),
- array('1')
- ),
- array(
- array(3, 2, 1),
- array(2, 3, 1),
- 0,
- true
- ),
- array(
- array(2.3),
- array(2.5),
- 0.5
- ),
- array(
- array(array(2.3)),
- array(array(2.5)),
- 0.5
- ),
- array(
- array(new Struct(2.3)),
- array(new Struct(2.5)),
- 0.5
- ),
- );
- }
-
- public function assertEqualsFailsProvider()
- {
- return array(
- array(
- array(),
- array(0 => 1)
- ),
- array(
- array(0 => 1),
- array()
- ),
- array(
- array(0 => null),
- array()
- ),
- array(
- array(0 => 1, 1 => 2),
- array(0 => 1, 1 => 3)
- ),
- array(
- array('a', 'b' => array(1, 2)),
- array('a', 'b' => array(2, 1))
- ),
- array(
- array(2.3),
- array(4.2),
- 0.5
- ),
- array(
- array(array(2.3)),
- array(array(4.2)),
- 0.5
- ),
- array(
- array(new Struct(2.3)),
- array(new Struct(4.2)),
- 0.5
- )
- );
- }
-
- /**
- * @covers ::accepts
- */
- public function testAcceptsSucceeds()
- {
- $this->assertTrue(
- $this->comparator->accepts(array(), array())
- );
- }
-
- /**
- * @covers ::accepts
- * @dataProvider acceptsFailsProvider
- */
- public function testAcceptsFails($expected, $actual)
- {
- $this->assertFalse(
- $this->comparator->accepts($expected, $actual)
- );
- }
-
- /**
- * @covers ::assertEquals
- * @dataProvider assertEqualsSucceedsProvider
- */
- public function testAssertEqualsSucceeds($expected, $actual, $delta = 0.0, $canonicalize = false)
- {
- $exception = null;
-
- try {
- $this->comparator->assertEquals($expected, $actual, $delta, $canonicalize);
- }
-
- catch (ComparisonFailure $exception) {
- }
-
- $this->assertNull($exception, 'Unexpected ComparisonFailure');
- }
-
- /**
- * @covers ::assertEquals
- * @dataProvider assertEqualsFailsProvider
- */
- public function testAssertEqualsFails($expected, $actual,$delta = 0.0, $canonicalize = false)
- {
- $this->setExpectedException(
- 'SebastianBergmann\\Comparator\\ComparisonFailure',
- 'Failed asserting that two arrays are equal'
- );
- $this->comparator->assertEquals($expected, $actual, $delta, $canonicalize);
- }
-}
diff --git a/vendor/sebastian/comparator/tests/DOMNodeComparatorTest.php b/vendor/sebastian/comparator/tests/DOMNodeComparatorTest.php
deleted file mode 100644
index a769b84c..00000000
--- a/vendor/sebastian/comparator/tests/DOMNodeComparatorTest.php
+++ /dev/null
@@ -1,162 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-use DOMNode;
-use DOMDocument;
-
-/**
- * @coversDefaultClass SebastianBergmann\Comparator\DOMNodeComparator
- *
- */
-class DOMNodeComparatorTest extends \PHPUnit_Framework_TestCase
-{
- private $comparator;
-
- protected function setUp()
- {
- $this->comparator = new DOMNodeComparator;
- }
-
- public function acceptsSucceedsProvider()
- {
- $document = new DOMDocument;
- $node = new DOMNode;
-
- return array(
- array($document, $document),
- array($node, $node),
- array($document, $node),
- array($node, $document)
- );
- }
-
- public function acceptsFailsProvider()
- {
- $document = new DOMDocument;
-
- return array(
- array($document, null),
- array(null, $document),
- array(null, null)
- );
- }
-
- public function assertEqualsSucceedsProvider()
- {
- return array(
- array(
- $this->createDOMDocument(' '),
- $this->createDOMDocument(' ')
- ),
- array(
- $this->createDOMDocument(' '),
- $this->createDOMDocument(' ')
- ),
- array(
- $this->createDOMDocument(' '),
- $this->createDOMDocument(' ')
- ),
- array(
- $this->createDOMDocument("\n \n "),
- $this->createDOMDocument(' ')
- ),
- );
- }
-
- public function assertEqualsFailsProvider()
- {
- return array(
- array(
- $this->createDOMDocument(' '),
- $this->createDOMDocument(' ')
- ),
- array(
- $this->createDOMDocument(' '),
- $this->createDOMDocument(' ')
- ),
- array(
- $this->createDOMDocument(' bar '),
- $this->createDOMDocument(' ')
- ),
- array(
- $this->createDOMDocument(' '),
- $this->createDOMDocument(' ')
- ),
- array(
- $this->createDOMDocument(' bar '),
- $this->createDOMDocument(' bir ')
- )
- );
- }
-
- private function createDOMDocument($content)
- {
- $document = new DOMDocument;
- $document->preserveWhiteSpace = false;
- $document->loadXML($content);
-
- return $document;
- }
-
- /**
- * @covers ::accepts
- * @dataProvider acceptsSucceedsProvider
- */
- public function testAcceptsSucceeds($expected, $actual)
- {
- $this->assertTrue(
- $this->comparator->accepts($expected, $actual)
- );
- }
-
- /**
- * @covers ::accepts
- * @dataProvider acceptsFailsProvider
- */
- public function testAcceptsFails($expected, $actual)
- {
- $this->assertFalse(
- $this->comparator->accepts($expected, $actual)
- );
- }
-
- /**
- * @covers ::assertEquals
- * @dataProvider assertEqualsSucceedsProvider
- */
- public function testAssertEqualsSucceeds($expected, $actual)
- {
- $exception = null;
-
- try {
- $this->comparator->assertEquals($expected, $actual);
- }
-
- catch (ComparisonFailure $exception) {
- }
-
- $this->assertNull($exception, 'Unexpected ComparisonFailure');
- }
-
- /**
- * @covers ::assertEquals
- * @dataProvider assertEqualsFailsProvider
- */
- public function testAssertEqualsFails($expected, $actual)
- {
- $this->setExpectedException(
- 'SebastianBergmann\\Comparator\\ComparisonFailure',
- 'Failed asserting that two DOM'
- );
- $this->comparator->assertEquals($expected, $actual);
- }
-}
diff --git a/vendor/sebastian/comparator/tests/DateTimeComparatorTest.php b/vendor/sebastian/comparator/tests/DateTimeComparatorTest.php
deleted file mode 100644
index 9abcff76..00000000
--- a/vendor/sebastian/comparator/tests/DateTimeComparatorTest.php
+++ /dev/null
@@ -1,216 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-use DateTime;
-use DateTimeImmutable;
-use DateTimeZone;
-
-/**
- * @coversDefaultClass SebastianBergmann\Comparator\DateTimeComparator
- *
- */
-class DateTimeComparatorTest extends \PHPUnit_Framework_TestCase
-{
- private $comparator;
-
- protected function setUp()
- {
- $this->comparator = new DateTimeComparator;
- }
-
- public function acceptsFailsProvider()
- {
- $datetime = new DateTime;
-
- return array(
- array($datetime, null),
- array(null, $datetime),
- array(null, null)
- );
- }
-
- public function assertEqualsSucceedsProvider()
- {
- return array(
- array(
- new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')),
- new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York'))
- ),
- array(
- new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')),
- new DateTime('2013-03-29 04:13:25', new DateTimeZone('America/New_York')),
- 10
- ),
- array(
- new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')),
- new DateTime('2013-03-29 04:14:40', new DateTimeZone('America/New_York')),
- 65
- ),
- array(
- new DateTime('2013-03-29', new DateTimeZone('America/New_York')),
- new DateTime('2013-03-29', new DateTimeZone('America/New_York'))
- ),
- array(
- new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')),
- new DateTime('2013-03-29 03:13:35', new DateTimeZone('America/Chicago'))
- ),
- array(
- new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')),
- new DateTime('2013-03-29 03:13:49', new DateTimeZone('America/Chicago')),
- 15
- ),
- array(
- new DateTime('2013-03-30', new DateTimeZone('America/New_York')),
- new DateTime('2013-03-29 23:00:00', new DateTimeZone('America/Chicago'))
- ),
- array(
- new DateTime('2013-03-30', new DateTimeZone('America/New_York')),
- new DateTime('2013-03-29 23:01:30', new DateTimeZone('America/Chicago')),
- 100
- ),
- array(
- new DateTime('@1364616000'),
- new DateTime('2013-03-29 23:00:00', new DateTimeZone('America/Chicago'))
- ),
- array(
- new DateTime('2013-03-29T05:13:35-0500'),
- new DateTime('2013-03-29T04:13:35-0600')
- )
- );
- }
-
- public function assertEqualsFailsProvider()
- {
- return array(
- array(
- new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')),
- new DateTime('2013-03-29 03:13:35', new DateTimeZone('America/New_York'))
- ),
- array(
- new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')),
- new DateTime('2013-03-29 03:13:35', new DateTimeZone('America/New_York')),
- 3500
- ),
- array(
- new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')),
- new DateTime('2013-03-29 05:13:35', new DateTimeZone('America/New_York')),
- 3500
- ),
- array(
- new DateTime('2013-03-29', new DateTimeZone('America/New_York')),
- new DateTime('2013-03-30', new DateTimeZone('America/New_York'))
- ),
- array(
- new DateTime('2013-03-29', new DateTimeZone('America/New_York')),
- new DateTime('2013-03-30', new DateTimeZone('America/New_York')),
- 43200
- ),
- array(
- new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')),
- new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/Chicago')),
- ),
- array(
- new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')),
- new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/Chicago')),
- 3500
- ),
- array(
- new DateTime('2013-03-30', new DateTimeZone('America/New_York')),
- new DateTime('2013-03-30', new DateTimeZone('America/Chicago'))
- ),
- array(
- new DateTime('2013-03-29T05:13:35-0600'),
- new DateTime('2013-03-29T04:13:35-0600')
- ),
- array(
- new DateTime('2013-03-29T05:13:35-0600'),
- new DateTime('2013-03-29T05:13:35-0500')
- ),
- );
- }
-
- /**
- * @covers ::accepts
- */
- public function testAcceptsSucceeds()
- {
- $this->assertTrue(
- $this->comparator->accepts(
- new DateTime,
- new DateTime
- )
- );
- }
-
- /**
- * @covers ::accepts
- * @dataProvider acceptsFailsProvider
- */
- public function testAcceptsFails($expected, $actual)
- {
- $this->assertFalse(
- $this->comparator->accepts($expected, $actual)
- );
- }
-
- /**
- * @covers ::assertEquals
- * @dataProvider assertEqualsSucceedsProvider
- */
- public function testAssertEqualsSucceeds($expected, $actual, $delta = 0.0)
- {
- $exception = null;
-
- try {
- $this->comparator->assertEquals($expected, $actual, $delta);
- }
-
- catch (ComparisonFailure $exception) {
- }
-
- $this->assertNull($exception, 'Unexpected ComparisonFailure');
- }
-
- /**
- * @covers ::assertEquals
- * @dataProvider assertEqualsFailsProvider
- */
- public function testAssertEqualsFails($expected, $actual, $delta = 0.0)
- {
- $this->setExpectedException(
- 'SebastianBergmann\\Comparator\\ComparisonFailure',
- 'Failed asserting that two DateTime objects are equal.'
- );
- $this->comparator->assertEquals($expected, $actual, $delta);
- }
-
- /**
- * @requires PHP 5.5
- * @covers ::accepts
- */
- public function testAcceptsDateTimeInterface()
- {
- $this->assertTrue($this->comparator->accepts(new DateTime, new DateTimeImmutable));
- }
-
- /**
- * @requires PHP 5.5
- * @covers ::assertEquals
- */
- public function testSupportsDateTimeInterface()
- {
- $this->comparator->assertEquals(
- new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')),
- new DateTimeImmutable('2013-03-29 04:13:35', new DateTimeZone('America/New_York'))
- );
- }
-}
diff --git a/vendor/sebastian/comparator/tests/DoubleComparatorTest.php b/vendor/sebastian/comparator/tests/DoubleComparatorTest.php
deleted file mode 100644
index 6b898bab..00000000
--- a/vendor/sebastian/comparator/tests/DoubleComparatorTest.php
+++ /dev/null
@@ -1,134 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-/**
- * @coversDefaultClass SebastianBergmann\Comparator\DoubleComparator
- *
- */
-class DoubleComparatorTest extends \PHPUnit_Framework_TestCase
-{
- private $comparator;
-
- protected function setUp()
- {
- $this->comparator = new DoubleComparator;
- }
-
- public function acceptsSucceedsProvider()
- {
- return array(
- array(0, 5.0),
- array(5.0, 0),
- array('5', 4.5),
- array(1.2e3, 7E-10),
- array(3, acos(8)),
- array(acos(8), 3),
- array(acos(8), acos(8))
- );
- }
-
- public function acceptsFailsProvider()
- {
- return array(
- array(5, 5),
- array('4.5', 5),
- array(0x539, 02471),
- array(5.0, false),
- array(null, 5.0)
- );
- }
-
- public function assertEqualsSucceedsProvider()
- {
- return array(
- array(2.3, 2.3),
- array('2.3', 2.3),
- array(5.0, 5),
- array(5, 5.0),
- array(5.0, '5'),
- array(1.2e3, 1200),
- array(2.3, 2.5, 0.5),
- array(3, 3.05, 0.05),
- array(1.2e3, 1201, 1),
- array((string)(1/3), 1 - 2/3),
- array(1/3, (string)(1 - 2/3))
- );
- }
-
- public function assertEqualsFailsProvider()
- {
- return array(
- array(2.3, 4.2),
- array('2.3', 4.2),
- array(5.0, '4'),
- array(5.0, 6),
- array(1.2e3, 1201),
- array(2.3, 2.5, 0.2),
- array(3, 3.05, 0.04),
- array(3, acos(8)),
- array(acos(8), 3),
- array(acos(8), acos(8))
- );
- }
-
- /**
- * @covers ::accepts
- * @dataProvider acceptsSucceedsProvider
- */
- public function testAcceptsSucceeds($expected, $actual)
- {
- $this->assertTrue(
- $this->comparator->accepts($expected, $actual)
- );
- }
-
- /**
- * @covers ::accepts
- * @dataProvider acceptsFailsProvider
- */
- public function testAcceptsFails($expected, $actual)
- {
- $this->assertFalse(
- $this->comparator->accepts($expected, $actual)
- );
- }
-
- /**
- * @covers ::assertEquals
- * @dataProvider assertEqualsSucceedsProvider
- */
- public function testAssertEqualsSucceeds($expected, $actual, $delta = 0.0)
- {
- $exception = null;
-
- try {
- $this->comparator->assertEquals($expected, $actual, $delta);
- }
-
- catch (ComparisonFailure $exception) {
- }
-
- $this->assertNull($exception, 'Unexpected ComparisonFailure');
- }
-
- /**
- * @covers ::assertEquals
- * @dataProvider assertEqualsFailsProvider
- */
- public function testAssertEqualsFails($expected, $actual, $delta = 0.0)
- {
- $this->setExpectedException(
- 'SebastianBergmann\\Comparator\\ComparisonFailure', 'matches expected'
- );
- $this->comparator->assertEquals($expected, $actual, $delta);
- }
-}
diff --git a/vendor/sebastian/comparator/tests/ExceptionComparatorTest.php b/vendor/sebastian/comparator/tests/ExceptionComparatorTest.php
deleted file mode 100644
index fa8cc0a3..00000000
--- a/vendor/sebastian/comparator/tests/ExceptionComparatorTest.php
+++ /dev/null
@@ -1,136 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-use \Exception;
-use \RuntimeException;
-
-/**
- * @coversDefaultClass SebastianBergmann\Comparator\ExceptionComparator
- *
- */
-class ExceptionComparatorTest extends \PHPUnit_Framework_TestCase
-{
- private $comparator;
-
- protected function setUp()
- {
- $this->comparator = new ExceptionComparator;
- $this->comparator->setFactory(new Factory);
- }
-
- public function acceptsSucceedsProvider()
- {
- return array(
- array(new Exception, new Exception),
- array(new RuntimeException, new RuntimeException),
- array(new Exception, new RuntimeException)
- );
- }
-
- public function acceptsFailsProvider()
- {
- return array(
- array(new Exception, null),
- array(null, new Exception),
- array(null, null)
- );
- }
-
- public function assertEqualsSucceedsProvider()
- {
- $exception1 = new Exception;
- $exception2 = new Exception;
-
- $exception3 = new RunTimeException('Error', 100);
- $exception4 = new RunTimeException('Error', 100);
-
- return array(
- array($exception1, $exception1),
- array($exception1, $exception2),
- array($exception3, $exception3),
- array($exception3, $exception4)
- );
- }
-
- public function assertEqualsFailsProvider()
- {
- $typeMessage = 'not instance of expected class';
- $equalMessage = 'Failed asserting that two objects are equal.';
-
- $exception1 = new Exception('Error', 100);
- $exception2 = new Exception('Error', 101);
- $exception3 = new Exception('Errors', 101);
-
- $exception4 = new RunTimeException('Error', 100);
- $exception5 = new RunTimeException('Error', 101);
-
- return array(
- array($exception1, $exception2, $equalMessage),
- array($exception1, $exception3, $equalMessage),
- array($exception1, $exception4, $typeMessage),
- array($exception2, $exception3, $equalMessage),
- array($exception4, $exception5, $equalMessage)
- );
- }
-
- /**
- * @covers ::accepts
- * @dataProvider acceptsSucceedsProvider
- */
- public function testAcceptsSucceeds($expected, $actual)
- {
- $this->assertTrue(
- $this->comparator->accepts($expected, $actual)
- );
- }
-
- /**
- * @covers ::accepts
- * @dataProvider acceptsFailsProvider
- */
- public function testAcceptsFails($expected, $actual)
- {
- $this->assertFalse(
- $this->comparator->accepts($expected, $actual)
- );
- }
-
- /**
- * @covers ::assertEquals
- * @dataProvider assertEqualsSucceedsProvider
- */
- public function testAssertEqualsSucceeds($expected, $actual)
- {
- $exception = null;
-
- try {
- $this->comparator->assertEquals($expected, $actual);
- }
-
- catch (ComparisonFailure $exception) {
- }
-
- $this->assertNull($exception, 'Unexpected ComparisonFailure');
- }
-
- /**
- * @covers ::assertEquals
- * @dataProvider assertEqualsFailsProvider
- */
- public function testAssertEqualsFails($expected, $actual, $message)
- {
- $this->setExpectedException(
- 'SebastianBergmann\\Comparator\\ComparisonFailure', $message
- );
- $this->comparator->assertEquals($expected, $actual);
- }
-}
diff --git a/vendor/sebastian/comparator/tests/FactoryTest.php b/vendor/sebastian/comparator/tests/FactoryTest.php
deleted file mode 100644
index cb58c20c..00000000
--- a/vendor/sebastian/comparator/tests/FactoryTest.php
+++ /dev/null
@@ -1,115 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-/**
- * @coversDefaultClass SebastianBergmann\Comparator\Factory
- *
- */
-class FactoryTest extends \PHPUnit_Framework_TestCase
-{
- public function instanceProvider()
- {
- $tmpfile = tmpfile();
-
- return array(
- array(NULL, NULL, 'SebastianBergmann\\Comparator\\ScalarComparator'),
- array(NULL, TRUE, 'SebastianBergmann\\Comparator\\ScalarComparator'),
- array(TRUE, NULL, 'SebastianBergmann\\Comparator\\ScalarComparator'),
- array(TRUE, TRUE, 'SebastianBergmann\\Comparator\\ScalarComparator'),
- array(FALSE, FALSE, 'SebastianBergmann\\Comparator\\ScalarComparator'),
- array(TRUE, FALSE, 'SebastianBergmann\\Comparator\\ScalarComparator'),
- array(FALSE, TRUE, 'SebastianBergmann\\Comparator\\ScalarComparator'),
- array('', '', 'SebastianBergmann\\Comparator\\ScalarComparator'),
- array('0', '0', 'SebastianBergmann\\Comparator\\ScalarComparator'),
- array('0', 0, 'SebastianBergmann\\Comparator\\NumericComparator'),
- array(0, '0', 'SebastianBergmann\\Comparator\\NumericComparator'),
- array(0, 0, 'SebastianBergmann\\Comparator\\NumericComparator'),
- array(1.0, 0, 'SebastianBergmann\\Comparator\\DoubleComparator'),
- array(0, 1.0, 'SebastianBergmann\\Comparator\\DoubleComparator'),
- array(1.0, 1.0, 'SebastianBergmann\\Comparator\\DoubleComparator'),
- array(array(1), array(1), 'SebastianBergmann\\Comparator\\ArrayComparator'),
- array($tmpfile, $tmpfile, 'SebastianBergmann\\Comparator\\ResourceComparator'),
- array(new \stdClass, new \stdClass, 'SebastianBergmann\\Comparator\\ObjectComparator'),
- array(new \DateTime, new \DateTime, 'SebastianBergmann\\Comparator\\DateTimeComparator'),
- array(new \SplObjectStorage, new \SplObjectStorage, 'SebastianBergmann\\Comparator\\SplObjectStorageComparator'),
- array(new \Exception, new \Exception, 'SebastianBergmann\\Comparator\\ExceptionComparator'),
- array(new \DOMDocument, new \DOMDocument, 'SebastianBergmann\\Comparator\\DOMNodeComparator'),
- // mixed types
- array($tmpfile, array(1), 'SebastianBergmann\\Comparator\\TypeComparator'),
- array(array(1), $tmpfile, 'SebastianBergmann\\Comparator\\TypeComparator'),
- array($tmpfile, '1', 'SebastianBergmann\\Comparator\\TypeComparator'),
- array('1', $tmpfile, 'SebastianBergmann\\Comparator\\TypeComparator'),
- array($tmpfile, new \stdClass, 'SebastianBergmann\\Comparator\\TypeComparator'),
- array(new \stdClass, $tmpfile, 'SebastianBergmann\\Comparator\\TypeComparator'),
- array(new \stdClass, array(1), 'SebastianBergmann\\Comparator\\TypeComparator'),
- array(array(1), new \stdClass, 'SebastianBergmann\\Comparator\\TypeComparator'),
- array(new \stdClass, '1', 'SebastianBergmann\\Comparator\\TypeComparator'),
- array('1', new \stdClass, 'SebastianBergmann\\Comparator\\TypeComparator'),
- array(new ClassWithToString, '1', 'SebastianBergmann\\Comparator\\ScalarComparator'),
- array('1', new ClassWithToString, 'SebastianBergmann\\Comparator\\ScalarComparator'),
- array(1.0, new \stdClass, 'SebastianBergmann\\Comparator\\TypeComparator'),
- array(new \stdClass, 1.0, 'SebastianBergmann\\Comparator\\TypeComparator'),
- array(1.0, array(1), 'SebastianBergmann\\Comparator\\TypeComparator'),
- array(array(1), 1.0, 'SebastianBergmann\\Comparator\\TypeComparator'),
- );
- }
-
- /**
- * @dataProvider instanceProvider
- * @covers ::getComparatorFor
- * @covers ::__construct
- */
- public function testGetComparatorFor($a, $b, $expected)
- {
- $factory = new Factory;
- $actual = $factory->getComparatorFor($a, $b);
- $this->assertInstanceOf($expected, $actual);
- }
-
- /**
- * @covers ::register
- */
- public function testRegister()
- {
- $comparator = new TestClassComparator;
-
- $factory = new Factory;
- $factory->register($comparator);
-
- $a = new TestClass;
- $b = new TestClass;
- $expected = 'SebastianBergmann\\Comparator\\TestClassComparator';
- $actual = $factory->getComparatorFor($a, $b);
-
- $factory->unregister($comparator);
- $this->assertInstanceOf($expected, $actual);
- }
-
- /**
- * @covers ::unregister
- */
- public function testUnregister()
- {
- $comparator = new TestClassComparator;
-
- $factory = new Factory;
- $factory->register($comparator);
- $factory->unregister($comparator);
-
- $a = new TestClass;
- $b = new TestClass;
- $expected = 'SebastianBergmann\\Comparator\\ObjectComparator';
- $actual = $factory->getComparatorFor($a, $b);
-
- $this->assertInstanceOf($expected, $actual);
- }
-}
diff --git a/vendor/sebastian/comparator/tests/MockObjectComparatorTest.php b/vendor/sebastian/comparator/tests/MockObjectComparatorTest.php
deleted file mode 100644
index 7910ad7a..00000000
--- a/vendor/sebastian/comparator/tests/MockObjectComparatorTest.php
+++ /dev/null
@@ -1,166 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-/**
- * @coversDefaultClass SebastianBergmann\Comparator\MockObjectComparator
- *
- */
-class MockObjectComparatorTest extends \PHPUnit_Framework_TestCase
-{
- private $comparator;
-
- protected function setUp()
- {
- $this->comparator = new MockObjectComparator;
- $this->comparator->setFactory(new Factory);
- }
-
- public function acceptsSucceedsProvider()
- {
- $testmock = $this->getMock('SebastianBergmann\\Comparator\\TestClass');
- $stdmock = $this->getMock('stdClass');
-
- return array(
- array($testmock, $testmock),
- array($stdmock, $stdmock),
- array($stdmock, $testmock)
- );
- }
-
- public function acceptsFailsProvider()
- {
- $stdmock = $this->getMock('stdClass');
-
- return array(
- array($stdmock, null),
- array(null, $stdmock),
- array(null, null)
- );
- }
-
- public function assertEqualsSucceedsProvider()
- {
- // cyclic dependencies
- $book1 = $this->getMock('SebastianBergmann\\Comparator\\Book', null);
- $book1->author = $this->getMock('SebastianBergmann\\Comparator\\Author', null, array('Terry Pratchett'));
- $book1->author->books[] = $book1;
- $book2 = $this->getMock('SebastianBergmann\\Comparator\\Book', null);
- $book2->author = $this->getMock('SebastianBergmann\\Comparator\\Author', null, array('Terry Pratchett'));
- $book2->author->books[] = $book2;
-
- $object1 = $this->getMock('SebastianBergmann\\Comparator\\SampleClass', null, array(4, 8, 15));
- $object2 = $this->getMock('SebastianBergmann\\Comparator\\SampleClass', null, array(4, 8, 15));
-
- return array(
- array($object1, $object1),
- array($object1, $object2),
- array($book1, $book1),
- array($book1, $book2),
- array(
- $this->getMock('SebastianBergmann\\Comparator\\Struct', null, array(2.3)),
- $this->getMock('SebastianBergmann\\Comparator\\Struct', null, array(2.5)),
- 0.5
- )
- );
- }
-
- public function assertEqualsFailsProvider()
- {
- $typeMessage = 'is not instance of expected class';
- $equalMessage = 'Failed asserting that two objects are equal.';
-
- // cyclic dependencies
- $book1 = $this->getMock('SebastianBergmann\\Comparator\\Book', null);
- $book1->author = $this->getMock('SebastianBergmann\\Comparator\\Author', null, array('Terry Pratchett'));
- $book1->author->books[] = $book1;
- $book2 = $this->getMock('SebastianBergmann\\Comparator\\Book', null);
- $book2->author = $this->getMock('SebastianBergmann\\Comparator\\Author', null, array('Terry Pratch'));
- $book2->author->books[] = $book2;
-
- $book3 = $this->getMock('SebastianBergmann\\Comparator\\Book', null);
- $book3->author = 'Terry Pratchett';
- $book4 = $this->getMock('stdClass');
- $book4->author = 'Terry Pratchett';
-
- $object1 = $this->getMock('SebastianBergmann\\Comparator\\SampleClass', null, array(4, 8, 15));
- $object2 = $this->getMock('SebastianBergmann\\Comparator\\SampleClass', null, array(16, 23, 42));
-
- return array(
- array(
- $this->getMock('SebastianBergmann\\Comparator\\SampleClass', null, array(4, 8, 15)),
- $this->getMock('SebastianBergmann\\Comparator\\SampleClass', null, array(16, 23, 42)),
- $equalMessage
- ),
- array($object1, $object2, $equalMessage),
- array($book1, $book2, $equalMessage),
- array($book3, $book4, $typeMessage),
- array(
- $this->getMock('SebastianBergmann\\Comparator\\Struct', null, array(2.3)),
- $this->getMock('SebastianBergmann\\Comparator\\Struct', null, array(4.2)),
- $equalMessage,
- 0.5
- )
- );
- }
-
- /**
- * @covers ::accepts
- * @dataProvider acceptsSucceedsProvider
- */
- public function testAcceptsSucceeds($expected, $actual)
- {
- $this->assertTrue(
- $this->comparator->accepts($expected, $actual)
- );
- }
-
- /**
- * @covers ::accepts
- * @dataProvider acceptsFailsProvider
- */
- public function testAcceptsFails($expected, $actual)
- {
- $this->assertFalse(
- $this->comparator->accepts($expected, $actual)
- );
- }
-
- /**
- * @covers ::assertEquals
- * @dataProvider assertEqualsSucceedsProvider
- */
- public function testAssertEqualsSucceeds($expected, $actual, $delta = 0.0)
- {
- $exception = null;
-
- try {
- $this->comparator->assertEquals($expected, $actual, $delta);
- }
-
- catch (ComparisonFailure $exception) {
- }
-
- $this->assertNull($exception, 'Unexpected ComparisonFailure');
- }
-
- /**
- * @covers ::assertEquals
- * @dataProvider assertEqualsFailsProvider
- */
- public function testAssertEqualsFails($expected, $actual, $message, $delta = 0.0)
- {
- $this->setExpectedException(
- 'SebastianBergmann\\Comparator\\ComparisonFailure', $message
- );
- $this->comparator->assertEquals($expected, $actual, $delta);
- }
-}
diff --git a/vendor/sebastian/comparator/tests/NumericComparatorTest.php b/vendor/sebastian/comparator/tests/NumericComparatorTest.php
deleted file mode 100644
index fec7d00a..00000000
--- a/vendor/sebastian/comparator/tests/NumericComparatorTest.php
+++ /dev/null
@@ -1,122 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-/**
- * @coversDefaultClass SebastianBergmann\Comparator\NumericComparator
- *
- */
-class NumericComparatorTest extends \PHPUnit_Framework_TestCase
-{
- private $comparator;
-
- protected function setUp()
- {
- $this->comparator = new NumericComparator;
- }
-
- public function acceptsSucceedsProvider()
- {
- return array(
- array(5, 10),
- array(8, '0'),
- array('10', 0),
- array(0x74c3b00c, 42),
- array(0755, 0777)
- );
- }
-
- public function acceptsFailsProvider()
- {
- return array(
- array('5', '10'),
- array(8, 5.0),
- array(5.0, 8),
- array(10, null),
- array(false, 12)
- );
- }
-
- public function assertEqualsSucceedsProvider()
- {
- return array(
- array(1337, 1337),
- array('1337', 1337),
- array(0x539, 1337),
- array(02471, 1337),
- array(1337, 1338, 1),
- array('1337', 1340, 5),
- );
- }
-
- public function assertEqualsFailsProvider()
- {
- return array(
- array(1337, 1338),
- array('1338', 1337),
- array(0x539, 1338),
- array(1337, 1339, 1),
- array('1337', 1340, 2),
- );
- }
-
- /**
- * @covers ::accepts
- * @dataProvider acceptsSucceedsProvider
- */
- public function testAcceptsSucceeds($expected, $actual)
- {
- $this->assertTrue(
- $this->comparator->accepts($expected, $actual)
- );
- }
-
- /**
- * @covers ::accepts
- * @dataProvider acceptsFailsProvider
- */
- public function testAcceptsFails($expected, $actual)
- {
- $this->assertFalse(
- $this->comparator->accepts($expected, $actual)
- );
- }
-
- /**
- * @covers ::assertEquals
- * @dataProvider assertEqualsSucceedsProvider
- */
- public function testAssertEqualsSucceeds($expected, $actual, $delta = 0.0)
- {
- $exception = null;
-
- try {
- $this->comparator->assertEquals($expected, $actual, $delta);
- }
-
- catch (ComparisonFailure $exception) {
- }
-
- $this->assertNull($exception, 'Unexpected ComparisonFailure');
- }
-
- /**
- * @covers ::assertEquals
- * @dataProvider assertEqualsFailsProvider
- */
- public function testAssertEqualsFails($expected, $actual, $delta = 0.0)
- {
- $this->setExpectedException(
- 'SebastianBergmann\\Comparator\\ComparisonFailure', 'matches expected'
- );
- $this->comparator->assertEquals($expected, $actual, $delta);
- }
-}
diff --git a/vendor/sebastian/comparator/tests/ObjectComparatorTest.php b/vendor/sebastian/comparator/tests/ObjectComparatorTest.php
deleted file mode 100644
index a9582325..00000000
--- a/vendor/sebastian/comparator/tests/ObjectComparatorTest.php
+++ /dev/null
@@ -1,150 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-use stdClass;
-
-/**
- * @coversDefaultClass SebastianBergmann\Comparator\ObjectComparator
- *
- */
-class ObjectComparatorTest extends \PHPUnit_Framework_TestCase
-{
- private $comparator;
-
- protected function setUp()
- {
- $this->comparator = new ObjectComparator;
- $this->comparator->setFactory(new Factory);
- }
-
- public function acceptsSucceedsProvider()
- {
- return array(
- array(new TestClass, new TestClass),
- array(new stdClass, new stdClass),
- array(new stdClass, new TestClass)
- );
- }
-
- public function acceptsFailsProvider()
- {
- return array(
- array(new stdClass, null),
- array(null, new stdClass),
- array(null, null)
- );
- }
-
- public function assertEqualsSucceedsProvider()
- {
- // cyclic dependencies
- $book1 = new Book;
- $book1->author = new Author('Terry Pratchett');
- $book1->author->books[] = $book1;
- $book2 = new Book;
- $book2->author = new Author('Terry Pratchett');
- $book2->author->books[] = $book2;
-
- $object1 = new SampleClass(4, 8, 15);
- $object2 = new SampleClass(4, 8, 15);
-
- return array(
- array($object1, $object1),
- array($object1, $object2),
- array($book1, $book1),
- array($book1, $book2),
- array(new Struct(2.3), new Struct(2.5), 0.5)
- );
- }
-
- public function assertEqualsFailsProvider()
- {
- $typeMessage = 'is not instance of expected class';
- $equalMessage = 'Failed asserting that two objects are equal.';
-
- // cyclic dependencies
- $book1 = new Book;
- $book1->author = new Author('Terry Pratchett');
- $book1->author->books[] = $book1;
- $book2 = new Book;
- $book2->author = new Author('Terry Pratch');
- $book2->author->books[] = $book2;
-
- $book3 = new Book;
- $book3->author = 'Terry Pratchett';
- $book4 = new stdClass;
- $book4->author = 'Terry Pratchett';
-
- $object1 = new SampleClass( 4, 8, 15);
- $object2 = new SampleClass(16, 23, 42);
-
- return array(
- array(new SampleClass(4, 8, 15), new SampleClass(16, 23, 42), $equalMessage),
- array($object1, $object2, $equalMessage),
- array($book1, $book2, $equalMessage),
- array($book3, $book4, $typeMessage),
- array(new Struct(2.3), new Struct(4.2), $equalMessage, 0.5)
- );
- }
-
- /**
- * @covers ::accepts
- * @dataProvider acceptsSucceedsProvider
- */
- public function testAcceptsSucceeds($expected, $actual)
- {
- $this->assertTrue(
- $this->comparator->accepts($expected, $actual)
- );
- }
-
- /**
- * @covers ::accepts
- * @dataProvider acceptsFailsProvider
- */
- public function testAcceptsFails($expected, $actual)
- {
- $this->assertFalse(
- $this->comparator->accepts($expected, $actual)
- );
- }
-
- /**
- * @covers ::assertEquals
- * @dataProvider assertEqualsSucceedsProvider
- */
- public function testAssertEqualsSucceeds($expected, $actual, $delta = 0.0)
- {
- $exception = null;
-
- try {
- $this->comparator->assertEquals($expected, $actual, $delta);
- }
-
- catch (ComparisonFailure $exception) {
- }
-
- $this->assertNull($exception, 'Unexpected ComparisonFailure');
- }
-
- /**
- * @covers ::assertEquals
- * @dataProvider assertEqualsFailsProvider
- */
- public function testAssertEqualsFails($expected, $actual, $message, $delta = 0.0)
- {
- $this->setExpectedException(
- 'SebastianBergmann\\Comparator\\ComparisonFailure', $message
- );
- $this->comparator->assertEquals($expected, $actual, $delta);
- }
-}
diff --git a/vendor/sebastian/comparator/tests/ResourceComparatorTest.php b/vendor/sebastian/comparator/tests/ResourceComparatorTest.php
deleted file mode 100644
index a9e9e955..00000000
--- a/vendor/sebastian/comparator/tests/ResourceComparatorTest.php
+++ /dev/null
@@ -1,120 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-/**
- * @coversDefaultClass SebastianBergmann\Comparator\ResourceComparator
- *
- */
-class ResourceComparatorTest extends \PHPUnit_Framework_TestCase
-{
- private $comparator;
-
- protected function setUp()
- {
- $this->comparator = new ResourceComparator;
- }
-
- public function acceptsSucceedsProvider()
- {
- $tmpfile1 = tmpfile();
- $tmpfile2 = tmpfile();
-
- return array(
- array($tmpfile1, $tmpfile1),
- array($tmpfile2, $tmpfile2),
- array($tmpfile1, $tmpfile2)
- );
- }
-
- public function acceptsFailsProvider()
- {
- $tmpfile1 = tmpfile();
-
- return array(
- array($tmpfile1, null),
- array(null, $tmpfile1),
- array(null, null)
- );
- }
-
- public function assertEqualsSucceedsProvider()
- {
- $tmpfile1 = tmpfile();
- $tmpfile2 = tmpfile();
-
- return array(
- array($tmpfile1, $tmpfile1),
- array($tmpfile2, $tmpfile2)
- );
- }
-
- public function assertEqualsFailsProvider()
- {
- $tmpfile1 = tmpfile();
- $tmpfile2 = tmpfile();
-
- return array(
- array($tmpfile1, $tmpfile2),
- array($tmpfile2, $tmpfile1)
- );
- }
-
- /**
- * @covers ::accepts
- * @dataProvider acceptsSucceedsProvider
- */
- public function testAcceptsSucceeds($expected, $actual)
- {
- $this->assertTrue(
- $this->comparator->accepts($expected, $actual)
- );
- }
-
- /**
- * @covers ::accepts
- * @dataProvider acceptsFailsProvider
- */
- public function testAcceptsFails($expected, $actual)
- {
- $this->assertFalse(
- $this->comparator->accepts($expected, $actual)
- );
- }
-
- /**
- * @covers ::assertEquals
- * @dataProvider assertEqualsSucceedsProvider
- */
- public function testAssertEqualsSucceeds($expected, $actual)
- {
- $exception = null;
-
- try {
- $this->comparator->assertEquals($expected, $actual);
- }
-
- catch (ComparisonFailure $exception) {
- }
-
- $this->assertNull($exception, 'Unexpected ComparisonFailure');
- }
-
- /**
- * @covers ::assertEquals
- * @dataProvider assertEqualsFailsProvider
- */
- public function testAssertEqualsFails($expected, $actual)
- {
- $this->setExpectedException('SebastianBergmann\\Comparator\\ComparisonFailure');
- $this->comparator->assertEquals($expected, $actual);
- }
-}
diff --git a/vendor/sebastian/comparator/tests/ScalarComparatorTest.php b/vendor/sebastian/comparator/tests/ScalarComparatorTest.php
deleted file mode 100644
index e5156aa3..00000000
--- a/vendor/sebastian/comparator/tests/ScalarComparatorTest.php
+++ /dev/null
@@ -1,158 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-/**
- * @coversDefaultClass SebastianBergmann\Comparator\ScalarComparator
- *
- */
-class ScalarComparatorTest extends \PHPUnit_Framework_TestCase
-{
- private $comparator;
-
- protected function setUp()
- {
- $this->comparator = new ScalarComparator;
- }
-
- public function acceptsSucceedsProvider()
- {
- return array(
- array("string", "string"),
- array(new ClassWithToString, "string"),
- array("string", new ClassWithToString),
- array("string", null),
- array(false, "string"),
- array(false, true),
- array(null, false),
- array(null, null),
- array("10", 10),
- array("", false),
- array("1", true),
- array(1, true),
- array(0, false),
- array(0.1, "0.1")
- );
- }
-
- public function acceptsFailsProvider()
- {
- return array(
- array(array(), array()),
- array("string", array()),
- array(new ClassWithToString, new ClassWithToString),
- array(false, new ClassWithToString),
- array(tmpfile(), tmpfile())
- );
- }
-
- public function assertEqualsSucceedsProvider()
- {
- return array(
- array("string", "string"),
- array(new ClassWithToString, new ClassWithToString),
- array("string representation", new ClassWithToString),
- array(new ClassWithToString, "string representation"),
- array("string", "STRING", true),
- array("STRING", "string", true),
- array("String Representation", new ClassWithToString, true),
- array(new ClassWithToString, "String Representation", true),
- array("10", 10),
- array("", false),
- array("1", true),
- array(1, true),
- array(0, false),
- array(0.1, "0.1"),
- array(false, null),
- array(false, false),
- array(true, true),
- array(null, null)
- );
- }
-
- public function assertEqualsFailsProvider()
- {
- $stringException = 'Failed asserting that two strings are equal.';
- $otherException = 'matches expected';
-
- return array(
- array("string", "other string", $stringException),
- array("string", "STRING", $stringException),
- array("STRING", "string", $stringException),
- array("string", "other string", $stringException),
- // https://github.com/sebastianbergmann/phpunit/issues/1023
- array('9E6666666','9E7777777', $stringException),
- array(new ClassWithToString, "does not match", $otherException),
- array("does not match", new ClassWithToString, $otherException),
- array(0, 'Foobar', $otherException),
- array('Foobar', 0, $otherException),
- array("10", 25, $otherException),
- array("1", false, $otherException),
- array("", true, $otherException),
- array(false, true, $otherException),
- array(true, false, $otherException),
- array(null, true, $otherException),
- array(0, true, $otherException)
- );
- }
-
- /**
- * @covers ::accepts
- * @dataProvider acceptsSucceedsProvider
- */
- public function testAcceptsSucceeds($expected, $actual)
- {
- $this->assertTrue(
- $this->comparator->accepts($expected, $actual)
- );
- }
-
- /**
- * @covers ::accepts
- * @dataProvider acceptsFailsProvider
- */
- public function testAcceptsFails($expected, $actual)
- {
- $this->assertFalse(
- $this->comparator->accepts($expected, $actual)
- );
- }
-
- /**
- * @covers ::assertEquals
- * @dataProvider assertEqualsSucceedsProvider
- */
- public function testAssertEqualsSucceeds($expected, $actual, $ignoreCase = false)
- {
- $exception = null;
-
- try {
- $this->comparator->assertEquals($expected, $actual, 0.0, false, $ignoreCase);
- }
-
- catch (ComparisonFailure $exception) {
- }
-
- $this->assertNull($exception, 'Unexpected ComparisonFailure');
- }
-
- /**
- * @covers ::assertEquals
- * @dataProvider assertEqualsFailsProvider
- */
- public function testAssertEqualsFails($expected, $actual, $message)
- {
- $this->setExpectedException(
- 'SebastianBergmann\\Comparator\\ComparisonFailure', $message
- );
- $this->comparator->assertEquals($expected, $actual);
- }
-}
diff --git a/vendor/sebastian/comparator/tests/SplObjectStorageComparatorTest.php b/vendor/sebastian/comparator/tests/SplObjectStorageComparatorTest.php
deleted file mode 100644
index 766dd2df..00000000
--- a/vendor/sebastian/comparator/tests/SplObjectStorageComparatorTest.php
+++ /dev/null
@@ -1,137 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-use SplObjectStorage;
-use stdClass;
-
-/**
- * @coversDefaultClass SebastianBergmann\Comparator\SplObjectStorageComparator
- *
- */
-class SplObjectStorageComparatorTest extends \PHPUnit_Framework_TestCase
-{
- private $comparator;
-
- protected function setUp()
- {
- $this->comparator = new SplObjectStorageComparator;
- }
-
- public function acceptsFailsProvider()
- {
- return array(
- array(new SplObjectStorage, new stdClass),
- array(new stdClass, new SplObjectStorage),
- array(new stdClass, new stdClass)
- );
- }
-
- public function assertEqualsSucceedsProvider()
- {
- $object1 = new stdClass();
- $object2 = new stdClass();
-
- $storage1 = new SplObjectStorage();
- $storage2 = new SplObjectStorage();
-
- $storage3 = new SplObjectStorage();
- $storage3->attach($object1);
- $storage3->attach($object2);
-
- $storage4 = new SplObjectStorage();
- $storage4->attach($object2);
- $storage4->attach($object1);
-
- return array(
- array($storage1, $storage1),
- array($storage1, $storage2),
- array($storage3, $storage3),
- array($storage3, $storage4)
- );
- }
-
- public function assertEqualsFailsProvider()
- {
- $object1 = new stdClass;
- $object2 = new stdClass;
-
- $storage1 = new SplObjectStorage;
-
- $storage2 = new SplObjectStorage;
- $storage2->attach($object1);
-
- $storage3 = new SplObjectStorage;
- $storage3->attach($object2);
- $storage3->attach($object1);
-
- return array(
- array($storage1, $storage2),
- array($storage1, $storage3),
- array($storage2, $storage3),
- );
- }
-
- /**
- * @covers ::accepts
- */
- public function testAcceptsSucceeds()
- {
- $this->assertTrue(
- $this->comparator->accepts(
- new SplObjectStorage,
- new SplObjectStorage
- )
- );
- }
-
- /**
- * @covers ::accepts
- * @dataProvider acceptsFailsProvider
- */
- public function testAcceptsFails($expected, $actual)
- {
- $this->assertFalse(
- $this->comparator->accepts($expected, $actual)
- );
- }
-
- /**
- * @covers ::assertEquals
- * @dataProvider assertEqualsSucceedsProvider
- */
- public function testAssertEqualsSucceeds($expected, $actual)
- {
- $exception = null;
-
- try {
- $this->comparator->assertEquals($expected, $actual);
- }
-
- catch (ComparisonFailure $exception) {
- }
-
- $this->assertNull($exception, 'Unexpected ComparisonFailure');
- }
-
- /**
- * @covers ::assertEquals
- * @dataProvider assertEqualsFailsProvider
- */
- public function testAssertEqualsFails($expected, $actual)
- {
- $this->setExpectedException(
- 'SebastianBergmann\\Comparator\\ComparisonFailure',
- 'Failed asserting that two objects are equal.'
- );
- $this->comparator->assertEquals($expected, $actual);
- }
-}
diff --git a/vendor/sebastian/comparator/tests/TypeComparatorTest.php b/vendor/sebastian/comparator/tests/TypeComparatorTest.php
deleted file mode 100644
index bb51f8a1..00000000
--- a/vendor/sebastian/comparator/tests/TypeComparatorTest.php
+++ /dev/null
@@ -1,104 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-use stdClass;
-
-/**
- * @coversDefaultClass SebastianBergmann\Comparator\TypeComparator
- *
- */
-class TypeComparatorTest extends \PHPUnit_Framework_TestCase
-{
- private $comparator;
-
- protected function setUp()
- {
- $this->comparator = new TypeComparator;
- }
-
- public function acceptsSucceedsProvider()
- {
- return array(
- array(true, 1),
- array(false, array(1)),
- array(null, new stdClass),
- array(1.0, 5),
- array("", "")
- );
- }
-
- public function assertEqualsSucceedsProvider()
- {
- return array(
- array(true, true),
- array(true, false),
- array(false, false),
- array(null, null),
- array(new stdClass, new stdClass),
- array(0, 0),
- array(1.0, 2.0),
- array("hello", "world"),
- array("", ""),
- array(array(), array(1,2,3))
- );
- }
-
- public function assertEqualsFailsProvider()
- {
- return array(
- array(true, null),
- array(null, false),
- array(1.0, 0),
- array(new stdClass, array()),
- array("1", 1)
- );
- }
-
- /**
- * @covers ::accepts
- * @dataProvider acceptsSucceedsProvider
- */
- public function testAcceptsSucceeds($expected, $actual)
- {
- $this->assertTrue(
- $this->comparator->accepts($expected, $actual)
- );
- }
-
- /**
- * @covers ::assertEquals
- * @dataProvider assertEqualsSucceedsProvider
- */
- public function testAssertEqualsSucceeds($expected, $actual)
- {
- $exception = null;
-
- try {
- $this->comparator->assertEquals($expected, $actual);
- }
-
- catch (ComparisonFailure $exception) {
- }
-
- $this->assertNull($exception, 'Unexpected ComparisonFailure');
- }
-
- /**
- * @covers ::assertEquals
- * @dataProvider assertEqualsFailsProvider
- */
- public function testAssertEqualsFails($expected, $actual)
- {
- $this->setExpectedException('SebastianBergmann\\Comparator\\ComparisonFailure', 'does not match expected type');
- $this->comparator->assertEquals($expected, $actual);
- }
-}
diff --git a/vendor/sebastian/comparator/tests/_files/Author.php b/vendor/sebastian/comparator/tests/_files/Author.php
deleted file mode 100644
index ae698c3c..00000000
--- a/vendor/sebastian/comparator/tests/_files/Author.php
+++ /dev/null
@@ -1,28 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-/**
- * An author.
- *
- */
-class Author
-{
- // the order of properties is important for testing the cycle!
- public $books = array();
-
- private $name = '';
-
- public function __construct($name)
- {
- $this->name = $name;
- }
-}
diff --git a/vendor/sebastian/comparator/tests/_files/Book.php b/vendor/sebastian/comparator/tests/_files/Book.php
deleted file mode 100644
index 6171bc33..00000000
--- a/vendor/sebastian/comparator/tests/_files/Book.php
+++ /dev/null
@@ -1,21 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-/**
- * A book.
- *
- */
-class Book
-{
- // the order of properties is important for testing the cycle!
- public $author = null;
-}
diff --git a/vendor/sebastian/comparator/tests/_files/ClassWithToString.php b/vendor/sebastian/comparator/tests/_files/ClassWithToString.php
deleted file mode 100644
index e8e03bc7..00000000
--- a/vendor/sebastian/comparator/tests/_files/ClassWithToString.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-class ClassWithToString
-{
- public function __toString()
- {
- return 'string representation';
- }
-}
diff --git a/vendor/sebastian/comparator/tests/_files/SampleClass.php b/vendor/sebastian/comparator/tests/_files/SampleClass.php
deleted file mode 100644
index 6079dd34..00000000
--- a/vendor/sebastian/comparator/tests/_files/SampleClass.php
+++ /dev/null
@@ -1,29 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-/**
- * A sample class.
- *
- */
-class SampleClass
-{
- public $a;
- protected $b;
- protected $c;
-
- public function __construct($a, $b, $c)
- {
- $this->a = $a;
- $this->b = $b;
- $this->c = $c;
- }
-}
diff --git a/vendor/sebastian/comparator/tests/_files/Struct.php b/vendor/sebastian/comparator/tests/_files/Struct.php
deleted file mode 100644
index 79ec559a..00000000
--- a/vendor/sebastian/comparator/tests/_files/Struct.php
+++ /dev/null
@@ -1,25 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-/**
- * A struct.
- *
- */
-class Struct
-{
- public $var;
-
- public function __construct($var)
- {
- $this->var = $var;
- }
-}
diff --git a/vendor/sebastian/comparator/tests/_files/TestClass.php b/vendor/sebastian/comparator/tests/_files/TestClass.php
deleted file mode 100644
index e4c9b78c..00000000
--- a/vendor/sebastian/comparator/tests/_files/TestClass.php
+++ /dev/null
@@ -1,14 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-class TestClass {
-}
diff --git a/vendor/sebastian/comparator/tests/_files/TestClassComparator.php b/vendor/sebastian/comparator/tests/_files/TestClassComparator.php
deleted file mode 100644
index 52aac3fd..00000000
--- a/vendor/sebastian/comparator/tests/_files/TestClassComparator.php
+++ /dev/null
@@ -1,14 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Comparator;
-
-class TestClassComparator extends ObjectComparator {
-}
diff --git a/vendor/sebastian/comparator/tests/autoload.php b/vendor/sebastian/comparator/tests/autoload.php
deleted file mode 100644
index f4d9bbcc..00000000
--- a/vendor/sebastian/comparator/tests/autoload.php
+++ /dev/null
@@ -1,38 +0,0 @@
- '/ArrayComparatorTest.php',
- 'sebastianbergmann\\comparator\\author' => '/_files/Author.php',
- 'sebastianbergmann\\comparator\\book' => '/_files/Book.php',
- 'sebastianbergmann\\comparator\\classwithtostring' => '/_files/ClassWithToString.php',
- 'sebastianbergmann\\comparator\\datetimecomparatortest' => '/DateTimeComparatorTest.php',
- 'sebastianbergmann\\comparator\\domnodecomparatortest' => '/DOMNodeComparatorTest.php',
- 'sebastianbergmann\\comparator\\doublecomparatortest' => '/DoubleComparatorTest.php',
- 'sebastianbergmann\\comparator\\exceptioncomparatortest' => '/ExceptionComparatorTest.php',
- 'sebastianbergmann\\comparator\\factorytest' => '/FactoryTest.php',
- 'sebastianbergmann\\comparator\\mockobjectcomparatortest' => '/MockObjectComparatorTest.php',
- 'sebastianbergmann\\comparator\\numericcomparatortest' => '/NumericComparatorTest.php',
- 'sebastianbergmann\\comparator\\objectcomparatortest' => '/ObjectComparatorTest.php',
- 'sebastianbergmann\\comparator\\resourcecomparatortest' => '/ResourceComparatorTest.php',
- 'sebastianbergmann\\comparator\\sampleclass' => '/_files/SampleClass.php',
- 'sebastianbergmann\\comparator\\scalarcomparatortest' => '/ScalarComparatorTest.php',
- 'sebastianbergmann\\comparator\\splobjectstoragecomparatortest' => '/SplObjectStorageComparatorTest.php',
- 'sebastianbergmann\\comparator\\struct' => '/_files/Struct.php',
- 'sebastianbergmann\\comparator\\testclass' => '/_files/TestClass.php',
- 'sebastianbergmann\\comparator\\testclasscomparator' => '/_files/TestClassComparator.php',
- 'sebastianbergmann\\comparator\\typecomparatortest' => '/TypeComparatorTest.php'
- );
- }
- $cn = strtolower($class);
- if (isset($classes[$cn])) {
- require __DIR__ . $classes[$cn];
- }
- }
-);
-// @codeCoverageIgnoreEnd
diff --git a/vendor/sebastian/comparator/tests/bootstrap.php b/vendor/sebastian/comparator/tests/bootstrap.php
deleted file mode 100644
index 8f1c57c3..00000000
--- a/vendor/sebastian/comparator/tests/bootstrap.php
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-For the full copyright and license information, please view the LICENSE
-file that was distributed with this source code.
-EOF;
-
-return PhpCsFixer\Config::create()
- ->setRiskyAllowed(true)
- ->setRules(
- [
- 'array_syntax' => ['syntax' => 'long'],
- 'binary_operator_spaces' => [
- 'align_double_arrow' => true,
- 'align_equals' => true
- ],
- 'blank_line_after_namespace' => true,
- 'blank_line_before_return' => true,
- 'braces' => true,
- 'cast_spaces' => true,
- 'concat_space' => ['spacing' => 'one'],
- 'elseif' => true,
- 'encoding' => true,
- 'full_opening_tag' => true,
- 'function_declaration' => true,
- 'header_comment' => ['header' => $header, 'separate' => 'none'],
- 'indentation_type' => true,
- 'line_ending' => true,
- 'lowercase_constants' => true,
- 'lowercase_keywords' => true,
- 'method_argument_space' => true,
- 'native_function_invocation' => true,
- 'no_alias_functions' => true,
- 'no_blank_lines_after_class_opening' => true,
- 'no_blank_lines_after_phpdoc' => true,
- 'no_closing_tag' => true,
- 'no_empty_phpdoc' => true,
- 'no_empty_statement' => true,
- 'no_extra_consecutive_blank_lines' => true,
- 'no_leading_namespace_whitespace' => true,
- 'no_singleline_whitespace_before_semicolons' => true,
- 'no_spaces_after_function_name' => true,
- 'no_spaces_inside_parenthesis' => true,
- 'no_trailing_comma_in_list_call' => true,
- 'no_trailing_whitespace' => true,
- 'no_unused_imports' => true,
- 'no_whitespace_in_blank_line' => true,
- 'phpdoc_align' => true,
- 'phpdoc_indent' => true,
- 'phpdoc_no_access' => true,
- 'phpdoc_no_empty_return' => true,
- 'phpdoc_no_package' => true,
- 'phpdoc_scalar' => true,
- 'phpdoc_separation' => true,
- 'phpdoc_to_comment' => true,
- 'phpdoc_trim' => true,
- 'phpdoc_types' => true,
- 'phpdoc_var_without_name' => true,
- 'self_accessor' => true,
- 'simplified_null_return' => true,
- 'single_blank_line_at_eof' => true,
- 'single_import_per_statement' => true,
- 'single_line_after_imports' => true,
- 'single_quote' => true,
- 'ternary_operator_spaces' => true,
- 'trim_array_spaces' => true,
- 'visibility_required' => true,
- ]
- )
- ->setFinder(
- PhpCsFixer\Finder::create()
- ->files()
- ->in(__DIR__ . '/src')
- ->in(__DIR__ . '/tests')
- ->name('*.php')
- );
diff --git a/vendor/sebastian/diff/.travis.yml b/vendor/sebastian/diff/.travis.yml
deleted file mode 100644
index fa69ad1c..00000000
--- a/vendor/sebastian/diff/.travis.yml
+++ /dev/null
@@ -1,31 +0,0 @@
-language: php
-
-php:
- - 5.3
- - 5.4
- - 5.5
- - 5.6
- - 7.0
- - 7.0snapshot
- - 7.1
- - 7.1snapshot
- - master
-
-sudo: false
-
-before_install:
- - composer self-update
- - composer clear-cache
-
-install:
- - travis_retry composer update --no-interaction --no-ansi --no-progress --no-suggest --optimize-autoloader --prefer-stable
-
-script:
- - ./vendor/bin/phpunit --coverage-clover=coverage.xml
-
-after_success:
- - bash <(curl -s https://codecov.io/bash)
-
-notifications:
- email: false
-
diff --git a/vendor/sebastian/diff/LICENSE b/vendor/sebastian/diff/LICENSE
deleted file mode 100644
index e1ddf136..00000000
--- a/vendor/sebastian/diff/LICENSE
+++ /dev/null
@@ -1,33 +0,0 @@
-sebastian/diff
-
-Copyright (c) 2002-2017, Sebastian Bergmann .
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- * Neither the name of Sebastian Bergmann nor the names of his
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/sebastian/diff/README.md b/vendor/sebastian/diff/README.md
deleted file mode 100644
index 956038b4..00000000
--- a/vendor/sebastian/diff/README.md
+++ /dev/null
@@ -1,126 +0,0 @@
-# sebastian/diff
-
-Diff implementation for PHP, factored out of PHPUnit into a stand-alone component.
-
-## Installation
-
-You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/):
-
- composer require sebastian/diff
-
-If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:
-
- composer require --dev sebastian/diff
-
-### Usage
-
-The `Differ` class can be used to generate a textual representation of the difference between two strings:
-
-```php
-use SebastianBergmann\Diff\Differ;
-
-$differ = new Differ;
-print $differ->diff('foo', 'bar');
-```
-
-The code above yields the output below:
-
- --- Original
- +++ New
- @@ @@
- -foo
- +bar
-
-The `Parser` class can be used to parse a unified diff into an object graph:
-
-```php
-use SebastianBergmann\Diff\Parser;
-use SebastianBergmann\Git;
-
-$git = new Git('/usr/local/src/money');
-
-$diff = $git->getDiff(
- '948a1a07768d8edd10dcefa8315c1cbeffb31833',
- 'c07a373d2399f3e686234c4f7f088d635eb9641b'
-);
-
-$parser = new Parser;
-
-print_r($parser->parse($diff));
-```
-
-The code above yields the output below:
-
- Array
- (
- [0] => SebastianBergmann\Diff\Diff Object
- (
- [from:SebastianBergmann\Diff\Diff:private] => a/tests/MoneyTest.php
- [to:SebastianBergmann\Diff\Diff:private] => b/tests/MoneyTest.php
- [chunks:SebastianBergmann\Diff\Diff:private] => Array
- (
- [0] => SebastianBergmann\Diff\Chunk Object
- (
- [start:SebastianBergmann\Diff\Chunk:private] => 87
- [startRange:SebastianBergmann\Diff\Chunk:private] => 7
- [end:SebastianBergmann\Diff\Chunk:private] => 87
- [endRange:SebastianBergmann\Diff\Chunk:private] => 7
- [lines:SebastianBergmann\Diff\Chunk:private] => Array
- (
- [0] => SebastianBergmann\Diff\Line Object
- (
- [type:SebastianBergmann\Diff\Line:private] => 3
- [content:SebastianBergmann\Diff\Line:private] => * @covers SebastianBergmann\Money\Money::add
- )
-
- [1] => SebastianBergmann\Diff\Line Object
- (
- [type:SebastianBergmann\Diff\Line:private] => 3
- [content:SebastianBergmann\Diff\Line:private] => * @covers SebastianBergmann\Money\Money::newMoney
- )
-
- [2] => SebastianBergmann\Diff\Line Object
- (
- [type:SebastianBergmann\Diff\Line:private] => 3
- [content:SebastianBergmann\Diff\Line:private] => */
- )
-
- [3] => SebastianBergmann\Diff\Line Object
- (
- [type:SebastianBergmann\Diff\Line:private] => 2
- [content:SebastianBergmann\Diff\Line:private] => public function testAnotherMoneyWithSameCurrencyObjectCanBeAdded()
- )
-
- [4] => SebastianBergmann\Diff\Line Object
- (
- [type:SebastianBergmann\Diff\Line:private] => 1
- [content:SebastianBergmann\Diff\Line:private] => public function testAnotherMoneyObjectWithSameCurrencyCanBeAdded()
- )
-
- [5] => SebastianBergmann\Diff\Line Object
- (
- [type:SebastianBergmann\Diff\Line:private] => 3
- [content:SebastianBergmann\Diff\Line:private] => {
- )
-
- [6] => SebastianBergmann\Diff\Line Object
- (
- [type:SebastianBergmann\Diff\Line:private] => 3
- [content:SebastianBergmann\Diff\Line:private] => $a = new Money(1, new Currency('EUR'));
- )
-
- [7] => SebastianBergmann\Diff\Line Object
- (
- [type:SebastianBergmann\Diff\Line:private] => 3
- [content:SebastianBergmann\Diff\Line:private] => $b = new Money(2, new Currency('EUR'));
- )
-
- )
-
- )
-
- )
-
- )
-
- )
diff --git a/vendor/sebastian/diff/build.xml b/vendor/sebastian/diff/build.xml
deleted file mode 100644
index fa7b7e2b..00000000
--- a/vendor/sebastian/diff/build.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/vendor/sebastian/diff/composer.json b/vendor/sebastian/diff/composer.json
deleted file mode 100644
index 8f2bcf3d..00000000
--- a/vendor/sebastian/diff/composer.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "name": "sebastian/diff",
- "description": "Diff implementation",
- "keywords": ["diff"],
- "homepage": "https://github.com/sebastianbergmann/diff",
- "license": "BSD-3-Clause",
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- },
- {
- "name": "Kore Nordmann",
- "email": "mail@kore-nordmann.de"
- }
- ],
- "require": {
- "php": "^5.3.3 || ^7.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "extra": {
- "branch-alias": {
- "dev-master": "1.4-dev"
- }
- }
-}
diff --git a/vendor/sebastian/diff/src/Chunk.php b/vendor/sebastian/diff/src/Chunk.php
deleted file mode 100644
index 1a6ea730..00000000
--- a/vendor/sebastian/diff/src/Chunk.php
+++ /dev/null
@@ -1,103 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Diff;
-
-class Chunk
-{
- /**
- * @var int
- */
- private $start;
-
- /**
- * @var int
- */
- private $startRange;
-
- /**
- * @var int
- */
- private $end;
-
- /**
- * @var int
- */
- private $endRange;
-
- /**
- * @var array
- */
- private $lines;
-
- /**
- * @param int $start
- * @param int $startRange
- * @param int $end
- * @param int $endRange
- * @param array $lines
- */
- public function __construct($start = 0, $startRange = 1, $end = 0, $endRange = 1, array $lines = array())
- {
- $this->start = (int) $start;
- $this->startRange = (int) $startRange;
- $this->end = (int) $end;
- $this->endRange = (int) $endRange;
- $this->lines = $lines;
- }
-
- /**
- * @return int
- */
- public function getStart()
- {
- return $this->start;
- }
-
- /**
- * @return int
- */
- public function getStartRange()
- {
- return $this->startRange;
- }
-
- /**
- * @return int
- */
- public function getEnd()
- {
- return $this->end;
- }
-
- /**
- * @return int
- */
- public function getEndRange()
- {
- return $this->endRange;
- }
-
- /**
- * @return array
- */
- public function getLines()
- {
- return $this->lines;
- }
-
- /**
- * @param array $lines
- */
- public function setLines(array $lines)
- {
- $this->lines = $lines;
- }
-}
diff --git a/vendor/sebastian/diff/src/Diff.php b/vendor/sebastian/diff/src/Diff.php
deleted file mode 100644
index d3ab3ef4..00000000
--- a/vendor/sebastian/diff/src/Diff.php
+++ /dev/null
@@ -1,73 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Diff;
-
-class Diff
-{
- /**
- * @var string
- */
- private $from;
-
- /**
- * @var string
- */
- private $to;
-
- /**
- * @var Chunk[]
- */
- private $chunks;
-
- /**
- * @param string $from
- * @param string $to
- * @param Chunk[] $chunks
- */
- public function __construct($from, $to, array $chunks = array())
- {
- $this->from = $from;
- $this->to = $to;
- $this->chunks = $chunks;
- }
-
- /**
- * @return string
- */
- public function getFrom()
- {
- return $this->from;
- }
-
- /**
- * @return string
- */
- public function getTo()
- {
- return $this->to;
- }
-
- /**
- * @return Chunk[]
- */
- public function getChunks()
- {
- return $this->chunks;
- }
-
- /**
- * @param Chunk[] $chunks
- */
- public function setChunks(array $chunks)
- {
- $this->chunks = $chunks;
- }
-}
diff --git a/vendor/sebastian/diff/src/Differ.php b/vendor/sebastian/diff/src/Differ.php
deleted file mode 100644
index 116c99c4..00000000
--- a/vendor/sebastian/diff/src/Differ.php
+++ /dev/null
@@ -1,399 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Diff;
-
-use SebastianBergmann\Diff\LCS\LongestCommonSubsequence;
-use SebastianBergmann\Diff\LCS\TimeEfficientImplementation;
-use SebastianBergmann\Diff\LCS\MemoryEfficientImplementation;
-
-/**
- * Diff implementation.
- */
-class Differ
-{
- /**
- * @var string
- */
- private $header;
-
- /**
- * @var bool
- */
- private $showNonDiffLines;
-
- /**
- * @param string $header
- * @param bool $showNonDiffLines
- */
- public function __construct($header = "--- Original\n+++ New\n", $showNonDiffLines = true)
- {
- $this->header = $header;
- $this->showNonDiffLines = $showNonDiffLines;
- }
-
- /**
- * Returns the diff between two arrays or strings as string.
- *
- * @param array|string $from
- * @param array|string $to
- * @param LongestCommonSubsequence $lcs
- *
- * @return string
- */
- public function diff($from, $to, LongestCommonSubsequence $lcs = null)
- {
- $from = $this->validateDiffInput($from);
- $to = $this->validateDiffInput($to);
- $diff = $this->diffToArray($from, $to, $lcs);
- $old = $this->checkIfDiffInOld($diff);
- $start = isset($old[0]) ? $old[0] : 0;
- $end = \count($diff);
-
- if ($tmp = \array_search($end, $old)) {
- $end = $tmp;
- }
-
- return $this->getBuffer($diff, $old, $start, $end);
- }
-
- /**
- * Casts variable to string if it is not a string or array.
- *
- * @param mixed $input
- *
- * @return string
- */
- private function validateDiffInput($input)
- {
- if (!\is_array($input) && !\is_string($input)) {
- return (string) $input;
- }
-
- return $input;
- }
-
- /**
- * Takes input of the diff array and returns the old array.
- * Iterates through diff line by line,
- *
- * @param array $diff
- *
- * @return array
- */
- private function checkIfDiffInOld(array $diff)
- {
- $inOld = false;
- $i = 0;
- $old = array();
-
- foreach ($diff as $line) {
- if ($line[1] === 0 /* OLD */) {
- if ($inOld === false) {
- $inOld = $i;
- }
- } elseif ($inOld !== false) {
- if (($i - $inOld) > 5) {
- $old[$inOld] = $i - 1;
- }
-
- $inOld = false;
- }
-
- ++$i;
- }
-
- return $old;
- }
-
- /**
- * Generates buffer in string format, returning the patch.
- *
- * @param array $diff
- * @param array $old
- * @param int $start
- * @param int $end
- *
- * @return string
- */
- private function getBuffer(array $diff, array $old, $start, $end)
- {
- $buffer = $this->header;
-
- if (!isset($old[$start])) {
- $buffer = $this->getDiffBufferElementNew($diff, $buffer, $start);
- ++$start;
- }
-
- for ($i = $start; $i < $end; $i++) {
- if (isset($old[$i])) {
- $i = $old[$i];
- $buffer = $this->getDiffBufferElementNew($diff, $buffer, $i);
- } else {
- $buffer = $this->getDiffBufferElement($diff, $buffer, $i);
- }
- }
-
- return $buffer;
- }
-
- /**
- * Gets individual buffer element.
- *
- * @param array $diff
- * @param string $buffer
- * @param int $diffIndex
- *
- * @return string
- */
- private function getDiffBufferElement(array $diff, $buffer, $diffIndex)
- {
- if ($diff[$diffIndex][1] === 1 /* ADDED */) {
- $buffer .= '+' . $diff[$diffIndex][0] . "\n";
- } elseif ($diff[$diffIndex][1] === 2 /* REMOVED */) {
- $buffer .= '-' . $diff[$diffIndex][0] . "\n";
- } elseif ($this->showNonDiffLines === true) {
- $buffer .= ' ' . $diff[$diffIndex][0] . "\n";
- }
-
- return $buffer;
- }
-
- /**
- * Gets individual buffer element with opening.
- *
- * @param array $diff
- * @param string $buffer
- * @param int $diffIndex
- *
- * @return string
- */
- private function getDiffBufferElementNew(array $diff, $buffer, $diffIndex)
- {
- if ($this->showNonDiffLines === true) {
- $buffer .= "@@ @@\n";
- }
-
- return $this->getDiffBufferElement($diff, $buffer, $diffIndex);
- }
-
- /**
- * Returns the diff between two arrays or strings as array.
- *
- * Each array element contains two elements:
- * - [0] => mixed $token
- * - [1] => 2|1|0
- *
- * - 2: REMOVED: $token was removed from $from
- * - 1: ADDED: $token was added to $from
- * - 0: OLD: $token is not changed in $to
- *
- * @param array|string $from
- * @param array|string $to
- * @param LongestCommonSubsequence $lcs
- *
- * @return array
- */
- public function diffToArray($from, $to, LongestCommonSubsequence $lcs = null)
- {
- if (\is_string($from)) {
- $fromMatches = $this->getNewLineMatches($from);
- $from = $this->splitStringByLines($from);
- } elseif (\is_array($from)) {
- $fromMatches = array();
- } else {
- throw new \InvalidArgumentException('"from" must be an array or string.');
- }
-
- if (\is_string($to)) {
- $toMatches = $this->getNewLineMatches($to);
- $to = $this->splitStringByLines($to);
- } elseif (\is_array($to)) {
- $toMatches = array();
- } else {
- throw new \InvalidArgumentException('"to" must be an array or string.');
- }
-
- list($from, $to, $start, $end) = self::getArrayDiffParted($from, $to);
-
- if ($lcs === null) {
- $lcs = $this->selectLcsImplementation($from, $to);
- }
-
- $common = $lcs->calculate(\array_values($from), \array_values($to));
- $diff = array();
-
- if ($this->detectUnmatchedLineEndings($fromMatches, $toMatches)) {
- $diff[] = array(
- '#Warning: Strings contain different line endings!',
- 0
- );
- }
-
- foreach ($start as $token) {
- $diff[] = array($token, 0 /* OLD */);
- }
-
- \reset($from);
- \reset($to);
-
- foreach ($common as $token) {
- while (($fromToken = \reset($from)) !== $token) {
- $diff[] = array(\array_shift($from), 2 /* REMOVED */);
- }
-
- while (($toToken = \reset($to)) !== $token) {
- $diff[] = array(\array_shift($to), 1 /* ADDED */);
- }
-
- $diff[] = array($token, 0 /* OLD */);
-
- \array_shift($from);
- \array_shift($to);
- }
-
- while (($token = \array_shift($from)) !== null) {
- $diff[] = array($token, 2 /* REMOVED */);
- }
-
- while (($token = \array_shift($to)) !== null) {
- $diff[] = array($token, 1 /* ADDED */);
- }
-
- foreach ($end as $token) {
- $diff[] = array($token, 0 /* OLD */);
- }
-
- return $diff;
- }
-
- /**
- * Get new strings denoting new lines from a given string.
- *
- * @param string $string
- *
- * @return array
- */
- private function getNewLineMatches($string)
- {
- \preg_match_all('(\r\n|\r|\n)', $string, $stringMatches);
-
- return $stringMatches;
- }
-
- /**
- * Checks if input is string, if so it will split it line-by-line.
- *
- * @param string $input
- *
- * @return array
- */
- private function splitStringByLines($input)
- {
- return \preg_split('(\r\n|\r|\n)', $input);
- }
-
- /**
- * @param array $from
- * @param array $to
- *
- * @return LongestCommonSubsequence
- */
- private function selectLcsImplementation(array $from, array $to)
- {
- // We do not want to use the time-efficient implementation if its memory
- // footprint will probably exceed this value. Note that the footprint
- // calculation is only an estimation for the matrix and the LCS method
- // will typically allocate a bit more memory than this.
- $memoryLimit = 100 * 1024 * 1024;
-
- if ($this->calculateEstimatedFootprint($from, $to) > $memoryLimit) {
- return new MemoryEfficientImplementation;
- }
-
- return new TimeEfficientImplementation;
- }
-
- /**
- * Calculates the estimated memory footprint for the DP-based method.
- *
- * @param array $from
- * @param array $to
- *
- * @return int|float
- */
- private function calculateEstimatedFootprint(array $from, array $to)
- {
- $itemSize = PHP_INT_SIZE === 4 ? 76 : 144;
-
- return $itemSize * \pow(\min(\count($from), \count($to)), 2);
- }
-
- /**
- * Returns true if line ends don't match on fromMatches and toMatches.
- *
- * @param array $fromMatches
- * @param array $toMatches
- *
- * @return bool
- */
- private function detectUnmatchedLineEndings(array $fromMatches, array $toMatches)
- {
- return isset($fromMatches[0], $toMatches[0]) &&
- \count($fromMatches[0]) === \count($toMatches[0]) &&
- $fromMatches[0] !== $toMatches[0];
- }
-
- /**
- * @param array $from
- * @param array $to
- *
- * @return array
- */
- private static function getArrayDiffParted(array &$from, array &$to)
- {
- $start = array();
- $end = array();
-
- \reset($to);
-
- foreach ($from as $k => $v) {
- $toK = \key($to);
-
- if ($toK === $k && $v === $to[$k]) {
- $start[$k] = $v;
-
- unset($from[$k], $to[$k]);
- } else {
- break;
- }
- }
-
- \end($from);
- \end($to);
-
- do {
- $fromK = \key($from);
- $toK = \key($to);
-
- if (null === $fromK || null === $toK || \current($from) !== \current($to)) {
- break;
- }
-
- \prev($from);
- \prev($to);
-
- $end = array($fromK => $from[$fromK]) + $end;
- unset($from[$fromK], $to[$toK]);
- } while (true);
-
- return array($from, $to, $start, $end);
- }
-}
diff --git a/vendor/sebastian/diff/src/LCS/LongestCommonSubsequence.php b/vendor/sebastian/diff/src/LCS/LongestCommonSubsequence.php
deleted file mode 100644
index 28674abe..00000000
--- a/vendor/sebastian/diff/src/LCS/LongestCommonSubsequence.php
+++ /dev/null
@@ -1,27 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Diff\LCS;
-
-/**
- * Interface for implementations of longest common subsequence calculation.
- */
-interface LongestCommonSubsequence
-{
- /**
- * Calculates the longest common subsequence of two arrays.
- *
- * @param array $from
- * @param array $to
- *
- * @return array
- */
- public function calculate(array $from, array $to);
-}
diff --git a/vendor/sebastian/diff/src/LCS/MemoryEfficientLongestCommonSubsequenceImplementation.php b/vendor/sebastian/diff/src/LCS/MemoryEfficientLongestCommonSubsequenceImplementation.php
deleted file mode 100644
index c1b31218..00000000
--- a/vendor/sebastian/diff/src/LCS/MemoryEfficientLongestCommonSubsequenceImplementation.php
+++ /dev/null
@@ -1,95 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Diff\LCS;
-
-/**
- * Memory-efficient implementation of longest common subsequence calculation.
- */
-class MemoryEfficientImplementation implements LongestCommonSubsequence
-{
- /**
- * Calculates the longest common subsequence of two arrays.
- *
- * @param array $from
- * @param array $to
- *
- * @return array
- */
- public function calculate(array $from, array $to)
- {
- $cFrom = \count($from);
- $cTo = \count($to);
-
- if ($cFrom === 0) {
- return array();
- }
-
- if ($cFrom === 1) {
- if (\in_array($from[0], $to, true)) {
- return array($from[0]);
- }
-
- return array();
- }
-
- $i = (int) ($cFrom / 2);
- $fromStart = \array_slice($from, 0, $i);
- $fromEnd = \array_slice($from, $i);
- $llB = $this->length($fromStart, $to);
- $llE = $this->length(\array_reverse($fromEnd), \array_reverse($to));
- $jMax = 0;
- $max = 0;
-
- for ($j = 0; $j <= $cTo; $j++) {
- $m = $llB[$j] + $llE[$cTo - $j];
-
- if ($m >= $max) {
- $max = $m;
- $jMax = $j;
- }
- }
-
- $toStart = \array_slice($to, 0, $jMax);
- $toEnd = \array_slice($to, $jMax);
-
- return \array_merge(
- $this->calculate($fromStart, $toStart),
- $this->calculate($fromEnd, $toEnd)
- );
- }
-
- /**
- * @param array $from
- * @param array $to
- *
- * @return array
- */
- private function length(array $from, array $to)
- {
- $current = \array_fill(0, \count($to) + 1, 0);
- $cFrom = \count($from);
- $cTo = \count($to);
-
- for ($i = 0; $i < $cFrom; $i++) {
- $prev = $current;
-
- for ($j = 0; $j < $cTo; $j++) {
- if ($from[$i] === $to[$j]) {
- $current[$j + 1] = $prev[$j] + 1;
- } else {
- $current[$j + 1] = \max($current[$j], $prev[$j + 1]);
- }
- }
- }
-
- return $current;
- }
-}
diff --git a/vendor/sebastian/diff/src/LCS/TimeEfficientLongestCommonSubsequenceImplementation.php b/vendor/sebastian/diff/src/LCS/TimeEfficientLongestCommonSubsequenceImplementation.php
deleted file mode 100644
index f31db3eb..00000000
--- a/vendor/sebastian/diff/src/LCS/TimeEfficientLongestCommonSubsequenceImplementation.php
+++ /dev/null
@@ -1,74 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Diff\LCS;
-
-/**
- * Time-efficient implementation of longest common subsequence calculation.
- */
-class TimeEfficientImplementation implements LongestCommonSubsequence
-{
- /**
- * Calculates the longest common subsequence of two arrays.
- *
- * @param array $from
- * @param array $to
- *
- * @return array
- */
- public function calculate(array $from, array $to)
- {
- $common = array();
- $fromLength = \count($from);
- $toLength = \count($to);
- $width = $fromLength + 1;
- $matrix = new \SplFixedArray($width * ($toLength + 1));
-
- for ($i = 0; $i <= $fromLength; ++$i) {
- $matrix[$i] = 0;
- }
-
- for ($j = 0; $j <= $toLength; ++$j) {
- $matrix[$j * $width] = 0;
- }
-
- for ($i = 1; $i <= $fromLength; ++$i) {
- for ($j = 1; $j <= $toLength; ++$j) {
- $o = ($j * $width) + $i;
- $matrix[$o] = \max(
- $matrix[$o - 1],
- $matrix[$o - $width],
- $from[$i - 1] === $to[$j - 1] ? $matrix[$o - $width - 1] + 1 : 0
- );
- }
- }
-
- $i = $fromLength;
- $j = $toLength;
-
- while ($i > 0 && $j > 0) {
- if ($from[$i - 1] === $to[$j - 1]) {
- $common[] = $from[$i - 1];
- --$i;
- --$j;
- } else {
- $o = ($j * $width) + $i;
-
- if ($matrix[$o - $width] > $matrix[$o - 1]) {
- --$j;
- } else {
- --$i;
- }
- }
- }
-
- return \array_reverse($common);
- }
-}
diff --git a/vendor/sebastian/diff/src/Line.php b/vendor/sebastian/diff/src/Line.php
deleted file mode 100644
index 89b86835..00000000
--- a/vendor/sebastian/diff/src/Line.php
+++ /dev/null
@@ -1,54 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Diff;
-
-class Line
-{
- const ADDED = 1;
- const REMOVED = 2;
- const UNCHANGED = 3;
-
- /**
- * @var int
- */
- private $type;
-
- /**
- * @var string
- */
- private $content;
-
- /**
- * @param int $type
- * @param string $content
- */
- public function __construct($type = self::UNCHANGED, $content = '')
- {
- $this->type = $type;
- $this->content = $content;
- }
-
- /**
- * @return string
- */
- public function getContent()
- {
- return $this->content;
- }
-
- /**
- * @return int
- */
- public function getType()
- {
- return $this->type;
- }
-}
diff --git a/vendor/sebastian/diff/src/Parser.php b/vendor/sebastian/diff/src/Parser.php
deleted file mode 100644
index 312c8411..00000000
--- a/vendor/sebastian/diff/src/Parser.php
+++ /dev/null
@@ -1,110 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Diff;
-
-/**
- * Unified diff parser.
- */
-class Parser
-{
- /**
- * @param string $string
- *
- * @return Diff[]
- */
- public function parse($string)
- {
- $lines = \preg_split('(\r\n|\r|\n)', $string);
-
- if (!empty($lines) && $lines[\count($lines) - 1] == '') {
- \array_pop($lines);
- }
-
- $lineCount = \count($lines);
- $diffs = array();
- $diff = null;
- $collected = array();
-
- for ($i = 0; $i < $lineCount; ++$i) {
- if (\preg_match('(^---\\s+(?P\\S+))', $lines[$i], $fromMatch) &&
- \preg_match('(^\\+\\+\\+\\s+(?P\\S+))', $lines[$i + 1], $toMatch)) {
- if ($diff !== null) {
- $this->parseFileDiff($diff, $collected);
-
- $diffs[] = $diff;
- $collected = array();
- }
-
- $diff = new Diff($fromMatch['file'], $toMatch['file']);
-
- ++$i;
- } else {
- if (\preg_match('/^(?:diff --git |index [\da-f\.]+|[+-]{3} [ab])/', $lines[$i])) {
- continue;
- }
-
- $collected[] = $lines[$i];
- }
- }
-
- if ($diff !== null && \count($collected)) {
- $this->parseFileDiff($diff, $collected);
-
- $diffs[] = $diff;
- }
-
- return $diffs;
- }
-
- /**
- * @param Diff $diff
- * @param array $lines
- */
- private function parseFileDiff(Diff $diff, array $lines)
- {
- $chunks = array();
- $chunk = null;
-
- foreach ($lines as $line) {
- if (\preg_match('/^@@\s+-(?P\d+)(?:,\s*(?P\d+))?\s+\+(?P\d+)(?:,\s*(?P\d+))?\s+@@/', $line, $match)) {
- $chunk = new Chunk(
- $match['start'],
- isset($match['startrange']) ? \max(1, $match['startrange']) : 1,
- $match['end'],
- isset($match['endrange']) ? \max(1, $match['endrange']) : 1
- );
-
- $chunks[] = $chunk;
- $diffLines = array();
-
- continue;
- }
-
- if (\preg_match('/^(?P[+ -])?(?P.*)/', $line, $match)) {
- $type = Line::UNCHANGED;
-
- if ($match['type'] === '+') {
- $type = Line::ADDED;
- } elseif ($match['type'] === '-') {
- $type = Line::REMOVED;
- }
-
- $diffLines[] = new Line($type, $match['line']);
-
- if (null !== $chunk) {
- $chunk->setLines($diffLines);
- }
- }
- }
-
- $diff->setChunks($chunks);
- }
-}
diff --git a/vendor/sebastian/diff/tests/ChunkTest.php b/vendor/sebastian/diff/tests/ChunkTest.php
deleted file mode 100644
index d065c133..00000000
--- a/vendor/sebastian/diff/tests/ChunkTest.php
+++ /dev/null
@@ -1,68 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Diff;
-
-use PHPUnit\Framework\TestCase;
-
-/**
- * @covers SebastianBergmann\Diff\Chunk
- */
-class ChunkTest extends TestCase
-{
- /**
- * @var Chunk
- */
- private $chunk;
-
- protected function setUp()
- {
- $this->chunk = new Chunk;
- }
-
- public function testCanBeCreatedWithoutArguments()
- {
- $this->assertInstanceOf('SebastianBergmann\Diff\Chunk', $this->chunk);
- }
-
- public function testStartCanBeRetrieved()
- {
- $this->assertEquals(0, $this->chunk->getStart());
- }
-
- public function testStartRangeCanBeRetrieved()
- {
- $this->assertEquals(1, $this->chunk->getStartRange());
- }
-
- public function testEndCanBeRetrieved()
- {
- $this->assertEquals(0, $this->chunk->getEnd());
- }
-
- public function testEndRangeCanBeRetrieved()
- {
- $this->assertEquals(1, $this->chunk->getEndRange());
- }
-
- public function testLinesCanBeRetrieved()
- {
- $this->assertEquals(array(), $this->chunk->getLines());
- }
-
- public function testLinesCanBeSet()
- {
- $this->assertEquals(array(), $this->chunk->getLines());
-
- $testValue = array('line0', 'line1');
- $this->chunk->setLines($testValue);
- $this->assertEquals($testValue, $this->chunk->getLines());
- }
-}
diff --git a/vendor/sebastian/diff/tests/DiffTest.php b/vendor/sebastian/diff/tests/DiffTest.php
deleted file mode 100644
index e1fa55d6..00000000
--- a/vendor/sebastian/diff/tests/DiffTest.php
+++ /dev/null
@@ -1,55 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Diff;
-
-use PHPUnit\Framework\TestCase;
-
-/**
- * @covers SebastianBergmann\Diff\Diff
- *
- * @uses SebastianBergmann\Diff\Chunk
- */
-final class DiffTest extends TestCase
-{
- public function testGettersAfterConstructionWithDefault()
- {
- $from = 'line1a';
- $to = 'line2a';
- $diff = new Diff($from, $to);
-
- $this->assertSame($from, $diff->getFrom());
- $this->assertSame($to, $diff->getTo());
- $this->assertSame(array(), $diff->getChunks(), 'Expect chunks to be default value "array()".');
- }
-
- public function testGettersAfterConstructionWithChunks()
- {
- $from = 'line1b';
- $to = 'line2b';
- $chunks = array(new Chunk(), new Chunk(2, 3));
-
- $diff = new Diff($from, $to, $chunks);
-
- $this->assertSame($from, $diff->getFrom());
- $this->assertSame($to, $diff->getTo());
- $this->assertSame($chunks, $diff->getChunks(), 'Expect chunks to be passed value.');
- }
-
- public function testSetChunksAfterConstruction()
- {
- $diff = new Diff('line1c', 'line2c');
- $this->assertSame(array(), $diff->getChunks(), 'Expect chunks to be default value "array()".');
-
- $chunks = array(new Chunk(), new Chunk(2, 3));
- $diff->setChunks($chunks);
- $this->assertSame($chunks, $diff->getChunks(), 'Expect chunks to be passed value.');
- }
-}
diff --git a/vendor/sebastian/diff/tests/DifferTest.php b/vendor/sebastian/diff/tests/DifferTest.php
deleted file mode 100644
index b9403f21..00000000
--- a/vendor/sebastian/diff/tests/DifferTest.php
+++ /dev/null
@@ -1,415 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Diff;
-
-use SebastianBergmann\Diff\LCS\MemoryEfficientImplementation;
-use SebastianBergmann\Diff\LCS\TimeEfficientImplementation;
-use PHPUnit\Framework\TestCase;
-
-/**
- * @covers SebastianBergmann\Diff\Differ
- *
- * @uses SebastianBergmann\Diff\LCS\MemoryEfficientImplementation
- * @uses SebastianBergmann\Diff\LCS\TimeEfficientImplementation
- * @uses SebastianBergmann\Diff\Chunk
- * @uses SebastianBergmann\Diff\Diff
- * @uses SebastianBergmann\Diff\Line
- * @uses SebastianBergmann\Diff\Parser
- */
-class DifferTest extends TestCase
-{
- const REMOVED = 2;
- const ADDED = 1;
- const OLD = 0;
-
- /**
- * @var Differ
- */
- private $differ;
-
- protected function setUp()
- {
- $this->differ = new Differ;
- }
-
- /**
- * @param array $expected
- * @param string|array $from
- * @param string|array $to
- * @dataProvider arrayProvider
- */
- public function testArrayRepresentationOfDiffCanBeRenderedUsingTimeEfficientLcsImplementation(array $expected, $from, $to)
- {
- $this->assertEquals($expected, $this->differ->diffToArray($from, $to, new TimeEfficientImplementation));
- }
-
- /**
- * @param string $expected
- * @param string $from
- * @param string $to
- * @dataProvider textProvider
- */
- public function testTextRepresentationOfDiffCanBeRenderedUsingTimeEfficientLcsImplementation($expected, $from, $to)
- {
- $this->assertEquals($expected, $this->differ->diff($from, $to, new TimeEfficientImplementation));
- }
-
- /**
- * @param array $expected
- * @param string|array $from
- * @param string|array $to
- * @dataProvider arrayProvider
- */
- public function testArrayRepresentationOfDiffCanBeRenderedUsingMemoryEfficientLcsImplementation(array $expected, $from, $to)
- {
- $this->assertEquals($expected, $this->differ->diffToArray($from, $to, new MemoryEfficientImplementation));
- }
-
- /**
- * @param string $expected
- * @param string $from
- * @param string $to
- * @dataProvider textProvider
- */
- public function testTextRepresentationOfDiffCanBeRenderedUsingMemoryEfficientLcsImplementation($expected, $from, $to)
- {
- $this->assertEquals($expected, $this->differ->diff($from, $to, new MemoryEfficientImplementation));
- }
-
- public function testCustomHeaderCanBeUsed()
- {
- $differ = new Differ('CUSTOM HEADER');
-
- $this->assertEquals(
- "CUSTOM HEADER@@ @@\n-a\n+b\n",
- $differ->diff('a', 'b')
- );
- }
-
- public function testTypesOtherThanArrayAndStringCanBePassed()
- {
- $this->assertEquals(
- "--- Original\n+++ New\n@@ @@\n-1\n+2\n",
- $this->differ->diff(1, 2)
- );
- }
-
- /**
- * @param string $diff
- * @param Diff[] $expected
- * @dataProvider diffProvider
- */
- public function testParser($diff, array $expected)
- {
- $parser = new Parser;
- $result = $parser->parse($diff);
-
- $this->assertEquals($expected, $result);
- }
-
- public function arrayProvider()
- {
- return array(
- array(
- array(
- array('a', self::REMOVED),
- array('b', self::ADDED)
- ),
- 'a',
- 'b'
- ),
- array(
- array(
- array('ba', self::REMOVED),
- array('bc', self::ADDED)
- ),
- 'ba',
- 'bc'
- ),
- array(
- array(
- array('ab', self::REMOVED),
- array('cb', self::ADDED)
- ),
- 'ab',
- 'cb'
- ),
- array(
- array(
- array('abc', self::REMOVED),
- array('adc', self::ADDED)
- ),
- 'abc',
- 'adc'
- ),
- array(
- array(
- array('ab', self::REMOVED),
- array('abc', self::ADDED)
- ),
- 'ab',
- 'abc'
- ),
- array(
- array(
- array('bc', self::REMOVED),
- array('abc', self::ADDED)
- ),
- 'bc',
- 'abc'
- ),
- array(
- array(
- array('abc', self::REMOVED),
- array('abbc', self::ADDED)
- ),
- 'abc',
- 'abbc'
- ),
- array(
- array(
- array('abcdde', self::REMOVED),
- array('abcde', self::ADDED)
- ),
- 'abcdde',
- 'abcde'
- ),
- 'same start' => array(
- array(
- array(17, self::OLD),
- array('b', self::REMOVED),
- array('d', self::ADDED),
- ),
- array(30 => 17, 'a' => 'b'),
- array(30 => 17, 'c' => 'd'),
- ),
- 'same end' => array(
- array(
- array(1, self::REMOVED),
- array(2, self::ADDED),
- array('b', self::OLD),
- ),
- array(1 => 1, 'a' => 'b'),
- array(1 => 2, 'a' => 'b'),
- ),
- 'same start (2), same end (1)' => array(
- array(
- array(17, self::OLD),
- array(2, self::OLD),
- array(4, self::REMOVED),
- array('a', self::ADDED),
- array(5, self::ADDED),
- array('x', self::OLD),
- ),
- array(30 => 17, 1 => 2, 2 => 4, 'z' => 'x'),
- array(30 => 17, 1 => 2, 3 => 'a', 2 => 5, 'z' => 'x'),
- ),
- 'same' => array(
- array(
- array('x', self::OLD),
- ),
- array('z' => 'x'),
- array('z' => 'x'),
- ),
- 'diff' => array(
- array(
- array('y', self::REMOVED),
- array('x', self::ADDED),
- ),
- array('x' => 'y'),
- array('z' => 'x'),
- ),
- 'diff 2' => array(
- array(
- array('y', self::REMOVED),
- array('b', self::REMOVED),
- array('x', self::ADDED),
- array('d', self::ADDED),
- ),
- array('x' => 'y', 'a' => 'b'),
- array('z' => 'x', 'c' => 'd'),
- ),
- 'test line diff detection' => array(
- array(
- array(
- '#Warning: Strings contain different line endings!',
- self::OLD,
- ),
- array(
- 'assertSame($expected, $differ->diff($from, $to));
- }
-
- public function textForNoNonDiffLinesProvider()
- {
- return array(
- array(
- '', 'a', 'a'
- ),
- array(
- "-A\n+C\n",
- "A\n\n\nB",
- "C\n\n\nB",
- ),
- );
- }
-
- /**
- * @requires PHPUnit 5.7
- */
- public function testDiffToArrayInvalidFromType()
- {
- $differ = new Differ;
-
- $this->expectException('\InvalidArgumentException');
- $this->expectExceptionMessageRegExp('#^"from" must be an array or string\.$#');
-
- $differ->diffToArray(null, '');
- }
-
- /**
- * @requires PHPUnit 5.7
- */
- public function testDiffInvalidToType()
- {
- $differ = new Differ;
-
- $this->expectException('\InvalidArgumentException');
- $this->expectExceptionMessageRegExp('#^"to" must be an array or string\.$#');
-
- $differ->diffToArray('', new \stdClass);
- }
-}
diff --git a/vendor/sebastian/diff/tests/LCS/LongestCommonSubsequenceTest.php b/vendor/sebastian/diff/tests/LCS/LongestCommonSubsequenceTest.php
deleted file mode 100644
index b4b40840..00000000
--- a/vendor/sebastian/diff/tests/LCS/LongestCommonSubsequenceTest.php
+++ /dev/null
@@ -1,198 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Diff\LCS;
-
-use PHPUnit\Framework\TestCase;
-
-abstract class LongestCommonSubsequenceTest extends TestCase
-{
- /**
- * @var LongestCommonSubsequence
- */
- private $implementation;
-
- /**
- * @var string
- */
- private $memoryLimit;
-
- /**
- * @var int[]
- */
- private $stress_sizes = array(1, 2, 3, 100, 500, 1000, 2000);
-
- protected function setUp()
- {
- $this->memoryLimit = \ini_get('memory_limit');
- \ini_set('memory_limit', '256M');
-
- $this->implementation = $this->createImplementation();
- }
-
- /**
- * @return LongestCommonSubsequence
- */
- abstract protected function createImplementation();
-
- protected function tearDown()
- {
- \ini_set('memory_limit', $this->memoryLimit);
- }
-
- public function testBothEmpty()
- {
- $from = array();
- $to = array();
- $common = $this->implementation->calculate($from, $to);
-
- $this->assertEquals(array(), $common);
- }
-
- public function testIsStrictComparison()
- {
- $from = array(
- false, 0, 0.0, '', null, array(),
- true, 1, 1.0, 'foo', array('foo', 'bar'), array('foo' => 'bar')
- );
- $to = $from;
- $common = $this->implementation->calculate($from, $to);
-
- $this->assertEquals($from, $common);
-
- $to = array(
- false, false, false, false, false, false,
- true, true, true, true, true, true
- );
-
- $expected = array(
- false,
- true,
- );
-
- $common = $this->implementation->calculate($from, $to);
-
- $this->assertEquals($expected, $common);
- }
-
- public function testEqualSequences()
- {
- foreach ($this->stress_sizes as $size) {
- $range = \range(1, $size);
- $from = $range;
- $to = $range;
- $common = $this->implementation->calculate($from, $to);
-
- $this->assertEquals($range, $common);
- }
- }
-
- public function testDistinctSequences()
- {
- $from = array('A');
- $to = array('B');
- $common = $this->implementation->calculate($from, $to);
- $this->assertEquals(array(), $common);
-
- $from = array('A', 'B', 'C');
- $to = array('D', 'E', 'F');
- $common = $this->implementation->calculate($from, $to);
- $this->assertEquals(array(), $common);
-
- foreach ($this->stress_sizes as $size) {
- $from = \range(1, $size);
- $to = \range($size + 1, $size * 2);
- $common = $this->implementation->calculate($from, $to);
- $this->assertEquals(array(), $common);
- }
- }
-
- public function testCommonSubsequence()
- {
- $from = array('A', 'C', 'E', 'F', 'G');
- $to = array('A', 'B', 'D', 'E', 'H');
- $expected = array('A', 'E');
- $common = $this->implementation->calculate($from, $to);
- $this->assertEquals($expected, $common);
-
- $from = array('A', 'C', 'E', 'F', 'G');
- $to = array('B', 'C', 'D', 'E', 'F', 'H');
- $expected = array('C', 'E', 'F');
- $common = $this->implementation->calculate($from, $to);
- $this->assertEquals($expected, $common);
-
- foreach ($this->stress_sizes as $size) {
- $from = $size < 2 ? array(1) : \range(1, $size + 1, 2);
- $to = $size < 3 ? array(1) : \range(1, $size + 1, 3);
- $expected = $size < 6 ? array(1) : \range(1, $size + 1, 6);
- $common = $this->implementation->calculate($from, $to);
-
- $this->assertEquals($expected, $common);
- }
- }
-
- public function testSingleElementSubsequenceAtStart()
- {
- foreach ($this->stress_sizes as $size) {
- $from = \range(1, $size);
- $to = \array_slice($from, 0, 1);
- $common = $this->implementation->calculate($from, $to);
-
- $this->assertEquals($to, $common);
- }
- }
-
- public function testSingleElementSubsequenceAtMiddle()
- {
- foreach ($this->stress_sizes as $size) {
- $from = \range(1, $size);
- $to = \array_slice($from, (int) $size / 2, 1);
- $common = $this->implementation->calculate($from, $to);
-
- $this->assertEquals($to, $common);
- }
- }
-
- public function testSingleElementSubsequenceAtEnd()
- {
- foreach ($this->stress_sizes as $size) {
- $from = \range(1, $size);
- $to = \array_slice($from, $size - 1, 1);
- $common = $this->implementation->calculate($from, $to);
-
- $this->assertEquals($to, $common);
- }
- }
-
- public function testReversedSequences()
- {
- $from = array('A', 'B');
- $to = array('B', 'A');
- $expected = array('A');
- $common = $this->implementation->calculate($from, $to);
- $this->assertEquals($expected, $common);
-
- foreach ($this->stress_sizes as $size) {
- $from = \range(1, $size);
- $to = \array_reverse($from);
- $common = $this->implementation->calculate($from, $to);
-
- $this->assertEquals(array(1), $common);
- }
- }
-
- public function testStrictTypeCalculate()
- {
- $diff = $this->implementation->calculate(array('5'), array('05'));
-
- $this->assertInternalType('array', $diff);
- $this->assertCount(0, $diff);
- }
-}
diff --git a/vendor/sebastian/diff/tests/LCS/MemoryEfficientImplementationTest.php b/vendor/sebastian/diff/tests/LCS/MemoryEfficientImplementationTest.php
deleted file mode 100644
index b0e57a47..00000000
--- a/vendor/sebastian/diff/tests/LCS/MemoryEfficientImplementationTest.php
+++ /dev/null
@@ -1,22 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Diff\LCS;
-
-/**
- * @covers SebastianBergmann\Diff\LCS\MemoryEfficientImplementation
- */
-class MemoryEfficientImplementationTest extends LongestCommonSubsequenceTest
-{
- protected function createImplementation()
- {
- return new MemoryEfficientImplementation;
- }
-}
diff --git a/vendor/sebastian/diff/tests/LCS/TimeEfficientImplementationTest.php b/vendor/sebastian/diff/tests/LCS/TimeEfficientImplementationTest.php
deleted file mode 100644
index a3ecb570..00000000
--- a/vendor/sebastian/diff/tests/LCS/TimeEfficientImplementationTest.php
+++ /dev/null
@@ -1,22 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Diff\LCS;
-
-/**
- * @covers SebastianBergmann\Diff\LCS\TimeEfficientImplementation
- */
-class TimeEfficientImplementationTest extends LongestCommonSubsequenceTest
-{
- protected function createImplementation()
- {
- return new TimeEfficientImplementation;
- }
-}
diff --git a/vendor/sebastian/diff/tests/LineTest.php b/vendor/sebastian/diff/tests/LineTest.php
deleted file mode 100644
index 6fd8c167..00000000
--- a/vendor/sebastian/diff/tests/LineTest.php
+++ /dev/null
@@ -1,44 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Diff;
-
-use PHPUnit\Framework\TestCase;
-
-/**
- * @covers SebastianBergmann\Diff\Line
- */
-class LineTest extends TestCase
-{
- /**
- * @var Line
- */
- private $line;
-
- protected function setUp()
- {
- $this->line = new Line;
- }
-
- public function testCanBeCreatedWithoutArguments()
- {
- $this->assertInstanceOf('SebastianBergmann\Diff\Line', $this->line);
- }
-
- public function testTypeCanBeRetrieved()
- {
- $this->assertEquals(Line::UNCHANGED, $this->line->getType());
- }
-
- public function testContentCanBeRetrieved()
- {
- $this->assertEquals('', $this->line->getContent());
- }
-}
diff --git a/vendor/sebastian/diff/tests/ParserTest.php b/vendor/sebastian/diff/tests/ParserTest.php
deleted file mode 100644
index 0963d83a..00000000
--- a/vendor/sebastian/diff/tests/ParserTest.php
+++ /dev/null
@@ -1,151 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Diff;
-
-use PHPUnit\Framework\TestCase;
-
-/**
- * @covers SebastianBergmann\Diff\Parser
- *
- * @uses SebastianBergmann\Diff\Chunk
- * @uses SebastianBergmann\Diff\Diff
- * @uses SebastianBergmann\Diff\Line
- */
-class ParserTest extends TestCase
-{
- /**
- * @var Parser
- */
- private $parser;
-
- protected function setUp()
- {
- $this->parser = new Parser;
- }
-
- public function testParse()
- {
- $content = \file_get_contents(__DIR__ . '/fixtures/patch.txt');
-
- $diffs = $this->parser->parse($content);
-
- $this->assertInternalType('array', $diffs);
- $this->assertContainsOnlyInstancesOf('SebastianBergmann\Diff\Diff', $diffs);
- $this->assertCount(1, $diffs);
-
- $chunks = $diffs[0]->getChunks();
- $this->assertInternalType('array', $chunks);
- $this->assertContainsOnlyInstancesOf('SebastianBergmann\Diff\Chunk', $chunks);
-
- $this->assertCount(1, $chunks);
-
- $this->assertEquals(20, $chunks[0]->getStart());
-
- $this->assertCount(4, $chunks[0]->getLines());
- }
-
- public function testParseWithMultipleChunks()
- {
- $content = \file_get_contents(__DIR__ . '/fixtures/patch2.txt');
-
- $diffs = $this->parser->parse($content);
-
- $this->assertCount(1, $diffs);
-
- $chunks = $diffs[0]->getChunks();
- $this->assertCount(3, $chunks);
-
- $this->assertEquals(20, $chunks[0]->getStart());
- $this->assertEquals(320, $chunks[1]->getStart());
- $this->assertEquals(600, $chunks[2]->getStart());
-
- $this->assertCount(5, $chunks[0]->getLines());
- $this->assertCount(5, $chunks[1]->getLines());
- $this->assertCount(4, $chunks[2]->getLines());
- }
-
- public function testParseWithRemovedLines()
- {
- $content = <<parser->parse($content);
- $this->assertInternalType('array', $diffs);
- $this->assertContainsOnlyInstancesOf('SebastianBergmann\Diff\Diff', $diffs);
- $this->assertCount(1, $diffs);
-
- $chunks = $diffs[0]->getChunks();
-
- $this->assertInternalType('array', $chunks);
- $this->assertContainsOnlyInstancesOf('SebastianBergmann\Diff\Chunk', $chunks);
- $this->assertCount(1, $chunks);
-
- $chunk = $chunks[0];
- $this->assertSame(49, $chunk->getStart());
- $this->assertSame(49, $chunk->getEnd());
- $this->assertSame(9, $chunk->getStartRange());
- $this->assertSame(8, $chunk->getEndRange());
-
- $lines = $chunk->getLines();
- $this->assertInternalType('array', $lines);
- $this->assertContainsOnlyInstancesOf('SebastianBergmann\Diff\Line', $lines);
- $this->assertCount(2, $lines);
-
- /** @var Line $line */
- $line = $lines[0];
- $this->assertSame('A', $line->getContent());
- $this->assertSame(Line::UNCHANGED, $line->getType());
-
- $line = $lines[1];
- $this->assertSame('B', $line->getContent());
- $this->assertSame(Line::REMOVED, $line->getType());
- }
-
- public function testParseDiffForMulitpleFiles()
- {
- $content = <<parser->parse($content);
- $this->assertCount(2, $diffs);
-
- /** @var Diff $diff */
- $diff = $diffs[0];
- $this->assertSame('a/Test.txt', $diff->getFrom());
- $this->assertSame('b/Test.txt', $diff->getTo());
- $this->assertCount(1, $diff->getChunks());
-
- $diff = $diffs[1];
- $this->assertSame('a/Test2.txt', $diff->getFrom());
- $this->assertSame('b/Test2.txt', $diff->getTo());
- $this->assertCount(1, $diff->getChunks());
- }
-}
diff --git a/vendor/sebastian/diff/tests/fixtures/patch.txt b/vendor/sebastian/diff/tests/fixtures/patch.txt
deleted file mode 100644
index 144b61d0..00000000
--- a/vendor/sebastian/diff/tests/fixtures/patch.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-diff --git a/Foo.php b/Foo.php
-index abcdefg..abcdefh 100644
---- a/Foo.php
-+++ b/Foo.php
-@@ -20,4 +20,5 @@ class Foo
- const ONE = 1;
- const TWO = 2;
-+ const THREE = 3;
- const FOUR = 4;
diff --git a/vendor/sebastian/diff/tests/fixtures/patch2.txt b/vendor/sebastian/diff/tests/fixtures/patch2.txt
deleted file mode 100644
index 41fbc959..00000000
--- a/vendor/sebastian/diff/tests/fixtures/patch2.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-diff --git a/Foo.php b/Foo.php
-index abcdefg..abcdefh 100644
---- a/Foo.php
-+++ b/Foo.php
-@@ -20,4 +20,5 @@ class Foo
- const ONE = 1;
- const TWO = 2;
-+ const THREE = 3;
- const FOUR = 4;
-
-@@ -320,4 +320,5 @@ class Foo
- const A = 'A';
- const B = 'B';
-+ const C = 'C';
- const D = 'D';
-
-@@ -600,4 +600,5 @@ class Foo
- public function doSomething() {
-
-+ return 'foo';
- }
diff --git a/vendor/sebastian/environment/.gitignore b/vendor/sebastian/environment/.gitignore
deleted file mode 100644
index 441848b7..00000000
--- a/vendor/sebastian/environment/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-/.idea
-/vendor
-/composer.lock
-/composer.phar
diff --git a/vendor/sebastian/environment/.travis.yml b/vendor/sebastian/environment/.travis.yml
deleted file mode 100644
index 76a9bde4..00000000
--- a/vendor/sebastian/environment/.travis.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-language: php
-
-before_script:
- - composer self-update
- - composer install --no-interaction --prefer-source --dev
-
-php:
- - 5.3.3
- - 5.3
- - 5.4
- - 5.5
- - 5.6
- - hhvm
-
-notifications:
- email: false
diff --git a/vendor/sebastian/environment/LICENSE b/vendor/sebastian/environment/LICENSE
deleted file mode 100644
index 08539af4..00000000
--- a/vendor/sebastian/environment/LICENSE
+++ /dev/null
@@ -1,33 +0,0 @@
-Environment
-
-Copyright (c) 2014-2015, Sebastian Bergmann .
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- * Neither the name of Sebastian Bergmann nor the names of his
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/sebastian/environment/README.md b/vendor/sebastian/environment/README.md
deleted file mode 100644
index 5f3cb3b9..00000000
--- a/vendor/sebastian/environment/README.md
+++ /dev/null
@@ -1,72 +0,0 @@
-# Environment
-
-This component provides functionality that helps writing PHP code that has runtime-specific (PHP / HHVM) execution paths.
-
-[](https://packagist.org/packages/sebastian/environment)
-[](https://travis-ci.org/sebastianbergmann/environment)
-
-## Installation
-
-To add Environment as a local, per-project dependency to your project, simply add a dependency on `sebastian/environment` to your project's `composer.json` file. Here is a minimal example of a `composer.json` file that just defines a dependency on Environment 1.0:
-
- {
- "require": {
- "sebastian/environment": "1.0.*"
- }
- }
-
-## Usage
-
-```php
-getNameWithVersion());
-var_dump($runtime->getName());
-var_dump($runtime->getVersion());
-var_dump($runtime->getBinary());
-var_dump($runtime->isHHVM());
-var_dump($runtime->isPHP());
-var_dump($runtime->hasXdebug());
-var_dump($runtime->canCollectCodeCoverage());
-```
-
-### Output on PHP
-
- $ php --version
- PHP 5.5.8 (cli) (built: Jan 9 2014 08:33:30)
- Copyright (c) 1997-2013 The PHP Group
- Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
- with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans
-
-
- $ php example.php
- string(9) "PHP 5.5.8"
- string(3) "PHP"
- string(5) "5.5.8"
- string(14) "'/usr/bin/php'"
- bool(false)
- bool(true)
- bool(true)
- bool(true)
-
-### Output on HHVM
-
- $ hhvm --version
- HipHop VM 2.4.0-dev (rel)
- Compiler: heads/master-0-ga98e57cabee7e7f0d14493ab17d5c7ab0157eb98
- Repo schema: 8d6e69287c41c1f09bb4d327421720d1922cfc67
-
-
- $ hhvm example.php
- string(14) "HHVM 2.4.0-dev"
- string(4) "HHVM"
- string(9) "2.4.0-dev"
- string(42) "'/usr/local/src/hhvm/hphp/hhvm/hhvm' --php"
- bool(true)
- bool(false)
- bool(false)
- bool(true)
-
diff --git a/vendor/sebastian/environment/build.xml b/vendor/sebastian/environment/build.xml
deleted file mode 100644
index 92fb1c54..00000000
--- a/vendor/sebastian/environment/build.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/vendor/sebastian/environment/composer.json b/vendor/sebastian/environment/composer.json
deleted file mode 100644
index b6602c4d..00000000
--- a/vendor/sebastian/environment/composer.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "name": "sebastian/environment",
- "description": "Provides functionality to handle HHVM/PHP environments",
- "keywords": ["environment","hhvm","xdebug"],
- "homepage": "http://www.github.com/sebastianbergmann/environment",
- "license": "BSD-3-Clause",
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- }
- ],
- "require": {
- "php": "^5.3.3 || ^7.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^4.8 || ^5.0"
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "extra": {
- "branch-alias": {
- "dev-master": "1.3.x-dev"
- }
- }
-}
diff --git a/vendor/sebastian/environment/src/Console.php b/vendor/sebastian/environment/src/Console.php
deleted file mode 100644
index 2aff1d65..00000000
--- a/vendor/sebastian/environment/src/Console.php
+++ /dev/null
@@ -1,113 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Environment;
-
-/**
- */
-class Console
-{
- const STDIN = 0;
- const STDOUT = 1;
- const STDERR = 2;
-
- /**
- * Returns true if STDOUT supports colorization.
- *
- * This code has been copied and adapted from
- * Symfony\Component\Console\Output\OutputStream.
- *
- * @return bool
- */
- public function hasColorSupport()
- {
- if (DIRECTORY_SEPARATOR == '\\') {
- return false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI') || 'xterm' === getenv('TERM');
- }
-
- if (!defined('STDOUT')) {
- return false;
- }
-
- return $this->isInteractive(STDOUT);
- }
-
- /**
- * Returns the number of columns of the terminal.
- *
- * @return int
- */
- public function getNumberOfColumns()
- {
- if (DIRECTORY_SEPARATOR == '\\') {
- $columns = 80;
-
- if (preg_match('/^(\d+)x\d+ \(\d+x(\d+)\)$/', trim(getenv('ANSICON')), $matches)) {
- $columns = $matches[1];
- } elseif (function_exists('proc_open')) {
- $process = proc_open(
- 'mode CON',
- array(
- 1 => array('pipe', 'w'),
- 2 => array('pipe', 'w')
- ),
- $pipes,
- null,
- null,
- array('suppress_errors' => true)
- );
-
- if (is_resource($process)) {
- $info = stream_get_contents($pipes[1]);
-
- fclose($pipes[1]);
- fclose($pipes[2]);
- proc_close($process);
-
- if (preg_match('/--------+\r?\n.+?(\d+)\r?\n.+?(\d+)\r?\n/', $info, $matches)) {
- $columns = $matches[2];
- }
- }
- }
-
- return $columns - 1;
- }
-
- if (!$this->isInteractive(self::STDIN)) {
- return 80;
- }
-
- if (function_exists('shell_exec') && preg_match('#\d+ (\d+)#', shell_exec('stty size'), $match) === 1) {
- if ((int) $match[1] > 0) {
- return (int) $match[1];
- }
- }
-
- if (function_exists('shell_exec') && preg_match('#columns = (\d+);#', shell_exec('stty'), $match) === 1) {
- if ((int) $match[1] > 0) {
- return (int) $match[1];
- }
- }
-
- return 80;
- }
-
- /**
- * Returns if the file descriptor is an interactive terminal or not.
- *
- * @param int|resource $fileDescriptor
- *
- * @return bool
- */
- public function isInteractive($fileDescriptor = self::STDOUT)
- {
- return function_exists('posix_isatty') && @posix_isatty($fileDescriptor);
- }
-}
diff --git a/vendor/sebastian/environment/src/Runtime.php b/vendor/sebastian/environment/src/Runtime.php
deleted file mode 100644
index 179473bf..00000000
--- a/vendor/sebastian/environment/src/Runtime.php
+++ /dev/null
@@ -1,194 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Environment;
-
-/**
- * Utility class for HHVM/PHP environment handling.
- */
-class Runtime
-{
- /**
- * @var string
- */
- private static $binary;
-
- /**
- * Returns true when Xdebug is supported or
- * the runtime used is PHPDBG (PHP >= 7.0).
- *
- * @return bool
- */
- public function canCollectCodeCoverage()
- {
- return $this->hasXdebug() || $this->hasPHPDBGCodeCoverage();
- }
-
- /**
- * Returns the path to the binary of the current runtime.
- * Appends ' --php' to the path when the runtime is HHVM.
- *
- * @return string
- */
- public function getBinary()
- {
- // HHVM
- if (self::$binary === null && $this->isHHVM()) {
- if ((self::$binary = getenv('PHP_BINARY')) === false) {
- self::$binary = PHP_BINARY;
- }
-
- self::$binary = escapeshellarg(self::$binary) . ' --php';
- }
-
- // PHP >= 5.4.0
- if (self::$binary === null && defined('PHP_BINARY')) {
- if (PHP_BINARY !== '') {
- self::$binary = escapeshellarg(PHP_BINARY);
- }
- }
-
- // PHP < 5.4.0
- if (self::$binary === null) {
- if (PHP_SAPI == 'cli' && isset($_SERVER['_'])) {
- if (strpos($_SERVER['_'], 'phpunit') !== false) {
- $file = file($_SERVER['_']);
-
- if (strpos($file[0], ' ') !== false) {
- $tmp = explode(' ', $file[0]);
- self::$binary = escapeshellarg(trim($tmp[1]));
- } else {
- self::$binary = escapeshellarg(ltrim(trim($file[0]), '#!'));
- }
- } elseif (strpos(basename($_SERVER['_']), 'php') !== false) {
- self::$binary = escapeshellarg($_SERVER['_']);
- }
- }
- }
-
- if (self::$binary === null) {
- $possibleBinaryLocations = array(
- PHP_BINDIR . '/php',
- PHP_BINDIR . '/php-cli.exe',
- PHP_BINDIR . '/php.exe'
- );
-
- foreach ($possibleBinaryLocations as $binary) {
- if (is_readable($binary)) {
- self::$binary = escapeshellarg($binary);
- break;
- }
- }
- }
-
- if (self::$binary === null) {
- self::$binary = 'php';
- }
-
- return self::$binary;
- }
-
- /**
- * @return string
- */
- public function getNameWithVersion()
- {
- return $this->getName() . ' ' . $this->getVersion();
- }
-
- /**
- * @return string
- */
- public function getName()
- {
- if ($this->isHHVM()) {
- return 'HHVM';
- } elseif ($this->isPHPDBG()) {
- return 'PHPDBG';
- } else {
- return 'PHP';
- }
- }
-
- /**
- * @return string
- */
- public function getVendorUrl()
- {
- if ($this->isHHVM()) {
- return 'http://hhvm.com/';
- } else {
- return 'https://secure.php.net/';
- }
- }
-
- /**
- * @return string
- */
- public function getVersion()
- {
- if ($this->isHHVM()) {
- return HHVM_VERSION;
- } else {
- return PHP_VERSION;
- }
- }
-
- /**
- * Returns true when the runtime used is PHP and Xdebug is loaded.
- *
- * @return bool
- */
- public function hasXdebug()
- {
- return ($this->isPHP() || $this->isHHVM()) && extension_loaded('xdebug');
- }
-
- /**
- * Returns true when the runtime used is HHVM.
- *
- * @return bool
- */
- public function isHHVM()
- {
- return defined('HHVM_VERSION');
- }
-
- /**
- * Returns true when the runtime used is PHP without the PHPDBG SAPI.
- *
- * @return bool
- */
- public function isPHP()
- {
- return !$this->isHHVM() && !$this->isPHPDBG();
- }
-
- /**
- * Returns true when the runtime used is PHP with the PHPDBG SAPI.
- *
- * @return bool
- */
- public function isPHPDBG()
- {
- return PHP_SAPI === 'phpdbg' && !$this->isHHVM();
- }
-
- /**
- * Returns true when the runtime used is PHP with the PHPDBG SAPI
- * and the phpdbg_*_oplog() functions are available (PHP >= 7.0).
- *
- * @return bool
- */
- public function hasPHPDBGCodeCoverage()
- {
- return $this->isPHPDBG() && function_exists('phpdbg_start_oplog');
- }
-}
diff --git a/vendor/sebastian/environment/tests/ConsoleTest.php b/vendor/sebastian/environment/tests/ConsoleTest.php
deleted file mode 100644
index 6b40172b..00000000
--- a/vendor/sebastian/environment/tests/ConsoleTest.php
+++ /dev/null
@@ -1,60 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Environment;
-
-use PHPUnit_Framework_TestCase;
-
-class ConsoleTest extends PHPUnit_Framework_TestCase
-{
- /**
- * @var \SebastianBergmann\Environment\Console
- */
- private $console;
-
- protected function setUp()
- {
- $this->console = new Console;
- }
-
- /**
- * @covers \SebastianBergmann\Environment\Console::isInteractive
- */
- public function testCanDetectIfStdoutIsInteractiveByDefault()
- {
- $this->assertInternalType('boolean', $this->console->isInteractive());
- }
-
- /**
- * @covers \SebastianBergmann\Environment\Console::isInteractive
- */
- public function testCanDetectIfFileDescriptorIsInteractive()
- {
- $this->assertInternalType('boolean', $this->console->isInteractive(STDOUT));
- }
-
- /**
- * @covers \SebastianBergmann\Environment\Console::hasColorSupport
- * @uses \SebastianBergmann\Environment\Console::isInteractive
- */
- public function testCanDetectColorSupport()
- {
- $this->assertInternalType('boolean', $this->console->hasColorSupport());
- }
-
- /**
- * @covers \SebastianBergmann\Environment\Console::getNumberOfColumns
- * @uses \SebastianBergmann\Environment\Console::isInteractive
- */
- public function testCanDetectNumberOfColumns()
- {
- $this->assertInternalType('integer', $this->console->getNumberOfColumns());
- }
-}
diff --git a/vendor/sebastian/environment/tests/RuntimeTest.php b/vendor/sebastian/environment/tests/RuntimeTest.php
deleted file mode 100644
index 8ea83730..00000000
--- a/vendor/sebastian/environment/tests/RuntimeTest.php
+++ /dev/null
@@ -1,112 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Environment;
-
-use PHPUnit_Framework_TestCase;
-
-class RuntimeTest extends PHPUnit_Framework_TestCase
-{
- /**
- * @var \SebastianBergmann\Environment\Runtime
- */
- private $env;
-
- protected function setUp()
- {
- $this->env = new Runtime;
- }
-
- /**
- * @covers \SebastianBergmann\Environment\Runtime::canCollectCodeCoverage
- * @uses \SebastianBergmann\Environment\Runtime::hasXdebug
- * @uses \SebastianBergmann\Environment\Runtime::isHHVM
- * @uses \SebastianBergmann\Environment\Runtime::isPHP
- */
- public function testAbilityToCollectCodeCoverageCanBeAssessed()
- {
- $this->assertInternalType('boolean', $this->env->canCollectCodeCoverage());
- }
-
- /**
- * @covers \SebastianBergmann\Environment\Runtime::getBinary
- * @uses \SebastianBergmann\Environment\Runtime::isHHVM
- */
- public function testBinaryCanBeRetrieved()
- {
- $this->assertInternalType('string', $this->env->getBinary());
- }
-
- /**
- * @covers \SebastianBergmann\Environment\Runtime::isHHVM
- */
- public function testCanBeDetected()
- {
- $this->assertInternalType('boolean', $this->env->isHHVM());
- }
-
- /**
- * @covers \SebastianBergmann\Environment\Runtime::isPHP
- * @uses \SebastianBergmann\Environment\Runtime::isHHVM
- */
- public function testCanBeDetected2()
- {
- $this->assertInternalType('boolean', $this->env->isPHP());
- }
-
- /**
- * @covers \SebastianBergmann\Environment\Runtime::hasXdebug
- * @uses \SebastianBergmann\Environment\Runtime::isHHVM
- * @uses \SebastianBergmann\Environment\Runtime::isPHP
- */
- public function testXdebugCanBeDetected()
- {
- $this->assertInternalType('boolean', $this->env->hasXdebug());
- }
-
- /**
- * @covers \SebastianBergmann\Environment\Runtime::getNameWithVersion
- * @uses \SebastianBergmann\Environment\Runtime::getName
- * @uses \SebastianBergmann\Environment\Runtime::getVersion
- * @uses \SebastianBergmann\Environment\Runtime::isHHVM
- * @uses \SebastianBergmann\Environment\Runtime::isPHP
- */
- public function testNameAndVersionCanBeRetrieved()
- {
- $this->assertInternalType('string', $this->env->getNameWithVersion());
- }
-
- /**
- * @covers \SebastianBergmann\Environment\Runtime::getName
- * @uses \SebastianBergmann\Environment\Runtime::isHHVM
- */
- public function testNameCanBeRetrieved()
- {
- $this->assertInternalType('string', $this->env->getName());
- }
-
- /**
- * @covers \SebastianBergmann\Environment\Runtime::getVersion
- * @uses \SebastianBergmann\Environment\Runtime::isHHVM
- */
- public function testVersionCanBeRetrieved()
- {
- $this->assertInternalType('string', $this->env->getVersion());
- }
-
- /**
- * @covers \SebastianBergmann\Environment\Runtime::getVendorUrl
- * @uses \SebastianBergmann\Environment\Runtime::isHHVM
- */
- public function testVendorUrlCanBeRetrieved()
- {
- $this->assertInternalType('string', $this->env->getVendorUrl());
- }
-}
diff --git a/vendor/sebastian/exporter/.gitignore b/vendor/sebastian/exporter/.gitignore
deleted file mode 100644
index 3beb10f9..00000000
--- a/vendor/sebastian/exporter/.gitignore
+++ /dev/null
@@ -1,9 +0,0 @@
-.idea
-phpunit.xml
-composer.lock
-composer.phar
-vendor/
-cache.properties
-build/LICENSE
-build/README.md
-build/*.tgz
diff --git a/vendor/sebastian/exporter/.travis.yml b/vendor/sebastian/exporter/.travis.yml
deleted file mode 100644
index 657519b1..00000000
--- a/vendor/sebastian/exporter/.travis.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-language: php
-
-before_script:
- - composer self-update
- - composer install --no-interaction --prefer-source --dev
-
-php:
- - 5.3.3
- - 5.3
- - 5.4
- - 5.5
- - 5.6
- - hhvm
-
-notifications:
- email: false
- webhooks:
- urls:
- - https://webhooks.gitter.im/e/6668f52f3dd4e3f81960
- on_success: always
- on_failure: always
- on_start: false
-
diff --git a/vendor/sebastian/exporter/LICENSE b/vendor/sebastian/exporter/LICENSE
deleted file mode 100644
index 55a13d47..00000000
--- a/vendor/sebastian/exporter/LICENSE
+++ /dev/null
@@ -1,33 +0,0 @@
-Exporter
-
-Copyright (c) 2002-2015, Sebastian Bergmann .
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- * Neither the name of Sebastian Bergmann nor the names of his
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/sebastian/exporter/README.md b/vendor/sebastian/exporter/README.md
deleted file mode 100644
index 9a40a77b..00000000
--- a/vendor/sebastian/exporter/README.md
+++ /dev/null
@@ -1,171 +0,0 @@
-Exporter
-========
-
-[](https://travis-ci.org/sebastianbergmann/exporter)
-
-This component provides the functionality to export PHP variables for visualization.
-
-## Usage
-
-Exporting:
-
-```php
- ''
- 'string' => ''
- 'code' => 0
- 'file' => '/home/sebastianbergmann/test.php'
- 'line' => 34
- 'trace' => Array &0 ()
- 'previous' => null
-)
-*/
-
-print $exporter->export(new Exception);
-```
-
-## Data Types
-
-Exporting simple types:
-
-```php
-export(46);
-
-// 4.0
-print $exporter->export(4.0);
-
-// 'hello, world!'
-print $exporter->export('hello, world!');
-
-// false
-print $exporter->export(false);
-
-// NAN
-print $exporter->export(acos(8));
-
-// -INF
-print $exporter->export(log(0));
-
-// null
-print $exporter->export(null);
-
-// resource(13) of type (stream)
-print $exporter->export(fopen('php://stderr', 'w'));
-
-// Binary String: 0x000102030405
-print $exporter->export(chr(0) . chr(1) . chr(2) . chr(3) . chr(4) . chr(5));
-```
-
-Exporting complex types:
-
-```php
- Array &1 (
- 0 => 1
- 1 => 2
- 2 => 3
- )
- 1 => Array &2 (
- 0 => ''
- 1 => 0
- 2 => false
- )
-)
-*/
-
-print $exporter->export(array(array(1,2,3), array("",0,FALSE)));
-
-/*
-Array &0 (
- 'self' => Array &1 (
- 'self' => Array &1
- )
-)
-*/
-
-$array = array();
-$array['self'] = &$array;
-print $exporter->export($array);
-
-/*
-stdClass Object &0000000003a66dcc0000000025e723e2 (
- 'self' => stdClass Object &0000000003a66dcc0000000025e723e2
-)
-*/
-
-$obj = new stdClass();
-$obj->self = $obj;
-print $exporter->export($obj);
-```
-
-Compact exports:
-
-```php
-shortenedExport(array());
-
-// Array (...)
-print $exporter->shortenedExport(array(1,2,3,4,5));
-
-// stdClass Object ()
-print $exporter->shortenedExport(new stdClass);
-
-// Exception Object (...)
-print $exporter->shortenedExport(new Exception);
-
-// this\nis\na\nsuper\nlong\nstring\nt...\nspace
-print $exporter->shortenedExport(
-<<
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/vendor/sebastian/exporter/composer.json b/vendor/sebastian/exporter/composer.json
deleted file mode 100644
index 62b94bda..00000000
--- a/vendor/sebastian/exporter/composer.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "name": "sebastian/exporter",
- "description": "Provides the functionality to export PHP variables for visualization",
- "keywords": ["exporter","export"],
- "homepage": "http://www.github.com/sebastianbergmann/exporter",
- "license": "BSD-3-Clause",
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- },
- {
- "name": "Jeff Welch",
- "email": "whatthejeff@gmail.com"
- },
- {
- "name": "Volker Dusch",
- "email": "github@wallbash.com"
- },
- {
- "name": "Adam Harvey",
- "email": "aharvey@php.net"
- },
- {
- "name": "Bernhard Schussek",
- "email": "bschussek@2bepublished.at"
- }
- ],
- "require": {
- "php": ">=5.3.3",
- "sebastian/recursion-context": "~1.0"
- },
- "require-dev": {
- "phpunit/phpunit": "~4.4",
- "ext-mbstring": "*"
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "extra": {
- "branch-alias": {
- "dev-master": "1.3.x-dev"
- }
- }
-}
-
diff --git a/vendor/sebastian/exporter/phpunit.xml.dist b/vendor/sebastian/exporter/phpunit.xml.dist
deleted file mode 100644
index 8d85af64..00000000
--- a/vendor/sebastian/exporter/phpunit.xml.dist
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- tests
-
-
-
-
- src
-
-
-
-
diff --git a/vendor/sebastian/exporter/src/Exporter.php b/vendor/sebastian/exporter/src/Exporter.php
deleted file mode 100644
index 5578aa8d..00000000
--- a/vendor/sebastian/exporter/src/Exporter.php
+++ /dev/null
@@ -1,301 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Exporter;
-
-use SebastianBergmann\RecursionContext\Context;
-
-/**
- * A nifty utility for visualizing PHP variables.
- *
- *
- * export(new Exception);
- *
- */
-class Exporter
-{
- /**
- * Exports a value as a string
- *
- * The output of this method is similar to the output of print_r(), but
- * improved in various aspects:
- *
- * - NULL is rendered as "null" (instead of "")
- * - TRUE is rendered as "true" (instead of "1")
- * - FALSE is rendered as "false" (instead of "")
- * - Strings are always quoted with single quotes
- * - Carriage returns and newlines are normalized to \n
- * - Recursion and repeated rendering is treated properly
- *
- * @param mixed $value
- * @param int $indentation The indentation level of the 2nd+ line
- * @return string
- */
- public function export($value, $indentation = 0)
- {
- return $this->recursiveExport($value, $indentation);
- }
-
- /**
- * @param mixed $data
- * @param Context $context
- * @return string
- */
- public function shortenedRecursiveExport(&$data, Context $context = null)
- {
- $result = array();
- $exporter = new self();
-
- if (!$context) {
- $context = new Context;
- }
-
- $context->add($data);
-
- foreach ($data as $key => $value) {
- if (is_array($value)) {
- if ($context->contains($data[$key]) !== false) {
- $result[] = '*RECURSION*';
- }
-
- else {
- $result[] = sprintf(
- 'array(%s)',
- $this->shortenedRecursiveExport($data[$key], $context)
- );
- }
- }
-
- else {
- $result[] = $exporter->shortenedExport($value);
- }
- }
-
- return implode(', ', $result);
- }
-
- /**
- * Exports a value into a single-line string
- *
- * The output of this method is similar to the output of
- * SebastianBergmann\Exporter\Exporter::export().
- *
- * Newlines are replaced by the visible string '\n'.
- * Contents of arrays and objects (if any) are replaced by '...'.
- *
- * @param mixed $value
- * @return string
- * @see SebastianBergmann\Exporter\Exporter::export
- */
- public function shortenedExport($value)
- {
- if (is_string($value)) {
- $string = $this->export($value);
-
- if (function_exists('mb_strlen')) {
- if (mb_strlen($string) > 40) {
- $string = mb_substr($string, 0, 30) . '...' . mb_substr($string, -7);
- }
- } else {
- if (strlen($string) > 40) {
- $string = substr($string, 0, 30) . '...' . substr($string, -7);
- }
- }
-
- return str_replace("\n", '\n', $string);
- }
-
- if (is_object($value)) {
- return sprintf(
- '%s Object (%s)',
- get_class($value),
- count($this->toArray($value)) > 0 ? '...' : ''
- );
- }
-
- if (is_array($value)) {
- return sprintf(
- 'Array (%s)',
- count($value) > 0 ? '...' : ''
- );
- }
-
- return $this->export($value);
- }
-
- /**
- * Converts an object to an array containing all of its private, protected
- * and public properties.
- *
- * @param mixed $value
- * @return array
- */
- public function toArray($value)
- {
- if (!is_object($value)) {
- return (array) $value;
- }
-
- $array = array();
-
- foreach ((array) $value as $key => $val) {
- // properties are transformed to keys in the following way:
- // private $property => "\0Classname\0property"
- // protected $property => "\0*\0property"
- // public $property => "property"
- if (preg_match('/^\0.+\0(.+)$/', $key, $matches)) {
- $key = $matches[1];
- }
-
- // See https://github.com/php/php-src/commit/5721132
- if ($key === "\0gcdata") {
- continue;
- }
-
- $array[$key] = $val;
- }
-
- // Some internal classes like SplObjectStorage don't work with the
- // above (fast) mechanism nor with reflection in Zend.
- // Format the output similarly to print_r() in this case
- if ($value instanceof \SplObjectStorage) {
- // However, the fast method does work in HHVM, and exposes the
- // internal implementation. Hide it again.
- if (property_exists('\SplObjectStorage', '__storage')) {
- unset($array['__storage']);
- } elseif (property_exists('\SplObjectStorage', 'storage')) {
- unset($array['storage']);
- }
-
- if (property_exists('\SplObjectStorage', '__key')) {
- unset($array['__key']);
- }
-
- foreach ($value as $key => $val) {
- $array[spl_object_hash($val)] = array(
- 'obj' => $val,
- 'inf' => $value->getInfo(),
- );
- }
- }
-
- return $array;
- }
-
- /**
- * Recursive implementation of export
- *
- * @param mixed $value The value to export
- * @param int $indentation The indentation level of the 2nd+ line
- * @param \SebastianBergmann\RecursionContext\Context $processed Previously processed objects
- * @return string
- * @see SebastianBergmann\Exporter\Exporter::export
- */
- protected function recursiveExport(&$value, $indentation, $processed = null)
- {
- if ($value === null) {
- return 'null';
- }
-
- if ($value === true) {
- return 'true';
- }
-
- if ($value === false) {
- return 'false';
- }
-
- if (is_float($value) && floatval(intval($value)) === $value) {
- return "$value.0";
- }
-
- if (is_resource($value)) {
- return sprintf(
- 'resource(%d) of type (%s)',
- $value,
- get_resource_type($value)
- );
- }
-
- if (is_string($value)) {
- // Match for most non printable chars somewhat taking multibyte chars into account
- if (preg_match('/[^\x09-\x0d\x1b\x20-\xff]/', $value)) {
- return 'Binary String: 0x' . bin2hex($value);
- }
-
- return "'" .
- str_replace(array("\r\n", "\n\r", "\r"), array("\n", "\n", "\n"), $value) .
- "'";
- }
-
- $whitespace = str_repeat(' ', 4 * $indentation);
-
- if (!$processed) {
- $processed = new Context;
- }
-
- if (is_array($value)) {
- if (($key = $processed->contains($value)) !== false) {
- return 'Array &' . $key;
- }
-
- $key = $processed->add($value);
- $values = '';
-
- if (count($value) > 0) {
- foreach ($value as $k => $v) {
- $values .= sprintf(
- '%s %s => %s' . "\n",
- $whitespace,
- $this->recursiveExport($k, $indentation),
- $this->recursiveExport($value[$k], $indentation + 1, $processed)
- );
- }
-
- $values = "\n" . $values . $whitespace;
- }
-
- return sprintf('Array &%s (%s)', $key, $values);
- }
-
- if (is_object($value)) {
- $class = get_class($value);
-
- if ($hash = $processed->contains($value)) {
- return sprintf('%s Object &%s', $class, $hash);
- }
-
- $hash = $processed->add($value);
- $values = '';
- $array = $this->toArray($value);
-
- if (count($array) > 0) {
- foreach ($array as $k => $v) {
- $values .= sprintf(
- '%s %s => %s' . "\n",
- $whitespace,
- $this->recursiveExport($k, $indentation),
- $this->recursiveExport($v, $indentation + 1, $processed)
- );
- }
-
- $values = "\n" . $values . $whitespace;
- }
-
- return sprintf('%s Object &%s (%s)', $class, $hash, $values);
- }
-
- return var_export($value, true);
- }
-}
diff --git a/vendor/sebastian/exporter/tests/ExporterTest.php b/vendor/sebastian/exporter/tests/ExporterTest.php
deleted file mode 100644
index b0546f19..00000000
--- a/vendor/sebastian/exporter/tests/ExporterTest.php
+++ /dev/null
@@ -1,358 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\Exporter;
-
-/**
- * @covers SebastianBergmann\Exporter\Exporter
- */
-class ExporterTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * @var Exporter
- */
- private $exporter;
-
- protected function setUp()
- {
- $this->exporter = new Exporter;
- }
-
- public function exportProvider()
- {
- $obj2 = new \stdClass;
- $obj2->foo = 'bar';
-
- $obj3 = (object)array(1,2,"Test\r\n",4,5,6,7,8);
-
- $obj = new \stdClass;
- //@codingStandardsIgnoreStart
- $obj->null = null;
- //@codingStandardsIgnoreEnd
- $obj->boolean = true;
- $obj->integer = 1;
- $obj->double = 1.2;
- $obj->string = '1';
- $obj->text = "this\nis\na\nvery\nvery\nvery\nvery\nvery\nvery\rlong\n\rtext";
- $obj->object = $obj2;
- $obj->objectagain = $obj2;
- $obj->array = array('foo' => 'bar');
- $obj->self = $obj;
-
- $storage = new \SplObjectStorage;
- $storage->attach($obj2);
- $storage->foo = $obj2;
-
- return array(
- array(null, 'null'),
- array(true, 'true'),
- array(false, 'false'),
- array(1, '1'),
- array(1.0, '1.0'),
- array(1.2, '1.2'),
- array(fopen('php://memory', 'r'), 'resource(%d) of type (stream)'),
- array('1', "'1'"),
- array(array(array(1,2,3), array(3,4,5)),
- << Array &1 (
- 0 => 1
- 1 => 2
- 2 => 3
- )
- 1 => Array &2 (
- 0 => 3
- 1 => 4
- 2 => 5
- )
-)
-EOF
- ),
- // \n\r and \r is converted to \n
- array("this\nis\na\nvery\nvery\nvery\nvery\nvery\nvery\rlong\n\rtext",
- << null
- 'boolean' => true
- 'integer' => 1
- 'double' => 1.2
- 'string' => '1'
- 'text' => 'this
-is
-a
-very
-very
-very
-very
-very
-very
-long
-text'
- 'object' => stdClass Object &%x (
- 'foo' => 'bar'
- )
- 'objectagain' => stdClass Object &%x
- 'array' => Array &%d (
- 'foo' => 'bar'
- )
- 'self' => stdClass Object &%x
-)
-EOF
- ),
- array(array(), 'Array &%d ()'),
- array($storage,
- << stdClass Object &%x (
- 'foo' => 'bar'
- )
- '%x' => Array &0 (
- 'obj' => stdClass Object &%x
- 'inf' => null
- )
-)
-EOF
- ),
- array($obj3,
- << 1
- 1 => 2
- 2 => 'Test\n'
- 3 => 4
- 4 => 5
- 5 => 6
- 6 => 7
- 7 => 8
-)
-EOF
- ),
- array(
- chr(0) . chr(1) . chr(2) . chr(3) . chr(4) . chr(5),
- 'Binary String: 0x000102030405'
- ),
- array(
- implode('', array_map('chr', range(0x0e, 0x1f))),
- 'Binary String: 0x0e0f101112131415161718191a1b1c1d1e1f'
- ),
- array(
- chr(0x00) . chr(0x09),
- 'Binary String: 0x0009'
- ),
- array(
- '',
- "''"
- ),
- );
- }
-
- /**
- * @dataProvider exportProvider
- */
- public function testExport($value, $expected)
- {
- $this->assertStringMatchesFormat(
- $expected,
- $this->trimNewline($this->exporter->export($value))
- );
- }
-
- public function testExport2()
- {
- if (PHP_VERSION === '5.3.3') {
- $this->markTestSkipped('Skipped due to "Nesting level too deep - recursive dependency?" fatal error');
- }
-
- $obj = new \stdClass;
- $obj->foo = 'bar';
-
- $array = array(
- 0 => 0,
- 'null' => null,
- 'boolean' => true,
- 'integer' => 1,
- 'double' => 1.2,
- 'string' => '1',
- 'text' => "this\nis\na\nvery\nvery\nvery\nvery\nvery\nvery\rlong\n\rtext",
- 'object' => $obj,
- 'objectagain' => $obj,
- 'array' => array('foo' => 'bar'),
- );
-
- $array['self'] = &$array;
-
- $expected = << 0
- 'null' => null
- 'boolean' => true
- 'integer' => 1
- 'double' => 1.2
- 'string' => '1'
- 'text' => 'this
-is
-a
-very
-very
-very
-very
-very
-very
-long
-text'
- 'object' => stdClass Object &%x (
- 'foo' => 'bar'
- )
- 'objectagain' => stdClass Object &%x
- 'array' => Array &%d (
- 'foo' => 'bar'
- )
- 'self' => Array &%d (
- 0 => 0
- 'null' => null
- 'boolean' => true
- 'integer' => 1
- 'double' => 1.2
- 'string' => '1'
- 'text' => 'this
-is
-a
-very
-very
-very
-very
-very
-very
-long
-text'
- 'object' => stdClass Object &%x
- 'objectagain' => stdClass Object &%x
- 'array' => Array &%d (
- 'foo' => 'bar'
- )
- 'self' => Array &%d
- )
-)
-EOF;
-
- $this->assertStringMatchesFormat(
- $expected,
- $this->trimNewline($this->exporter->export($array))
- );
- }
-
- public function shortenedExportProvider()
- {
- $obj = new \stdClass;
- $obj->foo = 'bar';
-
- $array = array(
- 'foo' => 'bar',
- );
-
- return array(
- array(null, 'null'),
- array(true, 'true'),
- array(1, '1'),
- array(1.0, '1.0'),
- array(1.2, '1.2'),
- array('1', "'1'"),
- // \n\r and \r is converted to \n
- array("this\nis\na\nvery\nvery\nvery\nvery\nvery\nvery\rlong\n\rtext", "'this\\nis\\na\\nvery\\nvery\\nvery\\nvery...g\\ntext'"),
- array(new \stdClass, 'stdClass Object ()'),
- array($obj, 'stdClass Object (...)'),
- array(array(), 'Array ()'),
- array($array, 'Array (...)'),
- );
- }
-
- /**
- * @dataProvider shortenedExportProvider
- */
- public function testShortenedExport($value, $expected)
- {
- $this->assertSame(
- $expected,
- $this->trimNewline($this->exporter->shortenedExport($value))
- );
- }
-
- /**
- * @requires extension mbstring
- */
- public function testShortenedExportForMultibyteCharacters()
- {
- $oldMbLanguage = mb_language();
- mb_language('Japanese');
- $oldMbInternalEncoding = mb_internal_encoding();
- mb_internal_encoding('UTF-8');
-
- try {
- $this->assertSame(
- "'いろはにほへとちりぬるをわかよたれそつねならむうゐのおくや...しゑひもせす'",
- $this->trimNewline($this->exporter->shortenedExport('いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす'))
- );
- } catch (\Exception $e) {
- mb_internal_encoding($oldMbInternalEncoding);
- mb_language($oldMbLanguage);
- throw $e;
- }
-
- mb_internal_encoding($oldMbInternalEncoding);
- mb_language($oldMbLanguage);
- }
-
- public function provideNonBinaryMultibyteStrings()
- {
- return array(
- array(implode('', array_map('chr', range(0x09, 0x0d))), 5),
- array(implode('', array_map('chr', range(0x20, 0x7f))), 96),
- array(implode('', array_map('chr', range(0x80, 0xff))), 128),
- );
- }
-
-
- /**
- * @dataProvider provideNonBinaryMultibyteStrings
- */
- public function testNonBinaryStringExport($value, $expectedLength)
- {
- $this->assertRegExp(
- "~'.{{$expectedLength}}'\$~s",
- $this->exporter->export($value)
- );
- }
-
- public function testNonObjectCanBeReturnedAsArray()
- {
- $this->assertEquals(array(true), $this->exporter->toArray(true));
- }
-
- private function trimNewline($string)
- {
- return preg_replace('/[ ]*\n/', "\n", $string);
- }
-}
diff --git a/vendor/sebastian/global-state/.gitignore b/vendor/sebastian/global-state/.gitignore
deleted file mode 100644
index 464180e1..00000000
--- a/vendor/sebastian/global-state/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.idea
-composer.lock
-composer.phar
-vendor/
-cache.properties
-phpunit.xml
diff --git a/vendor/sebastian/global-state/.travis.yml b/vendor/sebastian/global-state/.travis.yml
deleted file mode 100644
index 0be6154e..00000000
--- a/vendor/sebastian/global-state/.travis.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-language: php
-
-php:
- - 5.3.3
- - 5.3
- - 5.4
- - 5.5
- - 5.6
- - hhvm
-
-sudo: false
-
-before_script:
- - composer self-update
- - composer install --no-interaction --prefer-source --dev
-
-script: ./vendor/bin/phpunit
-
-notifications:
- email: false
diff --git a/vendor/sebastian/global-state/LICENSE b/vendor/sebastian/global-state/LICENSE
deleted file mode 100644
index a555bcd1..00000000
--- a/vendor/sebastian/global-state/LICENSE
+++ /dev/null
@@ -1,33 +0,0 @@
-GlobalState
-
-Copyright (c) 2001-2015, Sebastian Bergmann .
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- * Neither the name of Sebastian Bergmann nor the names of his
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/sebastian/global-state/README.md b/vendor/sebastian/global-state/README.md
deleted file mode 100644
index c5e262bd..00000000
--- a/vendor/sebastian/global-state/README.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# GlobalState
-
-Snapshotting of global state, factored out of PHPUnit into a stand-alone component.
-
-[](https://travis-ci.org/sebastianbergmann/global-state)
-
-## Installation
-
-To add this package as a local, per-project dependency to your project, simply add a dependency on `sebastian/global-state` to your project's `composer.json` file. Here is a minimal example of a `composer.json` file that just defines a dependency on GlobalState:
-
- {
- "require": {
- "sebastian/global-state": "1.0.*"
- }
- }
diff --git a/vendor/sebastian/global-state/build.xml b/vendor/sebastian/global-state/build.xml
deleted file mode 100644
index 63c5445a..00000000
--- a/vendor/sebastian/global-state/build.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/vendor/sebastian/global-state/composer.json b/vendor/sebastian/global-state/composer.json
deleted file mode 100644
index 7e8849ba..00000000
--- a/vendor/sebastian/global-state/composer.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "name": "sebastian/global-state",
- "description": "Snapshotting of global state",
- "keywords": ["global state"],
- "homepage": "http://www.github.com/sebastianbergmann/global-state",
- "license": "BSD-3-Clause",
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- }
- ],
- "require": {
- "php": ">=5.3.3"
- },
- "require-dev": {
- "phpunit/phpunit": "~4.2"
- },
- "suggest": {
- "ext-uopz": "*"
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "autoload-dev": {
- "classmap": [
- "tests/_fixture/"
- ]
- },
- "extra": {
- "branch-alias": {
- "dev-master": "1.0-dev"
- }
- }
-}
diff --git a/vendor/sebastian/global-state/phpunit.xml.dist b/vendor/sebastian/global-state/phpunit.xml.dist
deleted file mode 100644
index d6079183..00000000
--- a/vendor/sebastian/global-state/phpunit.xml.dist
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
- tests
-
-
-
-
- src
-
-
-
-
-
-
-
-
diff --git a/vendor/sebastian/global-state/src/Blacklist.php b/vendor/sebastian/global-state/src/Blacklist.php
deleted file mode 100644
index 5d540916..00000000
--- a/vendor/sebastian/global-state/src/Blacklist.php
+++ /dev/null
@@ -1,149 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\GlobalState;
-
-use ReflectionClass;
-
-/**
- * A blacklist for global state elements that should not be snapshotted.
- */
-class Blacklist
-{
- /**
- * @var array
- */
- private $globalVariables = array();
-
- /**
- * @var array
- */
- private $classes = array();
-
- /**
- * @var array
- */
- private $classNamePrefixes = array();
-
- /**
- * @var array
- */
- private $parentClasses = array();
-
- /**
- * @var array
- */
- private $interfaces = array();
-
- /**
- * @var array
- */
- private $staticAttributes = array();
-
- /**
- * @param string $variableName
- */
- public function addGlobalVariable($variableName)
- {
- $this->globalVariables[$variableName] = true;
- }
-
- /**
- * @param string $className
- */
- public function addClass($className)
- {
- $this->classes[] = $className;
- }
-
- /**
- * @param string $className
- */
- public function addSubclassesOf($className)
- {
- $this->parentClasses[] = $className;
- }
-
- /**
- * @param string $interfaceName
- */
- public function addImplementorsOf($interfaceName)
- {
- $this->interfaces[] = $interfaceName;
- }
-
- /**
- * @param string $classNamePrefix
- */
- public function addClassNamePrefix($classNamePrefix)
- {
- $this->classNamePrefixes[] = $classNamePrefix;
- }
-
- /**
- * @param string $className
- * @param string $attributeName
- */
- public function addStaticAttribute($className, $attributeName)
- {
- if (!isset($this->staticAttributes[$className])) {
- $this->staticAttributes[$className] = array();
- }
-
- $this->staticAttributes[$className][$attributeName] = true;
- }
-
- /**
- * @param string $variableName
- * @return bool
- */
- public function isGlobalVariableBlacklisted($variableName)
- {
- return isset($this->globalVariables[$variableName]);
- }
-
- /**
- * @param string $className
- * @param string $attributeName
- * @return bool
- */
- public function isStaticAttributeBlacklisted($className, $attributeName)
- {
- if (in_array($className, $this->classes)) {
- return true;
- }
-
- foreach ($this->classNamePrefixes as $prefix) {
- if (strpos($className, $prefix) === 0) {
- return true;
- }
- }
-
- $class = new ReflectionClass($className);
-
- foreach ($this->parentClasses as $type) {
- if ($class->isSubclassOf($type)) {
- return true;
- }
- }
-
- foreach ($this->interfaces as $type) {
- if ($class->implementsInterface($type)) {
- return true;
- }
- }
-
- if (isset($this->staticAttributes[$className][$attributeName])) {
- return true;
- }
-
- return false;
- }
-}
diff --git a/vendor/sebastian/global-state/src/CodeExporter.php b/vendor/sebastian/global-state/src/CodeExporter.php
deleted file mode 100644
index d595c22e..00000000
--- a/vendor/sebastian/global-state/src/CodeExporter.php
+++ /dev/null
@@ -1,93 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\GlobalState;
-
-/**
- * Exports parts of a Snapshot as PHP code.
- */
-class CodeExporter
-{
- /**
- * @param Snapshot $snapshot
- * @return string
- */
- public function constants(Snapshot $snapshot)
- {
- $result = '';
-
- foreach ($snapshot->constants() as $name => $value) {
- $result .= sprintf(
- 'if (!defined(\'%s\')) define(\'%s\', %s);' . "\n",
- $name,
- $name,
- $this->exportVariable($value)
- );
- }
-
- return $result;
- }
-
- /**
- * @param Snapshot $snapshot
- * @return string
- */
- public function iniSettings(Snapshot $snapshot)
- {
- $result = '';
-
- foreach ($snapshot->iniSettings() as $key => $value) {
- $result .= sprintf(
- '@ini_set(%s, %s);' . "\n",
- $this->exportVariable($key),
- $this->exportVariable($value)
- );
- }
-
- return $result;
- }
-
- /**
- * @param mixed $variable
- * @return string
- */
- private function exportVariable($variable)
- {
- if (is_scalar($variable) || is_null($variable) ||
- (is_array($variable) && $this->arrayOnlyContainsScalars($variable))) {
- return var_export($variable, true);
- }
-
- return 'unserialize(' . var_export(serialize($variable), true) . ')';
- }
-
- /**
- * @param array $array
- * @return bool
- */
- private function arrayOnlyContainsScalars(array $array)
- {
- $result = true;
-
- foreach ($array as $element) {
- if (is_array($element)) {
- $result = self::arrayOnlyContainsScalars($element);
- } elseif (!is_scalar($element) && !is_null($element)) {
- $result = false;
- }
-
- if ($result === false) {
- break;
- }
- }
-
- return $result;
- }
-}
diff --git a/vendor/sebastian/global-state/src/Exception.php b/vendor/sebastian/global-state/src/Exception.php
deleted file mode 100644
index 1e00212e..00000000
--- a/vendor/sebastian/global-state/src/Exception.php
+++ /dev/null
@@ -1,17 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\GlobalState;
-
-/**
- */
-interface Exception
-{
-}
diff --git a/vendor/sebastian/global-state/src/Restorer.php b/vendor/sebastian/global-state/src/Restorer.php
deleted file mode 100644
index 78e0ba80..00000000
--- a/vendor/sebastian/global-state/src/Restorer.php
+++ /dev/null
@@ -1,141 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\GlobalState;
-
-use ReflectionProperty;
-
-/**
- * Restorer of snapshots of global state.
- */
-class Restorer
-{
- /**
- * Deletes function definitions that are not defined in a snapshot.
- *
- * @param Snapshot $snapshot
- * @throws RuntimeException when the uopz_delete() function is not available
- * @see https://github.com/krakjoe/uopz
- */
- public function restoreFunctions(Snapshot $snapshot)
- {
- if (!function_exists('uopz_delete')) {
- throw new RuntimeException('The uopz_delete() function is required for this operation');
- }
-
- $functions = get_defined_functions();
-
- foreach (array_diff($functions['user'], $snapshot->functions()) as $function) {
- uopz_delete($function);
- }
- }
-
- /**
- * Restores all global and super-global variables from a snapshot.
- *
- * @param Snapshot $snapshot
- */
- public function restoreGlobalVariables(Snapshot $snapshot)
- {
- $superGlobalArrays = $snapshot->superGlobalArrays();
-
- foreach ($superGlobalArrays as $superGlobalArray) {
- $this->restoreSuperGlobalArray($snapshot, $superGlobalArray);
- }
-
- $globalVariables = $snapshot->globalVariables();
-
- foreach (array_keys($GLOBALS) as $key) {
- if ($key != 'GLOBALS' &&
- !in_array($key, $superGlobalArrays) &&
- !$snapshot->blacklist()->isGlobalVariableBlacklisted($key)) {
- if (isset($globalVariables[$key])) {
- $GLOBALS[$key] = $globalVariables[$key];
- } else {
- unset($GLOBALS[$key]);
- }
- }
- }
- }
-
- /**
- * Restores all static attributes in user-defined classes from this snapshot.
- *
- * @param Snapshot $snapshot
- */
- public function restoreStaticAttributes(Snapshot $snapshot)
- {
- $current = new Snapshot($snapshot->blacklist(), false, false, false, false, true, false, false, false, false);
- $newClasses = array_diff($current->classes(), $snapshot->classes());
- unset($current);
-
- foreach ($snapshot->staticAttributes() as $className => $staticAttributes) {
- foreach ($staticAttributes as $name => $value) {
- $reflector = new ReflectionProperty($className, $name);
- $reflector->setAccessible(true);
- $reflector->setValue($value);
- }
- }
-
- foreach ($newClasses as $className) {
- $class = new \ReflectionClass($className);
- $defaults = $class->getDefaultProperties();
-
- foreach ($class->getProperties() as $attribute) {
- if (!$attribute->isStatic()) {
- continue;
- }
-
- $name = $attribute->getName();
-
- if ($snapshot->blacklist()->isStaticAttributeBlacklisted($className, $name)) {
- continue;
- }
-
- if (!isset($defaults[$name])) {
- continue;
- }
-
- $attribute->setAccessible(true);
- $attribute->setValue($defaults[$name]);
- }
- }
- }
-
- /**
- * Restores a super-global variable array from this snapshot.
- *
- * @param Snapshot $snapshot
- * @param $superGlobalArray
- */
- private function restoreSuperGlobalArray(Snapshot $snapshot, $superGlobalArray)
- {
- $superGlobalVariables = $snapshot->superGlobalVariables();
-
- if (isset($GLOBALS[$superGlobalArray]) &&
- is_array($GLOBALS[$superGlobalArray]) &&
- isset($superGlobalVariables[$superGlobalArray])) {
- $keys = array_keys(
- array_merge(
- $GLOBALS[$superGlobalArray],
- $superGlobalVariables[$superGlobalArray]
- )
- );
-
- foreach ($keys as $key) {
- if (isset($superGlobalVariables[$superGlobalArray][$key])) {
- $GLOBALS[$superGlobalArray][$key] = $superGlobalVariables[$superGlobalArray][$key];
- } else {
- unset($GLOBALS[$superGlobalArray][$key]);
- }
- }
- }
- }
-}
diff --git a/vendor/sebastian/global-state/src/RuntimeException.php b/vendor/sebastian/global-state/src/RuntimeException.php
deleted file mode 100644
index c0bf7bdd..00000000
--- a/vendor/sebastian/global-state/src/RuntimeException.php
+++ /dev/null
@@ -1,17 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\GlobalState;
-
-/**
- */
-class RuntimeException extends \RuntimeException implements Exception
-{
-}
diff --git a/vendor/sebastian/global-state/src/Snapshot.php b/vendor/sebastian/global-state/src/Snapshot.php
deleted file mode 100644
index 3c8aaa9b..00000000
--- a/vendor/sebastian/global-state/src/Snapshot.php
+++ /dev/null
@@ -1,423 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\GlobalState;
-
-use ReflectionClass;
-use Serializable;
-
-/**
- * A snapshot of global state.
- */
-class Snapshot
-{
- /**
- * @var Blacklist
- */
- private $blacklist;
-
- /**
- * @var array
- */
- private $globalVariables = array();
-
- /**
- * @var array
- */
- private $superGlobalArrays = array();
-
- /**
- * @var array
- */
- private $superGlobalVariables = array();
-
- /**
- * @var array
- */
- private $staticAttributes = array();
-
- /**
- * @var array
- */
- private $iniSettings = array();
-
- /**
- * @var array
- */
- private $includedFiles = array();
-
- /**
- * @var array
- */
- private $constants = array();
-
- /**
- * @var array
- */
- private $functions = array();
-
- /**
- * @var array
- */
- private $interfaces = array();
-
- /**
- * @var array
- */
- private $classes = array();
-
- /**
- * @var array
- */
- private $traits = array();
-
- /**
- * Creates a snapshot of the current global state.
- *
- * @param Blacklist $blacklist
- * @param bool $includeGlobalVariables
- * @param bool $includeStaticAttributes
- * @param bool $includeConstants
- * @param bool $includeFunctions
- * @param bool $includeClasses
- * @param bool $includeInterfaces
- * @param bool $includeTraits
- * @param bool $includeIniSettings
- * @param bool $includeIncludedFiles
- */
- public function __construct(Blacklist $blacklist = null, $includeGlobalVariables = true, $includeStaticAttributes = true, $includeConstants = true, $includeFunctions = true, $includeClasses = true, $includeInterfaces = true, $includeTraits = true, $includeIniSettings = true, $includeIncludedFiles = true)
- {
- if ($blacklist === null) {
- $blacklist = new Blacklist;
- }
-
- $this->blacklist = $blacklist;
-
- if ($includeConstants) {
- $this->snapshotConstants();
- }
-
- if ($includeFunctions) {
- $this->snapshotFunctions();
- }
-
- if ($includeClasses || $includeStaticAttributes) {
- $this->snapshotClasses();
- }
-
- if ($includeInterfaces) {
- $this->snapshotInterfaces();
- }
-
- if ($includeGlobalVariables) {
- $this->setupSuperGlobalArrays();
- $this->snapshotGlobals();
- }
-
- if ($includeStaticAttributes) {
- $this->snapshotStaticAttributes();
- }
-
- if ($includeIniSettings) {
- $this->iniSettings = ini_get_all(null, false);
- }
-
- if ($includeIncludedFiles) {
- $this->includedFiles = get_included_files();
- }
-
- if (function_exists('get_declared_traits')) {
- $this->traits = get_declared_traits();
- }
- }
-
- /**
- * @return Blacklist
- */
- public function blacklist()
- {
- return $this->blacklist;
- }
-
- /**
- * @return array
- */
- public function globalVariables()
- {
- return $this->globalVariables;
- }
-
- /**
- * @return array
- */
- public function superGlobalVariables()
- {
- return $this->superGlobalVariables;
- }
-
- /**
- * Returns a list of all super-global variable arrays.
- *
- * @return array
- */
- public function superGlobalArrays()
- {
- return $this->superGlobalArrays;
- }
-
- /**
- * @return array
- */
- public function staticAttributes()
- {
- return $this->staticAttributes;
- }
-
- /**
- * @return array
- */
- public function iniSettings()
- {
- return $this->iniSettings;
- }
-
- /**
- * @return array
- */
- public function includedFiles()
- {
- return $this->includedFiles;
- }
-
- /**
- * @return array
- */
- public function constants()
- {
- return $this->constants;
- }
-
- /**
- * @return array
- */
- public function functions()
- {
- return $this->functions;
- }
-
- /**
- * @return array
- */
- public function interfaces()
- {
- return $this->interfaces;
- }
-
- /**
- * @return array
- */
- public function classes()
- {
- return $this->classes;
- }
-
- /**
- * @return array
- */
- public function traits()
- {
- return $this->traits;
- }
-
- /**
- * Creates a snapshot user-defined constants.
- */
- private function snapshotConstants()
- {
- $constants = get_defined_constants(true);
-
- if (isset($constants['user'])) {
- $this->constants = $constants['user'];
- }
- }
-
- /**
- * Creates a snapshot user-defined functions.
- */
- private function snapshotFunctions()
- {
- $functions = get_defined_functions();
-
- $this->functions = $functions['user'];
- }
-
- /**
- * Creates a snapshot user-defined classes.
- */
- private function snapshotClasses()
- {
- foreach (array_reverse(get_declared_classes()) as $className) {
- $class = new ReflectionClass($className);
-
- if (!$class->isUserDefined()) {
- break;
- }
-
- $this->classes[] = $className;
- }
-
- $this->classes = array_reverse($this->classes);
- }
-
- /**
- * Creates a snapshot user-defined interfaces.
- */
- private function snapshotInterfaces()
- {
- foreach (array_reverse(get_declared_interfaces()) as $interfaceName) {
- $class = new ReflectionClass($interfaceName);
-
- if (!$class->isUserDefined()) {
- break;
- }
-
- $this->interfaces[] = $interfaceName;
- }
-
- $this->interfaces = array_reverse($this->interfaces);
- }
-
- /**
- * Creates a snapshot of all global and super-global variables.
- */
- private function snapshotGlobals()
- {
- $superGlobalArrays = $this->superGlobalArrays();
-
- foreach ($superGlobalArrays as $superGlobalArray) {
- $this->snapshotSuperGlobalArray($superGlobalArray);
- }
-
- foreach (array_keys($GLOBALS) as $key) {
- if ($key != 'GLOBALS' &&
- !in_array($key, $superGlobalArrays) &&
- $this->canBeSerialized($GLOBALS[$key]) &&
- !$this->blacklist->isGlobalVariableBlacklisted($key)) {
- $this->globalVariables[$key] = unserialize(serialize($GLOBALS[$key]));
- }
- }
- }
-
- /**
- * Creates a snapshot a super-global variable array.
- *
- * @param $superGlobalArray
- */
- private function snapshotSuperGlobalArray($superGlobalArray)
- {
- $this->superGlobalVariables[$superGlobalArray] = array();
-
- if (isset($GLOBALS[$superGlobalArray]) && is_array($GLOBALS[$superGlobalArray])) {
- foreach ($GLOBALS[$superGlobalArray] as $key => $value) {
- $this->superGlobalVariables[$superGlobalArray][$key] = unserialize(serialize($value));
- }
- }
- }
-
- /**
- * Creates a snapshot of all static attributes in user-defined classes.
- */
- private function snapshotStaticAttributes()
- {
- foreach ($this->classes as $className) {
- $class = new ReflectionClass($className);
- $snapshot = array();
-
- foreach ($class->getProperties() as $attribute) {
- if ($attribute->isStatic()) {
- $name = $attribute->getName();
-
- if ($this->blacklist->isStaticAttributeBlacklisted($className, $name)) {
- continue;
- }
-
- $attribute->setAccessible(true);
- $value = $attribute->getValue();
-
- if ($this->canBeSerialized($value)) {
- $snapshot[$name] = unserialize(serialize($value));
- }
- }
- }
-
- if (!empty($snapshot)) {
- $this->staticAttributes[$className] = $snapshot;
- }
- }
- }
-
- /**
- * Returns a list of all super-global variable arrays.
- *
- * @return array
- */
- private function setupSuperGlobalArrays()
- {
- $this->superGlobalArrays = array(
- '_ENV',
- '_POST',
- '_GET',
- '_COOKIE',
- '_SERVER',
- '_FILES',
- '_REQUEST'
- );
-
- if (ini_get('register_long_arrays') == '1') {
- $this->superGlobalArrays = array_merge(
- $this->superGlobalArrays,
- array(
- 'HTTP_ENV_VARS',
- 'HTTP_POST_VARS',
- 'HTTP_GET_VARS',
- 'HTTP_COOKIE_VARS',
- 'HTTP_SERVER_VARS',
- 'HTTP_POST_FILES'
- )
- );
- }
- }
-
- /**
- * @param mixed $variable
- * @return bool
- * @todo Implement this properly
- */
- private function canBeSerialized($variable)
- {
- if (!is_object($variable)) {
- return !is_resource($variable);
- }
-
- if ($variable instanceof \stdClass) {
- return true;
- }
-
- $class = new ReflectionClass($variable);
-
- do {
- if ($class->isInternal()) {
- return $variable instanceof Serializable;
- }
- } while ($class = $class->getParentClass());
-
- return true;
- }
-}
diff --git a/vendor/sebastian/global-state/tests/BlacklistTest.php b/vendor/sebastian/global-state/tests/BlacklistTest.php
deleted file mode 100644
index 5d597965..00000000
--- a/vendor/sebastian/global-state/tests/BlacklistTest.php
+++ /dev/null
@@ -1,113 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\GlobalState;
-
-use PHPUnit_Framework_TestCase;
-
-/**
- */
-class BlacklistTest extends PHPUnit_Framework_TestCase
-{
- /**
- * @var \SebastianBergmann\GlobalState\Blacklist
- */
- private $blacklist;
-
- protected function setUp()
- {
- $this->blacklist = new Blacklist;
- }
-
- public function testGlobalVariableThatIsNotBlacklistedIsNotTreatedAsBlacklisted()
- {
- $this->assertFalse($this->blacklist->isGlobalVariableBlacklisted('variable'));
- }
-
- public function testGlobalVariableCanBeBlacklisted()
- {
- $this->blacklist->addGlobalVariable('variable');
-
- $this->assertTrue($this->blacklist->isGlobalVariableBlacklisted('variable'));
- }
-
- public function testStaticAttributeThatIsNotBlacklistedIsNotTreatedAsBlacklisted()
- {
- $this->assertFalse(
- $this->blacklist->isStaticAttributeBlacklisted(
- 'SebastianBergmann\GlobalState\TestFixture\BlacklistedClass',
- 'attribute'
- )
- );
- }
-
- public function testClassCanBeBlacklisted()
- {
- $this->blacklist->addClass('SebastianBergmann\GlobalState\TestFixture\BlacklistedClass');
-
- $this->assertTrue(
- $this->blacklist->isStaticAttributeBlacklisted(
- 'SebastianBergmann\GlobalState\TestFixture\BlacklistedClass',
- 'attribute'
- )
- );
- }
-
- public function testSubclassesCanBeBlacklisted()
- {
- $this->blacklist->addSubclassesOf('SebastianBergmann\GlobalState\TestFixture\BlacklistedClass');
-
- $this->assertTrue(
- $this->blacklist->isStaticAttributeBlacklisted(
- 'SebastianBergmann\GlobalState\TestFixture\BlacklistedChildClass',
- 'attribute'
- )
- );
- }
-
- public function testImplementorsCanBeBlacklisted()
- {
- $this->blacklist->addImplementorsOf('SebastianBergmann\GlobalState\TestFixture\BlacklistedInterface');
-
- $this->assertTrue(
- $this->blacklist->isStaticAttributeBlacklisted(
- 'SebastianBergmann\GlobalState\TestFixture\BlacklistedImplementor',
- 'attribute'
- )
- );
- }
-
- public function testClassNamePrefixesCanBeBlacklisted()
- {
- $this->blacklist->addClassNamePrefix('SebastianBergmann\GlobalState');
-
- $this->assertTrue(
- $this->blacklist->isStaticAttributeBlacklisted(
- 'SebastianBergmann\GlobalState\TestFixture\BlacklistedClass',
- 'attribute'
- )
- );
- }
-
- public function testStaticAttributeCanBeBlacklisted()
- {
- $this->blacklist->addStaticAttribute(
- 'SebastianBergmann\GlobalState\TestFixture\BlacklistedClass',
- 'attribute'
- );
-
- $this->assertTrue(
- $this->blacklist->isStaticAttributeBlacklisted(
- 'SebastianBergmann\GlobalState\TestFixture\BlacklistedClass',
- 'attribute'
- )
- );
- }
-}
diff --git a/vendor/sebastian/global-state/tests/SnapshotTest.php b/vendor/sebastian/global-state/tests/SnapshotTest.php
deleted file mode 100644
index 1e97488b..00000000
--- a/vendor/sebastian/global-state/tests/SnapshotTest.php
+++ /dev/null
@@ -1,119 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\GlobalState;
-
-use ArrayObject;
-use PHPUnit_Framework_TestCase;
-use SebastianBergmann\GlobalState\TestFixture\SnapshotClass;
-
-/**
- */
-class SnapshotTest extends PHPUnit_Framework_TestCase
-{
- public function testStaticAttributes()
- {
- $blacklist = $this->getBlacklist();
- $blacklist->method('isStaticAttributeBlacklisted')->willReturnCallback(function ($class) {
- return $class !== 'SebastianBergmann\GlobalState\TestFixture\SnapshotClass';
- });
-
- SnapshotClass::init();
-
- $snapshot = new Snapshot($blacklist, false, true, false, false, false, false, false, false, false);
- $expected = array('SebastianBergmann\GlobalState\TestFixture\SnapshotClass' => array(
- 'string' => 'snapshot',
- 'arrayObject' => new ArrayObject(array(1, 2, 3)),
- 'stdClass' => new \stdClass(),
- ));
-
- $this->assertEquals($expected, $snapshot->staticAttributes());
- }
-
- public function testConstants()
- {
- $snapshot = new Snapshot($this->getBlacklist(), false, false, true, false, false, false, false, false, false);
- $this->assertArrayHasKey('GLOBALSTATE_TESTSUITE', $snapshot->constants());
- }
-
- public function testFunctions()
- {
- require_once __DIR__.'/_fixture/SnapshotFunctions.php';
-
- $snapshot = new Snapshot($this->getBlacklist(), false, false, false, true, false, false, false, false, false);
- $functions = $snapshot->functions();
-
- $this->assertThat(
- $functions,
- $this->logicalOr(
- // Zend
- $this->contains('sebastianbergmann\globalstate\testfixture\snapshotfunction'),
- // HHVM
- $this->contains('SebastianBergmann\GlobalState\TestFixture\snapshotFunction')
- )
- );
-
- $this->assertNotContains('assert', $functions);
- }
-
- public function testClasses()
- {
- $snapshot = new Snapshot($this->getBlacklist(), false, false, false, false, true, false, false, false, false);
- $classes = $snapshot->classes();
-
- $this->assertContains('PHPUnit_Framework_TestCase', $classes);
- $this->assertNotContains('Exception', $classes);
- }
-
- public function testInterfaces()
- {
- $snapshot = new Snapshot($this->getBlacklist(), false, false, false, false, false, true, false, false, false);
- $interfaces = $snapshot->interfaces();
-
- $this->assertContains('PHPUnit_Framework_Test', $interfaces);
- $this->assertNotContains('Countable', $interfaces);
- }
-
- /**
- * @requires PHP 5.4
- */
- public function testTraits()
- {
- spl_autoload_call('SebastianBergmann\GlobalState\TestFixture\SnapshotTrait');
-
- $snapshot = new Snapshot($this->getBlacklist(), false, false, false, false, false, false, true, false, false);
- $this->assertContains('SebastianBergmann\GlobalState\TestFixture\SnapshotTrait', $snapshot->traits());
- }
-
- public function testIniSettings()
- {
- $snapshot = new Snapshot($this->getBlacklist(), false, false, false, false, false, false, false, true, false);
- $iniSettings = $snapshot->iniSettings();
-
- $this->assertArrayHasKey('date.timezone', $iniSettings);
- $this->assertEquals('Etc/UTC', $iniSettings['date.timezone']);
- }
-
- public function testIncludedFiles()
- {
- $snapshot = new Snapshot($this->getBlacklist(), false, false, false, false, false, false, false, false, true);
- $this->assertContains(__FILE__, $snapshot->includedFiles());
- }
-
- /**
- * @return \SebastianBergmann\GlobalState\Blacklist
- */
- private function getBlacklist()
- {
- return $this->getMockBuilder('SebastianBergmann\GlobalState\Blacklist')
- ->disableOriginalConstructor()
- ->getMock();
- }
-}
diff --git a/vendor/sebastian/global-state/tests/_fixture/BlacklistedChildClass.php b/vendor/sebastian/global-state/tests/_fixture/BlacklistedChildClass.php
deleted file mode 100644
index e852b492..00000000
--- a/vendor/sebastian/global-state/tests/_fixture/BlacklistedChildClass.php
+++ /dev/null
@@ -1,17 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\GlobalState\TestFixture;
-
-/**
- */
-class BlacklistedChildClass extends BlacklistedClass
-{
-}
diff --git a/vendor/sebastian/global-state/tests/_fixture/BlacklistedClass.php b/vendor/sebastian/global-state/tests/_fixture/BlacklistedClass.php
deleted file mode 100644
index 284876de..00000000
--- a/vendor/sebastian/global-state/tests/_fixture/BlacklistedClass.php
+++ /dev/null
@@ -1,18 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\GlobalState\TestFixture;
-
-/**
- */
-class BlacklistedClass
-{
- private static $attribute;
-}
diff --git a/vendor/sebastian/global-state/tests/_fixture/BlacklistedImplementor.php b/vendor/sebastian/global-state/tests/_fixture/BlacklistedImplementor.php
deleted file mode 100644
index d7b46a9a..00000000
--- a/vendor/sebastian/global-state/tests/_fixture/BlacklistedImplementor.php
+++ /dev/null
@@ -1,18 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\GlobalState\TestFixture;
-
-/**
- */
-class BlacklistedImplementor implements BlacklistedInterface
-{
- private static $attribute;
-}
diff --git a/vendor/sebastian/global-state/tests/_fixture/BlacklistedInterface.php b/vendor/sebastian/global-state/tests/_fixture/BlacklistedInterface.php
deleted file mode 100644
index 8c3ed674..00000000
--- a/vendor/sebastian/global-state/tests/_fixture/BlacklistedInterface.php
+++ /dev/null
@@ -1,17 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\GlobalState\TestFixture;
-
-/**
- */
-interface BlacklistedInterface
-{
-}
diff --git a/vendor/sebastian/global-state/tests/_fixture/SnapshotClass.php b/vendor/sebastian/global-state/tests/_fixture/SnapshotClass.php
deleted file mode 100644
index 9735818f..00000000
--- a/vendor/sebastian/global-state/tests/_fixture/SnapshotClass.php
+++ /dev/null
@@ -1,37 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\GlobalState\TestFixture;
-
-use DomDocument;
-use ArrayObject;
-
-/**
- */
-class SnapshotClass
-{
- private static $string = 'snapshot';
- private static $dom;
- private static $closure;
- private static $arrayObject;
- private static $snapshotDomDocument;
- private static $resource;
- private static $stdClass;
-
- public static function init()
- {
- self::$dom = new DomDocument();
- self::$closure = function () {};
- self::$arrayObject = new ArrayObject(array(1, 2, 3));
- self::$snapshotDomDocument = new SnapshotDomDocument();
- self::$resource = fopen('php://memory', 'r');
- self::$stdClass = new \stdClass();
- }
-}
diff --git a/vendor/sebastian/global-state/tests/_fixture/SnapshotDomDocument.php b/vendor/sebastian/global-state/tests/_fixture/SnapshotDomDocument.php
deleted file mode 100644
index bcf554dc..00000000
--- a/vendor/sebastian/global-state/tests/_fixture/SnapshotDomDocument.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\GlobalState\TestFixture;
-
-use DomDocument;
-
-/**
- */
-class SnapshotDomDocument extends DomDocument
-{
-}
diff --git a/vendor/sebastian/global-state/tests/_fixture/SnapshotFunctions.php b/vendor/sebastian/global-state/tests/_fixture/SnapshotFunctions.php
deleted file mode 100644
index 51d1c745..00000000
--- a/vendor/sebastian/global-state/tests/_fixture/SnapshotFunctions.php
+++ /dev/null
@@ -1,15 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\GlobalState\TestFixture;
-
-function snapshotFunction()
-{
-}
diff --git a/vendor/sebastian/global-state/tests/_fixture/SnapshotTrait.php b/vendor/sebastian/global-state/tests/_fixture/SnapshotTrait.php
deleted file mode 100644
index 14e81e97..00000000
--- a/vendor/sebastian/global-state/tests/_fixture/SnapshotTrait.php
+++ /dev/null
@@ -1,17 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\GlobalState\TestFixture;
-
-/**
- */
-trait SnapshotTrait
-{
-}
diff --git a/vendor/sebastian/recursion-context/.gitignore b/vendor/sebastian/recursion-context/.gitignore
deleted file mode 100644
index 3beb10f9..00000000
--- a/vendor/sebastian/recursion-context/.gitignore
+++ /dev/null
@@ -1,9 +0,0 @@
-.idea
-phpunit.xml
-composer.lock
-composer.phar
-vendor/
-cache.properties
-build/LICENSE
-build/README.md
-build/*.tgz
diff --git a/vendor/sebastian/recursion-context/.travis.yml b/vendor/sebastian/recursion-context/.travis.yml
deleted file mode 100644
index c5952a11..00000000
--- a/vendor/sebastian/recursion-context/.travis.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-language: php
-
-php:
- - 5.3.3
- - 5.3
- - 5.4
- - 5.5
- - 5.6
- - hhvm
-
-sudo: false
-
-before_script:
- - composer self-update
- - composer install --no-interaction --prefer-source --dev
-
-script: ./vendor/bin/phpunit
-
-notifications:
- email: false
- irc: "irc.freenode.org#phpunit"
diff --git a/vendor/sebastian/recursion-context/LICENSE b/vendor/sebastian/recursion-context/LICENSE
deleted file mode 100644
index f8c30c27..00000000
--- a/vendor/sebastian/recursion-context/LICENSE
+++ /dev/null
@@ -1,33 +0,0 @@
-Recursion Context
-
-Copyright (c) 2002-2015, Sebastian Bergmann .
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- * Neither the name of Sebastian Bergmann nor the names of his
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/sebastian/recursion-context/README.md b/vendor/sebastian/recursion-context/README.md
deleted file mode 100644
index 0b894962..00000000
--- a/vendor/sebastian/recursion-context/README.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# Recursion Context
-
-...
-
-## Installation
-
-You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/):
-
- composer require sebastian/recursion-context
-
-If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:
-
- composer require --dev sebastian/recursion-context
-
diff --git a/vendor/sebastian/recursion-context/build.xml b/vendor/sebastian/recursion-context/build.xml
deleted file mode 100644
index b4fd1935..00000000
--- a/vendor/sebastian/recursion-context/build.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/vendor/sebastian/recursion-context/composer.json b/vendor/sebastian/recursion-context/composer.json
deleted file mode 100644
index fed033d2..00000000
--- a/vendor/sebastian/recursion-context/composer.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- "name": "sebastian/recursion-context",
- "description": "Provides functionality to recursively process PHP variables",
- "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
- "license": "BSD-3-Clause",
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- },
- {
- "name": "Jeff Welch",
- "email": "whatthejeff@gmail.com"
- },
- {
- "name": "Adam Harvey",
- "email": "aharvey@php.net"
- }
- ],
- "require": {
- "php": ">=5.3.3"
- },
- "require-dev": {
- "phpunit/phpunit": "~4.4"
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- }
-}
diff --git a/vendor/sebastian/recursion-context/phpunit.xml.dist b/vendor/sebastian/recursion-context/phpunit.xml.dist
deleted file mode 100644
index 757e3e60..00000000
--- a/vendor/sebastian/recursion-context/phpunit.xml.dist
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
- tests
-
-
-
-
- src
-
-
-
diff --git a/vendor/sebastian/recursion-context/src/Context.php b/vendor/sebastian/recursion-context/src/Context.php
deleted file mode 100644
index 78ad1f67..00000000
--- a/vendor/sebastian/recursion-context/src/Context.php
+++ /dev/null
@@ -1,152 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\RecursionContext;
-
-/**
- * A context containing previously processed arrays and objects
- * when recursively processing a value.
- */
-final class Context
-{
- /**
- * @var array[]
- */
- private $arrays;
-
- /**
- * @var \SplObjectStorage
- */
- private $objects;
-
- /**
- * Initialises the context
- */
- public function __construct()
- {
- $this->arrays = array();
- $this->objects = new \SplObjectStorage;
- }
-
- /**
- * Adds a value to the context.
- *
- * @param array|object $value The value to add.
- *
- * @return int|string The ID of the stored value, either as a string or integer.
- *
- * @throws InvalidArgumentException Thrown if $value is not an array or object
- */
- public function add(&$value)
- {
- if (is_array($value)) {
- return $this->addArray($value);
- } elseif (is_object($value)) {
- return $this->addObject($value);
- }
-
- throw new InvalidArgumentException(
- 'Only arrays and objects are supported'
- );
- }
-
- /**
- * Checks if the given value exists within the context.
- *
- * @param array|object $value The value to check.
- *
- * @return int|string|false The string or integer ID of the stored value if it has already been seen, or false if the value is not stored.
- *
- * @throws InvalidArgumentException Thrown if $value is not an array or object
- */
- public function contains(&$value)
- {
- if (is_array($value)) {
- return $this->containsArray($value);
- } elseif (is_object($value)) {
- return $this->containsObject($value);
- }
-
- throw new InvalidArgumentException(
- 'Only arrays and objects are supported'
- );
- }
-
- /**
- * @param array $array
- *
- * @return bool|int
- */
- private function addArray(array &$array)
- {
- $key = $this->containsArray($array);
-
- if ($key !== false) {
- return $key;
- }
-
- $this->arrays[] = &$array;
-
- return count($this->arrays) - 1;
- }
-
- /**
- * @param object $object
- *
- * @return string
- */
- private function addObject($object)
- {
- if (!$this->objects->contains($object)) {
- $this->objects->attach($object);
- }
-
- return spl_object_hash($object);
- }
-
- /**
- * @param array $array
- *
- * @return int|false
- */
- private function containsArray(array &$array)
- {
- $keys = array_keys($this->arrays, $array, true);
- $hash = '_Key_' . microtime(true);
-
- foreach ($keys as $key) {
- $this->arrays[$key][$hash] = $hash;
-
- if (isset($array[$hash]) && $array[$hash] === $hash) {
- unset($this->arrays[$key][$hash]);
-
- return $key;
- }
-
- unset($this->arrays[$key][$hash]);
- }
-
- return false;
- }
-
- /**
- * @param object $value
- *
- * @return string|false
- */
- private function containsObject($value)
- {
- if ($this->objects->contains($value)) {
- return spl_object_hash($value);
- }
-
- return false;
- }
-}
diff --git a/vendor/sebastian/recursion-context/src/Exception.php b/vendor/sebastian/recursion-context/src/Exception.php
deleted file mode 100644
index 4a1557ba..00000000
--- a/vendor/sebastian/recursion-context/src/Exception.php
+++ /dev/null
@@ -1,17 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\RecursionContext;
-
-/**
- */
-interface Exception
-{
-}
diff --git a/vendor/sebastian/recursion-context/src/InvalidArgumentException.php b/vendor/sebastian/recursion-context/src/InvalidArgumentException.php
deleted file mode 100644
index 032c5043..00000000
--- a/vendor/sebastian/recursion-context/src/InvalidArgumentException.php
+++ /dev/null
@@ -1,17 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\RecursionContext;
-
-/**
- */
-final class InvalidArgumentException extends \InvalidArgumentException implements Exception
-{
-}
diff --git a/vendor/sebastian/recursion-context/tests/ContextTest.php b/vendor/sebastian/recursion-context/tests/ContextTest.php
deleted file mode 100644
index cee0bcf9..00000000
--- a/vendor/sebastian/recursion-context/tests/ContextTest.php
+++ /dev/null
@@ -1,144 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann\RecursionContext;
-
-use PHPUnit_Framework_TestCase;
-
-/**
- * @covers SebastianBergmann\RecursionContext\Context
- */
-class ContextTest extends PHPUnit_Framework_TestCase
-{
- /**
- * @var \SebastianBergmann\RecursionContext\Context
- */
- private $context;
-
- protected function setUp()
- {
- $this->context = new Context();
- }
-
- public function failsProvider()
- {
- return array(
- array(true),
- array(false),
- array(null),
- array('string'),
- array(1),
- array(1.5),
- array(fopen('php://memory', 'r'))
- );
- }
-
- public function valuesProvider()
- {
- $obj2 = new \stdClass();
- $obj2->foo = 'bar';
-
- $obj3 = (object) array(1,2,"Test\r\n",4,5,6,7,8);
-
- $obj = new \stdClass();
- //@codingStandardsIgnoreStart
- $obj->null = null;
- //@codingStandardsIgnoreEnd
- $obj->boolean = true;
- $obj->integer = 1;
- $obj->double = 1.2;
- $obj->string = '1';
- $obj->text = "this\nis\na\nvery\nvery\nvery\nvery\nvery\nvery\rlong\n\rtext";
- $obj->object = $obj2;
- $obj->objectagain = $obj2;
- $obj->array = array('foo' => 'bar');
- $obj->array2 = array(1,2,3,4,5,6);
- $obj->array3 = array($obj, $obj2, $obj3);
- $obj->self = $obj;
-
- $storage = new \SplObjectStorage();
- $storage->attach($obj2);
- $storage->foo = $obj2;
-
- return array(
- array($obj, spl_object_hash($obj)),
- array($obj2, spl_object_hash($obj2)),
- array($obj3, spl_object_hash($obj3)),
- array($storage, spl_object_hash($storage)),
- array($obj->array, 0),
- array($obj->array2, 0),
- array($obj->array3, 0)
- );
- }
-
- /**
- * @covers SebastianBergmann\RecursionContext\Context::add
- * @uses SebastianBergmann\RecursionContext\InvalidArgumentException
- * @dataProvider failsProvider
- */
- public function testAddFails($value)
- {
- $this->setExpectedException(
- 'SebastianBergmann\\RecursionContext\\Exception',
- 'Only arrays and objects are supported'
- );
- $this->context->add($value);
- }
-
- /**
- * @covers SebastianBergmann\RecursionContext\Context::contains
- * @uses SebastianBergmann\RecursionContext\InvalidArgumentException
- * @dataProvider failsProvider
- */
- public function testContainsFails($value)
- {
- $this->setExpectedException(
- 'SebastianBergmann\\RecursionContext\\Exception',
- 'Only arrays and objects are supported'
- );
- $this->context->contains($value);
- }
-
- /**
- * @covers SebastianBergmann\RecursionContext\Context::add
- * @dataProvider valuesProvider
- */
- public function testAdd($value, $key)
- {
- $this->assertEquals($key, $this->context->add($value));
-
- // Test we get the same key on subsequent adds
- $this->assertEquals($key, $this->context->add($value));
- }
-
- /**
- * @covers SebastianBergmann\RecursionContext\Context::contains
- * @uses SebastianBergmann\RecursionContext\Context::add
- * @depends testAdd
- * @dataProvider valuesProvider
- */
- public function testContainsFound($value, $key)
- {
- $this->context->add($value);
- $this->assertEquals($key, $this->context->contains($value));
-
- // Test we get the same key on subsequent calls
- $this->assertEquals($key, $this->context->contains($value));
- }
-
- /**
- * @covers SebastianBergmann\RecursionContext\Context::contains
- * @dataProvider valuesProvider
- */
- public function testContainsNotFound($value)
- {
- $this->assertFalse($this->context->contains($value));
- }
-}
diff --git a/vendor/sebastian/version/.gitattributes b/vendor/sebastian/version/.gitattributes
deleted file mode 100644
index 461090b7..00000000
--- a/vendor/sebastian/version/.gitattributes
+++ /dev/null
@@ -1 +0,0 @@
-*.php diff=php
diff --git a/vendor/sebastian/version/.gitignore b/vendor/sebastian/version/.gitignore
deleted file mode 100644
index a09c56df..00000000
--- a/vendor/sebastian/version/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/.idea
diff --git a/vendor/sebastian/version/LICENSE b/vendor/sebastian/version/LICENSE
deleted file mode 100644
index 5b79c41f..00000000
--- a/vendor/sebastian/version/LICENSE
+++ /dev/null
@@ -1,33 +0,0 @@
-Version
-
-Copyright (c) 2013-2015, Sebastian Bergmann .
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- * Neither the name of Sebastian Bergmann nor the names of his
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/sebastian/version/README.md b/vendor/sebastian/version/README.md
deleted file mode 100644
index be6b687b..00000000
--- a/vendor/sebastian/version/README.md
+++ /dev/null
@@ -1,37 +0,0 @@
-# Version
-
-**Version** is a library that helps with managing the version number of Git-hosted PHP projects.
-
-## Installation
-
-Simply add a dependency on `sebastian/version` to your project's `composer.json` file if you use [Composer](http://getcomposer.org/) to manage the dependencies of your project.
-
-## Usage
-
-The constructor of the `SebastianBergmann\Version` class expects two parameters:
-
-* `$release` is the version number of the latest release (`X.Y.Z`, for instance) or the name of the release series (`X.Y`) when no release has been made from that branch / for that release series yet.
-* `$path` is the path to the directory (or a subdirectory thereof) where the sourcecode of the project can be found. Simply passing `__DIR__` here usually suffices.
-
-Apart from the constructor, the `SebastianBergmann\Version` class has a single public method: `getVersion()`.
-
-Here is a contrived example that shows the basic usage:
-
- getVersion());
- ?>
-
- string(18) "3.7.10-17-g00f3408"
-
-When a new release is prepared, the string that is passed to the constructor as the first argument needs to be updated.
-
-### How SebastianBergmann\Version::getVersion() works
-
-* If `$path` is not (part of) a Git repository and `$release` is in `X.Y.Z` format then `$release` is returned as-is.
-* If `$path` is not (part of) a Git repository and `$release` is in `X.Y` format then `$release` is returned suffixed with `-dev`.
-* If `$path` is (part of) a Git repository and `$release` is in `X.Y.Z` format then the output of `git describe --tags` is returned as-is.
-* If `$path` is (part of) a Git repository and `$release` is in `X.Y` format then a string is returned that begins with `X.Y` and ends with information from `git describe --tags`.
diff --git a/vendor/sebastian/version/composer.json b/vendor/sebastian/version/composer.json
deleted file mode 100644
index 39d65697..00000000
--- a/vendor/sebastian/version/composer.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "name": "sebastian/version",
- "description": "Library that helps with managing the version number of Git-hosted PHP projects",
- "homepage": "https://github.com/sebastianbergmann/version",
- "license": "BSD-3-Clause",
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- }
- ],
- "support": {
- "issues": "https://github.com/sebastianbergmann/version/issues"
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- }
-}
diff --git a/vendor/sebastian/version/src/Version.php b/vendor/sebastian/version/src/Version.php
deleted file mode 100644
index 3cb3e092..00000000
--- a/vendor/sebastian/version/src/Version.php
+++ /dev/null
@@ -1,82 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace SebastianBergmann;
-
-/**
- * @since Class available since Release 1.0.0
- */
-class Version
-{
- private $path;
- private $release;
- private $version;
-
- /**
- * @param string $release
- * @param string $path
- */
- public function __construct($release, $path)
- {
- $this->release = $release;
- $this->path = $path;
- }
-
- /**
- * @return string
- */
- public function getVersion()
- {
- if ($this->version === null) {
- if (count(explode('.', $this->release)) == 3) {
- $this->version = $this->release;
- } else {
- $this->version = $this->release . '-dev';
- }
-
- $git = $this->getGitInformation($this->path);
-
- if ($git) {
- if (count(explode('.', $this->release)) == 3) {
- $this->version = $git;
- } else {
- $git = explode('-', $git);
-
- $this->version = $this->release . '-' . end($git);
- }
- }
- }
-
- return $this->version;
- }
-
- /**
- * @param string $path
- * @return bool|string
- */
- private function getGitInformation($path)
- {
- if (!is_dir($path . DIRECTORY_SEPARATOR . '.git')) {
- return false;
- }
-
- $dir = getcwd();
- chdir($path);
- $returnCode = 1;
- $result = @exec('git describe --tags 2>&1', $output, $returnCode);
- chdir($dir);
-
- if ($returnCode !== 0) {
- return false;
- }
-
- return $result;
- }
-}
diff --git a/vendor/symfony/polyfill-ctype/Ctype.php b/vendor/symfony/polyfill-ctype/Ctype.php
deleted file mode 100644
index 58414dc7..00000000
--- a/vendor/symfony/polyfill-ctype/Ctype.php
+++ /dev/null
@@ -1,227 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Polyfill\Ctype;
-
-/**
- * Ctype implementation through regex.
- *
- * @internal
- *
- * @author Gert de Pagter
- */
-final class Ctype
-{
- /**
- * Returns TRUE if every character in text is either a letter or a digit, FALSE otherwise.
- *
- * @see https://php.net/ctype-alnum
- *
- * @param string|int $text
- *
- * @return bool
- */
- public static function ctype_alnum($text)
- {
- $text = self::convert_int_to_char_for_ctype($text);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z0-9]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text is a letter, FALSE otherwise.
- *
- * @see https://php.net/ctype-alpha
- *
- * @param string|int $text
- *
- * @return bool
- */
- public static function ctype_alpha($text)
- {
- $text = self::convert_int_to_char_for_ctype($text);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text is a control character from the current locale, FALSE otherwise.
- *
- * @see https://php.net/ctype-cntrl
- *
- * @param string|int $text
- *
- * @return bool
- */
- public static function ctype_cntrl($text)
- {
- $text = self::convert_int_to_char_for_ctype($text);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^\x00-\x1f\x7f]/', $text);
- }
-
- /**
- * Returns TRUE if every character in the string text is a decimal digit, FALSE otherwise.
- *
- * @see https://php.net/ctype-digit
- *
- * @param string|int $text
- *
- * @return bool
- */
- public static function ctype_digit($text)
- {
- $text = self::convert_int_to_char_for_ctype($text);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^0-9]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text is printable and actually creates visible output (no white space), FALSE otherwise.
- *
- * @see https://php.net/ctype-graph
- *
- * @param string|int $text
- *
- * @return bool
- */
- public static function ctype_graph($text)
- {
- $text = self::convert_int_to_char_for_ctype($text);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^!-~]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text is a lowercase letter.
- *
- * @see https://php.net/ctype-lower
- *
- * @param string|int $text
- *
- * @return bool
- */
- public static function ctype_lower($text)
- {
- $text = self::convert_int_to_char_for_ctype($text);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^a-z]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text will actually create output (including blanks). Returns FALSE if text contains control characters or characters that do not have any output or control function at all.
- *
- * @see https://php.net/ctype-print
- *
- * @param string|int $text
- *
- * @return bool
- */
- public static function ctype_print($text)
- {
- $text = self::convert_int_to_char_for_ctype($text);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^ -~]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text is printable, but neither letter, digit or blank, FALSE otherwise.
- *
- * @see https://php.net/ctype-punct
- *
- * @param string|int $text
- *
- * @return bool
- */
- public static function ctype_punct($text)
- {
- $text = self::convert_int_to_char_for_ctype($text);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^!-\/\:-@\[-`\{-~]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text creates some sort of white space, FALSE otherwise. Besides the blank character this also includes tab, vertical tab, line feed, carriage return and form feed characters.
- *
- * @see https://php.net/ctype-space
- *
- * @param string|int $text
- *
- * @return bool
- */
- public static function ctype_space($text)
- {
- $text = self::convert_int_to_char_for_ctype($text);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^\s]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text is an uppercase letter.
- *
- * @see https://php.net/ctype-upper
- *
- * @param string|int $text
- *
- * @return bool
- */
- public static function ctype_upper($text)
- {
- $text = self::convert_int_to_char_for_ctype($text);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^A-Z]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text is a hexadecimal 'digit', that is a decimal digit or a character from [A-Fa-f] , FALSE otherwise.
- *
- * @see https://php.net/ctype-xdigit
- *
- * @param string|int $text
- *
- * @return bool
- */
- public static function ctype_xdigit($text)
- {
- $text = self::convert_int_to_char_for_ctype($text);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^A-Fa-f0-9]/', $text);
- }
-
- /**
- * Converts integers to their char versions according to normal ctype behaviour, if needed.
- *
- * If an integer between -128 and 255 inclusive is provided,
- * it is interpreted as the ASCII value of a single character
- * (negative values have 256 added in order to allow characters in the Extended ASCII range).
- * Any other integer is interpreted as a string containing the decimal digits of the integer.
- *
- * @param string|int $int
- *
- * @return mixed
- */
- private static function convert_int_to_char_for_ctype($int)
- {
- if (!\is_int($int)) {
- return $int;
- }
-
- if ($int < -128 || $int > 255) {
- return (string) $int;
- }
-
- if ($int < 0) {
- $int += 256;
- }
-
- return \chr($int);
- }
-}
diff --git a/vendor/symfony/polyfill-ctype/LICENSE b/vendor/symfony/polyfill-ctype/LICENSE
deleted file mode 100644
index 3f853aaf..00000000
--- a/vendor/symfony/polyfill-ctype/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2018-2019 Fabien Potencier
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished
-to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/vendor/symfony/polyfill-ctype/README.md b/vendor/symfony/polyfill-ctype/README.md
deleted file mode 100644
index 8add1ab0..00000000
--- a/vendor/symfony/polyfill-ctype/README.md
+++ /dev/null
@@ -1,12 +0,0 @@
-Symfony Polyfill / Ctype
-========================
-
-This component provides `ctype_*` functions to users who run php versions without the ctype extension.
-
-More information can be found in the
-[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md).
-
-License
-=======
-
-This library is released under the [MIT license](LICENSE).
diff --git a/vendor/symfony/polyfill-ctype/bootstrap.php b/vendor/symfony/polyfill-ctype/bootstrap.php
deleted file mode 100644
index 14d1d0fa..00000000
--- a/vendor/symfony/polyfill-ctype/bootstrap.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-use Symfony\Polyfill\Ctype as p;
-
-if (!function_exists('ctype_alnum')) {
- function ctype_alnum($text) { return p\Ctype::ctype_alnum($text); }
- function ctype_alpha($text) { return p\Ctype::ctype_alpha($text); }
- function ctype_cntrl($text) { return p\Ctype::ctype_cntrl($text); }
- function ctype_digit($text) { return p\Ctype::ctype_digit($text); }
- function ctype_graph($text) { return p\Ctype::ctype_graph($text); }
- function ctype_lower($text) { return p\Ctype::ctype_lower($text); }
- function ctype_print($text) { return p\Ctype::ctype_print($text); }
- function ctype_punct($text) { return p\Ctype::ctype_punct($text); }
- function ctype_space($text) { return p\Ctype::ctype_space($text); }
- function ctype_upper($text) { return p\Ctype::ctype_upper($text); }
- function ctype_xdigit($text) { return p\Ctype::ctype_xdigit($text); }
-}
diff --git a/vendor/symfony/polyfill-ctype/composer.json b/vendor/symfony/polyfill-ctype/composer.json
deleted file mode 100644
index 2a2ea044..00000000
--- a/vendor/symfony/polyfill-ctype/composer.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "name": "symfony/polyfill-ctype",
- "type": "library",
- "description": "Symfony polyfill for ctype functions",
- "keywords": ["polyfill", "compatibility", "portable", "ctype"],
- "homepage": "https://symfony.com",
- "license": "MIT",
- "authors": [
- {
- "name": "Gert de Pagter",
- "email": "BackEndTea@gmail.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "require": {
- "php": ">=5.3.3"
- },
- "autoload": {
- "psr-4": { "Symfony\\Polyfill\\Ctype\\": "" },
- "files": [ "bootstrap.php" ]
- },
- "suggest": {
- "ext-ctype": "For best performance"
- },
- "minimum-stability": "dev",
- "extra": {
- "branch-alias": {
- "dev-master": "1.13-dev"
- }
- }
-}
diff --git a/vendor/symfony/yaml/.gitignore b/vendor/symfony/yaml/.gitignore
deleted file mode 100644
index c49a5d8d..00000000
--- a/vendor/symfony/yaml/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-vendor/
-composer.lock
-phpunit.xml
diff --git a/vendor/symfony/yaml/CHANGELOG.md b/vendor/symfony/yaml/CHANGELOG.md
deleted file mode 100644
index fd41c9dd..00000000
--- a/vendor/symfony/yaml/CHANGELOG.md
+++ /dev/null
@@ -1,149 +0,0 @@
-CHANGELOG
-=========
-
-3.4.0
------
-
- * added support for parsing YAML files using the `Yaml::parseFile()` or `Parser::parseFile()` method
-
- * the `Dumper`, `Parser`, and `Yaml` classes are marked as final
-
- * Deprecated the `!php/object:` tag which will be replaced by the
- `!php/object` tag (without the colon) in 4.0.
-
- * Deprecated the `!php/const:` tag which will be replaced by the
- `!php/const` tag (without the colon) in 4.0.
-
- * Support for the `!str` tag is deprecated, use the `!!str` tag instead.
-
- * Deprecated using the non-specific tag `!` as its behavior will change in 4.0.
- It will force non-evaluating your values in 4.0. Use plain integers or `!!float` instead.
-
-3.3.0
------
-
- * Starting an unquoted string with a question mark followed by a space is
- deprecated and will throw a `ParseException` in Symfony 4.0.
-
- * Deprecated support for implicitly parsing non-string mapping keys as strings.
- Mapping keys that are no strings will lead to a `ParseException` in Symfony
- 4.0. Use quotes to opt-in for keys to be parsed as strings.
-
- Before:
-
- ```php
- $yaml = << new A(), 'bar' => 1], 0, 0, Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE | Yaml::DUMP_OBJECT);
- ```
-
-3.0.0
------
-
- * Yaml::parse() now throws an exception when a blackslash is not escaped
- in double-quoted strings
-
-2.8.0
------
-
- * Deprecated usage of a colon in an unquoted mapping value
- * Deprecated usage of @, \`, | and > at the beginning of an unquoted string
- * When surrounding strings with double-quotes, you must now escape `\` characters. Not
- escaping those characters (when surrounded by double-quotes) is deprecated.
-
- Before:
-
- ```yml
- class: "Foo\Var"
- ```
-
- After:
-
- ```yml
- class: "Foo\\Var"
- ```
-
-2.1.0
------
-
- * Yaml::parse() does not evaluate loaded files as PHP files by default
- anymore (call Yaml::enablePhpParsing() to get back the old behavior)
diff --git a/vendor/symfony/yaml/Command/LintCommand.php b/vendor/symfony/yaml/Command/LintCommand.php
deleted file mode 100644
index f6732ecf..00000000
--- a/vendor/symfony/yaml/Command/LintCommand.php
+++ /dev/null
@@ -1,253 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Yaml\Command;
-
-use Symfony\Component\Console\Command\Command;
-use Symfony\Component\Console\Exception\InvalidArgumentException;
-use Symfony\Component\Console\Exception\RuntimeException;
-use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Input\InputOption;
-use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Console\Style\SymfonyStyle;
-use Symfony\Component\Yaml\Exception\ParseException;
-use Symfony\Component\Yaml\Parser;
-use Symfony\Component\Yaml\Yaml;
-
-/**
- * Validates YAML files syntax and outputs encountered errors.
- *
- * @author Grégoire Pineau
- * @author Robin Chalas
- */
-class LintCommand extends Command
-{
- protected static $defaultName = 'lint:yaml';
-
- private $parser;
- private $format;
- private $displayCorrectFiles;
- private $directoryIteratorProvider;
- private $isReadableProvider;
-
- public function __construct($name = null, $directoryIteratorProvider = null, $isReadableProvider = null)
- {
- parent::__construct($name);
-
- $this->directoryIteratorProvider = $directoryIteratorProvider;
- $this->isReadableProvider = $isReadableProvider;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function configure()
- {
- $this
- ->setDescription('Lints a file and outputs encountered errors')
- ->addArgument('filename', null, 'A file or a directory or STDIN')
- ->addOption('format', null, InputOption::VALUE_REQUIRED, 'The output format', 'txt')
- ->addOption('parse-tags', null, InputOption::VALUE_NONE, 'Parse custom tags')
- ->setHelp(<<%command.name% command lints a YAML file and outputs to STDOUT
-the first encountered syntax error.
-
-You can validates YAML contents passed from STDIN:
-
- cat filename | php %command.full_name%
-
-You can also validate the syntax of a file:
-
- php %command.full_name% filename
-
-Or of a whole directory:
-
- php %command.full_name% dirname
- php %command.full_name% dirname --format=json
-
-EOF
- )
- ;
- }
-
- protected function execute(InputInterface $input, OutputInterface $output)
- {
- $io = new SymfonyStyle($input, $output);
- $filename = $input->getArgument('filename');
- $this->format = $input->getOption('format');
- $this->displayCorrectFiles = $output->isVerbose();
- $flags = $input->getOption('parse-tags') ? Yaml::PARSE_CUSTOM_TAGS : 0;
-
- if (!$filename) {
- if (!$stdin = $this->getStdin()) {
- throw new RuntimeException('Please provide a filename or pipe file content to STDIN.');
- }
-
- return $this->display($io, [$this->validate($stdin, $flags)]);
- }
-
- if (!$this->isReadable($filename)) {
- throw new RuntimeException(sprintf('File or directory "%s" is not readable.', $filename));
- }
-
- $filesInfo = [];
- foreach ($this->getFiles($filename) as $file) {
- $filesInfo[] = $this->validate(file_get_contents($file), $flags, $file);
- }
-
- return $this->display($io, $filesInfo);
- }
-
- private function validate($content, $flags, $file = null)
- {
- $prevErrorHandler = set_error_handler(function ($level, $message, $file, $line) use (&$prevErrorHandler) {
- if (E_USER_DEPRECATED === $level) {
- throw new ParseException($message, $this->getParser()->getRealCurrentLineNb() + 1);
- }
-
- return $prevErrorHandler ? $prevErrorHandler($level, $message, $file, $line) : false;
- });
-
- try {
- $this->getParser()->parse($content, Yaml::PARSE_CONSTANT | $flags);
- } catch (ParseException $e) {
- return ['file' => $file, 'line' => $e->getParsedLine(), 'valid' => false, 'message' => $e->getMessage()];
- } finally {
- restore_error_handler();
- }
-
- return ['file' => $file, 'valid' => true];
- }
-
- private function display(SymfonyStyle $io, array $files)
- {
- switch ($this->format) {
- case 'txt':
- return $this->displayTxt($io, $files);
- case 'json':
- return $this->displayJson($io, $files);
- default:
- throw new InvalidArgumentException(sprintf('The format "%s" is not supported.', $this->format));
- }
- }
-
- private function displayTxt(SymfonyStyle $io, array $filesInfo)
- {
- $countFiles = \count($filesInfo);
- $erroredFiles = 0;
-
- foreach ($filesInfo as $info) {
- if ($info['valid'] && $this->displayCorrectFiles) {
- $io->comment('OK '.($info['file'] ? sprintf(' in %s', $info['file']) : ''));
- } elseif (!$info['valid']) {
- ++$erroredFiles;
- $io->text(' ERROR '.($info['file'] ? sprintf(' in %s', $info['file']) : ''));
- $io->text(sprintf(' >> %s ', $info['message']));
- }
- }
-
- if (0 === $erroredFiles) {
- $io->success(sprintf('All %d YAML files contain valid syntax.', $countFiles));
- } else {
- $io->warning(sprintf('%d YAML files have valid syntax and %d contain errors.', $countFiles - $erroredFiles, $erroredFiles));
- }
-
- return min($erroredFiles, 1);
- }
-
- private function displayJson(SymfonyStyle $io, array $filesInfo)
- {
- $errors = 0;
-
- array_walk($filesInfo, function (&$v) use (&$errors) {
- $v['file'] = (string) $v['file'];
- if (!$v['valid']) {
- ++$errors;
- }
- });
-
- $io->writeln(json_encode($filesInfo, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));
-
- return min($errors, 1);
- }
-
- private function getFiles($fileOrDirectory)
- {
- if (is_file($fileOrDirectory)) {
- yield new \SplFileInfo($fileOrDirectory);
-
- return;
- }
-
- foreach ($this->getDirectoryIterator($fileOrDirectory) as $file) {
- if (!\in_array($file->getExtension(), ['yml', 'yaml'])) {
- continue;
- }
-
- yield $file;
- }
- }
-
- /**
- * @return string|null
- */
- private function getStdin()
- {
- if (0 !== ftell(STDIN)) {
- return null;
- }
-
- $inputs = '';
- while (!feof(STDIN)) {
- $inputs .= fread(STDIN, 1024);
- }
-
- return $inputs;
- }
-
- private function getParser()
- {
- if (!$this->parser) {
- $this->parser = new Parser();
- }
-
- return $this->parser;
- }
-
- private function getDirectoryIterator($directory)
- {
- $default = function ($directory) {
- return new \RecursiveIteratorIterator(
- new \RecursiveDirectoryIterator($directory, \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS),
- \RecursiveIteratorIterator::LEAVES_ONLY
- );
- };
-
- if (null !== $this->directoryIteratorProvider) {
- return \call_user_func($this->directoryIteratorProvider, $directory, $default);
- }
-
- return $default($directory);
- }
-
- private function isReadable($fileOrDirectory)
- {
- $default = function ($fileOrDirectory) {
- return is_readable($fileOrDirectory);
- };
-
- if (null !== $this->isReadableProvider) {
- return \call_user_func($this->isReadableProvider, $fileOrDirectory, $default);
- }
-
- return $default($fileOrDirectory);
- }
-}
diff --git a/vendor/symfony/yaml/Dumper.php b/vendor/symfony/yaml/Dumper.php
deleted file mode 100644
index a496dcc8..00000000
--- a/vendor/symfony/yaml/Dumper.php
+++ /dev/null
@@ -1,147 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Yaml;
-
-use Symfony\Component\Yaml\Tag\TaggedValue;
-
-/**
- * Dumper dumps PHP variables to YAML strings.
- *
- * @author Fabien Potencier
- *
- * @final since version 3.4
- */
-class Dumper
-{
- /**
- * The amount of spaces to use for indentation of nested nodes.
- *
- * @var int
- */
- protected $indentation;
-
- /**
- * @param int $indentation
- */
- public function __construct($indentation = 4)
- {
- if ($indentation < 1) {
- throw new \InvalidArgumentException('The indentation must be greater than zero.');
- }
-
- $this->indentation = $indentation;
- }
-
- /**
- * Sets the indentation.
- *
- * @param int $num The amount of spaces to use for indentation of nested nodes
- *
- * @deprecated since version 3.1, to be removed in 4.0. Pass the indentation to the constructor instead.
- */
- public function setIndentation($num)
- {
- @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 3.1 and will be removed in 4.0. Pass the indentation to the constructor instead.', E_USER_DEPRECATED);
-
- $this->indentation = (int) $num;
- }
-
- /**
- * Dumps a PHP value to YAML.
- *
- * @param mixed $input The PHP value
- * @param int $inline The level where you switch to inline YAML
- * @param int $indent The level of indentation (used internally)
- * @param int $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string
- *
- * @return string The YAML representation of the PHP value
- */
- public function dump($input, $inline = 0, $indent = 0, $flags = 0)
- {
- if (\is_bool($flags)) {
- @trigger_error('Passing a boolean flag to toggle exception handling is deprecated since Symfony 3.1 and will be removed in 4.0. Use the Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE flag instead.', E_USER_DEPRECATED);
-
- if ($flags) {
- $flags = Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE;
- } else {
- $flags = 0;
- }
- }
-
- if (\func_num_args() >= 5) {
- @trigger_error('Passing a boolean flag to toggle object support is deprecated since Symfony 3.1 and will be removed in 4.0. Use the Yaml::DUMP_OBJECT flag instead.', E_USER_DEPRECATED);
-
- if (func_get_arg(4)) {
- $flags |= Yaml::DUMP_OBJECT;
- }
- }
-
- $output = '';
- $prefix = $indent ? str_repeat(' ', $indent) : '';
- $dumpObjectAsInlineMap = true;
-
- if (Yaml::DUMP_OBJECT_AS_MAP & $flags && ($input instanceof \ArrayObject || $input instanceof \stdClass)) {
- $dumpObjectAsInlineMap = empty((array) $input);
- }
-
- if ($inline <= 0 || (!\is_array($input) && !$input instanceof TaggedValue && $dumpObjectAsInlineMap) || empty($input)) {
- $output .= $prefix.Inline::dump($input, $flags);
- } else {
- $dumpAsMap = Inline::isHash($input);
-
- foreach ($input as $key => $value) {
- if ($inline >= 1 && Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value) && false !== strpos($value, "\n") && false === strpos($value, "\r\n")) {
- // If the first line starts with a space character, the spec requires a blockIndicationIndicator
- // http://www.yaml.org/spec/1.2/spec.html#id2793979
- $blockIndentationIndicator = (' ' === substr($value, 0, 1)) ? (string) $this->indentation : '';
- $output .= sprintf("%s%s%s |%s\n", $prefix, $dumpAsMap ? Inline::dump($key, $flags).':' : '-', '', $blockIndentationIndicator);
-
- foreach (preg_split('/\n|\r\n/', $value) as $row) {
- $output .= sprintf("%s%s%s\n", $prefix, str_repeat(' ', $this->indentation), $row);
- }
-
- continue;
- }
-
- if ($value instanceof TaggedValue) {
- $output .= sprintf('%s%s !%s', $prefix, $dumpAsMap ? Inline::dump($key, $flags).':' : '-', $value->getTag());
-
- if ($inline - 1 <= 0 || null === $value->getValue() || is_scalar($value->getValue())) {
- $output .= ' '.$this->dump($value->getValue(), $inline - 1, 0, $flags)."\n";
- } else {
- $output .= "\n";
- $output .= $this->dump($value->getValue(), $inline - 1, $dumpAsMap ? $indent + $this->indentation : $indent + 2, $flags);
- }
-
- continue;
- }
-
- $dumpObjectAsInlineMap = true;
-
- if (Yaml::DUMP_OBJECT_AS_MAP & $flags && ($value instanceof \ArrayObject || $value instanceof \stdClass)) {
- $dumpObjectAsInlineMap = empty((array) $value);
- }
-
- $willBeInlined = $inline - 1 <= 0 || !\is_array($value) && $dumpObjectAsInlineMap || empty($value);
-
- $output .= sprintf('%s%s%s%s',
- $prefix,
- $dumpAsMap ? Inline::dump($key, $flags).':' : '-',
- $willBeInlined ? ' ' : "\n",
- $this->dump($value, $inline - 1, $willBeInlined ? 0 : $indent + $this->indentation, $flags)
- ).($willBeInlined ? "\n" : '');
- }
- }
-
- return $output;
- }
-}
diff --git a/vendor/symfony/yaml/Escaper.php b/vendor/symfony/yaml/Escaper.php
deleted file mode 100644
index 4d3ce244..00000000
--- a/vendor/symfony/yaml/Escaper.php
+++ /dev/null
@@ -1,101 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Yaml;
-
-/**
- * Escaper encapsulates escaping rules for single and double-quoted
- * YAML strings.
- *
- * @author Matthew Lewinski
- *
- * @internal
- */
-class Escaper
-{
- // Characters that would cause a dumped string to require double quoting.
- const REGEX_CHARACTER_TO_ESCAPE = "[\\x00-\\x1f]|\xc2\x85|\xc2\xa0|\xe2\x80\xa8|\xe2\x80\xa9";
-
- // Mapping arrays for escaping a double quoted string. The backslash is
- // first to ensure proper escaping because str_replace operates iteratively
- // on the input arrays. This ordering of the characters avoids the use of strtr,
- // which performs more slowly.
- private static $escapees = ['\\', '\\\\', '\\"', '"',
- "\x00", "\x01", "\x02", "\x03", "\x04", "\x05", "\x06", "\x07",
- "\x08", "\x09", "\x0a", "\x0b", "\x0c", "\x0d", "\x0e", "\x0f",
- "\x10", "\x11", "\x12", "\x13", "\x14", "\x15", "\x16", "\x17",
- "\x18", "\x19", "\x1a", "\x1b", "\x1c", "\x1d", "\x1e", "\x1f",
- "\xc2\x85", "\xc2\xa0", "\xe2\x80\xa8", "\xe2\x80\xa9",
- ];
- private static $escaped = ['\\\\', '\\"', '\\\\', '\\"',
- '\\0', '\\x01', '\\x02', '\\x03', '\\x04', '\\x05', '\\x06', '\\a',
- '\\b', '\\t', '\\n', '\\v', '\\f', '\\r', '\\x0e', '\\x0f',
- '\\x10', '\\x11', '\\x12', '\\x13', '\\x14', '\\x15', '\\x16', '\\x17',
- '\\x18', '\\x19', '\\x1a', '\\e', '\\x1c', '\\x1d', '\\x1e', '\\x1f',
- '\\N', '\\_', '\\L', '\\P',
- ];
-
- /**
- * Determines if a PHP value would require double quoting in YAML.
- *
- * @param string $value A PHP value
- *
- * @return bool True if the value would require double quotes
- */
- public static function requiresDoubleQuoting($value)
- {
- return 0 < preg_match('/'.self::REGEX_CHARACTER_TO_ESCAPE.'/u', $value);
- }
-
- /**
- * Escapes and surrounds a PHP value with double quotes.
- *
- * @param string $value A PHP value
- *
- * @return string The quoted, escaped string
- */
- public static function escapeWithDoubleQuotes($value)
- {
- return sprintf('"%s"', str_replace(self::$escapees, self::$escaped, $value));
- }
-
- /**
- * Determines if a PHP value would require single quoting in YAML.
- *
- * @param string $value A PHP value
- *
- * @return bool True if the value would require single quotes
- */
- public static function requiresSingleQuoting($value)
- {
- // Determines if a PHP value is entirely composed of a value that would
- // require single quoting in YAML.
- if (\in_array(strtolower($value), ['null', '~', 'true', 'false', 'y', 'n', 'yes', 'no', 'on', 'off'])) {
- return true;
- }
-
- // Determines if the PHP value contains any single characters that would
- // cause it to require single quoting in YAML.
- return 0 < preg_match('/[ \s \' " \: \{ \} \[ \] , & \* \# \?] | \A[ \- ? | < > = ! % @ ` ]/x', $value);
- }
-
- /**
- * Escapes and surrounds a PHP value with single quotes.
- *
- * @param string $value A PHP value
- *
- * @return string The quoted, escaped string
- */
- public static function escapeWithSingleQuotes($value)
- {
- return sprintf("'%s'", str_replace('\'', '\'\'', $value));
- }
-}
diff --git a/vendor/symfony/yaml/Exception/DumpException.php b/vendor/symfony/yaml/Exception/DumpException.php
deleted file mode 100644
index cce972f2..00000000
--- a/vendor/symfony/yaml/Exception/DumpException.php
+++ /dev/null
@@ -1,21 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Yaml\Exception;
-
-/**
- * Exception class thrown when an error occurs during dumping.
- *
- * @author Fabien Potencier
- */
-class DumpException extends RuntimeException
-{
-}
diff --git a/vendor/symfony/yaml/Exception/ExceptionInterface.php b/vendor/symfony/yaml/Exception/ExceptionInterface.php
deleted file mode 100644
index ad850eea..00000000
--- a/vendor/symfony/yaml/Exception/ExceptionInterface.php
+++ /dev/null
@@ -1,21 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Yaml\Exception;
-
-/**
- * Exception interface for all exceptions thrown by the component.
- *
- * @author Fabien Potencier
- */
-interface ExceptionInterface
-{
-}
diff --git a/vendor/symfony/yaml/Exception/ParseException.php b/vendor/symfony/yaml/Exception/ParseException.php
deleted file mode 100644
index be79960b..00000000
--- a/vendor/symfony/yaml/Exception/ParseException.php
+++ /dev/null
@@ -1,139 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Yaml\Exception;
-
-/**
- * Exception class thrown when an error occurs during parsing.
- *
- * @author Fabien Potencier
- */
-class ParseException extends RuntimeException
-{
- private $parsedFile;
- private $parsedLine;
- private $snippet;
- private $rawMessage;
-
- /**
- * @param string $message The error message
- * @param int $parsedLine The line where the error occurred
- * @param string|null $snippet The snippet of code near the problem
- * @param string|null $parsedFile The file name where the error occurred
- * @param \Exception|null $previous The previous exception
- */
- public function __construct($message, $parsedLine = -1, $snippet = null, $parsedFile = null, \Exception $previous = null)
- {
- $this->parsedFile = $parsedFile;
- $this->parsedLine = $parsedLine;
- $this->snippet = $snippet;
- $this->rawMessage = $message;
-
- $this->updateRepr();
-
- parent::__construct($this->message, 0, $previous);
- }
-
- /**
- * Gets the snippet of code near the error.
- *
- * @return string The snippet of code
- */
- public function getSnippet()
- {
- return $this->snippet;
- }
-
- /**
- * Sets the snippet of code near the error.
- *
- * @param string $snippet The code snippet
- */
- public function setSnippet($snippet)
- {
- $this->snippet = $snippet;
-
- $this->updateRepr();
- }
-
- /**
- * Gets the filename where the error occurred.
- *
- * This method returns null if a string is parsed.
- *
- * @return string The filename
- */
- public function getParsedFile()
- {
- return $this->parsedFile;
- }
-
- /**
- * Sets the filename where the error occurred.
- *
- * @param string $parsedFile The filename
- */
- public function setParsedFile($parsedFile)
- {
- $this->parsedFile = $parsedFile;
-
- $this->updateRepr();
- }
-
- /**
- * Gets the line where the error occurred.
- *
- * @return int The file line
- */
- public function getParsedLine()
- {
- return $this->parsedLine;
- }
-
- /**
- * Sets the line where the error occurred.
- *
- * @param int $parsedLine The file line
- */
- public function setParsedLine($parsedLine)
- {
- $this->parsedLine = $parsedLine;
-
- $this->updateRepr();
- }
-
- private function updateRepr()
- {
- $this->message = $this->rawMessage;
-
- $dot = false;
- if ('.' === substr($this->message, -1)) {
- $this->message = substr($this->message, 0, -1);
- $dot = true;
- }
-
- if (null !== $this->parsedFile) {
- $this->message .= sprintf(' in %s', json_encode($this->parsedFile, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
- }
-
- if ($this->parsedLine >= 0) {
- $this->message .= sprintf(' at line %d', $this->parsedLine);
- }
-
- if ($this->snippet) {
- $this->message .= sprintf(' (near "%s")', $this->snippet);
- }
-
- if ($dot) {
- $this->message .= '.';
- }
- }
-}
diff --git a/vendor/symfony/yaml/Exception/RuntimeException.php b/vendor/symfony/yaml/Exception/RuntimeException.php
deleted file mode 100644
index 3f36b73b..00000000
--- a/vendor/symfony/yaml/Exception/RuntimeException.php
+++ /dev/null
@@ -1,21 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Yaml\Exception;
-
-/**
- * Exception class thrown when an error occurs during parsing.
- *
- * @author Romain Neutron
- */
-class RuntimeException extends \RuntimeException implements ExceptionInterface
-{
-}
diff --git a/vendor/symfony/yaml/Inline.php b/vendor/symfony/yaml/Inline.php
deleted file mode 100644
index 7d3218a3..00000000
--- a/vendor/symfony/yaml/Inline.php
+++ /dev/null
@@ -1,903 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Yaml;
-
-use Symfony\Component\Yaml\Exception\DumpException;
-use Symfony\Component\Yaml\Exception\ParseException;
-use Symfony\Component\Yaml\Tag\TaggedValue;
-
-/**
- * Inline implements a YAML parser/dumper for the YAML inline syntax.
- *
- * @author Fabien Potencier
- *
- * @internal
- */
-class Inline
-{
- const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*+(?:\\\\.[^"\\\\]*+)*+)"|\'([^\']*+(?:\'\'[^\']*+)*+)\')';
-
- public static $parsedLineNumber = -1;
- public static $parsedFilename;
-
- private static $exceptionOnInvalidType = false;
- private static $objectSupport = false;
- private static $objectForMap = false;
- private static $constantSupport = false;
-
- /**
- * @param int $flags
- * @param int|null $parsedLineNumber
- * @param string|null $parsedFilename
- */
- public static function initialize($flags, $parsedLineNumber = null, $parsedFilename = null)
- {
- self::$exceptionOnInvalidType = (bool) (Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE & $flags);
- self::$objectSupport = (bool) (Yaml::PARSE_OBJECT & $flags);
- self::$objectForMap = (bool) (Yaml::PARSE_OBJECT_FOR_MAP & $flags);
- self::$constantSupport = (bool) (Yaml::PARSE_CONSTANT & $flags);
- self::$parsedFilename = $parsedFilename;
-
- if (null !== $parsedLineNumber) {
- self::$parsedLineNumber = $parsedLineNumber;
- }
- }
-
- /**
- * Converts a YAML string to a PHP value.
- *
- * @param string $value A YAML string
- * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior
- * @param array $references Mapping of variable names to values
- *
- * @return mixed A PHP value
- *
- * @throws ParseException
- */
- public static function parse($value, $flags = 0, $references = [])
- {
- if (\is_bool($flags)) {
- @trigger_error('Passing a boolean flag to toggle exception handling is deprecated since Symfony 3.1 and will be removed in 4.0. Use the Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE flag instead.', E_USER_DEPRECATED);
-
- if ($flags) {
- $flags = Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE;
- } else {
- $flags = 0;
- }
- }
-
- if (\func_num_args() >= 3 && !\is_array($references)) {
- @trigger_error('Passing a boolean flag to toggle object support is deprecated since Symfony 3.1 and will be removed in 4.0. Use the Yaml::PARSE_OBJECT flag instead.', E_USER_DEPRECATED);
-
- if ($references) {
- $flags |= Yaml::PARSE_OBJECT;
- }
-
- if (\func_num_args() >= 4) {
- @trigger_error('Passing a boolean flag to toggle object for map support is deprecated since Symfony 3.1 and will be removed in 4.0. Use the Yaml::PARSE_OBJECT_FOR_MAP flag instead.', E_USER_DEPRECATED);
-
- if (func_get_arg(3)) {
- $flags |= Yaml::PARSE_OBJECT_FOR_MAP;
- }
- }
-
- if (\func_num_args() >= 5) {
- $references = func_get_arg(4);
- } else {
- $references = [];
- }
- }
-
- self::initialize($flags);
-
- $value = trim($value);
-
- if ('' === $value) {
- return '';
- }
-
- if (2 /* MB_OVERLOAD_STRING */ & (int) ini_get('mbstring.func_overload')) {
- $mbEncoding = mb_internal_encoding();
- mb_internal_encoding('ASCII');
- }
-
- try {
- $i = 0;
- $tag = self::parseTag($value, $i, $flags);
- switch ($value[$i]) {
- case '[':
- $result = self::parseSequence($value, $flags, $i, $references);
- ++$i;
- break;
- case '{':
- $result = self::parseMapping($value, $flags, $i, $references);
- ++$i;
- break;
- default:
- $result = self::parseScalar($value, $flags, null, $i, null === $tag, $references);
- }
-
- // some comments are allowed at the end
- if (preg_replace('/\s+#.*$/A', '', substr($value, $i))) {
- throw new ParseException(sprintf('Unexpected characters near "%s".', substr($value, $i)), self::$parsedLineNumber + 1, $value, self::$parsedFilename);
- }
-
- if (null !== $tag) {
- return new TaggedValue($tag, $result);
- }
-
- return $result;
- } finally {
- if (isset($mbEncoding)) {
- mb_internal_encoding($mbEncoding);
- }
- }
- }
-
- /**
- * Dumps a given PHP variable to a YAML string.
- *
- * @param mixed $value The PHP variable to convert
- * @param int $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string
- *
- * @return string The YAML string representing the PHP value
- *
- * @throws DumpException When trying to dump PHP resource
- */
- public static function dump($value, $flags = 0)
- {
- if (\is_bool($flags)) {
- @trigger_error('Passing a boolean flag to toggle exception handling is deprecated since Symfony 3.1 and will be removed in 4.0. Use the Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE flag instead.', E_USER_DEPRECATED);
-
- if ($flags) {
- $flags = Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE;
- } else {
- $flags = 0;
- }
- }
-
- if (\func_num_args() >= 3) {
- @trigger_error('Passing a boolean flag to toggle object support is deprecated since Symfony 3.1 and will be removed in 4.0. Use the Yaml::DUMP_OBJECT flag instead.', E_USER_DEPRECATED);
-
- if (func_get_arg(2)) {
- $flags |= Yaml::DUMP_OBJECT;
- }
- }
-
- switch (true) {
- case \is_resource($value):
- if (Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE & $flags) {
- throw new DumpException(sprintf('Unable to dump PHP resources in a YAML file ("%s").', get_resource_type($value)));
- }
-
- return 'null';
- case $value instanceof \DateTimeInterface:
- return $value->format('c');
- case \is_object($value):
- if ($value instanceof TaggedValue) {
- return '!'.$value->getTag().' '.self::dump($value->getValue(), $flags);
- }
-
- if (Yaml::DUMP_OBJECT & $flags) {
- return '!php/object '.self::dump(serialize($value));
- }
-
- if (Yaml::DUMP_OBJECT_AS_MAP & $flags && ($value instanceof \stdClass || $value instanceof \ArrayObject)) {
- return self::dumpArray($value, $flags & ~Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE);
- }
-
- if (Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE & $flags) {
- throw new DumpException('Object support when dumping a YAML file has been disabled.');
- }
-
- return 'null';
- case \is_array($value):
- return self::dumpArray($value, $flags);
- case null === $value:
- return 'null';
- case true === $value:
- return 'true';
- case false === $value:
- return 'false';
- case ctype_digit($value):
- return \is_string($value) ? "'$value'" : (int) $value;
- case is_numeric($value):
- $locale = setlocale(LC_NUMERIC, 0);
- if (false !== $locale) {
- setlocale(LC_NUMERIC, 'C');
- }
- if (\is_float($value)) {
- $repr = (string) $value;
- if (is_infinite($value)) {
- $repr = str_ireplace('INF', '.Inf', $repr);
- } elseif (floor($value) == $value && $repr == $value) {
- // Preserve float data type since storing a whole number will result in integer value.
- $repr = '!!float '.$repr;
- }
- } else {
- $repr = \is_string($value) ? "'$value'" : (string) $value;
- }
- if (false !== $locale) {
- setlocale(LC_NUMERIC, $locale);
- }
-
- return $repr;
- case '' == $value:
- return "''";
- case self::isBinaryString($value):
- return '!!binary '.base64_encode($value);
- case Escaper::requiresDoubleQuoting($value):
- return Escaper::escapeWithDoubleQuotes($value);
- case Escaper::requiresSingleQuoting($value):
- case Parser::preg_match('{^[0-9]+[_0-9]*$}', $value):
- case Parser::preg_match(self::getHexRegex(), $value):
- case Parser::preg_match(self::getTimestampRegex(), $value):
- return Escaper::escapeWithSingleQuotes($value);
- default:
- return $value;
- }
- }
-
- /**
- * Check if given array is hash or just normal indexed array.
- *
- * @internal
- *
- * @param array|\ArrayObject|\stdClass $value The PHP array or array-like object to check
- *
- * @return bool true if value is hash array, false otherwise
- */
- public static function isHash($value)
- {
- if ($value instanceof \stdClass || $value instanceof \ArrayObject) {
- return true;
- }
-
- $expectedKey = 0;
-
- foreach ($value as $key => $val) {
- if ($key !== $expectedKey++) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Dumps a PHP array to a YAML string.
- *
- * @param array $value The PHP array to dump
- * @param int $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string
- *
- * @return string The YAML string representing the PHP array
- */
- private static function dumpArray($value, $flags)
- {
- // array
- if (($value || Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE & $flags) && !self::isHash($value)) {
- $output = [];
- foreach ($value as $val) {
- $output[] = self::dump($val, $flags);
- }
-
- return sprintf('[%s]', implode(', ', $output));
- }
-
- // hash
- $output = [];
- foreach ($value as $key => $val) {
- $output[] = sprintf('%s: %s', self::dump($key, $flags), self::dump($val, $flags));
- }
-
- return sprintf('{ %s }', implode(', ', $output));
- }
-
- /**
- * Parses a YAML scalar.
- *
- * @param string $scalar
- * @param int $flags
- * @param string[] $delimiters
- * @param int &$i
- * @param bool $evaluate
- * @param array $references
- *
- * @return string
- *
- * @throws ParseException When malformed inline YAML string is parsed
- *
- * @internal
- */
- public static function parseScalar($scalar, $flags = 0, $delimiters = null, &$i = 0, $evaluate = true, $references = [], $legacyOmittedKeySupport = false)
- {
- if (\in_array($scalar[$i], ['"', "'"])) {
- // quoted scalar
- $output = self::parseQuotedScalar($scalar, $i);
-
- if (null !== $delimiters) {
- $tmp = ltrim(substr($scalar, $i), ' ');
- if ('' === $tmp) {
- throw new ParseException(sprintf('Unexpected end of line, expected one of "%s".', implode('', $delimiters)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
- }
- if (!\in_array($tmp[0], $delimiters)) {
- throw new ParseException(sprintf('Unexpected characters (%s).', substr($scalar, $i)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
- }
- }
- } else {
- // "normal" string
- if (!$delimiters) {
- $output = substr($scalar, $i);
- $i += \strlen($output);
-
- // remove comments
- if (Parser::preg_match('/[ \t]+#/', $output, $match, PREG_OFFSET_CAPTURE)) {
- $output = substr($output, 0, $match[0][1]);
- }
- } elseif (Parser::preg_match('/^(.'.($legacyOmittedKeySupport ? '+' : '*').'?)('.implode('|', $delimiters).')/', substr($scalar, $i), $match)) {
- $output = $match[1];
- $i += \strlen($output);
- } else {
- throw new ParseException(sprintf('Malformed inline YAML string: %s.', $scalar), self::$parsedLineNumber + 1, null, self::$parsedFilename);
- }
-
- // a non-quoted string cannot start with @ or ` (reserved) nor with a scalar indicator (| or >)
- if ($output && ('@' === $output[0] || '`' === $output[0] || '|' === $output[0] || '>' === $output[0])) {
- throw new ParseException(sprintf('The reserved indicator "%s" cannot start a plain scalar; you need to quote the scalar.', $output[0]), self::$parsedLineNumber + 1, $output, self::$parsedFilename);
- }
-
- if ($output && '%' === $output[0]) {
- @trigger_error(self::getDeprecationMessage(sprintf('Not quoting the scalar "%s" starting with the "%%" indicator character is deprecated since Symfony 3.1 and will throw a ParseException in 4.0.', $output)), E_USER_DEPRECATED);
- }
-
- if ($evaluate) {
- $output = self::evaluateScalar($output, $flags, $references);
- }
- }
-
- return $output;
- }
-
- /**
- * Parses a YAML quoted scalar.
- *
- * @param string $scalar
- * @param int &$i
- *
- * @return string
- *
- * @throws ParseException When malformed inline YAML string is parsed
- */
- private static function parseQuotedScalar($scalar, &$i)
- {
- if (!Parser::preg_match('/'.self::REGEX_QUOTED_STRING.'/Au', substr($scalar, $i), $match)) {
- throw new ParseException(sprintf('Malformed inline YAML string: %s.', substr($scalar, $i)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
- }
-
- $output = substr($match[0], 1, \strlen($match[0]) - 2);
-
- $unescaper = new Unescaper();
- if ('"' == $scalar[$i]) {
- $output = $unescaper->unescapeDoubleQuotedString($output);
- } else {
- $output = $unescaper->unescapeSingleQuotedString($output);
- }
-
- $i += \strlen($match[0]);
-
- return $output;
- }
-
- /**
- * Parses a YAML sequence.
- *
- * @param string $sequence
- * @param int $flags
- * @param int &$i
- * @param array $references
- *
- * @return array
- *
- * @throws ParseException When malformed inline YAML string is parsed
- */
- private static function parseSequence($sequence, $flags, &$i = 0, $references = [])
- {
- $output = [];
- $len = \strlen($sequence);
- ++$i;
-
- // [foo, bar, ...]
- while ($i < $len) {
- if (']' === $sequence[$i]) {
- return $output;
- }
- if (',' === $sequence[$i] || ' ' === $sequence[$i]) {
- ++$i;
-
- continue;
- }
-
- $tag = self::parseTag($sequence, $i, $flags);
- switch ($sequence[$i]) {
- case '[':
- // nested sequence
- $value = self::parseSequence($sequence, $flags, $i, $references);
- break;
- case '{':
- // nested mapping
- $value = self::parseMapping($sequence, $flags, $i, $references);
- break;
- default:
- $isQuoted = \in_array($sequence[$i], ['"', "'"]);
- $value = self::parseScalar($sequence, $flags, [',', ']'], $i, null === $tag, $references);
-
- // the value can be an array if a reference has been resolved to an array var
- if (\is_string($value) && !$isQuoted && false !== strpos($value, ': ')) {
- // embedded mapping?
- try {
- $pos = 0;
- $value = self::parseMapping('{'.$value.'}', $flags, $pos, $references);
- } catch (\InvalidArgumentException $e) {
- // no, it's not
- }
- }
-
- --$i;
- }
-
- if (null !== $tag) {
- $value = new TaggedValue($tag, $value);
- }
-
- $output[] = $value;
-
- ++$i;
- }
-
- throw new ParseException(sprintf('Malformed inline YAML string: %s.', $sequence), self::$parsedLineNumber + 1, null, self::$parsedFilename);
- }
-
- /**
- * Parses a YAML mapping.
- *
- * @param string $mapping
- * @param int $flags
- * @param int &$i
- * @param array $references
- *
- * @return array|\stdClass
- *
- * @throws ParseException When malformed inline YAML string is parsed
- */
- private static function parseMapping($mapping, $flags, &$i = 0, $references = [])
- {
- $output = [];
- $len = \strlen($mapping);
- ++$i;
- $allowOverwrite = false;
-
- // {foo: bar, bar:foo, ...}
- while ($i < $len) {
- switch ($mapping[$i]) {
- case ' ':
- case ',':
- ++$i;
- continue 2;
- case '}':
- if (self::$objectForMap) {
- return (object) $output;
- }
-
- return $output;
- }
-
- // key
- $isKeyQuoted = \in_array($mapping[$i], ['"', "'"], true);
- $key = self::parseScalar($mapping, $flags, [':', ' '], $i, false, [], true);
-
- if (':' !== $key && false === $i = strpos($mapping, ':', $i)) {
- break;
- }
-
- if (':' === $key) {
- @trigger_error(self::getDeprecationMessage('Omitting the key of a mapping is deprecated and will throw a ParseException in 4.0.'), E_USER_DEPRECATED);
- }
-
- if (!$isKeyQuoted) {
- $evaluatedKey = self::evaluateScalar($key, $flags, $references);
-
- if ('' !== $key && $evaluatedKey !== $key && !\is_string($evaluatedKey) && !\is_int($evaluatedKey)) {
- @trigger_error(self::getDeprecationMessage('Implicit casting of incompatible mapping keys to strings is deprecated since Symfony 3.3 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0. Quote your evaluable mapping keys instead.'), E_USER_DEPRECATED);
- }
- }
-
- if (':' !== $key && !$isKeyQuoted && (!isset($mapping[$i + 1]) || !\in_array($mapping[$i + 1], [' ', ',', '[', ']', '{', '}'], true))) {
- @trigger_error(self::getDeprecationMessage('Using a colon after an unquoted mapping key that is not followed by an indication character (i.e. " ", ",", "[", "]", "{", "}") is deprecated since Symfony 3.2 and will throw a ParseException in 4.0.'), E_USER_DEPRECATED);
- }
-
- if ('<<' === $key) {
- $allowOverwrite = true;
- }
-
- while ($i < $len) {
- if (':' === $mapping[$i] || ' ' === $mapping[$i]) {
- ++$i;
-
- continue;
- }
-
- $tag = self::parseTag($mapping, $i, $flags);
- switch ($mapping[$i]) {
- case '[':
- // nested sequence
- $value = self::parseSequence($mapping, $flags, $i, $references);
- // Spec: Keys MUST be unique; first one wins.
- // Parser cannot abort this mapping earlier, since lines
- // are processed sequentially.
- // But overwriting is allowed when a merge node is used in current block.
- if ('<<' === $key) {
- foreach ($value as $parsedValue) {
- $output += $parsedValue;
- }
- } elseif ($allowOverwrite || !isset($output[$key])) {
- if (null !== $tag) {
- $output[$key] = new TaggedValue($tag, $value);
- } else {
- $output[$key] = $value;
- }
- } elseif (isset($output[$key])) {
- @trigger_error(self::getDeprecationMessage(sprintf('Duplicate key "%s" detected whilst parsing YAML. Silent handling of duplicate mapping keys in YAML is deprecated since Symfony 3.2 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0.', $key)), E_USER_DEPRECATED);
- }
- break;
- case '{':
- // nested mapping
- $value = self::parseMapping($mapping, $flags, $i, $references);
- // Spec: Keys MUST be unique; first one wins.
- // Parser cannot abort this mapping earlier, since lines
- // are processed sequentially.
- // But overwriting is allowed when a merge node is used in current block.
- if ('<<' === $key) {
- $output += $value;
- } elseif ($allowOverwrite || !isset($output[$key])) {
- if (null !== $tag) {
- $output[$key] = new TaggedValue($tag, $value);
- } else {
- $output[$key] = $value;
- }
- } elseif (isset($output[$key])) {
- @trigger_error(self::getDeprecationMessage(sprintf('Duplicate key "%s" detected whilst parsing YAML. Silent handling of duplicate mapping keys in YAML is deprecated since Symfony 3.2 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0.', $key)), E_USER_DEPRECATED);
- }
- break;
- default:
- $value = self::parseScalar($mapping, $flags, [',', '}'], $i, null === $tag, $references);
- // Spec: Keys MUST be unique; first one wins.
- // Parser cannot abort this mapping earlier, since lines
- // are processed sequentially.
- // But overwriting is allowed when a merge node is used in current block.
- if ('<<' === $key) {
- $output += $value;
- } elseif ($allowOverwrite || !isset($output[$key])) {
- if (null !== $tag) {
- $output[$key] = new TaggedValue($tag, $value);
- } else {
- $output[$key] = $value;
- }
- } elseif (isset($output[$key])) {
- @trigger_error(self::getDeprecationMessage(sprintf('Duplicate key "%s" detected whilst parsing YAML. Silent handling of duplicate mapping keys in YAML is deprecated since Symfony 3.2 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0.', $key)), E_USER_DEPRECATED);
- }
- --$i;
- }
- ++$i;
-
- continue 2;
- }
- }
-
- throw new ParseException(sprintf('Malformed inline YAML string: %s.', $mapping), self::$parsedLineNumber + 1, null, self::$parsedFilename);
- }
-
- /**
- * Evaluates scalars and replaces magic values.
- *
- * @param string $scalar
- * @param int $flags
- * @param array $references
- *
- * @return mixed The evaluated YAML string
- *
- * @throws ParseException when object parsing support was disabled and the parser detected a PHP object or when a reference could not be resolved
- */
- private static function evaluateScalar($scalar, $flags, $references = [])
- {
- $scalar = trim($scalar);
- $scalarLower = strtolower($scalar);
-
- if (0 === strpos($scalar, '*')) {
- if (false !== $pos = strpos($scalar, '#')) {
- $value = substr($scalar, 1, $pos - 2);
- } else {
- $value = substr($scalar, 1);
- }
-
- // an unquoted *
- if (false === $value || '' === $value) {
- throw new ParseException('A reference must contain at least one character.', self::$parsedLineNumber + 1, $value, self::$parsedFilename);
- }
-
- if (!\array_key_exists($value, $references)) {
- throw new ParseException(sprintf('Reference "%s" does not exist.', $value), self::$parsedLineNumber + 1, $value, self::$parsedFilename);
- }
-
- return $references[$value];
- }
-
- switch (true) {
- case 'null' === $scalarLower:
- case '' === $scalar:
- case '~' === $scalar:
- return null;
- case 'true' === $scalarLower:
- return true;
- case 'false' === $scalarLower:
- return false;
- case '!' === $scalar[0]:
- switch (true) {
- case 0 === strpos($scalar, '!str'):
- @trigger_error(self::getDeprecationMessage('Support for the !str tag is deprecated since Symfony 3.4. Use the !!str tag instead.'), E_USER_DEPRECATED);
-
- return (string) substr($scalar, 5);
- case 0 === strpos($scalar, '!!str '):
- return (string) substr($scalar, 6);
- case 0 === strpos($scalar, '! '):
- @trigger_error(self::getDeprecationMessage('Using the non-specific tag "!" is deprecated since Symfony 3.4 as its behavior will change in 4.0. It will force non-evaluating your values in 4.0. Use plain integers or !!float instead.'), E_USER_DEPRECATED);
-
- return (int) self::parseScalar(substr($scalar, 2), $flags);
- case 0 === strpos($scalar, '!php/object:'):
- if (self::$objectSupport) {
- @trigger_error(self::getDeprecationMessage('The !php/object: tag to indicate dumped PHP objects is deprecated since Symfony 3.4 and will be removed in 4.0. Use the !php/object (without the colon) tag instead.'), E_USER_DEPRECATED);
-
- return unserialize(substr($scalar, 12));
- }
-
- if (self::$exceptionOnInvalidType) {
- throw new ParseException('Object support when parsing a YAML file has been disabled.', self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
- }
-
- return null;
- case 0 === strpos($scalar, '!!php/object:'):
- if (self::$objectSupport) {
- @trigger_error(self::getDeprecationMessage('The !!php/object: tag to indicate dumped PHP objects is deprecated since Symfony 3.1 and will be removed in 4.0. Use the !php/object (without the colon) tag instead.'), E_USER_DEPRECATED);
-
- return unserialize(substr($scalar, 13));
- }
-
- if (self::$exceptionOnInvalidType) {
- throw new ParseException('Object support when parsing a YAML file has been disabled.', self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
- }
-
- return null;
- case 0 === strpos($scalar, '!php/object'):
- if (self::$objectSupport) {
- return unserialize(self::parseScalar(substr($scalar, 12)));
- }
-
- if (self::$exceptionOnInvalidType) {
- throw new ParseException('Object support when parsing a YAML file has been disabled.', self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
- }
-
- return null;
- case 0 === strpos($scalar, '!php/const:'):
- if (self::$constantSupport) {
- @trigger_error(self::getDeprecationMessage('The !php/const: tag to indicate dumped PHP constants is deprecated since Symfony 3.4 and will be removed in 4.0. Use the !php/const (without the colon) tag instead.'), E_USER_DEPRECATED);
-
- if (\defined($const = substr($scalar, 11))) {
- return \constant($const);
- }
-
- throw new ParseException(sprintf('The constant "%s" is not defined.', $const), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
- }
- if (self::$exceptionOnInvalidType) {
- throw new ParseException(sprintf('The string "%s" could not be parsed as a constant. Have you forgotten to pass the "Yaml::PARSE_CONSTANT" flag to the parser?', $scalar), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
- }
-
- return null;
- case 0 === strpos($scalar, '!php/const'):
- if (self::$constantSupport) {
- $i = 0;
- if (\defined($const = self::parseScalar(substr($scalar, 11), 0, null, $i, false))) {
- return \constant($const);
- }
-
- throw new ParseException(sprintf('The constant "%s" is not defined.', $const), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
- }
- if (self::$exceptionOnInvalidType) {
- throw new ParseException(sprintf('The string "%s" could not be parsed as a constant. Have you forgotten to pass the "Yaml::PARSE_CONSTANT" flag to the parser?', $scalar), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
- }
-
- return null;
- case 0 === strpos($scalar, '!!float '):
- return (float) substr($scalar, 8);
- case 0 === strpos($scalar, '!!binary '):
- return self::evaluateBinaryScalar(substr($scalar, 9));
- default:
- @trigger_error(self::getDeprecationMessage(sprintf('Using the unquoted scalar value "%s" is deprecated since Symfony 3.3 and will be considered as a tagged value in 4.0. You must quote it.', $scalar)), E_USER_DEPRECATED);
- }
-
- // Optimize for returning strings.
- // no break
- case '+' === $scalar[0] || '-' === $scalar[0] || '.' === $scalar[0] || is_numeric($scalar[0]):
- switch (true) {
- case Parser::preg_match('{^[+-]?[0-9][0-9_]*$}', $scalar):
- $scalar = str_replace('_', '', (string) $scalar);
- // omitting the break / return as integers are handled in the next case
- // no break
- case ctype_digit($scalar):
- $raw = $scalar;
- $cast = (int) $scalar;
-
- return '0' == $scalar[0] ? octdec($scalar) : (((string) $raw == (string) $cast) ? $cast : $raw);
- case '-' === $scalar[0] && ctype_digit(substr($scalar, 1)):
- $raw = $scalar;
- $cast = (int) $scalar;
-
- return '0' == $scalar[1] ? octdec($scalar) : (((string) $raw === (string) $cast) ? $cast : $raw);
- case is_numeric($scalar):
- case Parser::preg_match(self::getHexRegex(), $scalar):
- $scalar = str_replace('_', '', $scalar);
-
- return '0x' === $scalar[0].$scalar[1] ? hexdec($scalar) : (float) $scalar;
- case '.inf' === $scalarLower:
- case '.nan' === $scalarLower:
- return -log(0);
- case '-.inf' === $scalarLower:
- return log(0);
- case Parser::preg_match('/^(-|\+)?[0-9][0-9,]*(\.[0-9_]+)?$/', $scalar):
- case Parser::preg_match('/^(-|\+)?[0-9][0-9_]*(\.[0-9_]+)?$/', $scalar):
- if (false !== strpos($scalar, ',')) {
- @trigger_error(self::getDeprecationMessage('Using the comma as a group separator for floats is deprecated since Symfony 3.2 and will be removed in 4.0.'), E_USER_DEPRECATED);
- }
-
- return (float) str_replace([',', '_'], '', $scalar);
- case Parser::preg_match(self::getTimestampRegex(), $scalar):
- if (Yaml::PARSE_DATETIME & $flags) {
- // When no timezone is provided in the parsed date, YAML spec says we must assume UTC.
- return new \DateTime($scalar, new \DateTimeZone('UTC'));
- }
-
- $timeZone = date_default_timezone_get();
- date_default_timezone_set('UTC');
- $time = strtotime($scalar);
- date_default_timezone_set($timeZone);
-
- return $time;
- }
- }
-
- return (string) $scalar;
- }
-
- /**
- * @param string $value
- * @param int &$i
- * @param int $flags
- *
- * @return string|null
- */
- private static function parseTag($value, &$i, $flags)
- {
- if ('!' !== $value[$i]) {
- return null;
- }
-
- $tagLength = strcspn($value, " \t\n", $i + 1);
- $tag = substr($value, $i + 1, $tagLength);
-
- $nextOffset = $i + $tagLength + 1;
- $nextOffset += strspn($value, ' ', $nextOffset);
-
- // Is followed by a scalar
- if ((!isset($value[$nextOffset]) || !\in_array($value[$nextOffset], ['[', '{'], true)) && 'tagged' !== $tag) {
- // Manage non-whitelisted scalars in {@link self::evaluateScalar()}
- return null;
- }
-
- // Built-in tags
- if ($tag && '!' === $tag[0]) {
- throw new ParseException(sprintf('The built-in tag "!%s" is not implemented.', $tag), self::$parsedLineNumber + 1, $value, self::$parsedFilename);
- }
-
- if (Yaml::PARSE_CUSTOM_TAGS & $flags) {
- $i = $nextOffset;
-
- return $tag;
- }
-
- throw new ParseException(sprintf('Tags support is not enabled. Enable the `Yaml::PARSE_CUSTOM_TAGS` flag to use "!%s".', $tag), self::$parsedLineNumber + 1, $value, self::$parsedFilename);
- }
-
- /**
- * @param string $scalar
- *
- * @return string
- *
- * @internal
- */
- public static function evaluateBinaryScalar($scalar)
- {
- $parsedBinaryData = self::parseScalar(preg_replace('/\s/', '', $scalar));
-
- if (0 !== (\strlen($parsedBinaryData) % 4)) {
- throw new ParseException(sprintf('The normalized base64 encoded data (data without whitespace characters) length must be a multiple of four (%d bytes given).', \strlen($parsedBinaryData)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
- }
-
- if (!Parser::preg_match('#^[A-Z0-9+/]+={0,2}$#i', $parsedBinaryData)) {
- throw new ParseException(sprintf('The base64 encoded data (%s) contains invalid characters.', $parsedBinaryData), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
- }
-
- return base64_decode($parsedBinaryData, true);
- }
-
- private static function isBinaryString($value)
- {
- return !preg_match('//u', $value) || preg_match('/[^\x00\x07-\x0d\x1B\x20-\xff]/', $value);
- }
-
- /**
- * Gets a regex that matches a YAML date.
- *
- * @return string The regular expression
- *
- * @see http://www.yaml.org/spec/1.2/spec.html#id2761573
- */
- private static function getTimestampRegex()
- {
- return <<[0-9][0-9][0-9][0-9])
- -(?P[0-9][0-9]?)
- -(?P[0-9][0-9]?)
- (?:(?:[Tt]|[ \t]+)
- (?P[0-9][0-9]?)
- :(?P[0-9][0-9])
- :(?P[0-9][0-9])
- (?:\.(?P[0-9]*))?
- (?:[ \t]*(?PZ|(?P[-+])(?P[0-9][0-9]?)
- (?::(?P[0-9][0-9]))?))?)?
- $~x
-EOF;
- }
-
- /**
- * Gets a regex that matches a YAML number in hexadecimal notation.
- *
- * @return string
- */
- private static function getHexRegex()
- {
- return '~^0x[0-9a-f_]++$~i';
- }
-
- private static function getDeprecationMessage($message)
- {
- $message = rtrim($message, '.');
-
- if (null !== self::$parsedFilename) {
- $message .= ' in '.self::$parsedFilename;
- }
-
- if (-1 !== self::$parsedLineNumber) {
- $message .= ' on line '.(self::$parsedLineNumber + 1);
- }
-
- return $message.'.';
- }
-}
diff --git a/vendor/symfony/yaml/LICENSE b/vendor/symfony/yaml/LICENSE
deleted file mode 100644
index a677f437..00000000
--- a/vendor/symfony/yaml/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2004-2019 Fabien Potencier
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished
-to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/vendor/symfony/yaml/Parser.php b/vendor/symfony/yaml/Parser.php
deleted file mode 100644
index 7d6112e3..00000000
--- a/vendor/symfony/yaml/Parser.php
+++ /dev/null
@@ -1,1144 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Yaml;
-
-use Symfony\Component\Yaml\Exception\ParseException;
-use Symfony\Component\Yaml\Tag\TaggedValue;
-
-/**
- * Parser parses YAML strings to convert them to PHP arrays.
- *
- * @author Fabien Potencier
- *
- * @final since version 3.4
- */
-class Parser
-{
- const TAG_PATTERN = '(?P![\w!.\/:-]+)';
- const BLOCK_SCALAR_HEADER_PATTERN = '(?P\||>)(?P\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?(?P +#.*)?';
-
- private $filename;
- private $offset = 0;
- private $totalNumberOfLines;
- private $lines = [];
- private $currentLineNb = -1;
- private $currentLine = '';
- private $refs = [];
- private $skippedLineNumbers = [];
- private $locallySkippedLineNumbers = [];
- private $refsBeingParsed = [];
-
- public function __construct()
- {
- if (\func_num_args() > 0) {
- @trigger_error(sprintf('The constructor arguments $offset, $totalNumberOfLines, $skippedLineNumbers of %s are deprecated and will be removed in 4.0', self::class), E_USER_DEPRECATED);
-
- $this->offset = func_get_arg(0);
- if (\func_num_args() > 1) {
- $this->totalNumberOfLines = func_get_arg(1);
- }
- if (\func_num_args() > 2) {
- $this->skippedLineNumbers = func_get_arg(2);
- }
- }
- }
-
- /**
- * Parses a YAML file into a PHP value.
- *
- * @param string $filename The path to the YAML file to be parsed
- * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior
- *
- * @return mixed The YAML converted to a PHP value
- *
- * @throws ParseException If the file could not be read or the YAML is not valid
- */
- public function parseFile($filename, $flags = 0)
- {
- if (!is_file($filename)) {
- throw new ParseException(sprintf('File "%s" does not exist.', $filename));
- }
-
- if (!is_readable($filename)) {
- throw new ParseException(sprintf('File "%s" cannot be read.', $filename));
- }
-
- $this->filename = $filename;
-
- try {
- return $this->parse(file_get_contents($filename), $flags);
- } finally {
- $this->filename = null;
- }
- }
-
- /**
- * Parses a YAML string to a PHP value.
- *
- * @param string $value A YAML string
- * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior
- *
- * @return mixed A PHP value
- *
- * @throws ParseException If the YAML is not valid
- */
- public function parse($value, $flags = 0)
- {
- if (\is_bool($flags)) {
- @trigger_error('Passing a boolean flag to toggle exception handling is deprecated since Symfony 3.1 and will be removed in 4.0. Use the Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE flag instead.', E_USER_DEPRECATED);
-
- if ($flags) {
- $flags = Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE;
- } else {
- $flags = 0;
- }
- }
-
- if (\func_num_args() >= 3) {
- @trigger_error('Passing a boolean flag to toggle object support is deprecated since Symfony 3.1 and will be removed in 4.0. Use the Yaml::PARSE_OBJECT flag instead.', E_USER_DEPRECATED);
-
- if (func_get_arg(2)) {
- $flags |= Yaml::PARSE_OBJECT;
- }
- }
-
- if (\func_num_args() >= 4) {
- @trigger_error('Passing a boolean flag to toggle object for map support is deprecated since Symfony 3.1 and will be removed in 4.0. Use the Yaml::PARSE_OBJECT_FOR_MAP flag instead.', E_USER_DEPRECATED);
-
- if (func_get_arg(3)) {
- $flags |= Yaml::PARSE_OBJECT_FOR_MAP;
- }
- }
-
- if (Yaml::PARSE_KEYS_AS_STRINGS & $flags) {
- @trigger_error('Using the Yaml::PARSE_KEYS_AS_STRINGS flag is deprecated since Symfony 3.4 as it will be removed in 4.0. Quote your keys when they are evaluable instead.', E_USER_DEPRECATED);
- }
-
- if (false === preg_match('//u', $value)) {
- throw new ParseException('The YAML value does not appear to be valid UTF-8.', -1, null, $this->filename);
- }
-
- $this->refs = [];
-
- $mbEncoding = null;
- $e = null;
- $data = null;
-
- if (2 /* MB_OVERLOAD_STRING */ & (int) ini_get('mbstring.func_overload')) {
- $mbEncoding = mb_internal_encoding();
- mb_internal_encoding('UTF-8');
- }
-
- try {
- $data = $this->doParse($value, $flags);
- } catch (\Exception $e) {
- } catch (\Throwable $e) {
- }
-
- if (null !== $mbEncoding) {
- mb_internal_encoding($mbEncoding);
- }
-
- $this->lines = [];
- $this->currentLine = '';
- $this->refs = [];
- $this->skippedLineNumbers = [];
- $this->locallySkippedLineNumbers = [];
-
- if (null !== $e) {
- throw $e;
- }
-
- return $data;
- }
-
- private function doParse($value, $flags)
- {
- $this->currentLineNb = -1;
- $this->currentLine = '';
- $value = $this->cleanup($value);
- $this->lines = explode("\n", $value);
- $this->locallySkippedLineNumbers = [];
-
- if (null === $this->totalNumberOfLines) {
- $this->totalNumberOfLines = \count($this->lines);
- }
-
- if (!$this->moveToNextLine()) {
- return null;
- }
-
- $data = [];
- $context = null;
- $allowOverwrite = false;
-
- while ($this->isCurrentLineEmpty()) {
- if (!$this->moveToNextLine()) {
- return null;
- }
- }
-
- // Resolves the tag and returns if end of the document
- if (null !== ($tag = $this->getLineTag($this->currentLine, $flags, false)) && !$this->moveToNextLine()) {
- return new TaggedValue($tag, '');
- }
-
- do {
- if ($this->isCurrentLineEmpty()) {
- continue;
- }
-
- // tab?
- if ("\t" === $this->currentLine[0]) {
- throw new ParseException('A YAML file cannot contain tabs as indentation.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
- }
-
- Inline::initialize($flags, $this->getRealCurrentLineNb(), $this->filename);
-
- $isRef = $mergeNode = false;
- if (self::preg_match('#^\-((?P\s+)(?P.+))?$#u', rtrim($this->currentLine), $values)) {
- if ($context && 'mapping' == $context) {
- throw new ParseException('You cannot define a sequence item when in a mapping', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
- }
- $context = 'sequence';
-
- if (isset($values['value']) && self::preg_match('#^&(?P