diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..6cbf399f --- /dev/null +++ b/.travis.yml @@ -0,0 +1,9 @@ +language: php +php: + - 5.6 +services: + - mysql +sudo: true +before_script: ./before_script.sh +script: + - tests/vendor/bin/phpunit tests/cases/InstallTest.php diff --git a/before_script.sh b/before_script.sh new file mode 100755 index 00000000..93aa4cbf --- /dev/null +++ b/before_script.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +mysql -e 'create database phpback_test;' +git checkout -- install +rm application/config/database.php + +sudo apt-get install supervisor -y --no-install-recommends +sudo cp ./.ci/phpunit-environment.conf /etc/supervisor/conf.d/ +sudo sed -i "s/^directory=.*webserver$/directory=${ESCAPED_BUILD_DIR}\\/selenium-1-tests/" /etc/supervisor/conf.d/phpunit-environment.conf +sudo sed -i "s/^autostart=.*selenium$/autostart=true/" /etc/supervisor/conf.d/phpunit-environment.conf +sudo sed -i "s/^autostart=.*python-webserver$/autostart=true/" /etc/supervisor/conf.d/phpunit-environment.conf + +sudo killall supervisord +sudo killall -9 java +sudo killall -9 Xvfb +sudo rm -f /tmp/.X99-lock +sudo /etc/init.d/supervisor start + + +sudo apt-get install -y --force-yes apache2 libapache2-mod-php5 php5-curl php5-mysql php5-intl +sudo sed -i -e "s,/var/www,$(pwd)/web,g" /etc/apache2/sites-available/default +sudo /etc/init.d/apache2 restart + +SELENIUM_HUB_URL='http://localhost:4444' + +sudo apt-get install firefox -y --no-install-recommends +echo "FIREFOX VERSION --------------------------" +firefox --version +sh -e /etc/init.d/xvfb start +export DISPLAY=:99.0 +wget http://selenium.googlecode.com/files/selenium-server-standalone-2.31.0.jar +php -S localhost:8080 -t ./ & +sudo xvfb-run java -jar selenium-server-standalone-2.31.0.jar > /dev/null.log & +sleep 30 diff --git a/install/database_tables.sql b/install/database_tables.sql deleted file mode 100755 index bbf50021..00000000 --- a/install/database_tables.sql +++ /dev/null @@ -1,88 +0,0 @@ -CREATE TABLE IF NOT EXISTS `categories` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` tinytext COLLATE utf8_unicode_ci NOT NULL, - `description` text COLLATE utf8_unicode_ci NOT NULL, - `ideas` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `id` (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - -CREATE TABLE IF NOT EXISTS `comments` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `content` text COLLATE utf8_unicode_ci NOT NULL, - `ideaid` int(11) NOT NULL, - `userid` int(11) NOT NULL, - `date` tinytext COLLATE utf8_unicode_ci NOT NULL, - PRIMARY KEY (`id`), - KEY `id` (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - -CREATE TABLE IF NOT EXISTS `flags` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `toflagid` int(11) NOT NULL, - `userid` int(11) NOT NULL, - `date` tinytext COLLATE utf8_unicode_ci NOT NULL, - PRIMARY KEY (`id`), - KEY `id` (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - -CREATE TABLE IF NOT EXISTS `ideas` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` tinytext COLLATE utf8_unicode_ci NOT NULL, - `content` text COLLATE utf8_unicode_ci NOT NULL, - `authorid` int(11) NOT NULL, - `date` tinytext COLLATE utf8_unicode_ci NOT NULL, - `votes` int(11) NOT NULL, - `comments` int(11) NOT NULL, - `status` tinytext COLLATE utf8_unicode_ci NOT NULL, - `categoryid` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `id` (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - -CREATE TABLE IF NOT EXISTS `logs` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `content` tinytext COLLATE utf8_unicode_ci NOT NULL, - `date` tinytext COLLATE utf8_unicode_ci NOT NULL, - `type` tinytext COLLATE utf8_unicode_ci NOT NULL, - `toid` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `id` (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - -CREATE TABLE IF NOT EXISTS `settings` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` tinytext COLLATE utf8_unicode_ci NOT NULL, - `value` tinytext COLLATE utf8_unicode_ci NOT NULL, - PRIMARY KEY (`id`), - KEY `id` (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - -CREATE TABLE IF NOT EXISTS `users` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` tinytext COLLATE utf8_unicode_ci NOT NULL, - `email` tinytext COLLATE utf8_unicode_ci NOT NULL, - `pass` tinytext COLLATE utf8_unicode_ci NOT NULL, - `votes` int(11) NOT NULL, - `isadmin` tinyint(1) NOT NULL, - `banned` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `id` (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - -CREATE TABLE IF NOT EXISTS `votes` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `ideaid` int(11) NOT NULL, - `userid` int(11) NOT NULL, - `number` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `id` (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - -CREATE TABLE IF NOT EXISTS `_sessions` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `userid` int(11) NOT NULL, - `token` tinytext COLLATE utf8_unicode_ci NOT NULL, - PRIMARY KEY (`id`), - KEY `id` (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; diff --git a/install/index.php b/install/index.php deleted file mode 100755 index 274e2576..00000000 --- a/install/index.php +++ /dev/null @@ -1,107 +0,0 @@ - - -
-
* array( TABLE1, TABLE2 ... )
+ *
*
* or
*
+ *
* array( TABLE1 => array( COLUMN1, COLUMN2 ... ) ... )
+ *
*
* @param array $tables a table cache array
*
@@ -335,6 +339,8 @@ public function setCacheTables( $yesNo )
* the default behavior.
*
* @param array $filters list of tables to be filtered
+ *
+ * @return void
*/
public function setFilters( $filters )
{
diff --git a/tests/vendor/gabordemooij/redbean/RedBeanPHP/Facade.php b/tests/vendor/gabordemooij/redbean/RedBeanPHP/Facade.php
index f3888af3..2232331e 100755
--- a/tests/vendor/gabordemooij/redbean/RedBeanPHP/Facade.php
+++ b/tests/vendor/gabordemooij/redbean/RedBeanPHP/Facade.php
@@ -2,35 +2,29 @@
namespace RedBeanPHP;
-use RedBeanPHP\ToolBox as ToolBox;
-use RedBeanPHP\OODB as OODB;
use RedBeanPHP\QueryWriter as QueryWriter;
use RedBeanPHP\Adapter\DBAdapter as DBAdapter;
-use RedBeanPHP\AssociationManager as AssociationManager;
-use RedBeanPHP\TagManager as TagManager;
-use RedBeanPHP\DuplicationManager as DuplicationManager;
-use RedBeanPHP\LabelMaker as LabelMaker;
-use RedBeanPHP\Finder as Finder;
use RedBeanPHP\RedException\SQL as SQLException;
-use RedBeanPHP\RedException\Security as Security;
use RedBeanPHP\Logger as Logger;
use RedBeanPHP\Logger\RDefault as RDefault;
use RedBeanPHP\Logger\RDefault\Debug as Debug;
-use RedBeanPHP\OODBBean as OODBBean;
-use RedBeanPHP\SimpleModel as SimpleModel;
-use RedBeanPHP\SimpleModelHelper as SimpleModelHelper;
use RedBeanPHP\Adapter as Adapter;
use RedBeanPHP\QueryWriter\AQueryWriter as AQueryWriter;
use RedBeanPHP\RedException as RedException;
use RedBeanPHP\BeanHelper\SimpleFacadeBeanHelper as SimpleFacadeBeanHelper;
use RedBeanPHP\Driver\RPDO as RPDO;
+use RedBeanPHP\Util\MultiLoader as MultiLoader;
+use RedBeanPHP\Util\Transaction as Transaction;
+use RedBeanPHP\Util\Dump as Dump;
+use RedBeanPHP\Util\DispenseHelper as DispenseHelper;
+use RedBeanPHP\Util\ArrayTool as ArrayTool;
/**
* RedBean Facade
*
* Version Information
- * RedBean Version @version 4.2
- *
+ * RedBean Version @version 4.3
+ *
* This class hides the object landscape of
* RedBeanPHP behind a single letter class providing
* almost all functionality with simple static calls.
@@ -49,7 +43,7 @@ class Facade
/**
* RedBeanPHP version constant.
*/
- const C_REDBEANPHP_VERSION = '4.2';
+ const C_REDBEANPHP_VERSION = '4.3';
/**
* @var ToolBox
@@ -110,7 +104,7 @@ class Facade
* @var string
*/
private static $exportCaseStyle = 'default';
-
+
/**
* Not in use (backward compatibility SQLHelper)
*/
@@ -130,8 +124,6 @@ class Facade
* Internal Query function, executes the desired query. Used by
* all facade query functions. This keeps things DRY.
*
- * @throws SQL
- *
* @param string $method desired query method (i.e. 'cell', 'col', 'exec' etc..)
* @param string $sql the sql you want to execute
* @param array $bindings array of values to be bound to query statement
@@ -231,62 +223,38 @@ public static function setNarrowFieldMode( $mode )
}
/**
- * Starts a transaction within a closure (or other valid callback).
- * If an\Exception is thrown inside, the operation is automatically rolled back.
- * If no\Exception happens, it commits automatically.
+ * Wraps a transaction around a closure or string callback.
+ * If an Exception is thrown inside, the operation is automatically rolled back.
+ * If no Exception happens, it commits automatically.
* It also supports (simulated) nested transactions (that is useful when
* you have many methods that needs transactions but are unaware of
* each other).
- * ex:
- * $from = 1;
- * $to = 2;
- * $amount = 300;
*
- * R::transaction(function() use($from, $to, $amount)
- * {
- * $accountFrom = R::load('account', $from);
- * $accountTo = R::load('account', $to);
- *
- * $accountFrom->money -= $amount;
- * $accountTo->money += $amount;
+ * Example:
*
- * R::store($accountFrom);
- * R::store($accountTo);
- * });
+ *
+ * $from = 1;
+ * $to = 2;
+ * $amount = 300;
+ *
+ * R::transaction(function() use($from, $to, $amount)
+ * {
+ * $accountFrom = R::load('account', $from);
+ * $accountTo = R::load('account', $to);
+ * $accountFrom->money -= $amount;
+ * $accountTo->money += $amount;
+ * R::store($accountFrom);
+ * R::store($accountTo);
+ * });
+ *
*
* @param callable $callback Closure (or other callable) with the transaction logic
*
- * @throws Security
- *
* @return mixed
- *
*/
public static function transaction( $callback )
{
- if ( !is_callable( $callback ) ) {
- throw new RedException( 'R::transaction needs a valid callback.' );
- }
-
- static $depth = 0;
- $result = null;
- try {
- if ( $depth == 0 ) {
- self::begin();
- }
- $depth++;
- $result = call_user_func( $callback ); //maintain 5.2 compatibility
- $depth--;
- if ( $depth == 0 ) {
- self::commit();
- }
- } catch (\Exception $exception ) {
- $depth--;
- if ( $depth == 0 ) {
- self::rollback();
- }
- throw $exception;
- }
- return $result;
+ return Transaction::transaction( self::$adapter, $callback );
}
/**
@@ -295,8 +263,10 @@ public static function transaction( $callback )
*
* Usage:
*
+ *
* R::addDatabase( 'database-1', 'sqlite:/tmp/db1.txt' );
* R::selectDatabase( 'database-1' ); //to select database again
+ *
*
* This method allows you to dynamically add (and select) new databases
* to the facade. Adding a database with the same key will cause an exception.
@@ -325,16 +295,19 @@ public static function addDatabase( $key, $dsn, $user = NULL, $pass = NULL, $fro
$adapter = new DBAdapter( $db );
- $writers = array(
- 'pgsql' => 'PostgreSQL',
- 'sqlite' => 'SQLiteT',
- 'cubrid' => 'CUBRID',
- 'mysql' => 'MySQL',
- 'sqlsrv' => 'SQLServer',
- );
+ $writers = array(
+ 'pgsql' => 'PostgreSQL',
+ 'sqlite' => 'SQLiteT',
+ 'cubrid' => 'CUBRID',
+ 'mysql' => 'MySQL',
+ 'sqlsrv' => 'SQLServer',
+ );
$wkey = trim( strtolower( $dbType ) );
- if ( !isset( $writers[$wkey] ) ) trigger_error( 'Unsupported DSN: '.$wkey );
+ if ( !isset( $writers[$wkey] ) ) {
+ $wkey = preg_replace( '/\W/', '' , $wkey );
+ throw new RedException( 'Unsupported database ('.$wkey.').' );
+ }
$writerClass = '\\RedBeanPHP\\QueryWriter\\'.$writers[$wkey];
$writer = new $writerClass( $adapter );
$redbean = new OODB( $writer, $frozen );
@@ -362,6 +335,10 @@ public static function selectDatabase( $key )
return FALSE;
}
+ if ( !isset( self::$toolboxes[$key] ) ) {
+ throw new RedException( 'Database not found in registry. Add database using R::addDatabase().' );
+ }
+
self::configureFacadeWithToolbox( self::$toolboxes[$key] );
self::$currentDB = $key;
@@ -379,9 +356,8 @@ public static function selectDatabase( $key )
* @param boolean $tf debug mode (true or false)
* @param integer $mode (0 = to STDOUT, 1 = to ARRAY)
*
- * @throws Security
- *
* @return RDefault
+ * @throws RedException
*/
public static function debug( $tf = TRUE, $mode = 0 )
{
@@ -450,8 +426,6 @@ public static function inspect( $type = NULL )
* @param OODBBean|SimpleModel $bean bean to store
*
* @return integer|string
- *
- * @throws Security
*/
public static function store( $bean )
{
@@ -480,28 +454,16 @@ public static function freeze( $tf = TRUE )
* for loading a one-to-one relation.
*
* Usage:
- * list($author, $bio) = R::load('author, bio', $id);
+ * list( $author, $bio ) = R::loadMulti( 'author, bio', $id );
*
- * @param string|array $types
- * @param mixed $id
+ * @param string|array $types the set of types to load at once
+ * @param mixed $id the common ID
*
* @return OODBBean
*/
public static function loadMulti( $types, $id )
{
- if ( is_string( $types ) ) {
- $types = explode( ',', $types );
- }
-
- if ( !is_array( $types ) ) {
- return array();
- }
-
- foreach ( $types as $k => $typeItem ) {
- $types[$k] = self::$redbean->load( $typeItem, $id );
- }
-
- return $types;
+ return MultiLoader::load( self::$redbean, $types, $id );
}
/**
@@ -524,8 +486,6 @@ public static function loadMulti( $types, $id )
* @param string $type type of bean you want to load
* @param integer $id ID of the bean you want to load
*
- * @throws SQL
- *
* @return OODBBean
*/
public static function load( $type, $id )
@@ -543,7 +503,7 @@ public static function load( $type, $id )
* and THEN trash it.
*
* @param string|OODBBean|SimpleModel $bean bean you want to remove from database
- * @param integer $id (optional)
+ * @param integer $id ID if the bean to trash (optional, type-id variant only)
*
* @return void
*/
@@ -559,41 +519,13 @@ public static function trash( $beanOrType, $id = NULL )
*
* @param string|array $typeOrBeanArray type or bean array to import
* @param integer $number number of beans to dispense
- * @param boolean $alwaysReturnArray if TRUE always returns the result as an array
+ * @param boolean $alwaysReturnArray if TRUE always returns the result as an array
*
* @return array|OODBBean
- *
- * @throws Security
*/
public static function dispense( $typeOrBeanArray, $num = 1, $alwaysReturnArray = FALSE )
{
- if ( is_array($typeOrBeanArray) ) {
-
- if ( !isset( $typeOrBeanArray['_type'] ) ) {
- $list = array();
- foreach( $typeOrBeanArray as $beanArray ) if ( !( is_array( $beanArray ) && isset( $beanArray['_type'] ) ) ) throw new RedException( 'Invalid Array Bean' );
- foreach( $typeOrBeanArray as $beanArray ) $list[] = self::dispense( $beanArray );
- return $list;
- }
-
- $import = $typeOrBeanArray;
- $type = $import['_type'];
- unset( $import['_type'] );
- } else {
- $type = $typeOrBeanArray;
- }
-
- if ( !preg_match( '/^[a-z0-9]+$/', $type ) ) {
- throw new RedException( 'Invalid type: ' . $type );
- }
-
- $beanOrBeans = self::$redbean->dispense( $type, $num, $alwaysReturnArray );
-
- if ( isset( $import ) ) {
- $beanOrBeans->import( $import );
- }
-
- return $beanOrBeans;
+ return DispenseHelper::dispense( self::$redbean, $typeOrBeanArray, $num, $alwaysReturnArray );
}
/**
@@ -603,14 +535,18 @@ public static function dispense( $typeOrBeanArray, $num = 1, $alwaysReturnArray
*
* Usage:
*
- * list($book, $page, $text) = R::dispenseAll('book,page,text');
+ *
+ * list( $book, $page, $text ) = R::dispenseAll( 'book,page,text' );
+ *
*
* This will dispense a book, a page and a text. This way you can
* quickly dispense beans of various types in just one line of code.
*
* Usage:
*
+ *
* list($book, $pages) = R::dispenseAll('book,page*100');
+ *
*
* This returns an array with a book bean and then another array
* containing 100 page beans.
@@ -622,21 +558,7 @@ public static function dispense( $typeOrBeanArray, $num = 1, $alwaysReturnArray
*/
public static function dispenseAll( $order, $onlyArrays = FALSE )
{
-
- $list = array();
-
- foreach( explode( ',', $order ) as $order ) {
- if ( strpos( $order, '*' ) !== false ) {
- list( $type, $amount ) = explode( '*', $order );
- } else {
- $type = $order;
- $amount = 1;
- }
-
- $list[] = self::dispense( $type, $amount, $onlyArrays );
- }
-
- return $list;
+ return DispenseHelper::dispenseAll( self::$redbean, $order, $onlyArrays );
}
/**
@@ -661,9 +583,9 @@ public static function findOrDispense( $type, $sql = NULL, $bindings = array() )
* array parameter; you can either use the question mark notation
* or the slot-notation (:keyname).
*
- * @param string $type type the type of bean you are looking for
- * @param string $sql sql SQL query to find the desired bean, starting right after WHERE clause
- * @param array $bindings values array of values to be bound to parameters in query
+ * @param string $type the type of bean you are looking for
+ * @param string $sql SQL query to find the desired bean, starting right after WHERE clause
+ * @param array $bindings array of values to be bound to parameters in query
*
* @return array
*/
@@ -681,9 +603,9 @@ public static function find( $type, $sql = NULL, $bindings = array() )
*
* Your SQL does not have to start with a valid WHERE-clause condition.
*
- * @param string $type type the type of bean you are looking for
- * @param string $sql sql SQL query to find the desired bean, starting right after WHERE clause
- * @param array $bindings values array of values to be bound to parameters in query
+ * @param string $type the type of bean you are looking for
+ * @param string $sql SQL query to find the desired bean, starting right after WHERE clause
+ * @param array $bindings array of values to be bound to parameters in query
*
* @return array
*/
@@ -696,9 +618,9 @@ public static function findAll( $type, $sql = NULL, $bindings = array() )
* @see Facade::find
* The variation also exports the beans (i.e. it returns arrays).
*
- * @param string $type type the type of bean you are looking for
- * @param string $sql sql SQL query to find the desired bean, starting right after WHERE clause
- * @param array $bindings values array of values to be bound to parameters in query
+ * @param string $type the type of bean you are looking for
+ * @param string $sql SQL query to find the desired bean, starting right after WHERE clause
+ * @param array $bindings array of values to be bound to parameters in query
*
* @return array
*/
@@ -711,9 +633,9 @@ public static function findAndExport( $type, $sql = NULL, $bindings = array() )
* @see Facade::find
* This variation returns the first bean only.
*
- * @param string $type type the type of bean you are looking for
- * @param string $sql sql SQL query to find the desired bean, starting right after WHERE clause
- * @param array $bindings values array of values to be bound to parameters in query
+ * @param string $type the type of bean you are looking for
+ * @param string $sql SQL query to find the desired bean, starting right after WHERE clause
+ * @param array $bindings array of values to be bound to parameters in query
*
* @return OODBBean
*/
@@ -726,9 +648,9 @@ public static function findOne( $type, $sql = NULL, $bindings = array() )
* @see Facade::find
* This variation returns the last bean only.
*
- * @param string $type type the type of bean you are looking for
- * @param string $sql sql SQL query to find the desired bean, starting right after WHERE clause
- * @param array $bindings values array of values to be bound to parameters in query
+ * @param string $type the type of bean you are looking for
+ * @param string $sql SQL query to find the desired bean, starting right after WHERE clause
+ * @param array $bindings array of values to be bound to parameters in query
*
* @return OODBBean
*/
@@ -741,9 +663,9 @@ public static function findLast( $type, $sql = NULL, $bindings = array() )
* Finds a bean collection.
* Use this for large datasets.
*
- * @param string $type type the type of bean you are looking for
- * @param string $sql sql SQL query to find the desired bean, starting right after WHERE clause
- * @param array $bindings values array of values to be bound to parameters in query
+ * @param string $type the type of bean you are looking for
+ * @param string $sql SQL query to find the desired bean, starting right after WHERE clause
+ * @param array $bindings array of values to be bound to parameters in query
*
* @return BeanCollection
*/
@@ -762,7 +684,7 @@ public static function findCollection( $type, $sql = NULL, $bindings = array() )
* @param array|string $types a list of bean types to find
* @param string|array $sqlOrArr SQL query string or result set array
* @param array $bindings SQL bindings
- * @param array $remappings An array of remapping arrays containing closures
+ * @param array $remappings an array of remapping arrays containing closures
*
* @return array
*/
@@ -812,8 +734,8 @@ public static function loadAll( $type, $ids )
* Convenience function to execute Queries directly.
* Executes SQL.
*
- * @param string $sql sql SQL query to execute
- * @param array $bindings values a list of values to be bound to query parameters
+ * @param string $sql SQL query to execute
+ * @param array $bindings a list of values to be bound to query parameters
*
* @return integer
*/
@@ -826,8 +748,8 @@ public static function exec( $sql, $bindings = array() )
* Convenience function to execute Queries directly.
* Executes SQL.
*
- * @param string $sql sql SQL query to execute
- * @param array $bindings values a list of values to be bound to query parameters
+ * @param string $sql SQL query to execute
+ * @param array $bindings a list of values to be bound to query parameters
*
* @return array
*/
@@ -840,8 +762,8 @@ public static function getAll( $sql, $bindings = array() )
* Convenience function to execute Queries directly.
* Executes SQL.
*
- * @param string $sql sql SQL query to execute
- * @param array $bindings values a list of values to be bound to query parameters
+ * @param string $sql SQL query to execute
+ * @param array $bindings a list of values to be bound to query parameters
*
* @return string
*/
@@ -854,8 +776,8 @@ public static function getCell( $sql, $bindings = array() )
* Convenience function to execute Queries directly.
* Executes SQL.
*
- * @param string $sql sql SQL query to execute
- * @param array $bindings values a list of values to be bound to query parameters
+ * @param string $sql SQL query to execute
+ * @param array $bindings a list of values to be bound to query parameters
*
* @return array
*/
@@ -868,8 +790,8 @@ public static function getRow( $sql, $bindings = array() )
* Convenience function to execute Queries directly.
* Executes SQL.
*
- * @param string $sql sql SQL query to execute
- * @param array $bindings values a list of values to be bound to query parameters
+ * @param string $sql SQL query to execute
+ * @param array $bindings a list of values to be bound to query parameters
*
* @return array
*/
@@ -887,8 +809,8 @@ public static function getCol( $sql, $bindings = array() )
* selected in the query, both key and value of the array will have the
* value of this field for each row.
*
- * @param string $sql sql SQL query to execute
- * @param array $bindings values a list of values to be bound to query parameters
+ * @param string $sql SQL query to execute
+ * @param array $bindings a list of values to be bound to query parameters
*
* @return array
*/
@@ -903,8 +825,8 @@ public static function getAssoc( $sql, $bindings = array() )
* Results will be returned as an associative array indexed by the first
* column in the select.
*
- * @param string $sql sql SQL query to execute
- * @param array $bindings values a list of values to be bound to query parameters
+ * @param string $sql SQL query to execute
+ * @param array $bindings a list of values to be bound to query parameters
*
* @return array
*/
@@ -946,7 +868,7 @@ public static function getInsertID()
* @param OODBBean $bean bean to be copied
* @param array $trail for internal usage, pass array()
* @param boolean $pid for internal usage
- * @param array $white white list filter with bean types to duplicate
+ * @param array $white white list filter with bean types to duplicate
*
* @return array
*/
@@ -960,9 +882,9 @@ public static function dup( $bean, $trail = array(), $pid = FALSE, $filters = ar
* Makes a deep copy of a bean. This method makes a deep copy
* of the bean.The copy will have the following:
*
- * - All beans in own-lists will be duplicated as well
- * - All references to shared beans will be copied but not the shared beans themselves
- * - All references to parent objects (_id fields) will be copied but not the parents themselves
+ * * All beans in own-lists will be duplicated as well
+ * * All references to shared beans will be copied but not the shared beans themselves
+ * * All references to parent objects (_id fields) will be copied but not the parents themselves
*
* In most cases this is the desired scenario for copying beans.
* This function uses a trail-array to prevent infinite recursion, if a recursive bean is found
@@ -976,7 +898,7 @@ public static function dup( $bean, $trail = array(), $pid = FALSE, $filters = ar
* This is a simplified version of the deprecated R::dup() function.
*
* @param OODBBean $bean bean to be copied
- * @param array $white white list filter with bean types to duplicate
+ * @param array $white white list filter with bean types to duplicate
*
* @return array
*/
@@ -989,15 +911,16 @@ public static function duplicate( $bean, $filters = array() )
* Exports a collection of beans. Handy for XML/JSON exports with a
* Javascript framework like Dojo or ExtJS.
* What will be exported:
- * - contents of the bean
- * - all own bean lists (recursively)
- * - all shared beans (not THEIR own lists)
+ *
+ * * contents of the bean
+ * * all own bean lists (recursively)
+ * * all shared beans (not THEIR own lists)
*
* @param array|OODBBean $beans beans to be exported
* @param boolean $parents whether you want parent beans to be exported
* @param array $filters whitelist of types
*
- * @return array
+ * @return array
*/
public static function exportAll( $beans, $parents = FALSE, $filters = array())
{
@@ -1009,9 +932,9 @@ public static function exportAll( $beans, $parents = FALSE, $filters = array())
* This will determine the case style for the keys of exported beans (see exportAll).
* The following options are accepted:
*
- * 'default' RedBeanPHP by default enforces Snake Case (i.e. book_id is_valid )
- * 'camel' Camel Case (i.e. bookId isValid )
- * 'dolphin' Dolphin Case (i.e. bookID isValid ) Like CamelCase but ID is written all uppercase
+ * * 'default' RedBeanPHP by default enforces Snake Case (i.e. book_id is_valid )
+ * * 'camel' Camel Case (i.e. bookId isValid )
+ * * 'dolphin' Dolphin Case (i.e. bookID isValid ) Like CamelCase but ID is written all uppercase
*
* @warning RedBeanPHP transforms camelCase to snake_case using a slightly different
* algorithm, it also converts isACL to is_acl (not is_a_c_l) and bookID to book_id.
@@ -1090,8 +1013,8 @@ public static function untag( $bean, $tagList )
* be associated with the bean.
* You may also pass an array instead of a string.
*
- * @param OODBBean $bean bean
- * @param mixed $tagList tags
+ * @param OODBBean $bean bean to tag
+ * @param mixed $tagList tags to attach to the specified bean
*
* @return string
*/
@@ -1107,7 +1030,7 @@ public static function tag( OODBBean $bean, $tagList = NULL )
* be associated with the bean.
* You may also pass an array instead of a string.
*
- * @param OODBBean $bean bean
+ * @param OODBBean $bean bean to tag
* @param array $tagList list of tags to add to bean
*
* @return void
@@ -1123,8 +1046,8 @@ public static function addTags( OODBBean $bean, $tagList )
*
* @param string $beanType type of bean you are looking for
* @param array $tagList list of tags to match
- * @param string $sql additional SQL
- * @param array $bindings bindings
+ * @param string $sql additional SQL query snippet
+ * @param array $bindings a list of values to bind to the query parameters
*
* @return array
*/
@@ -1139,8 +1062,8 @@ public static function tagged( $beanType, $tagList, $sql = '', $bindings = array
*
* @param string $beanType type of bean you are looking for
* @param array $tagList list of tags to match
- * @param string $sql additional SQL
- * @param array $bindings bindings
+ * @param string $sql additional SQL query snippet
+ * @param array $bindings a list of values to bind to the query parameters
*
* @return array
*/
@@ -1171,8 +1094,6 @@ public static function wipe( $beanType )
* @param array $bindings parameters to bind to SQL
*
* @return integer
- *
- * @throws SQL
*/
public static function count( $type, $addSQL = '', $bindings = array() )
{
@@ -1184,36 +1105,26 @@ public static function count( $type, $addSQL = '', $bindings = array() )
* Adapter and you want it on-the-fly? Use this method to hot-swap your facade with a new
* toolbox.
*
- * @param ToolBox $tb toolbox
+ * @param ToolBox $tb toolbox to configure facade with
*
* @return ToolBox
*/
public static function configureFacadeWithToolbox( ToolBox $tb )
{
$oldTools = self::$toolbox;
-
self::$toolbox = $tb;
-
self::$writer = self::$toolbox->getWriter();
self::$adapter = self::$toolbox->getDatabaseAdapter();
self::$redbean = self::$toolbox->getRedBean();
self::$finder = new Finder( self::$toolbox );
-
self::$associationManager = new AssociationManager( self::$toolbox );
-
self::$redbean->setAssociationManager( self::$associationManager );
-
self::$labelMaker = new LabelMaker( self::$toolbox );
-
$helper = new SimpleModelHelper();
-
$helper->attachEventListeners( self::$redbean );
-
self::$redbean->setBeanHelper( new SimpleFacadeBeanHelper );
-
self::$duplicationManager = new DuplicationManager( self::$toolbox );
self::$tagManager = new TagManager( self::$toolbox );
-
return $oldTools;
}
@@ -1226,9 +1137,7 @@ public static function configureFacadeWithToolbox( ToolBox $tb )
public static function begin()
{
if ( !self::$redbean->isFrozen() ) return FALSE;
-
self::$adapter->startTransaction();
-
return TRUE;
}
@@ -1241,9 +1150,7 @@ public static function begin()
public static function commit()
{
if ( !self::$redbean->isFrozen() ) return FALSE;
-
self::$adapter->commit();
-
return TRUE;
}
@@ -1256,9 +1163,7 @@ public static function commit()
public static function rollback()
{
if ( !self::$redbean->isFrozen() ) return FALSE;
-
self::$adapter->rollback();
-
return TRUE;
}
@@ -1286,8 +1191,7 @@ public static function getColumns( $table )
*/
public static function genSlots( $array, $template = NULL )
{
- $str = count( $array ) ? implode( ',', array_fill( 0, count( $array ), '?' ) ) : '';
- return ( is_null( $template ) || $str === '' ) ? $str : sprintf( $template, $str );
+ return ArrayTool::genSlots( $array, $template );
}
/**
@@ -1299,11 +1203,7 @@ public static function genSlots( $array, $template = NULL )
*/
public static function flat( $array, $result = array() )
{
- foreach( $array as $value ) {
- if ( is_array( $value ) ) $result = self::flat( $value, $result );
- else $result[] = $value;
- }
- return $result;
+ return ArrayTool::flat( $array, $result );
}
/**
@@ -1338,7 +1238,6 @@ public static function storeAll( $beans )
foreach ( $beans as $bean ) {
$ids[] = self::store( $bean );
}
-
return $ids;
}
@@ -1378,7 +1277,6 @@ public static function useWriterCache( $yesNo )
self::getWriter()->setUseCache( $yesNo );
}
-
/**
* A label is a bean with only an id, type and name property.
* This function will dispense beans for all entries in the array. The
@@ -1402,7 +1300,9 @@ public static function dispenseLabels( $type, $labels )
*
* To obtain (and add if necessary) an ENUM value:
*
+ *
* $tea->flavour = R::enum( 'flavour:apple' );
+ *
*
* Returns a bean of type 'flavour' with name = apple.
* This will add a bean with property name (set to APPLE) to the database
@@ -1410,11 +1310,15 @@ public static function dispenseLabels( $type, $labels )
*
* To obtain all flavours:
*
+ *
* R::enum('flavour');
+ *
*
* To get a list of all flavour names:
*
+ *
* R::gatherLabels( R::enum( 'flavour' ) );
+ *
*
* @param string $enum either type or type-value
*
@@ -1481,7 +1385,6 @@ public static function isoDate( $time = NULL )
public static function isoDateTime( $time = NULL )
{
if ( !$time ) $time = time();
-
return @date( 'Y-m-d H:i:s', $time );
}
@@ -1489,7 +1392,7 @@ public static function isoDateTime( $time = NULL )
* Optional accessor for neat code.
* Sets the database adapter you want to use.
*
- * @param Adapter $adapter
+ * @param Adapter $adapter Database Adapter for facade to use
*
* @return void
*/
@@ -1502,7 +1405,7 @@ public static function setDatabaseAdapter( Adapter $adapter )
* Optional accessor for neat code.
* Sets the database adapter you want to use.
*
- * @param QueryWriter $writer
+ * @param QueryWriter $writer Query Writer instance for facade to use
*
* @return void
*/
@@ -1515,7 +1418,7 @@ public static function setWriter( QueryWriter $writer )
* Optional accessor for neat code.
* Sets the database adapter you want to use.
*
- * @param OODB $redbean
+ * @param OODB $redbean Object Database for facade to use
*/
public static function setRedBean( OODB $redbean )
{
@@ -1586,21 +1489,16 @@ public static function getToolBox()
*
* Returns the components in the following order:
*
- * 0 - OODB instance (getRedBean())
- * 1 - Database Adapter
- * 2 - Query Writer
- * 3 - Toolbox itself
+ * # OODB instance (getRedBean())
+ * # Database Adapter
+ * # Query Writer
+ * # Toolbox itself
*
* @return array
*/
public static function getExtractedToolbox()
{
- return array(
- self::$redbean,
- self::$adapter,
- self::$writer,
- self::$toolbox
- );
+ return array( self::$redbean, self::$adapter, self::$writer, self::$toolbox );
}
/**
@@ -1630,36 +1528,36 @@ public static function renameAssociation( $from, $to = NULL )
public static function beansToArray( $beans )
{
$list = array();
- foreach( $beans as $bean ) {
- $list[] = $bean->export();
- }
+ foreach( $beans as $bean ) $list[] = $bean->export();
return $list;
}
-
+
/**
* Sets the error mode for FUSE.
* What to do if a FUSE model method does not exist?
* You can set the following options:
*
- * OODBBean::C_ERR_IGNORE (default), ignores the call, returns NULL
- * OODBBean::C_ERR_LOG, logs the incident using error_log
- * OODBBean::C_ERR_NOTICE, triggers a E_USER_NOTICE
- * OODBBean::C_ERR_WARN, triggers a E_USER_WARNING
- * OODBBean::C_ERR_EXCEPTION, throws an exception
- * OODBBean::C_ERR_FUNC, allows you to specify a custom handler (function)
- * OODBBean::C_ERR_FATAL, triggers a E_USER_ERROR
- *
+ * * OODBBean::C_ERR_IGNORE (default), ignores the call, returns NULL
+ * * OODBBean::C_ERR_LOG, logs the incident using error_log
+ * * OODBBean::C_ERR_NOTICE, triggers a E_USER_NOTICE
+ * * OODBBean::C_ERR_WARN, triggers a E_USER_WARNING
+ * * OODBBean::C_ERR_EXCEPTION, throws an exception
+ * * OODBBean::C_ERR_FUNC, allows you to specify a custom handler (function)
+ * * OODBBean::C_ERR_FATAL, triggers a E_USER_ERROR
+ *
+ *
* Custom handler method signature: handler( array (
* 'message' => string
* 'bean' => OODBBean
* 'method' => string
* ) )
+ *
*
* This method returns the old mode and handler as an array.
*
- * @param integer $mode mode
- * @param callable|NULL $func custom handler
- *
+ * @param integer $mode mode, determines how to handle errors
+ * @param callable|NULL $func custom handler (if applicable)
+ *
* @return array
*/
public static function setErrorHandlingFUSE( $mode, $func = NULL )
@@ -1676,29 +1574,10 @@ public static function setErrorHandlingFUSE( $mode, $func = NULL )
* @param OODBBean|array $data either a bean or an array of beans
*
* @return array
- *
*/
public static function dump( $data )
{
- $array = array();
-
- if ( $data instanceof OODBBean ) {
- $str = strval( $data );
- if (strlen($str) > 35) {
- $beanStr = substr( $str, 0, 35 ).'... ';
- } else {
- $beanStr = $str;
- }
- return $beanStr;
- }
-
- if ( is_array( $data ) ) {
- foreach( $data as $key => $item ) {
- $array[$key] = self::dump( $item );
- }
- }
-
- return $array;
+ return Dump::dump( $data );
}
/**
@@ -1710,16 +1589,19 @@ public static function dump( $data )
*
* Example:
*
+ *
* R::bindFunc( 'read', 'location.point', 'asText' );
* R::bindFunc( 'write', 'location.point', 'GeomFromText' );
+ *
*
* Passing NULL as the function will reset (clear) the function
* for this column/mode.
*
- * @param string $mode (read or write)
- * @param string $field
- * @param string $function
+ * @param string $mode mode for function: i.e. read or write
+ * @param string $field field (table.column) to bind function to
+ * @param string $function SQL function to bind to specified column
*
+ * @return void
*/
public static function bindFunc( $mode, $field, $function )
{
@@ -1729,7 +1611,7 @@ public static function bindFunc( $mode, $field, $function )
/**
* Sets global aliases.
*
- * @param array $list
+ * @param array $list list of global aliases
*
* @return void
*/
@@ -1865,14 +1747,20 @@ public static function setAutoResolve( $automatic = TRUE )
*
* Usage:
*
+ *
* R::ext( 'makeTea', function() { ... } );
+ *
*
* Now you can use your makeTea plugin like this:
*
+ *
* R::makeTea();
+ *
*
* @param string $pluginName name of the method to call the plugin
* @param callable $callable a PHP callable
+ *
+ * @return void
*/
public static function ext( $pluginName, $callable )
{
diff --git a/tests/vendor/gabordemooij/redbean/RedBeanPHP/Finder.php b/tests/vendor/gabordemooij/redbean/RedBeanPHP/Finder.php
index 2affc837..5a1b4b75 100644
--- a/tests/vendor/gabordemooij/redbean/RedBeanPHP/Finder.php
+++ b/tests/vendor/gabordemooij/redbean/RedBeanPHP/Finder.php
@@ -2,10 +2,6 @@
namespace RedBeanPHP;
-use RedBeanPHP\ToolBox as ToolBox;
-use RedBeanPHP\OODB as OODB;
-use RedBeanPHP\RedException\Security as Security;
-use RedBeanPHP\OODBBean as OODBBean;
/**
* RedBeanPHP Finder.
@@ -59,8 +55,6 @@ public function __construct( ToolBox $toolbox )
* @param array $bindings values array of values to be bound to parameters in query
*
* @return array
- *
- * @throws Security
*/
public function find( $type, $sql = NULL, $bindings = array() )
{
@@ -75,8 +69,12 @@ public function find( $type, $sql = NULL, $bindings = array() )
/**
* Like find() but also exports the beans as an array.
+ * This method will perform a find-operation. For every bean
+ * in the result collection this method will call the export() method.
+ * This method returns an array containing the array representations
+ * of every bean in the result set.
*
- * @see Finder::findAndExport
+ * @see Finder::find
*
* @param string $type type the type of bean you are looking for
* @param string $sql sql SQL query to find the desired bean, starting right after WHERE clause
@@ -97,6 +95,7 @@ public function findAndExport( $type, $sql = NULL, $bindings = array() )
/**
* Like find() but returns just one bean instead of an array of beans.
* This method will return only the first bean of the array.
+ * If no beans are found, this method will return NULL.
*
* @see Finder::find
*
@@ -109,7 +108,7 @@ public function findAndExport( $type, $sql = NULL, $bindings = array() )
public function findOne( $type, $sql = NULL, $bindings = array() )
{
$sql = $this->toolbox->getWriter()->glueLimitOne( $sql );
-
+
$items = $this->find( $type, $sql, $bindings );
if ( empty($items) ) {
@@ -122,6 +121,7 @@ public function findOne( $type, $sql = NULL, $bindings = array() )
/**
* Like find() but returns the last bean of the result array.
* Opposite of Finder::findLast().
+ * If no beans are found, this method will return NULL.
*
* @see Finder::find
*
@@ -252,9 +252,11 @@ public function findLike( $type, $conditions = array(), $sql = '' )
*
* Example:
*
+ *
* $stuff = $finder->findMulti('movie,review', '
* SELECT movie.*, review.* FROM movie
* LEFT JOIN review ON review.movie_id = movie.id');
+ *
*
* After this operation, $stuff will contain an entry 'movie' containing all
* movies and an entry named 'review' containing all reviews (all beans).
@@ -267,18 +269,21 @@ public function findLike( $type, $conditions = array(), $sql = '' )
* The remapping argument (optional) should contain an array of arrays.
* Each array in the remapping array should contain the following entries:
*
+ *
* array(
* 'a' => TYPE A
* 'b' => TYPE B
* 'matcher' => MATCHING FUNCTION ACCEPTING A, B and ALL BEANS
* 'do' => OPERATION FUNCTION ACCEPTING A, B, ALL BEANS, ALL REMAPPINGS
* )
+ *
*
* Using this mechanism you can build your own 'preloader' with tiny function
* snippets (and those can be re-used and shared online of course).
*
* Example:
*
+ *
* array(
* 'a' => 'movie' //define A as movie
* 'b' => 'review' //define B as review
@@ -290,6 +295,7 @@ public function findLike( $type, $conditions = array(), $sql = '' )
* $a->clearHistory(); //optional, act 'as if these beans have been loaded through ownReviewList'.
* }
* )
+ *
*
* The Query Template parameter is optional as well but can be used to
* set a different SQL template (sprintf-style) for processing the original query.
diff --git a/tests/vendor/gabordemooij/redbean/RedBeanPHP/Functions.php b/tests/vendor/gabordemooij/redbean/RedBeanPHP/Functions.php
index 3285124f..259aac8c 100644
--- a/tests/vendor/gabordemooij/redbean/RedBeanPHP/Functions.php
+++ b/tests/vendor/gabordemooij/redbean/RedBeanPHP/Functions.php
@@ -7,7 +7,7 @@
* @file RedBeanPHP/Functions.php
* @author Gabor de Mooij and the RedBeanPHP community
* @license BSD/GPLv2
- *
+ *
* @copyright
* copyright (c) G.J.G.T. (Gabor) de Mooij and the RedBeanPHP Community.
* This source file is subject to the BSD/GPLv2 License that is bundled
@@ -19,7 +19,9 @@
*
* Usage:
*
+ *
* R::find( 'paint', ' color_id = ? ', [ EID('color:yellow') ] );
+ *
*
* If a function called EID() already exists you'll have to write this
* wrapper yourself ;)
diff --git a/tests/vendor/gabordemooij/redbean/RedBeanPHP/LabelMaker.php b/tests/vendor/gabordemooij/redbean/RedBeanPHP/LabelMaker.php
index 677dcb5a..23010fad 100644
--- a/tests/vendor/gabordemooij/redbean/RedBeanPHP/LabelMaker.php
+++ b/tests/vendor/gabordemooij/redbean/RedBeanPHP/LabelMaker.php
@@ -45,7 +45,9 @@ public function __construct( ToolBox $toolbox )
* values of the array will be assigned to the name property of each
* individual bean.
*
+ *
* $people = R::dispenseLabels( 'person', [ 'Santa', 'Claus' ] );
+ *
*
* @param string $type type of beans you would like to have
* @param array $labels list of labels, names for each bean
@@ -72,9 +74,11 @@ public function dispenseLabels( $type, $labels )
*
* Usage:
*
+ *
* $o1->name = 'hamburger';
* $o2->name = 'pizza';
* implode( ',', R::gatherLabels( [ $o1, $o2 ] ) ); //hamburger,pizza
+ *
*
* Note that the return value is an array of strings, not beans.
*
@@ -94,39 +98,47 @@ public function gatherLabels( $beans )
return $labels;
}
-
+
/**
* Fetches an ENUM from the database and creates it if necessary.
* An ENUM has the following format:
*
+ *
* ENUM:VALUE
+ *
*
* If you pass 'ENUM' only, this method will return an array of its
* values:
*
+ *
* implode( ',', R::gatherLabels( R::enum( 'flavour' ) ) ) //'BANANA,MOCCA'
+ *
*
* If you pass 'ENUM:VALUE' this method will return the specified enum bean
* and create it in the database if it does not exist yet:
*
+ *
* $bananaFlavour = R::enum( 'flavour:banana' );
* $bananaFlavour->name;
+ *
*
* So you can use this method to set an ENUM value in a bean:
*
+ *
* $shake->flavour = R::enum( 'flavour:banana' );
+ *
*
* the property flavour now contains the enum bean, a parent bean.
* In the database, flavour_id will point to the flavour record with name 'banana'.
*
* @param string $enum ENUM specification for label
- *
+ *
* @return array|OODBBean
*/
public function enum( $enum )
{
$oodb = $this->toolbox->getRedBean();
-
+
if ( strpos( $enum, ':' ) === FALSE ) {
$type = $enum;
$value = FALSE;
@@ -134,22 +146,37 @@ public function enum( $enum )
list( $type, $value ) = explode( ':', $enum );
$value = preg_replace( '/\W+/', '_', strtoupper( trim( $value ) ) );
}
-
+
+ /**
+ * We use simply find here, we could use inspect() in fluid mode etc,
+ * but this would be useless. At first sight it looks clean, you could even
+ * bake this into find(), however, find not only has to deal with the primary
+ * search type, people can also include references in the SQL part, so avoiding
+ * find failures does not matter, this is still the quickest way making use
+ * of existing functionality.
+ *
+ * @note There seems to be a bug in XDebug v2.3.2 causing suppressed
+ * exceptions like these to surface anyway, to prevent this use:
+ *
+ * "xdebug.default_enable = 0"
+ *
+ * Also see Github Issue #464
+ */
$values = $oodb->find( $type );
-
+
if ( $value === FALSE ) {
return $values;
}
-
+
foreach( $values as $enumItem ) {
- if ( $enumItem->name === $value ) return $enumItem;
+ if ( $enumItem->name === $value ) return $enumItem;
}
-
+
$newEnumItems = $this->dispenseLabels( $type, array( $value ) );
$newEnumItem = reset( $newEnumItems );
-
+
$oodb->store( $newEnumItem );
-
+
return $newEnumItem;
}
}
diff --git a/tests/vendor/gabordemooij/redbean/RedBeanPHP/Logger.php b/tests/vendor/gabordemooij/redbean/RedBeanPHP/Logger.php
index 2b791edb..3699e66b 100755
--- a/tests/vendor/gabordemooij/redbean/RedBeanPHP/Logger.php
+++ b/tests/vendor/gabordemooij/redbean/RedBeanPHP/Logger.php
@@ -1,4 +1,4 @@
-mode === self::C_LOGGER_ECHO ) echo "
* array(
* 'PROPERTY' => array( POSSIBLE VALUES... 'John', 'Steve' )
* 'PROPERTY' => array( POSSIBLE VALUES... )
* );
+ *
*
* All conditions are glued together using the AND-operator, while all value lists
* are glued using IN-operators thus acting as OR-conditions.
@@ -287,11 +295,9 @@ public function check( OODBBean $bean )
* @param string $type type of beans you are looking for
* @param array $conditions list of conditions
* @param string $addSQL SQL to be used in query
- * @param array $bindings whether you prefer to use a WHERE clause or not (TRUE = not)
+ * @param array $bindings a list of values to bind to query parameters
*
* @return array
- *
- * @throws SQL
*/
public function find( $type, $conditions = array(), $sql = NULL, $bindings = array() )
{
@@ -301,13 +307,11 @@ public function find( $type, $conditions = array(), $sql = NULL, $bindings = arr
/**
* Same as find() but returns a BeanCollection.
*
- * @param string $type type of beans you are looking for
- * @param string $addSQL SQL to be used in query
- * @param array $bindings whether you prefer to use a WHERE clause or not (TRUE = not)
+ * @param string $type type of beans you are looking for
+ * @param string $addSQL SQL to be used in query
+ * @param array $bindings a list of values to bind to query parameters
*
* @return array
- *
- * @throws SQL
*/
public function findCollection( $type, $sql = NULL, $bindings = array() )
{
@@ -348,13 +352,15 @@ public function tableExists( $table )
* @param OODBBean|SimpleModel $bean bean to store
*
* @return integer|string
- *
- * @throws Security
*/
public function store( $bean )
{
$bean = $this->unboxIfNeeded( $bean );
- return $this->repository->store( $bean );
+ $id = $this->repository->store( $bean );
+ if ( self::$autoClearHistoryAfterStore ) {
+ $bean->clearHistory();
+ }
+ return $id;
}
/**
@@ -377,10 +383,7 @@ public function store( $bean )
* @param string $type type of bean you want to load
* @param integer $id ID of the bean you want to load
*
- * @throws SQL
- *
* @return OODBBean
- *
*/
public function load( $type, $id )
{
@@ -395,8 +398,6 @@ public function load( $type, $id )
* @param OODBBean|SimpleModel $bean bean you want to remove from database
*
* @return void
- *
- * @throws Security
*/
public function trash( $bean )
{
@@ -449,8 +450,6 @@ public function convertToBeans( $type, $rows )
* @param array $bindings parameters to bind to SQL
*
* @return integer
- *
- * @throws SQL
*/
public function count( $type, $addSQL = '', $bindings = array() )
{
@@ -463,8 +462,6 @@ public function count( $type, $addSQL = '', $bindings = array() )
* @param string $type type of bean you wish to delete all instances of
*
* @return boolean
- *
- * @throws SQL
*/
public function wipe( $type )
{
@@ -477,8 +474,6 @@ public function wipe( $type )
* storage and more.
*
* @return AssociationManager
- *
- * @throws Security
*/
public function getAssociationManager()
{
@@ -521,9 +516,11 @@ public function getCurrentRepository()
* MySQL spatial columns, because they need to be processed first using
* the asText/GeomFromText functions.
*
- * @param string $mode (read or write)
- * @param string $field
- * @param string $function
+ * @param string $mode mode to set function for, i.e. read or write
+ * @param string $field field (table.column) to bind SQL function to
+ * @param string $function SQL function to bind to field
+ *
+ * @return void
*/
public function bindFunc( $mode, $field, $function )
{
diff --git a/tests/vendor/gabordemooij/redbean/RedBeanPHP/OODBBean.php b/tests/vendor/gabordemooij/redbean/RedBeanPHP/OODBBean.php
index f657fcbb..1854a8a7 100755
--- a/tests/vendor/gabordemooij/redbean/RedBeanPHP/OODBBean.php
+++ b/tests/vendor/gabordemooij/redbean/RedBeanPHP/OODBBean.php
@@ -4,13 +4,11 @@
use RedBeanPHP\QueryWriter\AQueryWriter as AQueryWriter;
use RedBeanPHP\BeanHelper as BeanHelper;
-use RedBeanPHP\RedException\Security as Security;
use RedBeanPHP\RedException as RedException;
-use RedBeanPHP\OODBBean as OODBBean;
/**
* OODBBean (Object Oriented DataBase Bean).
- *
+ *
* to exchange information with the database. A bean represents
* a single table row and offers generic services for interaction
* with databases systems as well as some meta-data.
@@ -19,7 +17,7 @@
* @author Gabor de Mooij and the RedBeanPHP community
* @license BSD/GPLv2
* @desc OODBBean represents a bean. RedBeanPHP uses beans
- *
+ *
* @copyright
* copyright (c) G.J.G.T. (Gabor) de Mooij and the RedBeanPHP Community.
* This source file is subject to the BSD/GPLv2 License that is bundled
@@ -58,28 +56,89 @@ class OODBBean implements\IteratorAggregate,\ArrayAccess,\Countable
*/
protected static $autoResolve = FALSE;
+ /**
+ * This is where the real properties of the bean live. They are stored and retrieved
+ * by the magic getter and setter (__get and __set).
+ *
+ * @var array $properties
+ */
+ protected $properties = array();
+
+ /**
+ * Here we keep the meta data of a bean.
+ *
+ * @var array
+ */
+ protected $__info = array();
+
+ /**
+ * The BeanHelper allows the bean to access the toolbox objects to implement
+ * rich functionality, otherwise you would have to do everything with R or
+ * external objects.
+ *
+ * @var BeanHelper
+ */
+ protected $beanHelper = NULL;
+
+ /**
+ * @var null
+ */
+ protected $fetchType = NULL;
+
+ /**
+ * @var string
+ */
+ protected $withSql = '';
+
+ /**
+ * @var array
+ */
+ protected $withParams = array();
+
+ /**
+ * @var string
+ */
+ protected $aliasName = NULL;
+
+ /**
+ * @var string
+ */
+ protected $via = NULL;
+
+ /**
+ * @var boolean
+ */
+ protected $noLoad = FALSE;
+
+ /**
+ * @var boolean
+ */
+ protected $all = FALSE;
+
/**
* Sets the error mode for FUSE.
* What to do if a FUSE model method does not exist?
* You can set the following options:
*
- * OODBBean::C_ERR_IGNORE (default), ignores the call, returns NULL
- * OODBBean::C_ERR_LOG, logs the incident using error_log
- * OODBBean::C_ERR_NOTICE, triggers a E_USER_NOTICE
- * OODBBean::C_ERR_WARN, triggers a E_USER_WARNING
- * OODBBean::C_ERR_EXCEPTION, throws an exception
- * OODBBean::C_ERR_FUNC, allows you to specify a custom handler (function)
- * OODBBean::C_ERR_FATAL, triggers a E_USER_ERROR
+ * * OODBBean::C_ERR_IGNORE (default), ignores the call, returns NULL
+ * * OODBBean::C_ERR_LOG, logs the incident using error_log
+ * * OODBBean::C_ERR_NOTICE, triggers a E_USER_NOTICE
+ * * OODBBean::C_ERR_WARN, triggers a E_USER_WARNING
+ * * OODBBean::C_ERR_EXCEPTION, throws an exception
+ * * OODBBean::C_ERR_FUNC, allows you to specify a custom handler (function)
+ * * OODBBean::C_ERR_FATAL, triggers a E_USER_ERROR
*
+ *
* Custom handler method signature: handler( array (
* 'message' => string
* 'bean' => OODBBean
* 'method' => string
* ) )
+ *
*
* This method returns the old mode and handler as an array.
*
- * @param integer $mode mode
+ * @param integer $mode error handling mode
* @param callable|NULL $func custom handler
*
* @return array
@@ -110,9 +169,9 @@ public static function setErrorHandlingFUSE($mode, $func = NULL) {
}
/**
- * Sets aliases.
+ * Sets global aliases.
*
- * @param array $list
+ * @param array $list list of global aliases to use
*
* @return void
*/
@@ -136,65 +195,6 @@ public static function setAutoResolve( $automatic = TRUE )
self::$autoResolve = (boolean) $automatic;
}
- /**
- * This is where the real properties of the bean live. They are stored and retrieved
- * by the magic getter and setter (__get and __set).
- *
- * @var array $properties
- */
- protected $properties = array();
-
- /**
- * Here we keep the meta data of a bean.
- *
- * @var array
- */
- protected $__info = array();
-
- /**
- * The BeanHelper allows the bean to access the toolbox objects to implement
- * rich functionality, otherwise you would have to do everything with R or
- * external objects.
- *
- * @var BeanHelper
- */
- protected $beanHelper = NULL;
-
- /**
- * @var null
- */
- protected $fetchType = NULL;
-
- /**
- * @var string
- */
- protected $withSql = '';
-
- /**
- * @var array
- */
- protected $withParams = array();
-
- /**
- * @var string
- */
- protected $aliasName = NULL;
-
- /**
- * @var string
- */
- protected $via = NULL;
-
- /**
- * @var boolean
- */
- protected $noLoad = FALSE;
-
- /**
- * @var boolean
- */
- protected $all = FALSE;
-
/**
* Sets a meta property for all beans. This is a quicker way to set
* the meta properties for a collection of beans because this method
@@ -232,7 +232,7 @@ public static function setMetaAll( $beans, $property, $value )
*
* @param string $type the source type for the join
*
- * @return string $joinSql
+ * @return string
*/
private function parseJoin( $type )
{
@@ -357,7 +357,7 @@ private function getOwnList( $type, $redbean )
* use the OODB object to dispense new beans. You can use this method
* if you build your own bean dispensing mechanism.
*
- * @param string $type type of the new bean
+ * @param string $type type of the new bean
* @param BeanHelper $beanhelper bean helper to obtain a toolbox and a model
*
* @return void
@@ -380,7 +380,7 @@ public function initializeForDispense( $type, BeanHelper $beanhelper )
* nested beans (bean lists: ownBean, sharedBean) without the need to
* rely on static calls to the facade (or make this class dep. on OODB).
*
- * @param BeanHelper $helper
+ * @param BeanHelper $helper helper to use for this bean
*
* @return void
*/
@@ -390,7 +390,7 @@ public function setBeanHelper( BeanHelper $helper )
}
/**
- * Returns an\ArrayIterator so you can treat the bean like
+ * Returns an ArrayIterator so you can treat the bean like
* an array with the properties container as its contents.
* This method is meant for PHP and allows you to access beans as if
* they were arrays, i.e. using array notation:
@@ -399,11 +399,11 @@ public function setBeanHelper( BeanHelper $helper )
*
* Note that not all PHP functions work with the array interface.
*
- * @return \ArrayIterator
+ * @return ArrayIterator
*/
public function getIterator()
{
- return new\ArrayIterator( $this->properties );
+ return new \ArrayIterator( $this->properties );
}
/**
@@ -600,7 +600,7 @@ public function getID()
* Unsets a property of a bean.
* Magic method, gets called implicitly when performing the unset() operation
* on a bean property.
- *
+ *
* @param string $property property to unset
*
* @return void
@@ -636,13 +636,15 @@ public function __unset( $property )
* issue the following command: $book->ownPage
* However, to order these pages by number use:
*
+ *
* $book->with(' ORDER BY `number` ASC ')->ownPage
+ *
*
* the additional SQL snippet will be merged into the final
* query.
*
- * @param string $sql SQL to be added to retrieval query.
- * @param array $bindings array with parameters to bind to SQL snippet
+ * @param string $sql SQL to be added to retrieval query.
+ * @param array $bindings array with parameters to bind to SQL snippet
*
* @return OODBBean
*/
@@ -682,8 +684,10 @@ public function withCondition( $sql, $bindings = array() )
*
* Usage:
*
+ *
* $bean->with( ' LIMIT 3 ' )->ownPage; //Just 3
* $bean->all()->ownPage; //Reload all pages
+ *
*
* @return self
*/
@@ -713,16 +717,22 @@ public function noLoad()
* case, so to the project has a teacher_id pointing to a person, and a student_id
* also pointing to a person. Given a project, we obtain the teacher like this:
*
+ *
* $project->fetchAs('person')->teacher;
+ *
*
* Now, if we want all projects of a teacher we cant say:
*
+ *
* $teacher->ownProject
+ *
*
* because the $teacher is a bean of type 'person' and no project has been
* assigned to a person. Instead we use the alias() method like this:
*
+ *
* $teacher->alias('teacher')->ownProject
+ *
*
* now we get the projects associated with the person bean aliased as
* a teacher.
@@ -770,12 +780,13 @@ public function getPropertiesAndType()
* Turns a camelcase property name into an underscored property name.
*
* Examples:
- * oneACLRoute -> one_acl_route
- * camelCase -> camel_case
+ *
+ * * oneACLRoute -> one_acl_route
+ * * camelCase -> camel_case
*
* Also caches the result to improve performance.
*
- * @param string $property
+ * @param string $property property to un-beautify
*
* @return string
*/
@@ -911,7 +922,6 @@ public function &__get( $property )
return $this->properties[$property];
}
-
list( $redbean, , , $toolbox ) = $this->beanHelper->getExtractedToolbox();
if ( isset( $this->$fieldLink ) ) {
@@ -989,8 +999,6 @@ public function &__get( $property )
* @param mixed $value the value you want to assign
*
* @return void
- *
- * @throws Security
*/
public function __set( $property, $value )
{
@@ -1101,12 +1109,14 @@ public function setProperty( $property, $value, $updateShadow = FALSE, $taint =
*
* Example:
*
+ *
* $bean->setMeta( 'flush-cache', TRUE );
+ *
*
* RedBeanPHP also stores meta data in beans, this meta data uses
* keys prefixed with 'sys.' (system).
*
- * @param string $path path
+ * @param string $path path to property in meta data
* @param mixed $default default value
*
* @return mixed
@@ -1122,7 +1132,7 @@ public function getMeta( $path, $default = NULL )
* This is a short-cut method that can be used instead
* of combining a get/unset.
*
- * @param string $path path
+ * @param string $path path to property in meta data
* @param mixed $default default value
*
* @return mixed
@@ -1161,7 +1171,7 @@ public function setMeta( $path, $value )
* This is a convenience method to enable you to
* exchange meta information easily.
*
- * @param OODBBean $bean
+ * @param OODBBean $bean bean to copy meta data of
*
* @return OODBBean
*/
@@ -1338,7 +1348,7 @@ public function fetchAs( $type )
* For polymorphic bean relations.
* Same as fetchAs but uses a column instead of a direct value.
*
- * @param string $column
+ * @param string $field field name to use for mapping
*
* @return OODBBean
*/
@@ -1354,10 +1364,12 @@ public function poly( $field )
*
* Can be used together with with, withCondition, alias and fetchAs.
*
- * @param string $property property
- * @param closure $function function
+ * @param string $property property
+ * @param callable $function function
+ * @param integer $maxDepth maximum depth for traversal
*
* @return OODBBean
+ * @throws RedException
*/
public function traverse( $property, $function, $maxDepth = NULL )
{
@@ -1382,7 +1394,7 @@ public function traverse( $property, $function, $maxDepth = NULL )
if ( !is_array( $beans ) ) $beans = array( $beans );
foreach( $beans as $bean ) {
-
+ /** @var OODBBean $bean */
$function( $bean );
$bean->fetchType = $oldFetchType;
@@ -1397,7 +1409,7 @@ public function traverse( $property, $function, $maxDepth = NULL )
}
/**
- * Implementation of\Countable interface. Makes it possible to use
+ * Implementation of Countable interface. Makes it possible to use
* count() function on a bean.
*
* @return integer
@@ -1508,7 +1520,7 @@ public function isTainted()
* it has been stored or not. Storing a bean does not undo it's history,
* to clean the history of a bean use: clearHistory().
*
- * @param string $property name of the property you want the change-status of
+ * @param string $property name of the property you want the change-status of
*
* @return boolean
*/
@@ -1564,11 +1576,15 @@ public function clearHistory()
*
* Usage:
*
+ *
* $album->link('track', array('number'=>1))->song = $song;
+ *
*
* or:
*
+ *
* $album->link($trackBean)->song = $song;
+ *
*
* What this method does is adding the link bean to the own-list, in this case
* ownTrack. If the first argument is a string and the second is an array or
@@ -1577,7 +1593,7 @@ public function clearHistory()
* allowing the chained setter: ->song = $song.
*
* @param string|OODBBean $type type of bean to dispense or the full bean
- * @param string|array $qualification JSON string or array (optional)
+ * @param string|array $qualification JSON string or array (optional)
*
* @return OODBBean
*/
@@ -1609,6 +1625,19 @@ public function link( $typeOrBean, $qualification = array() )
return $bean;
}
+ /**
+ * Returns a bean of the given type with the same ID of as
+ * the current one. This only happens in a one-to-one relation.
+ * This is as far as support for 1-1 goes in RedBeanPHP. This
+ * method will only return a reference to the bean, changing it
+ * and storing the bean will not update the related one-bean.
+ *
+ * @return OODBBean
+ */
+ public function one( $type ) {
+ return $this->beanHelper->getToolBox()->getRedBean()->load( $type, $this->id );
+ }
+
/**
* Returns the same bean freshly loaded from the database.
*
@@ -1708,7 +1737,7 @@ public function countShared( $type )
$count = 0;
if ( $this->getID() ) {
- $count = $redbean->getAssociationManager()->relatedCount( $this, $type, $this->withSql, $this->withParams, TRUE );
+ $count = $redbean->getAssociationManager()->relatedCount( $this, $type, $this->withSql, $this->withParams );
}
$this->clearModifiers();
@@ -1727,7 +1756,9 @@ public function countShared( $type )
*
* Example:
*
+ *
* $quest->aggr( 'xownQuestTarget', 'target', 'quest' );
+ *
*
* Loads (in batch) and returns references to all
* quest beans residing in the $questTarget->target properties
diff --git a/tests/vendor/gabordemooij/redbean/RedBeanPHP/Observable.php b/tests/vendor/gabordemooij/redbean/RedBeanPHP/Observable.php
index 0b68d7b7..8e3e6c72 100755
--- a/tests/vendor/gabordemooij/redbean/RedBeanPHP/Observable.php
+++ b/tests/vendor/gabordemooij/redbean/RedBeanPHP/Observable.php
@@ -1,4 +1,4 @@
-
* renameAssociation('album_song','track')
+ *
*
* This allows:
*
+ *
* $album->sharedSong
+ *
*
* to add/retrieve beans from track instead of album_song.
* Also works for exportAll().
@@ -451,8 +455,8 @@ public function wipeAll();
* This method also accepts a single associative array as
* its first argument.
*
- * @param string|array $fromType
- * @param string $toType (optional)
+ * @param string|array $fromType original type name, or array
+ * @param string $toType new type name (only if 1st argument is string)
*
* @return void
*/
@@ -474,7 +478,7 @@ public function getAssocTable( $types );
/**
* Given a bean type and a property, this method
* tries to infer the fetch type using the foreign key
- * definitions in the database.
+ * definitions in the database.
* For instance: project, student -> person.
* If no fetchType can be inferred, this method will return NULL.
*
diff --git a/tests/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/AQueryWriter.php b/tests/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/AQueryWriter.php
index 052ec32d..dbe6ac26 100755
--- a/tests/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/AQueryWriter.php
+++ b/tests/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/AQueryWriter.php
@@ -123,7 +123,7 @@ public static function renameAssociation( $from, $to = NULL )
* Globally available service method for RedBeanPHP.
* Converts a camel cased string to a snake cased string.
*
- * @param string $camel a camelCased string
+ * @param string $camel camelCased string to converty to snake case
*
* @return string
*/
@@ -172,6 +172,7 @@ public static function setNarrowFieldMode( $narrowField )
* This is a lowlevel method to set the SQL filter array.
* The format of this array is:
*
+ *
* array(
* '' => array(
* '' => array(
@@ -179,22 +180,27 @@ public static function setNarrowFieldMode( $narrowField )
* )
* )
* )
+ *
*
* Example:
*
+ *
* array(
- * QueryWriter::C_SQLFILTER_READ => array(
+ * QueryWriter::C_SQLFILTER_READ => array(
* 'book' => array(
* 'title' => ' LOWER(book.title) '
* )
* )
+ *
*
* Note that you can use constants instead of magical chars
* as keys for the uppermost array.
* This is a lowlevel method. For a more friendly method
* please take a look at the facade: R::bindFunc().
*
- * @param array
+ * @param array list of filters to set
+ *
+ * @return void
*/
public static function setSQLFilters( $sqlFilters, $safeMode = false )
{
@@ -284,7 +290,7 @@ private function updateCache()
* improve caching efficiency (issue #400).
*
* @param string $cacheTag cache tag (secondary key)
- * @param string $key key
+ * @param string $key key to store values under
* @param array $values content to be stored
*
* @return void
@@ -303,15 +309,17 @@ private function putResultInCache( $cacheTag, $key, $values )
/**
* Creates an SQL snippet from a list of conditions of format:
*
+ *
* array(
* key => array(
* value1, value2, value3 ....
* )
* )
+ *
*
* @param array $conditions list of conditions
* @param array $bindings parameter bindings for SQL snippet
- * @param string $addSql SQL snippet
+ * @param string $addSql additional SQL snippet to append to result
*
* @return string
*/
@@ -434,6 +442,7 @@ protected function getForeignKeyForTypeProperty( $type, $property )
* A foreign key map describes the foreign keys in a table.
* A FKM always has the same structure:
*
+ *
* array(
* 'name' =>
* 'from' =>
@@ -442,6 +451,7 @@ protected function getForeignKeyForTypeProperty( $type, $property )
* 'on_update' =>
* 'on_delete' =>
* )
+ *
*
* @note the keys in the result array are FKDLs, i.e. descriptive unique
* keys per source table. Also see: AQueryWriter::makeFKLabel for details.
@@ -510,9 +520,9 @@ protected function getSQLFilterSnippet( $type )
* If you pass an offset the bindings will be re-added to the value list.
* Some databases cant handle duplicate parameter names in queries.
*
- * @param array &$valueList list of values to generate slots for (gets modified if needed)
- * @param array $otherBindings list of additional bindings
- * @param integer $offset start counter at...
+ * @param array &$valueList list of values to generate slots for (gets modified if needed)
+ * @param array $otherBindings list of additional bindings
+ * @param integer $offset start counter at...
*
* @return string
*/
@@ -648,8 +658,6 @@ protected function insertRecord( $type, $insertcolumns, $insertvalues )
* @param string $table table string
*
* @return string
- *
- * @throws Security
*/
protected function check( $struct )
{
@@ -712,7 +720,7 @@ public function glueSQLCondition( $sql, $glue = NULL )
*/
public function glueLimitOne( $sql = '')
{
- return ( strpos( $sql, 'LIMIT' ) === FALSE ) ? ( $sql . ' LIMIT 1 ' ) : $sql;
+ return ( strpos( strtoupper( $sql ), 'LIMIT' ) === FALSE ) ? ( $sql . ' LIMIT 1 ' ) : $sql;
}
/**
@@ -832,7 +840,6 @@ public function queryRecord( $type, $conditions = array(), $addSql = NULL, $bind
$rows = $this->adapter->get( $sql, $bindings );
-
if ( $this->flagUseCache && $key ) {
$this->putResultInCache( $type, $key, $rows );
}
@@ -1107,6 +1114,8 @@ public function getAssocTable( $types )
* use a result row cache.
*
* @param boolean
+ *
+ * @return void
*/
public function setUseCache( $yesNo )
{
diff --git a/tests/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/CUBRID.php b/tests/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/CUBRID.php
index 4e91acb8..ad8740af 100644
--- a/tests/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/CUBRID.php
+++ b/tests/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/CUBRID.php
@@ -1,10 +1,10 @@
esc( $type, TRUE );
$field = $this->esc( $property, TRUE ) . '_id';
$keys = $this->getKeyMapForType( $table );
-
+
foreach( $keys as $key ) {
- if (
+ if (
$key['from'] === $field
) return $key['table'];
}
diff --git a/tests/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/MySQL.php b/tests/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/MySQL.php
index 7e575760..f6545c2a 100755
--- a/tests/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/MySQL.php
+++ b/tests/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/MySQL.php
@@ -39,6 +39,7 @@ class MySQL extends AQueryWriter implements QueryWriter
const C_DATATYPE_SPECIAL_POINT = 90;
const C_DATATYPE_SPECIAL_LINESTRING = 91;
const C_DATATYPE_SPECIAL_POLYGON = 92;
+ const C_DATATYPE_SPECIAL_MONEY = 93;
const C_DATATYPE_SPECIFIED = 99;
@@ -57,6 +58,7 @@ class MySQL extends AQueryWriter implements QueryWriter
*/
protected function getKeyMapForType( $type )
{
+ $databaseName = $this->adapter->getCell('SELECT DATABASE()');
$table = $this->esc( $type, TRUE );
$keys = $this->adapter->get('
SELECT
@@ -68,17 +70,15 @@ protected function getKeyMapForType( $type )
information_schema.referential_constraints.delete_rule AS `on_delete`
FROM information_schema.key_column_usage
INNER JOIN information_schema.referential_constraints
- ON (
- information_schema.referential_constraints.constraint_name = information_schema.key_column_usage.constraint_name
- AND information_schema.referential_constraints.constraint_schema = information_schema.key_column_usage.constraint_schema
- AND information_schema.referential_constraints.constraint_catalog = information_schema.key_column_usage.constraint_catalog
- )
+ ON information_schema.referential_constraints.constraint_name = information_schema.key_column_usage.constraint_name
WHERE
- information_schema.key_column_usage.table_schema IN ( SELECT DATABASE() )
- AND information_schema.key_column_usage.table_name = ?
+ information_schema.key_column_usage.table_schema = :database
+ AND information_schema.referential_constraints.constraint_schema = :database
+ AND information_schema.key_column_usage.constraint_schema = :database
+ AND information_schema.key_column_usage.table_name = :table
AND information_schema.key_column_usage.constraint_name != \'PRIMARY\'
AND information_schema.key_column_usage.referenced_table_name IS NOT NULL
- ', array($table));
+ ', array( ':database' => $databaseName, ':table' => $table ) );
$keyInfoList = array();
foreach ( $keys as $k ) {
$label = $this->makeFKLabel( $k['from'], $k['table'], $k['to'] );
@@ -114,6 +114,7 @@ public function __construct( Adapter $adapter )
MySQL::C_DATATYPE_SPECIAL_POINT => ' POINT ',
MySQL::C_DATATYPE_SPECIAL_LINESTRING => ' LINESTRING ',
MySQL::C_DATATYPE_SPECIAL_POLYGON => ' POLYGON ',
+ MySQL::C_DATATYPE_SPECIAL_MONEY => ' DECIMAL(10,2) '
);
$this->sqltype_typeno = array();
@@ -131,7 +132,7 @@ public function __construct( Adapter $adapter )
* This method returns the datatype to be used for primary key IDS and
* foreign keys. Returns one if the data type constants.
*
- * @return integer $const data type to be used for IDS.
+ * @return integer
*/
public function getTypeForID()
{
@@ -185,6 +186,9 @@ public function scanType( $value, $flagSpecial = FALSE )
if ( $value === INF ) return MySQL::C_DATATYPE_TEXT7;
if ( $flagSpecial ) {
+ if ( preg_match( '/^-?\d+\.\d{2}$/', $value ) ) {
+ return MySQL::C_DATATYPE_SPECIAL_MONEY;
+ }
if ( preg_match( '/^\d{4}\-\d\d-\d\d$/', $value ) ) {
return MySQL::C_DATATYPE_SPECIAL_DATE;
}
@@ -297,6 +301,7 @@ public function addIndex( $type, $name, $property )
/**
* @see QueryWriter::addFK
+ * @return bool
*/
public function addFK( $type, $targetType, $property, $targetProperty, $isDependent = FALSE )
{
@@ -329,6 +334,7 @@ public function addFK( $type, $targetType, $property, $targetProperty, $isDepend
} catch ( SQLException $e ) {
// Failure of fk-constraints is not a problem
}
+ return true;
}
/**
diff --git a/tests/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/PostgreSQL.php b/tests/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/PostgreSQL.php
index 9b9f601d..f364fc79 100755
--- a/tests/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/PostgreSQL.php
+++ b/tests/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/PostgreSQL.php
@@ -37,6 +37,7 @@ class PostgreSQL extends AQueryWriter implements QueryWriter
const C_DATATYPE_SPECIAL_CIRCLE = 92;
const C_DATATYPE_SPECIAL_MONEY = 93;
const C_DATATYPE_SPECIAL_POLYGON = 94;
+ const C_DATATYPE_SPECIAL_MONEY2 = 95; //Numbers only money, i.e. fixed point numeric
const C_DATATYPE_SPECIFIED = 99;
/**
@@ -136,6 +137,7 @@ public function __construct( Adapter $adapter )
self::C_DATATYPE_SPECIAL_LSEG => ' lseg ',
self::C_DATATYPE_SPECIAL_CIRCLE => ' circle ',
self::C_DATATYPE_SPECIAL_MONEY => ' money ',
+ self::C_DATATYPE_SPECIAL_MONEY2 => ' numeric(10,2) ',
self::C_DATATYPE_SPECIAL_POLYGON => ' polygon ',
);
@@ -152,7 +154,7 @@ public function __construct( Adapter $adapter )
* This method returns the datatype to be used for primary key IDS and
* foreign keys. Returns one if the data type constants.
*
- * @return integer $const data type to be used for IDS.
+ * @return integer
*/
public function getTypeForID()
{
@@ -184,7 +186,7 @@ public function getColumns( $table )
{
$table = $this->esc( $table, TRUE );
- $columnsRaw = $this->adapter->get( "SELECT column_name, data_type FROM information_schema.columns WHERE table_name='$table'" );
+ $columnsRaw = $this->adapter->get( "SELECT column_name, data_type FROM information_schema.columns WHERE table_name='$table' AND table_schema = ANY( current_schemas( FALSE ) )" );
$columns = array();
foreach ( $columnsRaw as $r ) {
@@ -231,12 +233,16 @@ public function scanType( $value, $flagSpecial = FALSE )
if ( preg_match( '/^\-?(\$|€|¥|£)[\d,\.]+$/', $value ) ) {
return PostgreSQL::C_DATATYPE_SPECIAL_MONEY;
}
+
+ if ( preg_match( '/^-?\d+\.\d{2}$/', $value ) ) {
+ return PostgreSQL::C_DATATYPE_SPECIAL_MONEY2;
+ }
}
if ( is_float( $value ) ) return self::C_DATATYPE_DOUBLE;
if ( $this->startsWithZeros( $value ) ) return self::C_DATATYPE_TEXT;
-
+
if ( $value === FALSE || $value === TRUE || $value === NULL || ( is_numeric( $value )
&& AQueryWriter::canBeTreatedAsInt( $value )
&& $value < 2147483648
diff --git a/tests/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/SQLiteT.php b/tests/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/SQLiteT.php
index b171a650..96f52d3c 100755
--- a/tests/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/SQLiteT.php
+++ b/tests/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/SQLiteT.php
@@ -1,4 +1,4 @@
-startsWithZeros( $value ) ) return self::C_DATATYPE_TEXT;
if ( $value === TRUE || $value === FALSE ) return self::C_DATATYPE_INTEGER;
-
+
if ( is_numeric( $value ) && ( intval( $value ) == $value ) && $value < 2147483648 && $value > -2147483648 ) return self::C_DATATYPE_INTEGER;
if ( ( is_numeric( $value ) && $value < 2147483648 && $value > -2147483648)
@@ -290,7 +291,7 @@ public function addColumn( $table, $column, $type )
public function code( $typedescription, $includeSpecials = FALSE )
{
$r = ( ( isset( $this->sqltype_typeno[$typedescription] ) ) ? $this->sqltype_typeno[$typedescription] : 99 );
-
+
return $r;
}
@@ -400,7 +401,7 @@ public function addIndex( $type, $name, $column )
public function wipe( $type )
{
$table = $this->esc( $type );
-
+
$this->adapter->exec( "DELETE FROM $table " );
}
diff --git a/tests/vendor/gabordemooij/redbean/RedBeanPHP/R.php b/tests/vendor/gabordemooij/redbean/RedBeanPHP/R.php
index 1e2c9fd9..6f2648b4 100644
--- a/tests/vendor/gabordemooij/redbean/RedBeanPHP/R.php
+++ b/tests/vendor/gabordemooij/redbean/RedBeanPHP/R.php
@@ -16,4 +16,6 @@
* @license BSD/GPLv2
*
*/
- class R extends Facade {}
+class R extends Facade
+{
+}
diff --git a/tests/vendor/gabordemooij/redbean/RedBeanPHP/RedException.php b/tests/vendor/gabordemooij/redbean/RedBeanPHP/RedException.php
index d8ca7146..5973bbb7 100755
--- a/tests/vendor/gabordemooij/redbean/RedBeanPHP/RedException.php
+++ b/tests/vendor/gabordemooij/redbean/RedBeanPHP/RedException.php
@@ -1,4 +1,4 @@
-getMeta( 'type' ) . '_id';
@@ -210,8 +201,8 @@ protected function processTrashcan( $bean, $ownTrashcan )
/**
* Unassociates the list items in the trashcan.
*
- * @param OODBBean $bean bean
- * @param array $sharedTrashcan list
+ * @param OODBBean $bean bean to process
+ * @param array $sharedTrashcan list to process
*
* @return void
*/
@@ -225,8 +216,8 @@ protected function processSharedTrashcan( $bean, $sharedTrashcan )
/**
* Stores all the beans in the residue group.
*
- * @param OODBBean $bean bean
- * @param array $sharedresidue list
+ * @param OODBBean $bean bean to process
+ * @param array $sharedresidue list to process
*
* @return void
*/
@@ -259,19 +250,20 @@ protected function hasListsOrObjects( OODBBean $bean )
return $processLists;
}
-
/**
* Converts an embedded bean to an ID, removed the bean property and
* stores the bean in the embedded beans array.
*
- * @param array $embeddedBeans destination array for embedded bean
- * @param OODBBean $bean target bean
- * @param string $property property that contains the embedded bean
+ * @param array $embeddedBeans destination array for embedded bean
+ * @param OODBBean $bean target bean to process
+ * @param string $property property that contains the embedded bean
* @param OODBBean $value embedded bean itself
+ *
+ * @return void
*/
protected function processEmbeddedBean( &$embeddedBeans, $bean, $property, OODBBean $value )
{
- $linkField = $property . '_id';
+ $linkField = $property . '_id';
$id = $this->prepareEmbeddedBean( $value );
if ($bean->$linkField != $id) $bean->$linkField = $id;
$bean->setMeta( 'cast.' . $linkField, 'id' );
@@ -279,11 +271,13 @@ protected function processEmbeddedBean( &$embeddedBeans, $bean, $property, OODBB
unset( $bean->$property );
}
-
/**
* Constructor, requires a query writer.
+ * Creates a new instance of the bean respository class.
*
- * @param QueryWriter $writer writer
+ * @param QueryWriter $writer the Query Writer to use for this repository
+ *
+ * @return void
*/
public function __construct( OODB $oodb, QueryWriter $writer )
{
@@ -299,8 +293,6 @@ public function __construct( OODB $oodb, QueryWriter $writer )
* @param OODBBean $bean the bean that needs to be checked
*
* @return void
- *
- * @throws Security $exception
*/
public function check( OODBBean $bean )
{
@@ -339,10 +331,12 @@ public function check( OODBBean $bean )
*
* Conditions need to take form:
*
+ *
* array(
* 'PROPERTY' => array( POSSIBLE VALUES... 'John', 'Steve' )
* 'PROPERTY' => array( POSSIBLE VALUES... )
* );
+ *
*
* All conditions are glued together using the AND-operator, while all value lists
* are glued using IN-operators thus acting as OR-conditions.
@@ -356,7 +350,6 @@ public function check( OODBBean $bean )
* @param array $bindings whether you prefer to use a WHERE clause or not (TRUE = not)
*
* @return array
- *
*/
public function find( $type, $conditions = array(), $sql = NULL, $bindings = array() )
{
@@ -512,8 +505,6 @@ public function convertToBeans( $type, $rows )
* @param array $bindings parameters to bind to SQL
*
* @return integer
- *
- * @throws SQLException
*/
public function count( $type, $addSQL = '', $bindings = array() )
{
@@ -543,8 +534,6 @@ public function count( $type, $addSQL = '', $bindings = array() )
* @param OODBBean|SimpleModel $bean bean you want to remove from database
*
* @return void
- *
- * @throws SQLException
*/
public function trash( $bean )
{
@@ -591,8 +580,6 @@ public function tableExists( $table )
* @param string $type type of bean you wish to delete all instances of
*
* @return boolean
- *
- * @throws SQLException
*/
public function wipe( $type )
{
diff --git a/tests/vendor/gabordemooij/redbean/RedBeanPHP/Repository/Fluid.php b/tests/vendor/gabordemooij/redbean/RedBeanPHP/Repository/Fluid.php
index 65502e7e..fb4dcee4 100644
--- a/tests/vendor/gabordemooij/redbean/RedBeanPHP/Repository/Fluid.php
+++ b/tests/vendor/gabordemooij/redbean/RedBeanPHP/Repository/Fluid.php
@@ -3,16 +3,10 @@
namespace RedBeanPHP\Repository;
use RedBeanPHP\OODBBean as OODBBean;
-use RedBeanPHP\Observable as Observable;
-use RedBeanPHP\Adapter\DBAdapter as DBAdapter;
-use RedBeanPHP\BeanHelper\FacadeBeanHelper as FacadeBeanHelper;
use RedBeanPHP\QueryWriter as QueryWriter;
use RedBeanPHP\RedException as RedException;
-use RedBeanPHP\RedException\Security as Security;
-use RedBeanPHP\SimpleModel as SimpleModel;
use RedBeanPHP\BeanHelper as BeanHelper;
use RedBeanPHP\RedException\SQL as SQLException;
-use RedBeanPHP\QueryWriter\AQueryWriter as AQueryWriter;
use RedBeanPHP\Repository as Repository;
/**
@@ -41,8 +35,6 @@ class Fluid extends Repository
* @param string $cast cast identifier
*
* @return integer
- *
- * @throws Security
*/
private function getTypeFromCast( $cast )
{
@@ -63,8 +55,8 @@ private function getTypeFromCast( $cast )
* Orders the Query Writer to create a table if it does not exist already and
* adds a note in the build report about the creation.
*
- * @param OODBBean $bean bean to update report of
- * @param string $table table to check and create if not exists
+ * @param OODBBean $bean bean to update report of
+ * @param string $table table to check and create if not exists
*
* @return void
*/
@@ -149,12 +141,15 @@ private function modifySchema( OODBBean $bean, $property, $value )
* adds a foreign key. Also adds a constraint in case the type is
* in the dependent list.
*
- * @param OODBBean $bean bean
- * @param array $ownAdditions list of addition beans in own-list
+ * Note that this method raises a custom exception if the bean
+ * is not an instance of OODBBean. Therefore it does not use
+ * a type hint. This allows the user to take action in case
+ * invalid objects are passed in the list.
*
- * @return void
+ * @param OODBBean $bean bean to process
+ * @param array $ownAdditions list of addition beans in own-list
*
- * @throws Security
+ * @return void
*/
protected function processAdditions( $bean, $ownAdditions )
{
@@ -217,13 +212,11 @@ protected function storeBean( OODBBean $bean )
}
/**
- * Handles\Exceptions. Suppresses exceptions caused by missing structures.
+ * Handles exceptions. Suppresses exceptions caused by missing structures.
*
- * @param\Exception $exception exception
+ * @param Exception $exception exception
*
* @return void
- *
- * @throws\Exception
*/
protected function handleException( \Exception $exception )
{
@@ -286,10 +279,7 @@ public function dispense( $type, $number = 1, $alwaysReturnArray = FALSE )
* @param string $type type of bean you want to load
* @param integer $id ID of the bean you want to load
*
- * @throws SQL
- *
* @return OODBBean
- *
*/
public function load( $type, $id )
{
diff --git a/tests/vendor/gabordemooij/redbean/RedBeanPHP/Repository/Frozen.php b/tests/vendor/gabordemooij/redbean/RedBeanPHP/Repository/Frozen.php
index 9f42d72f..7e7a53ef 100644
--- a/tests/vendor/gabordemooij/redbean/RedBeanPHP/Repository/Frozen.php
+++ b/tests/vendor/gabordemooij/redbean/RedBeanPHP/Repository/Frozen.php
@@ -3,16 +3,10 @@
namespace RedBeanPHP\Repository;
use RedBeanPHP\OODBBean as OODBBean;
-use RedBeanPHP\Observable as Observable;
-use RedBeanPHP\Adapter\DBAdapter as DBAdapter;
-use RedBeanPHP\BeanHelper\FacadeBeanHelper as FacadeBeanHelper;
use RedBeanPHP\QueryWriter as QueryWriter;
use RedBeanPHP\RedException as RedException;
-use RedBeanPHP\RedException\Security as Security;
-use RedBeanPHP\SimpleModel as SimpleModel;
use RedBeanPHP\BeanHelper as BeanHelper;
use RedBeanPHP\RedException\SQL as SQLException;
-use RedBeanPHP\QueryWriter\AQueryWriter as AQueryWriter;
use RedBeanPHP\Repository as Repository;
/**
@@ -36,12 +30,11 @@
class Frozen extends Repository
{
/**
- * Handles\Exceptions. Suppresses exceptions caused by missing structures.
+ * Handles exceptions. Suppresses exceptions caused by missing structures.
*
- * @param \Exception $exception exception
+ * @param \Exception $exception exception to handle
*
* @return void
- *
* @throws \Exception
*/
protected function handleException( \Exception $exception )
@@ -85,12 +78,16 @@ protected function storeBean( OODBBean $bean )
* adds a foreign key. Also adds a constraint in case the type is
* in the dependent list.
*
- * @param OODBBean $bean bean
- * @param array $ownAdditions list of addition beans in own-list
+ * Note that this method raises a custom exception if the bean
+ * is not an instance of OODBBean. Therefore it does not use
+ * a type hint. This allows the user to take action in case
+ * invalid objects are passed in the list.
*
- * @return void
+ * @param OODBBean $bean bean to process
+ * @param array $ownAdditions list of addition beans in own-list
*
- * @throws Security
+ * @return void
+ * @throws RedException
*/
protected function processAdditions( $bean, $ownAdditions )
{
@@ -124,7 +121,7 @@ protected function processAdditions( $bean, $ownAdditions )
* configuration for you.
*
* @param string $type type of bean you want to dispense
- * @param string $number number of beans you would like to get
+ * @param int $number number of beans you would like to get
* @param boolean $alwaysReturnArray if TRUE always returns the result as an array
*
* @return OODBBean
@@ -134,6 +131,7 @@ public function dispense( $type, $number = 1, $alwaysReturnArray = FALSE )
$OODBBEAN = defined( 'REDBEAN_OODBBEAN_CLASS' ) ? REDBEAN_OODBBEAN_CLASS : '\RedBeanPHP\OODBBean';
$beans = array();
for ( $i = 0; $i < $number; $i++ ) {
+ /** @var \RedBeanPHP\OODBBean $bean */
$bean = new $OODBBEAN;
$bean->initializeForDispense( $type, $this->oodb->getBeanHelper() );
$this->oodb->signal( 'dispense', $bean );
@@ -163,10 +161,8 @@ public function dispense( $type, $number = 1, $alwaysReturnArray = FALSE )
* @param string $type type of bean you want to load
* @param integer $id ID of the bean you want to load
*
- * @throws SQL
- *
* @return OODBBean
- *
+ * @throws SQLException
*/
public function load( $type, $id )
{
diff --git a/tests/vendor/gabordemooij/redbean/RedBeanPHP/SimpleModel.php b/tests/vendor/gabordemooij/redbean/RedBeanPHP/SimpleModel.php
index 17a54bc0..b7940f44 100755
--- a/tests/vendor/gabordemooij/redbean/RedBeanPHP/SimpleModel.php
+++ b/tests/vendor/gabordemooij/redbean/RedBeanPHP/SimpleModel.php
@@ -1,4 +1,4 @@
-sharedTag;
$foundTags = array();
@@ -193,12 +193,12 @@ public function tag( OODBBean $bean, $tagList = NULL )
* If $tagList is a comma separated list of tags all tags will
* be associated with the bean.
* You may also pass an array instead of a string.
- *
+ *
* Tag list can be either an array with tag names or a comma separated list
* of tag names.
*
- * @param OODBBean $bean bean to add tags to
- * @param array|string $tagList list of tags to add to bean
+ * @param OODBBean $bean bean to add tags to
+ * @param array|string $tagList list of tags to add to bean
*
* @return void
*/
@@ -250,8 +250,8 @@ public function tagged( $beanType, $tagList, $sql = '', $bindings = array() )
* Tag list can be either an array with tag names or a comma separated list
* of tag names.
*
- * @param string $beanType type of bean you are looking for
- * @param array|string $tagList list of tags to match
+ * @param string $beanType type of bean you are looking for
+ * @param array|string $tagList list of tags to match
*
* @return array
*/
diff --git a/tests/vendor/gabordemooij/redbean/RedBeanPHP/ToolBox.php b/tests/vendor/gabordemooij/redbean/RedBeanPHP/ToolBox.php
index ef60c0cf..9947b792 100755
--- a/tests/vendor/gabordemooij/redbean/RedBeanPHP/ToolBox.php
+++ b/tests/vendor/gabordemooij/redbean/RedBeanPHP/ToolBox.php
@@ -1,4 +1,4 @@
-dispense( $type, $num, $alwaysReturnArray );
+
+ if ( isset( $import ) ) {
+ $beanOrBeans->import( $import );
+ }
+
+ return $beanOrBeans;
+ }
+
+
+ /**
+ * Takes a comma separated list of bean types
+ * and dispenses these beans. For each type in the list
+ * you can specify the number of beans to be dispensed.
+ *
+ * Usage:
+ *
+ *
+ * list( $book, $page, $text ) = R::dispenseAll( 'book,page,text' );
+ *
+ *
+ * This will dispense a book, a page and a text. This way you can
+ * quickly dispense beans of various types in just one line of code.
+ *
+ * Usage:
+ *
+ *
+ * list($book, $pages) = R::dispenseAll('book,page*100');
+ *
+ *
+ * This returns an array with a book bean and then another array
+ * containing 100 page beans.
+ *
+ * @param OODB $oodb OODB
+ * @param string $order a description of the desired dispense order using the syntax above
+ * @param boolean $onlyArrays return only arrays even if amount < 2
+ *
+ * @return array
+ */
+ public static function dispenseAll( OODB $oodb, $order, $onlyArrays = FALSE )
+ {
+ $list = array();
+
+ foreach( explode( ',', $order ) as $order ) {
+ if ( strpos( $order, '*' ) !== FALSE ) {
+ list( $type, $amount ) = explode( '*', $order );
+ } else {
+ $type = $order;
+ $amount = 1;
+ }
+
+ $list[] = self::dispense( $oodb, $type, $amount, $onlyArrays );
+ }
+
+ return $list;
+ }
+}
diff --git a/tests/vendor/gabordemooij/redbean/RedBeanPHP/Util/Dump.php b/tests/vendor/gabordemooij/redbean/RedBeanPHP/Util/Dump.php
new file mode 100644
index 00000000..de616641
--- /dev/null
+++ b/tests/vendor/gabordemooij/redbean/RedBeanPHP/Util/Dump.php
@@ -0,0 +1,61 @@
+ 35) {
+ $beanStr = substr( $str, 0, 35 ).'... ';
+ } else {
+ $beanStr = $str;
+ }
+ return $beanStr;
+ }
+
+ if ( is_array( $data ) ) {
+ foreach( $data as $key => $item ) {
+ $array[$key] = self::dump( $item );
+ }
+ }
+
+ return $array;
+ }
+}
diff --git a/tests/vendor/gabordemooij/redbean/RedBeanPHP/Util/MultiLoader.php b/tests/vendor/gabordemooij/redbean/RedBeanPHP/Util/MultiLoader.php
new file mode 100644
index 00000000..67572efc
--- /dev/null
+++ b/tests/vendor/gabordemooij/redbean/RedBeanPHP/Util/MultiLoader.php
@@ -0,0 +1,56 @@
+ $typeItem ) {
+ $types[$k] = $oodb->load( $typeItem, $id );
+ }
+
+ return $types;
+ }
+}
diff --git a/tests/vendor/gabordemooij/redbean/RedBeanPHP/Util/Transaction.php b/tests/vendor/gabordemooij/redbean/RedBeanPHP/Util/Transaction.php
new file mode 100644
index 00000000..35e70f8f
--- /dev/null
+++ b/tests/vendor/gabordemooij/redbean/RedBeanPHP/Util/Transaction.php
@@ -0,0 +1,90 @@
+
+ * $from = 1;
+ * $to = 2;
+ * $amount = 300;
+ *
+ * R::transaction(function() use($from, $to, $amount)
+ * {
+ * $accountFrom = R::load('account', $from);
+ * $accountTo = R::load('account', $to);
+ * $accountFrom->money -= $amount;
+ * $accountTo->money += $amount;
+ * R::store($accountFrom);
+ * R::store($accountTo);
+ * });
+ *
+ *
+ * @param Adapter $adapter Database Adapter providing transaction mechanisms.
+ * @param callable $callback Closure (or other callable) with the transaction logic
+ *
+ * @return mixed
+ */
+ public static function transaction( Adapter $adapter, $callback )
+ {
+ if ( !is_callable( $callback ) ) {
+ throw new RedException( 'R::transaction needs a valid callback.' );
+ }
+
+ static $depth = 0;
+ $result = null;
+ try {
+ if ( $depth == 0 ) {
+ $adapter->startTransaction();
+ }
+ $depth++;
+ $result = call_user_func( $callback ); //maintain 5.2 compatibility
+ $depth--;
+ if ( $depth == 0 ) {
+ $adapter->commit();
+ }
+ } catch ( \Exception $exception ) {
+ $depth--;
+ if ( $depth == 0 ) {
+ $adapter->rollback();
+ }
+ throw $exception;
+ }
+ return $result;
+ }
+}
diff --git a/tests/vendor/gabordemooij/redbean/RedBeanPHP/loader.php b/tests/vendor/gabordemooij/redbean/RedBeanPHP/loader.php
index 6f31b29e..ed4e93e4 100644
--- a/tests/vendor/gabordemooij/redbean/RedBeanPHP/loader.php
+++ b/tests/vendor/gabordemooij/redbean/RedBeanPHP/loader.php
@@ -59,6 +59,13 @@
require( REDBEANPHP_MAIN_DIR . 'Plugin.php' );
require( REDBEANPHP_MAIN_DIR . 'Functions.php' );
+/* Facade Utilities */
+require( REDBEANPHP_MAIN_DIR . 'Util/ArrayTool.php' );
+require( REDBEANPHP_MAIN_DIR . 'Util/DispenseHelper.php' );
+require( REDBEANPHP_MAIN_DIR . 'Util/Dump.php' );
+require( REDBEANPHP_MAIN_DIR . 'Util/MultiLoader.php' );
+require( REDBEANPHP_MAIN_DIR . 'Util/Transaction.php' );
+
//Allow users to mount the plugin folder.
if ( defined( 'REDBEANPHP_PLUGINS' ) ) {
Phar::mount( 'RedBeanPHP/Plugin', REDBEANPHP_PLUGINS );
diff --git a/tests/vendor/gabordemooij/redbean/replica2.php b/tests/vendor/gabordemooij/redbean/replica2.php
index 0bcb09b2..af2f0672 100644
--- a/tests/vendor/gabordemooij/redbean/replica2.php
+++ b/tests/vendor/gabordemooij/redbean/replica2.php
@@ -40,7 +40,7 @@
function addFile($file) {
global $code;
- echo 'Added '. $file . ' to package... '.PHP_EOL;
+ echo 'Added ', $file , ' to package... ',PHP_EOL;
$raw = file_get_contents($file);
$raw = preg_replace('/namespace\s+([a-zA-Z0-9\\\;]+);/m', 'namespace $1 {', $raw);
$raw .= '}';
@@ -85,6 +85,11 @@ function addFile($file) {
addFile( DIR . 'LabelMaker.php' );
addFile( DIR . 'Facade.php' );
addFile( DIR . 'DuplicationManager.php' );
+ addFile( DIR . 'Util/ArrayTool.php' );
+ addFile( DIR . 'Util/DispenseHelper.php' );
+ addFile( DIR . 'Util/Dump.php' );
+ addFile( DIR . 'Util/MultiLoader.php' );
+ addFile( DIR . 'Util/Transaction.php' );
addFile( DIR . 'Plugin.php' );
$func = file_get_contents(DIR . 'Functions.php');
@@ -106,16 +111,16 @@ class R extends \RedBeanPHP\Facade{};
$code = ' 0) {
- echo 'Done!' .PHP_EOL;
+ echo 'Done!' ,PHP_EOL;
} else {
- echo 'Hm, something seems to have gone wrong... '.PHP_EOL;
+ echo 'Hm, something seems to have gone wrong... ',PHP_EOL;
}
}
diff --git a/tests/vendor/gabordemooij/redbean/run_all_tests.sh b/tests/vendor/gabordemooij/redbean/run_all_tests.sh
new file mode 100755
index 00000000..242c8cf4
--- /dev/null
+++ b/tests/vendor/gabordemooij/redbean/run_all_tests.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+php replica2.php
+cp rb.php testing/cli/testcontainer/rb.php
+cd testing
+cd cli
+php runtests.php
diff --git a/tests/vendor/gabordemooij/redbean/run_single_test.sh b/tests/vendor/gabordemooij/redbean/run_single_test.sh
new file mode 100755
index 00000000..92015d4b
--- /dev/null
+++ b/tests/vendor/gabordemooij/redbean/run_single_test.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+if [ -z "$1" ]
+then
+ echo "Please enter the name of a test suite, example: Blackhole/Version"
+ exit
+fi
+php replica2.php
+cp rb.php testing/cli/testcontainer/rb.php
+cd testing
+cd cli
+php runtests.php $1
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT.php
index 5c50c4e8..d2ceadb4 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT.php
@@ -19,6 +19,11 @@
*/
abstract class RedUNIT
{
+ /**
+ * @var integer
+ */
+ protected $round;
+
/**
* @var string
*/
@@ -35,7 +40,7 @@ abstract public function getTargetDrivers();
public function prepare()
{
R::freeze( FALSE );
-
+
R::debug( FALSE );
R::nuke();
@@ -86,4 +91,34 @@ public function setCurrentDriver( $driver )
{
$this->currentlyActiveDriverID = $driver;
}
+
+ /**
+ * Sets the round number.
+ *
+ * @param integer $roundNumber round
+ */
+ public function setRound( $roundNumber )
+ {
+ $this->round = (int) $roundNumber;
+ }
+
+ /**
+ * Returns the current round number
+ *
+ * @return integer
+ */
+ public function getRound()
+ {
+ return $this->round;
+ }
+
+ /**
+ * Returns TRUE if the current round is the first round.
+ *
+ * @return boolean
+ */
+ public function isFirstRound()
+ {
+ return ( $this->round === 0 );
+ }
}
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Aliasing.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Aliasing.php
index bfb896e7..e497f7eb 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Aliasing.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Aliasing.php
@@ -252,7 +252,8 @@ public function testFetchTypeConfusionIssue291()
list( $teacher, $student ) = R::dispense( 'person', 2 ) ;
$teacher->name = 'jimmy' ;
$student->name = 'jacko' ;
- R::store( $teacher, $student ) ;
+ R::store( $teacher ) ;
+ R::store( $student ) ;
$client = R::dispense( 'client' ) ;
$client->firm = 'bean AG' ;
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Arrays.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Arrays.php
index 1ad65223..dbdb284b 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Arrays.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Arrays.php
@@ -1,4 +1,4 @@
-name = 'bean';
$bean->taste = 'salty';
@@ -38,7 +38,7 @@ public function testArrayAccess() {
asrt( isset( $properties['id'] ), TRUE );
asrt( isset( $properties['name'] ), TRUE );
asrt( isset( $properties['taste'] ), TRUE );
-
+
$bean = R::dispense('bean');
$bean['name'] = 'bean';
$bean['taste'] = 'salty';
@@ -52,30 +52,30 @@ public function testArrayAccess() {
asrt( isset( $properties['name'] ), TRUE );
asrt( isset( $properties['taste'] ), TRUE );
}
-
+
/**
* Tests array access with lists.
- *
+ *
* @return void
*/
public function testArrayAccessAndLists()
{
$book = R::dispense('book');
$book['title'] = 'My Book';
-
+
//Can we add a bean in list with array access?
$book['ownPage'][] = R::dispense('page');
$book['ownPage'][] = R::dispense('page');
-
+
asrt( count( $book ), 3 );
-
+
$properties = array();
foreach($book as $key => $value) {
$properties[ $key ] = $value;
}
-
+
asrt( count( $properties ), 3 );
-
+
//Dont reveal aliased x-own and -List in foreach-loop
asrt( isset( $properties['id'] ), TRUE );
asrt( isset( $properties['title'] ), TRUE );
@@ -83,13 +83,13 @@ public function testArrayAccessAndLists()
asrt( isset( $properties['ownPageList'] ), FALSE );
asrt( isset( $properties['xownPage'] ), FALSE );
asrt( isset( $properties['xownPageList'] ), FALSE );
-
+
//But keep them countable
asrt( count( $book['ownPage'] ), 2 );
asrt( count( $book['ownPageList'] ), 2 );
asrt( count( $book['xownPage'] ), 2 );
asrt( count( $book['xownPageList'] ), 2 );
-
+
//And reveal them with isset()
asrt( isset( $book['id'] ), TRUE );
asrt( isset( $book['title'] ), TRUE );
@@ -97,21 +97,21 @@ public function testArrayAccessAndLists()
asrt( isset( $book['ownPageList'] ), TRUE );
asrt( isset( $book['xownPage'] ), TRUE );
asrt( isset( $book['xownPageList'] ), TRUE );
-
+
//Can we add using the List alias?
$book['ownPageList'][] = R::dispense('page');
asrt( count( $book['ownPage'] ), 3 );
asrt( count( $book['ownPageList'] ), 3 );
asrt( count( $book['xownPage'] ), 3 );
asrt( count( $book['xownPageList'] ), 3 );
-
+
//Can we add using the x-mode alias?
$book['ownPageList'][] = R::dispense('page');
asrt( count( $book['ownPage'] ), 4 );
asrt( count( $book['ownPageList'] ), 4 );
asrt( count( $book['xownPage'] ), 4 );
asrt( count( $book['xownPageList'] ), 4 );
-
+
//Can we unset using array access?
unset( $book['ownPage'] );
asrt( isset( $book['ownPage'] ), FALSE );
@@ -136,39 +136,39 @@ public function testArrayAccessAndLists()
asrt( isset( $book['ownPageList'] ), FALSE );
asrt( isset( $book['xownPage'] ), FALSE );
asrt( isset( $book['xownPageList'] ), FALSE );
-
+
//does it work with shared lists as well?
$book['sharedCategory'] = array( R::dispense('category') );
asrt( count( $book ), 3 );
-
+
$properties = array();
foreach($book as $key => $value) {
$properties[ $key ] = $value;
}
-
+
asrt( isset( $properties['sharedCategory'] ), TRUE );
asrt( isset( $properties['sharedCategoryList'] ), FALSE );
-
+
asrt( isset( $book['sharedCategory'] ), TRUE );
asrt( isset( $book['sharedCategoryList'] ), TRUE );
-
+
asrt( count( $book['sharedCategory'] ), 1 );
asrt( count( $book['sharedCategoryList'] ), 1 );
-
+
$book['sharedCategory'][] = R::dispense( 'category' );
-
+
asrt( count( $book['sharedCategory'] ), 2 );
asrt( count( $book['sharedCategoryList'] ), 2 );
-
+
$book['sharedCategoryList'][] = R::dispense( 'category' );
-
+
asrt( count( $book['sharedCategory'] ), 3 );
asrt( count( $book['sharedCategoryList'] ), 3 );
}
-
+
/**
* Tests array access with parent beans.
- *
+ *
* @return void
*/
public function testArrayAccessWithBeans()
@@ -194,10 +194,10 @@ public function testArrayAccessWithBeans()
asrt( isset( $book['author'] ), FALSE );
asrt( count( $book ), 1 );
}
-
+
/**
* Tests array access with CRUD operations.
- *
+ *
* @return void
*/
public function testArrayAccessWithCRUD()
@@ -206,7 +206,7 @@ public function testArrayAccessWithCRUD()
$book = R::dispense( 'book' );
$book['ownPageList'] = R::dispense( 'page', 3 );
R::store( $book );
-
+
$book = $book->fresh();
//note that isset first returns false, so you can check if a list is loaded
asrt( isset( $book['ownPage'] ), FALSE );
@@ -225,10 +225,10 @@ public function testArrayAccessWithCRUD()
asrt( count( $book['ownPageList'] ), 3 );
$book = $book->fresh();
asrt( count( $book['xownPageList'] ), 3 );
-
+
$book['ownPage'][] = R::dispense( 'page' );
R::store( $book );
-
+
$book = $book->fresh();
asrt( count( $book['ownPage'] ), 4 );
$book = $book->fresh();
@@ -237,7 +237,7 @@ public function testArrayAccessWithCRUD()
asrt( count( $book['ownPageList'] ), 4 );
$book = $book->fresh();
asrt( count( $book['xownPageList'] ), 4 );
-
+
//does dependency still work?
$book['xownPageList'] = array();
R::store( $book );
@@ -249,11 +249,11 @@ public function testArrayAccessWithCRUD()
asrt( count( $book['ownPageList'] ), 0 );
$book = $book->fresh();
asrt( count( $book['xownPageList'] ), 0 );
-
+
//does shared list work as well?
$book['sharedTag'] = R::dispense( 'tag', 2 );
R::store( $book );
-
+
$book = $book->fresh();
//note that isset first returns false, so you can check if a list is loaded
asrt( isset( $book['sharedTagList'] ), FALSE );
@@ -263,18 +263,17 @@ public function testArrayAccessWithCRUD()
asrt( count( $book['sharedTag'] ), 2 );
asrt( isset( $book['sharedTagList'] ), TRUE );
asrt( isset( $book['sharedTag'] ), TRUE );
-
-
+
$book['sharedTag'][] = R::dispense( 'tag' );
R::store( $book );
-
+
$book = $book->fresh();
asrt( count( $book['sharedTagList'] ), 3 );
asrt( count( $book['sharedTag'] ), 3 );
-
+
$book['sharedTagList'][] = R::dispense( 'tag' );
R::store( $book );
-
+
$book = $book->fresh();
asrt( count( $book['sharedTagList'] ), 4 );
asrt( count( $book['sharedTag'] ), 4 );
@@ -288,16 +287,16 @@ public function testArrayAccessWithCRUD()
$first = reset( $book['sharedBookList'] );
$id = $first['id'];
asrt( count( $book['sharedBookList'][$id]['sharedBookList'] ), 1 );
-
+
$properties = array();
foreach($book as $key => $value) {
$properties[ $key ] = $value;
}
-
+
asrt( count( $properties ), 2 );
$keys = array_keys( $properties );
sort( $keys );
asrt( implode( ',', $keys ), 'id,sharedBook' );
}
-
+
}
\ No newline at end of file
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Association.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Association.php
index 98cc5836..9887ca2f 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Association.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Association.php
@@ -170,6 +170,14 @@ public function testOneToOne()
R::storeAll( array( $author, $bio ) );
+ $x = $author->one( 'bio' );
+ $y = $bio->one('author');
+
+ asrt( $x->name, $bio->name );
+ asrt( $y->name, $author->name );
+ asrt( $x->id, $bio->id );
+ asrt( $y->id, $author->id );
+
$id2 = $author->id;
list( $a, $b ) = R::loadMulti( 'author,bio', $id1 );
@@ -310,7 +318,6 @@ public function testMultiAssociationDissociation()
asrt( count( $wines[2]->sharedOlive ), 0 );
}
-
public function testErrorHandling()
{
R::nuke();
@@ -345,7 +352,6 @@ public function testErrorHandling()
fail();
}
-
}
}
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Bean.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Bean.php
index 4abfe699..1aff3715 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Bean.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Bean.php
@@ -53,7 +53,7 @@ public function testBeau()
asrt( isset( $columns['xownerCritic'] ), FALSE );
asrt( isset( $columns['sharedbyReader'] ), FALSE );
}
-
+
/**
* Other tests...
*/
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Boxing.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Boxing.php
index ff3ce37a..33b1dd90 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Boxing.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Boxing.php
@@ -72,4 +72,3 @@ public function testBoxing()
}
}
-
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Chill.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Chill.php
index 71db71d2..86524b27 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Chill.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Chill.php
@@ -99,7 +99,6 @@ public function testDontAddUniqueConstraintForChilledBeanTypes()
}
asrt(R::count('person_role'), 2);
-
R::nuke();
$link = R::getRedBean()->dispense('person_role');
$person = R::dispense( 'person' );
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Close.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Close.php
index 511f748b..573123ed 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Close.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Close.php
@@ -38,4 +38,3 @@ public function testClose()
}
}
-
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Count.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Count.php
index dad1d405..c914f599 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Count.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Count.php
@@ -50,7 +50,6 @@ public function testCountType()
}
}
-
/**
* Test count and wipe.
*
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Cross.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Cross.php
index b77559fd..d8f1fae3 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Cross.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Cross.php
@@ -461,7 +461,7 @@ public function testAggrBasic()
$text->content = 'CHANGED';
}
foreach( $texts as $text ) {
- asrt( $text->content, 'CHANGED', TRUE );
+ asrt( $text->content, 'CHANGED' );
}
}
@@ -504,7 +504,7 @@ public function testAggrWithOnlyAlias()
$text->content = 'CHANGED';
}
foreach( $texts as $text ) {
- asrt( $text->content, 'CHANGED', TRUE );
+ asrt( $text->content, 'CHANGED' );
}
}
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Cursors.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Cursors.php
index 3fcc0bf0..2168a475 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Cursors.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Cursors.php
@@ -61,7 +61,7 @@ public function testBasicCursors()
if ( $i > 5 ) break;
}
$key = array_rand( $list );
- $content = $list[ $key ];
+ $content = $list[ $key ];
$collection = R::findCollection( 'page', ' content = ? ', array( $content ) );
$bean = $collection->next();
asrt( $bean->content, $content );
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Database.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Database.php
index 15bd2e7c..60d0b4c8 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Database.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Database.php
@@ -161,7 +161,7 @@ public function testFetchTypes()
$expect = '{"1":"a","2":"c"}';
asrt( json_encode( R::getAssoc( 'SELECT id, a FROM page' ) ), $expect );
-
+
$expect = '{"1":{"a":"a","b":"b"},"2":{"a":"c","b":"d"}}';
asrt( json_encode( R::getAssoc( 'SELECT id, a, b FROM page' ) ), $expect );
@@ -391,4 +391,3 @@ public function exec( $sql, $aValues = array(), $noEvent = FALSE )
}
}
-
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Dispense.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Dispense.php
index 25c25652..62c270e8 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Dispense.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Dispense.php
@@ -70,7 +70,6 @@ public function testBasicsDispense()
asrt( isset( $bean["abc"] ), TRUE );
}
-
/**
* Tests the facade-only dispenseAll method.
*
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Dup.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Dup.php
index 73560153..d352b720 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Dup.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Dup.php
@@ -424,7 +424,7 @@ public function DupAndCache()
* }}'
*/
- $d->setTables( $cache, 1 );
+ $d->setTables( $cache );
ob_start();
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Finding.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Finding.php
index 48bbb121..a5d309fd 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Finding.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Finding.php
@@ -663,6 +663,10 @@ public function testFindOneLimitOne()
$logger->clear();
$found = R::findOne( 'book', ' title = ? LIMIT 1', array( 'b' ) );
asrt( count( $logger->grep('LIMIT 1') ), 1 );
+ $logger->clear();
+ $found = R::findOne( 'book', ' title = ? limit 1', array( 'b' ) );
+ asrt( count( $logger->grep('LIMIT 1') ), 0 );
+ asrt( count( $logger->grep('limit 1') ), 1 );
asrt( ( $found instanceof \RedBeanPHP\OODBBean ), TRUE );
$found = R::findOne( 'book', ' title = ? LIMIT 2', array( 'b' ) );
asrt( count( $logger->grep('LIMIT 2') ), 1 );
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Foreignkeys.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Foreignkeys.php
index 747bf3bf..19428da9 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Foreignkeys.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Foreignkeys.php
@@ -9,7 +9,6 @@
use RedBeanPHP\Adapter as Adapter;
use RedBeanPHP\QueryWriter\AQueryWriter as AQueryWriter;
-
/**
* Foreignkeys
*
@@ -229,7 +228,7 @@ public function testDependency()
* @return void
*/
public function testDependency2()
- {
+ {
$can = $this->createBeanInCan( TRUE );
asrt( R::count( 'bean' ), 1 );
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Fuse.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Fuse.php
index 0ced24c1..f8851795 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Fuse.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Fuse.php
@@ -158,7 +158,7 @@ public function testHooks()
asrt( $probe->getLogActionCount( 'after_delete' ), 0 );
asrt( ( $probe->getDataFromLog( 2, 'bean' ) === $probe ), TRUE );
}
-
+
/**
* Tests the SimpleFacadeBeanHelper factory setter.
*
@@ -336,7 +336,7 @@ public function testModelErrorHandling()
asrt( $old[1], NULL);
$test->nonExistantMethod(); //we cant really test this... :(
pass();
-
+
$old = R::setErrorHandlingFUSE( OODBBean::C_ERR_NOTICE );
asrt( is_array( $old ), TRUE );
asrt( count( $old ), 2 );
@@ -347,7 +347,7 @@ public function testModelErrorHandling()
}, E_USER_NOTICE);
$test->nonExistantMethod();
restore_error_handler();
-
+
$old = OODBBean::setErrorHandlingFUSE( OODBBean::C_ERR_WARN );
asrt( is_array( $old ), TRUE );
asrt( count( $old ), 2 );
@@ -358,7 +358,7 @@ public function testModelErrorHandling()
}, E_USER_WARNING);
$test->nonExistantMethod();
restore_error_handler();
-
+
$old = OODBBean::setErrorHandlingFUSE( OODBBean::C_ERR_FATAL );
asrt( is_array( $old ), TRUE );
asrt( count( $old ), 2 );
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Joins.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Joins.php
index eb13c3ba..2bb4f460 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Joins.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Joins.php
@@ -6,7 +6,6 @@
use RedBeanPHP\Facade as R;
use RedBeanPHP\OODBBean as OODBBean;
-
/**
* Joins
*
@@ -106,10 +105,10 @@ public function testJoins()
/**
* Helper for the next test.
- *
+ *
* @param array $books the books we are going to check
* @param string $numberList the numbers that are expected
- *
+ *
* @return void
*/
private function checkBookNumbers( $books, $numberList )
@@ -190,7 +189,7 @@ private function testComplexCombinationsJoins()
$books = $author->with(' ORDER BY @joined.category.title DESC, @joined.info.title ASC' )->ownBookList;
$this->checkBookNumbers( $books, '3,2,0,1' );
$books = $author->with(' ORDER BY @joined.category.title DESC, @joined.info.title ASC LIMIT 2' )->ownBookList;
- $this->checkBookNumbers( $books, '3,2' );
+ $this->checkBookNumbers( $books, '3,2' );
}
/**
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Keywords.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Keywords.php
index e343f000..9a5c6a1a 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Keywords.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Keywords.php
@@ -48,7 +48,6 @@ public function testKeywords()
'distinct', 'like'
);
-
foreach ( $keywords as $k ) {
R::nuke();
@@ -76,6 +75,5 @@ public function testKeywords()
pass();
}
-
}
}
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Largenum.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Largenum.php
index b7c0d87c..9a3cb4a8 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Largenum.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Largenum.php
@@ -22,7 +22,7 @@ class Largenum extends Base
/**
* Test for issue #386.
* Can we use large numbers in LIMIT ?
- *
+ *
* @return void
*/
public function testLargeNum()
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Logging.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Logging.php
index 29d80620..59090574 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Logging.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Logging.php
@@ -5,7 +5,7 @@
use RedUNIT\Base as Base;
use RedBeanPHP\Facade as R;
use RedBeanPHP\Logger as Logger;
-use RedBeanPHP\Logger\RDefault as RDefault;
+use RedBeanPHP\Logger\RDefault as RDefault;
/**
* Logging
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Misc.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Misc.php
index 16a3fbe7..95caed61 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Misc.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Misc.php
@@ -28,6 +28,37 @@
*/
class Misc extends Base
{
+ /**
+ * Test whether we can set the 'auto clear'
+ * option in OODB.
+ *
+ * @return void
+ */
+ public function testAutoClearHistory()
+ {
+ testpack( 'Auto clear history' );
+ $book = R::dispense( 'book' );
+ $book->pages = 100;
+ $book->title = 'book';
+ R::store( $book );
+ $book = R::findOne( 'book' );
+ asrt( $book->hasChanged( 'title' ), FALSE );
+ $book->title = 'yes';
+ R::store( $book );
+ asrt( $book->hasChanged( 'title' ), TRUE );
+ OODB::autoClearHistoryAfterStore( TRUE );
+ $book = R::findOne( 'book' );
+ asrt( $book->hasChanged( 'title' ), FALSE );
+ $book->title = 'yes2';
+ R::store( $book );
+ asrt( $book->hasChanged( 'title' ), FALSE );
+ OODB::autoClearHistoryAfterStore( FALSE );
+ $book = R::findOne( 'book' );
+ asrt( $book->hasChanged( 'title' ), FALSE );
+ $book->title = 'yes';
+ R::store( $book );
+ asrt( $book->hasChanged( 'title' ), TRUE );
+ }
/**
* Tests the R::inspect() method on the Facade.
@@ -584,7 +615,6 @@ public function testENUM() {
asrt( R::count( 'flavour' ), 4 );
}
-
/**
* Test trashAll().
*/
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Performance.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Performance.php
index 9492f390..58fa3324 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Performance.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Performance.php
@@ -1,16 +1,16 @@
-title = 'book';
@@ -55,16 +55,16 @@ public function setup()
$book->sharedTagList = $tags;
R::store( $book );
}
-
+
/**
* CRUD performance.
- *
+ *
* @return void
*/
public function crud()
{
R::freeze( TRUE );
-
+
$book = R::dispense( 'book' );
$book->title = 'Book';
$page = R::dispense('page');
@@ -87,18 +87,18 @@ public function crud()
$book->ownPage;
$book->sharedTag;
R::trash( $book );
-
+
}
-
+
/**
* CRUD performance Array Access.
- *
+ *
* @return void
*/
public function crudaa()
{
R::freeze( TRUE );
-
+
$book = R::dispense( 'book' );
$book['title'] = 'Book';
$page = R::dispense('page');
@@ -121,6 +121,6 @@ public function crudaa()
$book->ownPage;
$book->sharedTag;
R::trash( $book );
-
+
}
}
\ No newline at end of file
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Prefixes.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Prefixes.php
index c8ee53aa..d18edd6f 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Prefixes.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Prefixes.php
@@ -37,7 +37,7 @@ class Prefixes extends Base
* Test prerequisites.
*/
public function testPrerequisites()
- {
+ {
R::nuke();
$bean = R::xdispense( 'type_with_underscore' );
asrt( ( $bean instanceof OODBBean ), TRUE );
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Relations.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Relations.php
index 37529ab5..b5c7de38 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Relations.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Relations.php
@@ -981,12 +981,10 @@ public function testScenarios()
// Get books for topic
asrt( $topic3->countShared('book'), 2 );
-
$t3 = R::load( 'topic', $topic3->id );
asrt( count( $t3->sharedBook ), 2 );
-
// Nuke an own-array, replace entire array at once without getting first
$page2->id = 0;
$page2->title = 'yet another page 2';
@@ -1420,7 +1418,6 @@ public function testSharedListIntermediate()
$v2->name = 'Ville 2';
$v3->name = 'Ville 3';
-
$v1->link( 'armyVillage' )->army = $a3;
$v2->link( 'army_village' )->army = $a2;
$v3->link( 'armyVillage' )->army = $a1;
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Traverse.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Traverse.php
index 4c92e84c..fa3c5692 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Traverse.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Traverse.php
@@ -149,7 +149,6 @@ public function testTraversePaths()
asrt( implode( ',', $path ), 'e,f,h' );
-
$path = array();
$pageA->traverse( 'ownPageList', function( $page ) use ( &$path ) {
$path[] = $page->title;
@@ -226,7 +225,6 @@ public function testTraversalWithAlias()
} );
asrt( implode( ',', $cats ), 'SF,Fantasy' );
-
$catList = array();
$fantasy->alias( 'genre' )
->with( ' ORDER BY gname ASC ' )
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Update.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Update.php
index 0bdc8a59..faab8124 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Update.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Update.php
@@ -176,7 +176,6 @@ public function testUpdatingParentBeansWithAliases()
$account = R::load( 'user', $id );
asrt( count( $account->alias( 'seller' )->ownTransaction ), 10 );
-
$account->alias( 'seller' )->ownTransaction = array();
$id = R::store( $account );
@@ -507,7 +506,7 @@ public function testUpdatingBeans()
asrt( (int) $pdo->GetCell( "SELECT count(*) FROM page" ), 0 );
}
-
+
public function testEmptyStringShouldNotBeStoredAsInteger()
{
R::nuke();
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Via.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Via.php
index fdf7c1cd..319b3b2f 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Via.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Via.php
@@ -91,7 +91,6 @@ public function testIssue378()
$book->via('garbage')->item = 'test';
asrt( count( $book->sharedPageList ), 1 );
-
//yet another
$book = R::dispense('leaflet');
$book->title = 'leaflet';
@@ -189,7 +188,6 @@ public function testViaAndSQL()
R::storeAll(array( $p1, $p2 ));
-
$project = R::load('project', $x1->id);
$designers = $project
@@ -201,7 +199,6 @@ public function testViaAndSQL()
asrt(count($designers), 1);
asrt($anna->name, 'Anna');
-
$coders = $project
->withCondition(' participant.arole = ? ', array( 'coder' ) )
->via( 'participant' )
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/With.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/With.php
index d2f6f8fe..10817f1c 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/With.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Base/With.php
@@ -107,7 +107,6 @@ public function testNoLoad()
}
-
/**
* Test all().
*
@@ -466,7 +465,6 @@ public function testWhenToReload()
$book->ownPage[] = R::dispense( 'page' );
asrt( count( $book->ownPageList ), 4 );
-
//Do not reload an own list if told to not reload using noLoad()
$book->noLoad()->with(' LIMIT 1 ')->ownPage; //dont reload!
asrt( count( $book->xownPage ), 0); //dont reload!
@@ -529,7 +527,6 @@ public function testWhenToReload()
$book->sharedTag = R::dispense( 'tag', 16 );
asrt( count( $book->sharedTag ), 16 );
-
//Do not reload a sharedTag list if told to not reload using noLoad()
$book->noLoad()->with(' LIMIT 1 ')->sharedTag; //dont reload!
asrt( count( $book->sharedTag ), 0); //dont reload!
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Debug.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Debug.php
index b8d50eb3..19c13e36 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Debug.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Debug.php
@@ -118,7 +118,6 @@ public function testDebugger2()
$this->testDebug(':a,?', array(':a'=>20, 30), '20,30');
$this->testDebug(':a,?', array(30, ':a'=>20), '20,30');
-
$this->testDebug('?,?', array('test',20), '\'test\',20');
$this->testDebug('?', array( NULL ), 'NULL');
$this->testDebug('title = ?', array( NULL ), 'title = NULL');
@@ -129,7 +128,7 @@ public function testDebugger2()
$this->testDebug('?,?', array('hello'), '\'hello\',:slot1');
$this->testDebug('hello ?', 'world', 'hello ?');
-
+
$this->testDebug(':slot0 :slot1 :slot2 :slot3 :slot4 :slot5 :slot6 :slot7 :slot8 :slot9 :slot10', array(
'a','b','c','d','e','f','g','h','i','j','k'
),"'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k'");
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Fusebox.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Fusebox.php
index 522440a6..350ca444 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Fusebox.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Fusebox.php
@@ -69,4 +69,3 @@ private function giveMeBean( OODBBean $bean )
}
}
-
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Misc.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Misc.php
index 88dbbbb7..cac84133 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Misc.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Misc.php
@@ -256,7 +256,6 @@ public function testTransactionInFacade()
$bean->name = 'a';
-
try {
R::transaction( function () use ( $bean ) {
R::store( $bean );
@@ -336,7 +335,6 @@ public function testTransactionInFacade()
testpack( 'Misc Tests' );
-
R::debug( 1 );
flush();
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Toolbox.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Toolbox.php
index f749b37b..58719ddf 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Toolbox.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Toolbox.php
@@ -13,7 +13,7 @@
use RedBeanPHP\Repository as Repository;
use RedBeanPHP\Repository\Fluid as FluidRepo;
use RedBeanPHP\Repository\Frozen as FrozenRepo;
-
+use RedBeanPHP\RedException as RedException;
/**
* Toolbox
@@ -29,6 +29,22 @@
*/
class Toolbox extends Blackhole {
+ /**
+ * Github issue #458, selectDatabase causes PHP notice undefined index
+ * if database key not found.
+ *
+ * @return void
+ */
+ public function testInvalidDB()
+ {
+ try {
+ R::selectDatabase( 'idontexist' );
+ fail();
+ } catch ( RedException $exception ) {
+ pass();
+ }
+ }
+
/**
* Test whether we can obtain a toolbox properly.
*
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/CUBRID.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/CUBRID.php
index 469ec6f5..0338d791 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/CUBRID.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/CUBRID.php
@@ -1,5 +1,5 @@
-getWriter();
$redbean = $toolbox->getRedBean();
$pdo = $adapter->getDatabase();
-
+
$writer->createTable( "testtable" );
$writer->addColumn( "testtable", "special", CUBRID::C_DATATYPE_SPECIAL_DATE );
-
+
$cols = $writer->getColumns( "testtable" );
asrt( $writer->code( $cols['special'], TRUE ), CUBRID::C_DATATYPE_SPECIAL_DATE );
-
+
asrt( $writer->code( $cols['special'], FALSE ), CUBRID::C_DATATYPE_SPECIFIED );
-
+
$writer->addColumn( "testtable", "special2", CUBRID::C_DATATYPE_SPECIAL_DATETIME );
-
+
$cols = $writer->getColumns( "testtable" );
asrt( $writer->code( $cols['special2'], TRUE ), CUBRID::C_DATATYPE_SPECIAL_DATETIME );
-
+
asrt( $writer->code( $cols['special'], FALSE ), CUBRID::C_DATATYPE_SPECIFIED );
-
-
+
}
-
+
}
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Foreignkeys.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Foreignkeys.php
index 6a99d1ca..6ee4ae64 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Foreignkeys.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Foreignkeys.php
@@ -276,7 +276,6 @@ public function testAddingForeignKey()
//Now add non-dep key
R::nuke();
-
$sql = '
CREATE TABLE book (
id INT( 11 ) UNSIGNED NULL AUTO_INCREMENT,
@@ -363,7 +362,6 @@ public function testAddingIndex()
$writer->addIndex('song', 'index1', 'album_id');
-
$indexes = R::getAll( 'SHOW INDEX FROM song' );
asrt( count( $indexes ), 2 );
@@ -379,7 +377,6 @@ public function testAddingIndex()
asrt( count( $indexes ), 3 );
-
//Dont fail, just dont
try {
$writer->addIndex('song', 'index3', 'nonexistant');
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Issue411.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Issue411.php
index f6141a3c..cc93bb52 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Issue411.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Issue411.php
@@ -55,6 +55,3 @@ public function testInnoDBIndexLimit()
}
}
-
-
-
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Mix.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Mix.php
index 6495308f..102fefdc 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Mix.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Mix.php
@@ -145,6 +145,3 @@ public function testToString()
}
}
-
-
-
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Setget.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Setget.php
index 11c642e1..cbf2db08 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Setget.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Setget.php
@@ -48,6 +48,11 @@ public function testNumbers()
asrt( setget( "1.0" ), "1" );
asrt( setget( 1.0 ), "1" );
+ asrt( setget( "3.20" ), "3.20" );
+ asrt( setget( "13.20" ), "13.20" );
+ asrt( setget( "134.20" ), "134.20" );
+ asrt( setget( 3.21 ), '3.21' );
+
asrt( setget( "0.12345678" ), "0.12345678" );
asrt( setget( 0.12345678 ), "0.12345678" );
@@ -133,8 +138,8 @@ public function testNull()
asrt( setget( "NULL" ), "NULL" );
asrt( setget( "NULL" ), "NULL" );
- asrt( setget( "0123", 1 ), "0123" );
- asrt( setget( "0000123", 1 ), "0000123" );
+ asrt( setget( "0123" ), "0123" );
+ asrt( setget( "0000123" ), "0000123" );
asrt( setget( NULL ), NULL );
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Writer.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Writer.php
index b5c9e950..e1f2c82b 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Writer.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Writer.php
@@ -157,7 +157,7 @@ public function testScanningAndCoding()
asrt( $writer->scanType( FALSE ), MySQL::C_DATATYPE_BOOL );
asrt( $writer->scanType( TRUE ), MySQL::C_DATATYPE_BOOL );
asrt( $writer->scanType( INF ), MySQL::C_DATATYPE_TEXT7 );
-
+
asrt( $writer->scanType( NULL ), MySQL::C_DATATYPE_BOOL );
asrt( $writer->scanType( 2 ), MySQL::C_DATATYPE_UINT32 );
@@ -179,6 +179,10 @@ public function testScanningAndCoding()
asrt( $writer->scanType( "2001-10-10 10:00:00" ), MySQL::C_DATATYPE_TEXT7 );
+ asrt( $writer->scanType( "1.23", TRUE ), MySQL::C_DATATYPE_SPECIAL_MONEY );
+ asrt( $writer->scanType( "12.23", TRUE ), MySQL::C_DATATYPE_SPECIAL_MONEY );
+ asrt( $writer->scanType( "124.23", TRUE ), MySQL::C_DATATYPE_SPECIAL_MONEY );
+
asrt( $writer->scanType( str_repeat( "lorem ipsum", 100 ) ), MySQL::C_DATATYPE_TEXT16 );
$writer->widenColumn( "testtable", "c1", MySQL::C_DATATYPE_UINT32 );
@@ -544,6 +548,37 @@ public function testTypesDates()
asrt( $cols['date'], 'date' );
}
+ /**
+ * Test money types.
+ *
+ * @return void
+ */
+ public function testTypesMon()
+ {
+ $bean = R::dispense( 'bean' );
+
+ $bean->amount = '22.99';
+
+ R::store( $bean );
+
+ $cols = R::getColumns( 'bean' );
+
+ asrt( $cols['amount'], 'decimal(10,2)' );
+
+ R::nuke();
+
+ $bean = R::dispense( 'bean' );
+
+ $bean->amount = '-22.99';
+
+ R::store( $bean );
+
+ $cols = R::getColumns( 'bean' );
+
+ asrt( $cols['amount'], 'decimal(10,2)' );
+ }
+
+
/**
* Date-time
*
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres/Setget.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres/Setget.php
index a38b9665..25a485cc 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres/Setget.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres/Setget.php
@@ -35,6 +35,11 @@ public function testNumbers()
asrt( setget( "-0.25" ), "-0.25" );
asrt( setget( -0.25 ), "-0.25" );
+ asrt( setget( "3.20" ), "3.20" );
+ asrt( setget( "13.20" ), "13.20" );
+ asrt( setget( "134.20" ), "134.20" );
+ asrt( setget( 3.21 ), '3.21' );
+
asrt( setget( "0.12345678" ), "0.12345678" );
asrt( setget( 0.12345678 ), "0.12345678" );
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres/Uuid.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres/Uuid.php
index 85f415a6..0b7d82aa 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres/Uuid.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres/Uuid.php
@@ -171,7 +171,6 @@ public function testFullSupport()
$id = R::store( $mansion );
//exit;
-
asrt( is_string( $id ), TRUE );
asrt( strlen( $id ), 36 );
$haunted = R::load( 'mansion', $id );
diff --git a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres/Writer.php b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres/Writer.php
index 9d47cfed..fbc2ed1a 100644
--- a/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres/Writer.php
+++ b/tests/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres/Writer.php
@@ -500,6 +500,36 @@ public function testTypesWeirdPoints()
asrt( $bean->circle, '<(9.2,1.2),7.9>' );
}
+ /**
+ * Test money types.
+ *
+ * @return void
+ */
+ public function testTypesMon()
+ {
+ $bean = R::dispense( 'bean' );
+
+ $bean->amount = '22.99';
+
+ R::store( $bean );
+
+ $cols = R::getColumns( 'bean' );
+
+ asrt( $cols['amount'], 'numeric' );
+
+ R::nuke();
+
+ $bean = R::dispense( 'bean' );
+
+ $bean->amount = '-22.99';
+
+ R::store( $bean );
+
+ $cols = R::getColumns( 'bean' );
+
+ asrt( $cols['amount'], 'numeric' );
+ }
+
/**
* Test money data type.
*
diff --git a/tests/vendor/gabordemooij/redbean/testing/cli/plugins/myhooks.php b/tests/vendor/gabordemooij/redbean/testing/cli/plugins/myhooks.php
index 8bee3621..38699946 100644
--- a/tests/vendor/gabordemooij/redbean/testing/cli/plugins/myhooks.php
+++ b/tests/vendor/gabordemooij/redbean/testing/cli/plugins/myhooks.php
@@ -8,7 +8,7 @@
//Define extra test packages from the hook
$extraTestsFromHook = array(
'CUBRID/Setget',
- 'CUBRID/Writer'
+ 'CUBRID/Writer'
);
//Create a connection for this database
diff --git a/tests/vendor/gabordemooij/redbean/testing/cli/runperf.php b/tests/vendor/gabordemooij/redbean/testing/cli/runperf.php
index 5bb7d4e8..1d584d56 100644
--- a/tests/vendor/gabordemooij/redbean/testing/cli/runperf.php
+++ b/tests/vendor/gabordemooij/redbean/testing/cli/runperf.php
@@ -9,7 +9,6 @@
require 'RedUNIT/Base.php';
require 'RedUNIT/Base/Performance.php';
-
error_reporting( E_ALL );
//Load configuration file
@@ -19,7 +18,6 @@
die( 'Cant find configuration file.' );
}
-
//Configure the databases
if ( isset( $ini['mysql'] ) ) {
$dsn = "mysql:host={$ini['mysql']['host']};dbname={$ini['mysql']['schema']}";
@@ -52,34 +50,32 @@ function activate_driver( $d )
$drivers = $test->getTargetDrivers();
-
-
foreach ( $drivers as $driver ) {
-
+
if ( !isset( $ini[$driver] ) ) continue;
if ( !isset( $_SERVER['argv'][1])) die('Missing parameter. Usage: php runperf.php ');
-
+
$method = $_SERVER['argv'][1];
-
+
if ($method === 'setup') {
-
+
echo 'Setup...'.PHP_EOL;
-
+
$test->$method();
echo 'READY'.PHP_EOL;
-
+
} else {
-
+
$times = 100;
if (isset($_SERVER['argv'][2])) {
$times = (int) $_SERVER['argv'][2];
}
-
+
echo "Performing test: $method with driver $driver ".PHP_EOL;
for ($j=0; $j<$times; $j++) {
-
+
$t1 = microtime( TRUE );
$test->$method();
@@ -87,14 +83,14 @@ function activate_driver( $d )
$t2 = microtime( TRUE );
$d[] = ($t2 - $t1);
-
+
}
-
+
$s = array_sum($d);
$a = ($s / $times);
$mx = max($d);
$mn = min($d);
-
+
echo PHP_EOL."AVG: $a, MAX: $mx, MIN: $mn, TOTAL: $s, TIMES: $times ".PHP_EOL;
}
}
\ No newline at end of file
diff --git a/tests/vendor/gabordemooij/redbean/testing/cli/runtests.php b/tests/vendor/gabordemooij/redbean/testing/cli/runtests.php
index e48daff8..c754e3a5 100644
--- a/tests/vendor/gabordemooij/redbean/testing/cli/runtests.php
+++ b/tests/vendor/gabordemooij/redbean/testing/cli/runtests.php
@@ -2,7 +2,6 @@
chdir( '..' );
-
$xdebugSupported = (function_exists('xdebug_start_code_coverage'));
if ($xdebugSupported) xdebug_start_code_coverage( XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE );
@@ -26,7 +25,6 @@
echo 'Welcome to RedUNIT Unit testing framework for RedBeanPHP.'.PHP_EOL;
echo PHP_EOL;
-
/**
* Define some globals.
*/
@@ -44,7 +42,6 @@
require_once( 'RedUNIT/Postgres.php' );
require_once( 'RedUNIT/Sqlite.php' );
-
require_once( 'RedUNIT/Pretest.php' );
$extraTestsFromHook = array();
@@ -91,7 +88,6 @@ function activate_driver( $d )
R::selectDatabase( $d );
}
-
$arguments = $_SERVER['argc'];
$mode = 'all';
@@ -198,8 +194,6 @@ function activate_driver( $d )
'Base/Close'
);
-
-
// Default (mode == all)
if ( $mode == 'all' ) {
$packList = $allPacks;
@@ -237,6 +231,9 @@ function activate_driver( $d )
maintestpack( str_replace( '_', ' ', get_class( $test ) ) );
+ $round = 0;
+ $test->setRound( $round );
+
if ( $drivers && is_array( $drivers ) ) {
foreach ( $drivers as $driver ) {
if ( !isset( $ini[$driver] ) ) continue;
@@ -267,6 +264,7 @@ function activate_driver( $d )
}
echo PHP_EOL;
+ $test->setRound( ++$round );
}
} else {
@@ -276,7 +274,6 @@ function activate_driver( $d )
}
}
-
if (!$xdebugSupported) {
echo 'Done. No report - XDEBUG not installed.';
exit(0);
diff --git a/tests/vendor/gabordemooij/redbean/testing/cli/test_hook_example.php b/tests/vendor/gabordemooij/redbean/testing/cli/test_hook_example.php
index 892b7dd6..ab86d265 100644
--- a/tests/vendor/gabordemooij/redbean/testing/cli/test_hook_example.php
+++ b/tests/vendor/gabordemooij/redbean/testing/cli/test_hook_example.php
@@ -1,14 +1,14 @@
add 1 additional path which will be searched for unit tests
* $extraTestsFromHook -> array with additional test packs (will be executed if you pass 'all' argument to CLI runner)
- *
- *
+ *
+ *
*/
\ No newline at end of file
diff --git a/tests/vendor/gabordemooij/redbean/testing/helpers/classes.php b/tests/vendor/gabordemooij/redbean/testing/helpers/classes.php
index aedae9cb..d3a897b9 100644
--- a/tests/vendor/gabordemooij/redbean/testing/helpers/classes.php
+++ b/tests/vendor/gabordemooij/redbean/testing/helpers/classes.php
@@ -409,7 +409,6 @@ public function update()
}
}
-
/**
* Mock class to test proper model name
* beautificattion for link table beans in FUSE.
@@ -484,7 +483,6 @@ public function open() {
}
}
-
/**
* UUID QueryWriter for MySQL for testing purposes.
*/
@@ -576,9 +574,9 @@ public function getModFlags()
class DiagnosticModel extends \RedBeanPHP\SimpleModel
{
-
+
private $logs = array();
-
+
public function open()
{
$this->logs[] = array(
@@ -638,12 +636,12 @@ public function after_delete()
)
);
}
-
+
public function getLogs()
{
return $this->logs;
}
-
+
public function getLogActionCount( $action = NULL )
{
if ( is_null( $action ) ) return count( $this->logs );
@@ -653,21 +651,19 @@ public function getLogActionCount( $action = NULL )
}
return $counter;
}
-
+
public function clearLog()
{
return $this->logs = array();
}
-
+
public function getDataFromLog( $logIndex = 0, $property )
{
return $this->logs[$logIndex]['data'][$property];
}
-
-
+
}
class Model_Probe extends DiagnosticModel {};
-
define('REDBEAN_OODBBEAN_CLASS', '\DiagnosticBean');
diff --git a/tests/vendor/gabordemooij/redbean/testing/helpers/functions.php b/tests/vendor/gabordemooij/redbean/testing/helpers/functions.php
index 69c7f53b..cdde31e7 100644
--- a/tests/vendor/gabordemooij/redbean/testing/helpers/functions.php
+++ b/tests/vendor/gabordemooij/redbean/testing/helpers/functions.php
@@ -4,9 +4,9 @@
* Convenience function for test hook.
* If you added the proper Writer class, the facade should be able
* to automatically load it, i.e. \RedBeanPHP\QueryWriter\MyWriter
- *
+ *
* @global array $ini
- *
+ *
* @param string $name name of the connection (key)
* @param string $dsn DSN to connect
* @param string $user username
@@ -16,7 +16,7 @@ function add_writer_to_tests( $name, $dsn, $user, $pass )
{
global $ini;
-
+
\RedUNIT\Base::addToDriverList( $name );
R::addDatabase( $name, $dsn, $user, $pass );
@@ -400,7 +400,6 @@ function getIndexes( $tableNoQ )
return array();
}
-
function are_cols_in_unique( $type, $properties )
{
sort( $properties );
@@ -414,7 +413,6 @@ function are_cols_in_unique( $type, $properties )
return FALSE;
}
-
function get_uniques_for_type( $type )
{
$list = array();
diff --git a/tests/vendor/myclabs/deep-copy/.gitattributes b/tests/vendor/myclabs/deep-copy/.gitattributes
deleted file mode 100755
index 8018068b..00000000
--- a/tests/vendor/myclabs/deep-copy/.gitattributes
+++ /dev/null
@@ -1,7 +0,0 @@
-# Auto detect text files and perform LF normalization
-* text=auto
-
-*.png binary
-
-tests/ export-ignore
-phpunit.xml.dist export-ignore
diff --git a/tests/vendor/myclabs/deep-copy/.gitignore b/tests/vendor/myclabs/deep-copy/.gitignore
deleted file mode 100755
index 93541710..00000000
--- a/tests/vendor/myclabs/deep-copy/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.DS_Store
-.idea/*
-
-vendor/*
-composer.phar
-composer.lock
diff --git a/tests/vendor/myclabs/deep-copy/.travis.yml b/tests/vendor/myclabs/deep-copy/.travis.yml
deleted file mode 100755
index 4b9c7c05..00000000
--- a/tests/vendor/myclabs/deep-copy/.travis.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-language: php
-
-php:
- - 5.4
- - 5.5
- - 5.6
- - hhvm
-
-matrix:
- allow_failures:
- - php: hhvm
-
-install:
- - composer install
- - composer require satooshi/php-coveralls:dev-master --dev --no-progress
-
-before_script:
- - mkdir -p build/logs
-
-script:
- - phpunit --coverage-clover build/logs/clover.xml
-
-after_script:
- - php vendor/bin/coveralls -v
diff --git a/tests/vendor/myclabs/deep-copy/LICENSE b/tests/vendor/myclabs/deep-copy/LICENSE
deleted file mode 100644
index c3e83500..00000000
--- a/tests/vendor/myclabs/deep-copy/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2013 My C-Sense
-
-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/tests/vendor/myclabs/deep-copy/README.md b/tests/vendor/myclabs/deep-copy/README.md
deleted file mode 100644
index a9d70f6b..00000000
--- a/tests/vendor/myclabs/deep-copy/README.md
+++ /dev/null
@@ -1,209 +0,0 @@
-# DeepCopy
-
-DeepCopy helps you create deep copies (clones) of your objects. It is designed to handle cycles in the association graph.
-
-[](https://travis-ci.org/myclabs/DeepCopy) [](https://coveralls.io/r/myclabs/DeepCopy?branch=master) [](https://scrutinizer-ci.com/g/myclabs/DeepCopy/)
-[](https://packagist.org/packages/myclabs/deep-copy)
-
-
-## How?
-
-Install with Composer:
-
-```json
-composer require myclabs/deep-copy
-```
-
-Use simply:
-
-```php
-use DeepCopy\DeepCopy;
-
-$deepCopy = new DeepCopy();
-$myCopy = $deepCopy->copy($myObject);
-```
-
-
-## Why?
-
-- How do you create copies of your objects?
-
-```php
-$myCopy = clone $myObject;
-```
-
-- How do you create **deep** copies of your objects (i.e. copying also all the objects referenced in the properties)?
-
-You use [`__clone()`](http://www.php.net/manual/en/language.oop5.cloning.php#object.clone) and implement the behavior yourself.
-
-- But how do you handle **cycles** in the association graph?
-
-Now you're in for a big mess :(
-
-
-
-### Using simply `clone`
-
-
-
-### Overridding `__clone()`
-
-
-
-### With DeepCopy
-
-
-
-
-## How it works
-
-DeepCopy traverses recursively all your object's properties and clones them.
-
-To avoid cloning the same object twice (and thus, keep you object graph), it keeps a hash-map of all instances.
-
-
-## Going further
-
-You can add filters to customize the copy process.
-
-The method to add a filter is `$deepCopy->addFilter($filter, $matcher)`,
-with `$filter` implementing `DeepCopy\Filter\Filter`
-and `$matcher` implementing `DeepCopy\Matcher\Matcher`.
-
-We provide some generic filters and matchers.
-
-### Matchers
-
-#### Property name
-
-The `PropertyNameMatcher` will match a property by its name:
-
-```php
-use DeepCopy\Matcher\PropertyNameMatcher;
-
-$matcher = new PropertyNameMatcher('id');
-// will apply a filter to any property of any objects named "id"
-```
-
-#### Specific property
-
-The `PropertyMatcher` will match a specific property of a specific class:
-
-```php
-use DeepCopy\Matcher\PropertyMatcher;
-
-$matcher = new PropertyMatcher('MyClass', 'id');
-// will apply a filter to the property "id" of any objects of the class "MyClass"
-```
-
-#### Property type
-
-The `PropertyTypeMatcher` will match a property by its type (instance of a class):
-
-```php
-use DeepCopy\Matcher\PropertyTypeMatcher;
-
-$matcher = new PropertyTypeMatcher('Doctrine\Common\Collections\Collection');
-// will apply a filter to any property that is an instance of Doctrine\Common\Collections\Collection
-```
-
-### Filters
-
-#### `SetNullFilter`
-
-Let's say for example that you are copying a database record (or a Doctrine entity), so you want the copy not to have any ID:
-
-```php
-use DeepCopy\DeepCopy;
-use DeepCopy\Filter\SetNullFilter;
-use DeepCopy\Matcher\PropertyNameMatcher;
-
-$myObject = MyClass::load(123);
-echo $myObject->id; // 123
-
-$deepCopy = new DeepCopy();
-$deepCopy->addFilter(new SetNullFilter(), new PropertyNameMatcher('id'));
-$myCopy = $deepCopy->copy($myObject);
-
-echo $myCopy->id; // null
-```
-
-#### `KeepFilter`
-
-If you want a property to remain untouched (for example, an association to an object):
-
-```php
-use DeepCopy\DeepCopy;
-use DeepCopy\Filter\KeepFilter;
-use DeepCopy\Matcher\PropertyMatcher;
-
-$deepCopy = new DeepCopy();
-$deepCopy->addFilter(new KeepFilter(), new PropertyMatcher('MyClass', 'category'));
-$myCopy = $deepCopy->copy($myObject);
-
-// $myCopy->category has not been touched
-```
-
-#### `ReplaceFilter`
-
-If you want to replace the value of a property:
-
-```php
-use DeepCopy\DeepCopy;
-use DeepCopy\Filter\ReplaceFilter;
-use DeepCopy\Matcher\PropertyMatcher;
-
-$deepCopy = new DeepCopy();
-$callback = function ($currentValue) {
- return $currentValue . ' (copy)'
-};
-$deepCopy->addFilter(new ReplaceFilter($callback), new PropertyMatcher('MyClass', 'title'));
-$myCopy = $deepCopy->copy($myObject);
-
-// $myCopy->title will contain the data returned by the callback, e.g. 'The title (copy)'
-```
-
-The `$callback` parameter of the `ReplaceFilter` constructor accepts any PHP callable.
-
-
-#### `DoctrineCollectionFilter`
-
-If you use Doctrine and want to copy an entity, you will need to use the `DoctrineCollectionFilter`:
-
-```php
-use DeepCopy\DeepCopy;
-use DeepCopy\Filter\Doctrine\DoctrineCollectionFilter;
-use DeepCopy\Matcher\PropertyTypeMatcher;
-
-$deepCopy = new DeepCopy();
-$deepCopy->addFilter(new DoctrineCollectionFilter(), new PropertyTypeMatcher('Doctrine\Common\Collections\Collection'));
-$myCopy = $deepCopy->copy($myObject);
-```
-
-#### `DoctrineEmptyCollectionFilter`
-
-If you use Doctrine and want to copy an entity who contains a `Collection` that you want to be reset, you can use the `DoctrineEmptyCollectionFilter`
-
-```php
-use DeepCopy\DeepCopy;
-use DeepCopy\Filter\Doctrine\DoctrineEmptyCollectionFilter;
-use DeepCopy\Matcher\PropertyMatcher;
-
-$deepCopy = new DeepCopy();
-$deepCopy->addFilter(new DoctrineEmptyCollectionFilter(), new PropertyMatcher('MyClass', 'myProperty'));
-$myCopy = $deepCopy->copy($myObject);
-
-// $myCopy->myProperty will return an empty collection
-```
-
-## Contributing
-
-DeepCopy is distributed under the MIT license.
-
-### Tests
-
-Running the tests is simple:
-
-```php
-phpunit
-```
diff --git a/tests/vendor/myclabs/deep-copy/composer.json b/tests/vendor/myclabs/deep-copy/composer.json
deleted file mode 100644
index d20287ab..00000000
--- a/tests/vendor/myclabs/deep-copy/composer.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "name": "myclabs/deep-copy",
- "type": "library",
- "description": "Create deep copies (clones) of your objects",
- "keywords": ["clone", "copy", "duplicate", "object", "object graph"],
- "homepage": "https://github.com/myclabs/DeepCopy",
- "license": "MIT",
- "autoload": {
- "psr-4": { "DeepCopy\\": "src/DeepCopy/" }
- },
- "autoload-dev": {
- "psr-4": { "DeepCopyTest\\": "tests/DeepCopyTest/" }
- },
- "require": {
- "php": ">=5.4.0"
- },
- "require-dev": {
- "doctrine/collections": "1.*",
- "phpunit/phpunit": "~4.1"
- }
-}
diff --git a/tests/vendor/myclabs/deep-copy/doc/clone.png b/tests/vendor/myclabs/deep-copy/doc/clone.png
deleted file mode 100644
index 376afd49..00000000
Binary files a/tests/vendor/myclabs/deep-copy/doc/clone.png and /dev/null differ
diff --git a/tests/vendor/myclabs/deep-copy/doc/deep-clone.png b/tests/vendor/myclabs/deep-copy/doc/deep-clone.png
deleted file mode 100644
index 2b37a6d7..00000000
Binary files a/tests/vendor/myclabs/deep-copy/doc/deep-clone.png and /dev/null differ
diff --git a/tests/vendor/myclabs/deep-copy/doc/deep-copy.png b/tests/vendor/myclabs/deep-copy/doc/deep-copy.png
deleted file mode 100644
index 68c508ae..00000000
Binary files a/tests/vendor/myclabs/deep-copy/doc/deep-copy.png and /dev/null differ
diff --git a/tests/vendor/myclabs/deep-copy/doc/graph.png b/tests/vendor/myclabs/deep-copy/doc/graph.png
deleted file mode 100644
index 4d5c9428..00000000
Binary files a/tests/vendor/myclabs/deep-copy/doc/graph.png and /dev/null differ
diff --git a/tests/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php b/tests/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php
deleted file mode 100644
index 1330b9e0..00000000
--- a/tests/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php
+++ /dev/null
@@ -1,162 +0,0 @@
-skipUncloneable = $skipUncloneable;
- return $this;
- }
-
- /**
- * Perform a deep copy of the object.
- * @param object $object
- * @return object
- */
- public function copy($object)
- {
- $this->hashMap = [];
-
- return $this->recursiveCopy($object);
- }
-
- public function addFilter(Filter $filter, Matcher $matcher)
- {
- $this->filters[] = [
- 'matcher' => $matcher,
- 'filter' => $filter,
- ];
- }
-
- private function recursiveCopy($var)
- {
- // Resource
- if (is_resource($var)) {
- return $var;
- }
- // Array
- if (is_array($var)) {
- return $this->copyArray($var);
- }
- // Scalar
- if (! is_object($var)) {
- return $var;
- }
- // Object
- return $this->copyObject($var);
- }
-
- /**
- * Copy an array
- * @param array $array
- * @return array
- */
- private function copyArray(array $array)
- {
- $copier = function($item) {
- return $this->recursiveCopy($item);
- };
-
- return array_map($copier, $array);
- }
-
- /**
- * Copy an object
- * @param object $object
- * @return object
- */
- private function copyObject($object)
- {
- $objectHash = spl_object_hash($object);
-
- if (isset($this->hashMap[$objectHash])) {
- return $this->hashMap[$objectHash];
- }
-
- $reflectedObject = new \ReflectionObject($object);
-
- if (false === $isCloneable = $reflectedObject->isCloneable() and $this->skipUncloneable) {
- $this->hashMap[$objectHash] = $object;
- return $object;
- }
-
- if (false === $isCloneable) {
- throw new CloneException(sprintf(
- 'Class "%s" is not cloneable.',
- $object->getName()
- ));
- }
-
- $newObject = clone $object;
- $this->hashMap[$objectHash] = $newObject;
-
- foreach (ReflectionHelper::getProperties($reflectedObject) as $property) {
- $this->copyObjectProperty($newObject, $property);
- }
-
- return $newObject;
- }
-
- private function copyObjectProperty($object, ReflectionProperty $property)
- {
- // Ignore static properties
- if ($property->isStatic()) {
- return;
- }
-
- // Apply the filters
- foreach ($this->filters as $item) {
- /** @var Matcher $matcher */
- $matcher = $item['matcher'];
- /** @var Filter $filter */
- $filter = $item['filter'];
-
- if ($matcher->matches($object, $property->getName())) {
- $filter->apply(
- $object,
- $property->getName(),
- function ($object) {
- return $this->recursiveCopy($object);
- }
- );
- // If a filter matches, we stop processing this property
- return;
- }
- }
-
- $property->setAccessible(true);
- $propertyValue = $property->getValue($object);
-
- // Copy the property
- $property->setValue($object, $this->recursiveCopy($propertyValue));
- }
-}
diff --git a/tests/vendor/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php b/tests/vendor/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php
deleted file mode 100644
index dd3b617b..00000000
--- a/tests/vendor/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php
+++ /dev/null
@@ -1,6 +0,0 @@
-setAccessible(true);
- $oldCollection = $reflectionProperty->getValue($object);
-
- $newCollection = $oldCollection->map(
- function ($item) use ($objectCopier) {
- return $objectCopier($item);
- }
- );
-
- $reflectionProperty->setValue($object, $newCollection);
- }
-}
diff --git a/tests/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php b/tests/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php
deleted file mode 100644
index f9b3f7ac..00000000
--- a/tests/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php
+++ /dev/null
@@ -1,24 +0,0 @@
-setAccessible(true);
-
- $reflectionProperty->setValue($object, new ArrayCollection());
- }
-}
\ No newline at end of file
diff --git a/tests/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php b/tests/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php
deleted file mode 100644
index 48076a1b..00000000
--- a/tests/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php
+++ /dev/null
@@ -1,17 +0,0 @@
-callback = $callable;
- }
-
- /**
- * {@inheritdoc}
- */
- public function apply($object, $property, $objectCopier)
- {
- $reflectionProperty = new \ReflectionProperty($object, $property);
- $reflectionProperty->setAccessible(true);
-
- $value = call_user_func($this->callback, $reflectionProperty->getValue($object));
-
- $reflectionProperty->setValue($object, $value);
- }
-}
diff --git a/tests/vendor/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php b/tests/vendor/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php
deleted file mode 100644
index d48f15b6..00000000
--- a/tests/vendor/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php
+++ /dev/null
@@ -1,22 +0,0 @@
-setAccessible(true);
- $reflectionProperty->setValue($object, null);
- }
-}
diff --git a/tests/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Matcher.php b/tests/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Matcher.php
deleted file mode 100644
index 91eb7c90..00000000
--- a/tests/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Matcher.php
+++ /dev/null
@@ -1,16 +0,0 @@
-class = $class;
- $this->property = $property;
- }
-
- /**
- * {@inheritdoc}
- */
- public function matches($object, $property)
- {
- return ($object instanceof $this->class) && ($property == $this->property);
- }
-}
diff --git a/tests/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php b/tests/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php
deleted file mode 100644
index 9d9575f0..00000000
--- a/tests/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php
+++ /dev/null
@@ -1,30 +0,0 @@
-property = $property;
- }
-
- /**
- * {@inheritdoc}
- */
- public function matches($object, $property)
- {
- return $property == $this->property;
- }
-}
diff --git a/tests/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php b/tests/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php
deleted file mode 100644
index 12bb279a..00000000
--- a/tests/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php
+++ /dev/null
@@ -1,35 +0,0 @@
-propertyType = $propertyType;
- }
-
- /**
- * {@inheritdoc}
- */
- public function matches($object, $property)
- {
- $reflectionProperty = new ReflectionProperty($object, $property);
- $reflectionProperty->setAccessible(true);
-
- return $reflectionProperty->getValue($object) instanceof $this->propertyType;
- }
-}
diff --git a/tests/vendor/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php b/tests/vendor/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php
deleted file mode 100644
index 110acaf8..00000000
--- a/tests/vendor/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php
+++ /dev/null
@@ -1,36 +0,0 @@
-getProperties() does not return private properties from ancestor classes.
- *
- * @author muratyaman@gmail.com
- * @see http://php.net/manual/en/reflectionclass.getproperties.php
- *
- * @param \ReflectionClass $ref
- * @return \ReflectionProperty[]
- */
- public static function getProperties(\ReflectionClass $ref)
- {
- $props = $ref->getProperties();
- $propsArr = array();
-
- foreach ($props as $prop) {
- $f = $prop->getName();
- $propsArr[$f] = $prop;
- }
-
- if ($parentClass = $ref->getParentClass()) {
- $parentPropsArr = self::getProperties($parentClass);
- if (count($parentPropsArr) > 0) {
- $propsArr = array_merge($parentPropsArr, $propsArr);
- }
- }
- return $propsArr;
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/.gitignore b/tests/vendor/phpdocumentor/reflection-docblock/.gitignore
deleted file mode 100644
index 3ce5adbb..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-.idea
-vendor
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/.travis.yml b/tests/vendor/phpdocumentor/reflection-docblock/.travis.yml
deleted file mode 100644
index eef782c4..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/.travis.yml
+++ /dev/null
@@ -1,32 +0,0 @@
-language: php
-php:
- - 5.3.3
- - 5.3
- - 5.4
- - 5.5
- - 5.6
- - hhvm
- - hhvm-nightly
-
-matrix:
- allow_failures:
- - php: hhvm
- - php: hhvm-nightly
-
-script:
- - vendor/bin/phpunit
-
-before_script:
- - sudo apt-get -qq update > /dev/null
- - phpenv rehash > /dev/null
- - composer selfupdate --quiet
- - composer install --no-interaction --prefer-source --dev
- - vendor/bin/phpunit
- - composer update --no-interaction --prefer-source --dev
-
-notifications:
- irc: "irc.freenode.org#phpdocumentor"
- email:
- - mike.vanriel@naenius.com
- - ashnazg@php.net
- - boen.robot@gmail.com
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/LICENSE b/tests/vendor/phpdocumentor/reflection-docblock/LICENSE
deleted file mode 100644
index 792e4040..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2010 Mike van Riel
-
-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/tests/vendor/phpdocumentor/reflection-docblock/README.md b/tests/vendor/phpdocumentor/reflection-docblock/README.md
deleted file mode 100644
index 6405d1a1..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/README.md
+++ /dev/null
@@ -1,57 +0,0 @@
-The ReflectionDocBlock Component [](https://travis-ci.org/phpDocumentor/ReflectionDocBlock)
-================================
-
-Introduction
-------------
-
-The ReflectionDocBlock component of phpDocumentor provides a DocBlock parser
-that is 100% compatible with the [PHPDoc standard](http://phpdoc.org/docs/latest).
-
-With this component, a library can provide support for annotations via DocBlocks
-or otherwise retrieve information that is embedded in a DocBlock.
-
-> **Note**: *this is a core component of phpDocumentor and is constantly being
-> optimized for performance.*
-
-Installation
-------------
-
-You can install the component in the following ways:
-
-* Use the official Github repository (https://github.com/phpDocumentor/ReflectionDocBlock)
-* Via Composer (http://packagist.org/packages/phpdocumentor/reflection-docblock)
-
-Usage
------
-
-The ReflectionDocBlock component is designed to work in an identical fashion to
-PHP's own Reflection extension (http://php.net/manual/en/book.reflection.php).
-
-Parsing can be initiated by instantiating the
-`\phpDocumentor\Reflection\DocBlock()` class and passing it a string containing
-a DocBlock (including asterisks) or by passing an object supporting the
-`getDocComment()` method.
-
-> *Examples of objects having the `getDocComment()` method are the
-> `ReflectionClass` and the `ReflectionMethod` classes of the PHP
-> Reflection extension*
-
-Example:
-
- $class = new ReflectionClass('MyClass');
- $phpdoc = new \phpDocumentor\Reflection\DocBlock($class);
-
-or
-
- $docblock = <<=5.3.3"
- },
- "autoload": {
- "psr-0": {"phpDocumentor": ["src/"]}
- },
- "require-dev": {
- "phpunit/phpunit": "~4.0"
- },
- "suggest": {
- "dflydev/markdown": "~1.0",
- "erusev/parsedown": "~1.0"
- },
- "extra": {
- "branch-alias": {
- "dev-master": "2.0.x-dev"
- }
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/composer.lock b/tests/vendor/phpdocumentor/reflection-docblock/composer.lock
deleted file mode 100644
index 4c6a8bb7..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/composer.lock
+++ /dev/null
@@ -1,827 +0,0 @@
-{
- "_readme": [
- "This file locks the dependencies of your project to a known state",
- "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
- "This file is @generated automatically"
- ],
- "hash": "ea1734d11b8c878445c2c6e58de8b85f",
- "packages": [],
- "packages-dev": [
- {
- "name": "ocramius/instantiator",
- "version": "1.1.2",
- "source": {
- "type": "git",
- "url": "https://github.com/Ocramius/Instantiator.git",
- "reference": "a7abbb5fc9df6e7126af741dd6c140d1a7369435"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/Ocramius/Instantiator/zipball/a7abbb5fc9df6e7126af741dd6c140d1a7369435",
- "reference": "a7abbb5fc9df6e7126af741dd6c140d1a7369435",
- "shasum": ""
- },
- "require": {
- "ocramius/lazy-map": "1.0.*",
- "php": "~5.3"
- },
- "require-dev": {
- "athletic/athletic": "~0.1.8",
- "ext-pdo": "*",
- "ext-phar": "*",
- "phpunit/phpunit": "~4.0",
- "squizlabs/php_codesniffer": "2.0.*@ALPHA"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.0.x-dev"
- }
- },
- "autoload": {
- "psr-0": {
- "Instantiator\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Marco Pivetta",
- "email": "ocramius@gmail.com",
- "homepage": "http://ocramius.github.com/"
- }
- ],
- "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
- "homepage": "https://github.com/Ocramius/Instantiator",
- "keywords": [
- "constructor",
- "instantiate"
- ],
- "time": "2014-08-14 15:10:55"
- },
- {
- "name": "ocramius/lazy-map",
- "version": "1.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/Ocramius/LazyMap.git",
- "reference": "7fe3d347f5e618bcea7d39345ff83f3651d8b752"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/Ocramius/LazyMap/zipball/7fe3d347f5e618bcea7d39345ff83f3651d8b752",
- "reference": "7fe3d347f5e618bcea7d39345ff83f3651d8b752",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3"
- },
- "require-dev": {
- "athletic/athletic": "~0.1.6",
- "phpmd/phpmd": "1.5.*",
- "phpunit/phpunit": ">=3.7",
- "satooshi/php-coveralls": "~0.6",
- "squizlabs/php_codesniffer": "1.4.*"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
- "autoload": {
- "psr-0": {
- "LazyMap\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Marco Pivetta",
- "email": "ocramius@gmail.com",
- "homepage": "http://ocramius.github.com/",
- "role": "Developer"
- }
- ],
- "description": "A library that provides lazy instantiation logic for a map of objects",
- "homepage": "https://github.com/Ocramius/LazyMap",
- "keywords": [
- "lazy",
- "lazy instantiation",
- "lazy loading",
- "map",
- "service location"
- ],
- "time": "2013-11-09 22:30:54"
- },
- {
- "name": "phpunit/php-code-coverage",
- "version": "2.0.10",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "6d196af48e8c100a3ae881940123e693da5a9217"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6d196af48e8c100a3ae881940123e693da5a9217",
- "reference": "6d196af48e8c100a3ae881940123e693da5a9217",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3",
- "phpunit/php-file-iterator": "~1.3.1",
- "phpunit/php-text-template": "~1.2.0",
- "phpunit/php-token-stream": "~1.2.2",
- "sebastian/environment": "~1.0.0",
- "sebastian/version": "~1.0.3"
- },
- "require-dev": {
- "ext-xdebug": ">=2.1.4",
- "phpunit/phpunit": "~4.0.14"
- },
- "suggest": {
- "ext-dom": "*",
- "ext-xdebug": ">=2.2.1",
- "ext-xmlwriter": "*"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.0.x-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "include-path": [
- ""
- ],
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
- "role": "lead"
- }
- ],
- "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
- "homepage": "https://github.com/sebastianbergmann/php-code-coverage",
- "keywords": [
- "coverage",
- "testing",
- "xunit"
- ],
- "time": "2014-08-06 06:39:42"
- },
- {
- "name": "phpunit/php-file-iterator",
- "version": "1.3.4",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
- "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/acd690379117b042d1c8af1fafd61bde001bf6bb",
- "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3"
- },
- "type": "library",
- "autoload": {
- "classmap": [
- "File/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "include-path": [
- ""
- ],
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
- "role": "lead"
- }
- ],
- "description": "FilterIterator implementation that filters files based on a list of suffixes.",
- "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
- "keywords": [
- "filesystem",
- "iterator"
- ],
- "time": "2013-10-10 15:34:57"
- },
- {
- "name": "phpunit/php-text-template",
- "version": "1.2.0",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/php-text-template.git",
- "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/206dfefc0ffe9cebf65c413e3d0e809c82fbf00a",
- "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3"
- },
- "type": "library",
- "autoload": {
- "classmap": [
- "Text/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "include-path": [
- ""
- ],
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
- "role": "lead"
- }
- ],
- "description": "Simple template engine.",
- "homepage": "https://github.com/sebastianbergmann/php-text-template/",
- "keywords": [
- "template"
- ],
- "time": "2014-01-30 17:20:04"
- },
- {
- "name": "phpunit/php-timer",
- "version": "1.0.5",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/php-timer.git",
- "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/19689d4354b295ee3d8c54b4f42c3efb69cbc17c",
- "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3"
- },
- "type": "library",
- "autoload": {
- "classmap": [
- "PHP/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "include-path": [
- ""
- ],
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
- "role": "lead"
- }
- ],
- "description": "Utility class for timing",
- "homepage": "https://github.com/sebastianbergmann/php-timer/",
- "keywords": [
- "timer"
- ],
- "time": "2013-08-02 07:42:54"
- },
- {
- "name": "phpunit/php-token-stream",
- "version": "1.2.2",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/php-token-stream.git",
- "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/ad4e1e23ae01b483c16f600ff1bebec184588e32",
- "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32",
- "shasum": ""
- },
- "require": {
- "ext-tokenizer": "*",
- "php": ">=5.3.3"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.2-dev"
- }
- },
- "autoload": {
- "classmap": [
- "PHP/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "include-path": [
- ""
- ],
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
- "role": "lead"
- }
- ],
- "description": "Wrapper around PHP's tokenizer extension.",
- "homepage": "https://github.com/sebastianbergmann/php-token-stream/",
- "keywords": [
- "tokenizer"
- ],
- "time": "2014-03-03 05:10:30"
- },
- {
- "name": "phpunit/phpunit",
- "version": "4.2.2",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "a33fa68ece9f8c68589bfc2da8d2794e27b820bc"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a33fa68ece9f8c68589bfc2da8d2794e27b820bc",
- "reference": "a33fa68ece9f8c68589bfc2da8d2794e27b820bc",
- "shasum": ""
- },
- "require": {
- "ext-dom": "*",
- "ext-json": "*",
- "ext-pcre": "*",
- "ext-reflection": "*",
- "ext-spl": "*",
- "php": ">=5.3.3",
- "phpunit/php-code-coverage": "~2.0",
- "phpunit/php-file-iterator": "~1.3.1",
- "phpunit/php-text-template": "~1.2",
- "phpunit/php-timer": "~1.0.2",
- "phpunit/phpunit-mock-objects": "~2.2",
- "sebastian/comparator": "~1.0",
- "sebastian/diff": "~1.1",
- "sebastian/environment": "~1.0",
- "sebastian/exporter": "~1.0",
- "sebastian/version": "~1.0",
- "symfony/yaml": "~2.0"
- },
- "suggest": {
- "phpunit/php-invoker": "~1.1"
- },
- "bin": [
- "phpunit"
- ],
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "4.2.x-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "include-path": [
- "",
- "../../symfony/yaml/"
- ],
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- }
- ],
- "description": "The PHP Unit Testing framework.",
- "homepage": "http://www.phpunit.de/",
- "keywords": [
- "phpunit",
- "testing",
- "xunit"
- ],
- "time": "2014-08-18 05:12:30"
- },
- {
- "name": "phpunit/phpunit-mock-objects",
- "version": "2.2.0",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
- "reference": "42e589e08bc86e3e9bdf20d385e948347788505b"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/42e589e08bc86e3e9bdf20d385e948347788505b",
- "reference": "42e589e08bc86e3e9bdf20d385e948347788505b",
- "shasum": ""
- },
- "require": {
- "ocramius/instantiator": "~1.0",
- "php": ">=5.3.3",
- "phpunit/php-text-template": "~1.2"
- },
- "require-dev": {
- "phpunit/phpunit": "4.2.*@dev"
- },
- "suggest": {
- "ext-soap": "*"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.2.x-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "include-path": [
- ""
- ],
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
- "role": "lead"
- }
- ],
- "description": "Mock Object library for PHPUnit",
- "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
- "keywords": [
- "mock",
- "xunit"
- ],
- "time": "2014-08-02 13:50:58"
- },
- {
- "name": "sebastian/comparator",
- "version": "1.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "f7069ee51fa9fb6c038e16a9d0e3439f5449dcf2"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/f7069ee51fa9fb6c038e16a9d0e3439f5449dcf2",
- "reference": "f7069ee51fa9fb6c038e16a9d0e3439f5449dcf2",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3",
- "sebastian/diff": "~1.1",
- "sebastian/exporter": "~1.0"
- },
- "require-dev": {
- "phpunit/phpunit": "~4.1"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- },
- {
- "name": "Jeff Welch",
- "email": "whatthejeff@gmail.com"
- },
- {
- "name": "Volker Dusch",
- "email": "github@wallbash.com"
- },
- {
- "name": "Bernhard Schussek",
- "email": "bschussek@2bepublished.at"
- }
- ],
- "description": "Provides the functionality to compare PHP values for equality",
- "homepage": "http://www.github.com/sebastianbergmann/comparator",
- "keywords": [
- "comparator",
- "compare",
- "equality"
- ],
- "time": "2014-05-02 07:05:58"
- },
- {
- "name": "sebastian/diff",
- "version": "1.1.0",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "1e091702a5a38e6b4c1ba9ca816e3dd343df2e2d"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/1e091702a5a38e6b4c1ba9ca816e3dd343df2e2d",
- "reference": "1e091702a5a38e6b4c1ba9ca816e3dd343df2e2d",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.1-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- },
- {
- "name": "Kore Nordmann",
- "email": "mail@kore-nordmann.de"
- }
- ],
- "description": "Diff implementation",
- "homepage": "http://www.github.com/sebastianbergmann/diff",
- "keywords": [
- "diff"
- ],
- "time": "2013-08-03 16:46:33"
- },
- {
- "name": "sebastian/environment",
- "version": "1.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "79517609ec01139cd7e9fded0dd7ce08c952ef6a"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/79517609ec01139cd7e9fded0dd7ce08c952ef6a",
- "reference": "79517609ec01139cd7e9fded0dd7ce08c952ef6a",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3"
- },
- "require-dev": {
- "phpunit/phpunit": "4.0.*@dev"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- }
- ],
- "description": "Provides functionality to handle HHVM/PHP environments",
- "homepage": "http://www.github.com/sebastianbergmann/environment",
- "keywords": [
- "Xdebug",
- "environment",
- "hhvm"
- ],
- "time": "2014-02-18 16:17:19"
- },
- {
- "name": "sebastian/exporter",
- "version": "1.0.1",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "1f9a98e6f5dfe0524cb8c6166f7c82f3e9ae1529"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/1f9a98e6f5dfe0524cb8c6166f7c82f3e9ae1529",
- "reference": "1f9a98e6f5dfe0524cb8c6166f7c82f3e9ae1529",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3"
- },
- "require-dev": {
- "phpunit/phpunit": "4.0.*@dev"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- },
- {
- "name": "Jeff Welch",
- "email": "whatthejeff@gmail.com"
- },
- {
- "name": "Volker Dusch",
- "email": "github@wallbash.com"
- },
- {
- "name": "Adam Harvey",
- "email": "aharvey@php.net",
- "role": "Lead"
- },
- {
- "name": "Bernhard Schussek",
- "email": "bschussek@2bepublished.at"
- }
- ],
- "description": "Provides the functionality to export PHP variables for visualization",
- "homepage": "http://www.github.com/sebastianbergmann/exporter",
- "keywords": [
- "export",
- "exporter"
- ],
- "time": "2014-02-16 08:26:31"
- },
- {
- "name": "sebastian/version",
- "version": "1.0.3",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/version.git",
- "reference": "b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43",
- "reference": "b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43",
- "shasum": ""
- },
- "type": "library",
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- }
- ],
- "description": "Library that helps with managing the version number of Git-hosted PHP projects",
- "homepage": "https://github.com/sebastianbergmann/version",
- "time": "2014-03-07 15:35:33"
- },
- {
- "name": "symfony/yaml",
- "version": "v2.5.3",
- "target-dir": "Symfony/Component/Yaml",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/Yaml.git",
- "reference": "5a75366ae9ca8b4792cd0083e4ca4dff9fe96f1f"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/Yaml/zipball/5a75366ae9ca8b4792cd0083e4ca4dff9fe96f1f",
- "reference": "5a75366ae9ca8b4792cd0083e4ca4dff9fe96f1f",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.5-dev"
- }
- },
- "autoload": {
- "psr-0": {
- "Symfony\\Component\\Yaml\\": ""
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Symfony Community",
- "homepage": "http://symfony.com/contributors"
- },
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- }
- ],
- "description": "Symfony Yaml Component",
- "homepage": "http://symfony.com",
- "time": "2014-08-05 09:00:40"
- }
- ],
- "aliases": [],
- "minimum-stability": "stable",
- "stability-flags": [],
- "prefer-stable": false,
- "platform": {
- "php": ">=5.3.3"
- },
- "platform-dev": []
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/phpunit.xml.dist b/tests/vendor/phpdocumentor/reflection-docblock/phpunit.xml.dist
deleted file mode 100644
index f67ad2a2..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/phpunit.xml.dist
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
- ./tests/
-
-
-
-
- ./src/
-
-
-
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock.php b/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock.php
deleted file mode 100644
index 02968b16..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock.php
+++ /dev/null
@@ -1,468 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection;
-
-use phpDocumentor\Reflection\DocBlock\Tag;
-use phpDocumentor\Reflection\DocBlock\Context;
-use phpDocumentor\Reflection\DocBlock\Location;
-
-/**
- * Parses the DocBlock for any structure.
- *
- * @author Mike van Riel
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class DocBlock implements \Reflector
-{
- /** @var string The opening line for this docblock. */
- protected $short_description = '';
-
- /**
- * @var DocBlock\Description The actual
- * description for this docblock.
- */
- protected $long_description = null;
-
- /**
- * @var Tag[] An array containing all
- * the tags in this docblock; except inline.
- */
- protected $tags = array();
-
- /** @var Context Information about the context of this DocBlock. */
- protected $context = null;
-
- /** @var Location Information about the location of this DocBlock. */
- protected $location = null;
-
- /** @var bool Is this DocBlock (the start of) a template? */
- protected $isTemplateStart = false;
-
- /** @var bool Does this DocBlock signify the end of a DocBlock template? */
- protected $isTemplateEnd = false;
-
- /**
- * Parses the given docblock and populates the member fields.
- *
- * The constructor may also receive namespace information such as the
- * current namespace and aliases. This information is used by some tags
- * (e.g. @return, @param, etc.) to turn a relative Type into a FQCN.
- *
- * @param \Reflector|string $docblock A docblock comment (including
- * asterisks) or reflector supporting the getDocComment method.
- * @param Context $context The context in which the DocBlock
- * occurs.
- * @param Location $location The location within the file that this
- * DocBlock occurs in.
- *
- * @throws \InvalidArgumentException if the given argument does not have the
- * getDocComment method.
- */
- public function __construct(
- $docblock,
- Context $context = null,
- Location $location = null
- ) {
- if (is_object($docblock)) {
- if (!method_exists($docblock, 'getDocComment')) {
- throw new \InvalidArgumentException(
- 'Invalid object passed; the given reflector must support '
- . 'the getDocComment method'
- );
- }
-
- $docblock = $docblock->getDocComment();
- }
-
- $docblock = $this->cleanInput($docblock);
-
- list($templateMarker, $short, $long, $tags) = $this->splitDocBlock($docblock);
- $this->isTemplateStart = $templateMarker === '#@+';
- $this->isTemplateEnd = $templateMarker === '#@-';
- $this->short_description = $short;
- $this->long_description = new DocBlock\Description($long, $this);
- $this->parseTags($tags);
-
- $this->context = $context;
- $this->location = $location;
- }
-
- /**
- * Strips the asterisks from the DocBlock comment.
- *
- * @param string $comment String containing the comment text.
- *
- * @return string
- */
- protected function cleanInput($comment)
- {
- $comment = trim(
- preg_replace(
- '#[ \t]*(?:\/\*\*|\*\/|\*)?[ \t]{0,1}(.*)?#u',
- '$1',
- $comment
- )
- );
-
- // reg ex above is not able to remove */ from a single line docblock
- if (substr($comment, -2) == '*/') {
- $comment = trim(substr($comment, 0, -2));
- }
-
- // normalize strings
- $comment = str_replace(array("\r\n", "\r"), "\n", $comment);
-
- return $comment;
- }
-
- /**
- * Splits the DocBlock into a template marker, summary, description and block of tags.
- *
- * @param string $comment Comment to split into the sub-parts.
- *
- * @author Richard van Velzen (@_richardJ) Special thanks to Richard for the regex responsible for the split.
- * @author Mike van Riel for extending the regex with template marker support.
- *
- * @return string[] containing the template marker (if any), summary, description and a string containing the tags.
- */
- protected function splitDocBlock($comment)
- {
- // Performance improvement cheat: if the first character is an @ then only tags are in this DocBlock. This
- // method does not split tags so we return this verbatim as the fourth result (tags). This saves us the
- // performance impact of running a regular expression
- if (strpos($comment, '@') === 0) {
- return array('', '', '', $comment);
- }
-
- // clears all extra horizontal whitespace from the line endings to prevent parsing issues
- $comment = preg_replace('/\h*$/Sum', '', $comment);
-
- /*
- * Splits the docblock into a template marker, short description, long description and tags section
- *
- * - The template marker is empty, #@+ or #@- if the DocBlock starts with either of those (a newline may
- * occur after it and will be stripped).
- * - The short description is started from the first character until a dot is encountered followed by a
- * newline OR two consecutive newlines (horizontal whitespace is taken into account to consider spacing
- * errors). This is optional.
- * - The long description, any character until a new line is encountered followed by an @ and word
- * characters (a tag). This is optional.
- * - Tags; the remaining characters
- *
- * Big thanks to RichardJ for contributing this Regular Expression
- */
- preg_match(
- '/
- \A
- # 1. Extract the template marker
- (?:(\#\@\+|\#\@\-)\n?)?
-
- # 2. Extract the summary
- (?:
- (?! @\pL ) # The summary may not start with an @
- (
- [^\n.]+
- (?:
- (?! \. \n | \n{2} ) # End summary upon a dot followed by newline or two newlines
- [\n.] (?! [ \t]* @\pL ) # End summary when an @ is found as first character on a new line
- [^\n.]+ # Include anything else
- )*
- \.?
- )?
- )
-
- # 3. Extract the description
- (?:
- \s* # Some form of whitespace _must_ precede a description because a summary must be there
- (?! @\pL ) # The description may not start with an @
- (
- [^\n]+
- (?: \n+
- (?! [ \t]* @\pL ) # End description when an @ is found as first character on a new line
- [^\n]+ # Include anything else
- )*
- )
- )?
-
- # 4. Extract the tags (anything that follows)
- (\s+ [\s\S]*)? # everything that follows
- /ux',
- $comment,
- $matches
- );
- array_shift($matches);
-
- while (count($matches) < 4) {
- $matches[] = '';
- }
-
- return $matches;
- }
-
- /**
- * Creates the tag objects.
- *
- * @param string $tags Tag block to parse.
- *
- * @return void
- */
- protected function parseTags($tags)
- {
- $result = array();
- $tags = trim($tags);
- if ('' !== $tags) {
- if ('@' !== $tags[0]) {
- throw new \LogicException(
- 'A tag block started with text instead of an actual tag,'
- . ' this makes the tag block invalid: ' . $tags
- );
- }
- foreach (explode("\n", $tags) as $tag_line) {
- if (isset($tag_line[0]) && ($tag_line[0] === '@')) {
- $result[] = $tag_line;
- } else {
- $result[count($result) - 1] .= "\n" . $tag_line;
- }
- }
-
- // create proper Tag objects
- foreach ($result as $key => $tag_line) {
- $result[$key] = Tag::createInstance(trim($tag_line), $this);
- }
- }
-
- $this->tags = $result;
- }
-
- /**
- * Gets the text portion of the doc block.
- *
- * Gets the text portion (short and long description combined) of the doc
- * block.
- *
- * @return string The text portion of the doc block.
- */
- public function getText()
- {
- $short = $this->getShortDescription();
- $long = $this->getLongDescription()->getContents();
-
- if ($long) {
- return "{$short}\n\n{$long}";
- } else {
- return $short;
- }
- }
-
- /**
- * Set the text portion of the doc block.
- *
- * Sets the text portion (short and long description combined) of the doc
- * block.
- *
- * @param string $docblock The new text portion of the doc block.
- *
- * @return $this This doc block.
- */
- public function setText($comment)
- {
- list(,$short, $long) = $this->splitDocBlock($comment);
- $this->short_description = $short;
- $this->long_description = new DocBlock\Description($long, $this);
- return $this;
- }
- /**
- * Returns the opening line or also known as short description.
- *
- * @return string
- */
- public function getShortDescription()
- {
- return $this->short_description;
- }
-
- /**
- * Returns the full description or also known as long description.
- *
- * @return DocBlock\Description
- */
- public function getLongDescription()
- {
- return $this->long_description;
- }
-
- /**
- * Returns whether this DocBlock is the start of a Template section.
- *
- * A Docblock may serve as template for a series of subsequent DocBlocks. This is indicated by a special marker
- * (`#@+`) that is appended directly after the opening `/**` of a DocBlock.
- *
- * An example of such an opening is:
- *
- * ```
- * /**#@+
- * * My DocBlock
- * * /
- * ```
- *
- * The description and tags (not the summary!) are copied onto all subsequent DocBlocks and also applied to all
- * elements that follow until another DocBlock is found that contains the closing marker (`#@-`).
- *
- * @see self::isTemplateEnd() for the check whether a closing marker was provided.
- *
- * @return boolean
- */
- public function isTemplateStart()
- {
- return $this->isTemplateStart;
- }
-
- /**
- * Returns whether this DocBlock is the end of a Template section.
- *
- * @see self::isTemplateStart() for a more complete description of the Docblock Template functionality.
- *
- * @return boolean
- */
- public function isTemplateEnd()
- {
- return $this->isTemplateEnd;
- }
-
- /**
- * Returns the current context.
- *
- * @return Context
- */
- public function getContext()
- {
- return $this->context;
- }
-
- /**
- * Returns the current location.
- *
- * @return Location
- */
- public function getLocation()
- {
- return $this->location;
- }
-
- /**
- * Returns the tags for this DocBlock.
- *
- * @return Tag[]
- */
- public function getTags()
- {
- return $this->tags;
- }
-
- /**
- * Returns an array of tags matching the given name. If no tags are found
- * an empty array is returned.
- *
- * @param string $name String to search by.
- *
- * @return Tag[]
- */
- public function getTagsByName($name)
- {
- $result = array();
-
- /** @var Tag $tag */
- foreach ($this->getTags() as $tag) {
- if ($tag->getName() != $name) {
- continue;
- }
-
- $result[] = $tag;
- }
-
- return $result;
- }
-
- /**
- * Checks if a tag of a certain type is present in this DocBlock.
- *
- * @param string $name Tag name to check for.
- *
- * @return bool
- */
- public function hasTag($name)
- {
- /** @var Tag $tag */
- foreach ($this->getTags() as $tag) {
- if ($tag->getName() == $name) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Appends a tag at the end of the list of tags.
- *
- * @param Tag $tag The tag to add.
- *
- * @return Tag The newly added tag.
- *
- * @throws \LogicException When the tag belongs to a different DocBlock.
- */
- public function appendTag(Tag $tag)
- {
- if (null === $tag->getDocBlock()) {
- $tag->setDocBlock($this);
- }
-
- if ($tag->getDocBlock() === $this) {
- $this->tags[] = $tag;
- } else {
- throw new \LogicException(
- 'This tag belongs to a different DocBlock object.'
- );
- }
-
- return $tag;
- }
-
-
- /**
- * Builds a string representation of this object.
- *
- * @todo determine the exact format as used by PHP Reflection and
- * implement it.
- *
- * @return string
- * @codeCoverageIgnore Not yet implemented
- */
- public static function export()
- {
- throw new \Exception('Not yet implemented');
- }
-
- /**
- * Returns the exported information (we should use the export static method
- * BUT this throws an exception at this point).
- *
- * @return string
- * @codeCoverageIgnore Not yet implemented
- */
- public function __toString()
- {
- return 'Not yet implemented';
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Context.php b/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Context.php
deleted file mode 100644
index 81aa83ce..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Context.php
+++ /dev/null
@@ -1,154 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock;
-
-/**
- * The context in which a DocBlock occurs.
- *
- * @author Vasil Rangelov
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class Context
-{
- /** @var string The current namespace. */
- protected $namespace = '';
-
- /** @var array List of namespace aliases => Fully Qualified Namespace. */
- protected $namespace_aliases = array();
-
- /** @var string Name of the structural element, within the namespace. */
- protected $lsen = '';
-
- /**
- * Cteates a new context.
- * @param string $namespace The namespace where this DocBlock
- * resides in.
- * @param array $namespace_aliases List of namespace aliases => Fully
- * Qualified Namespace.
- * @param string $lsen Name of the structural element, within
- * the namespace.
- */
- public function __construct(
- $namespace = '',
- array $namespace_aliases = array(),
- $lsen = ''
- ) {
- if (!empty($namespace)) {
- $this->setNamespace($namespace);
- }
- $this->setNamespaceAliases($namespace_aliases);
- $this->setLSEN($lsen);
- }
-
- /**
- * @return string The namespace where this DocBlock resides in.
- */
- public function getNamespace()
- {
- return $this->namespace;
- }
-
- /**
- * @return array List of namespace aliases => Fully Qualified Namespace.
- */
- public function getNamespaceAliases()
- {
- return $this->namespace_aliases;
- }
-
- /**
- * Returns the Local Structural Element Name.
- *
- * @return string Name of the structural element, within the namespace.
- */
- public function getLSEN()
- {
- return $this->lsen;
- }
-
- /**
- * Sets a new namespace.
- *
- * Sets a new namespace for the context. Leading and trailing slashes are
- * trimmed, and the keywords "global" and "default" are treated as aliases
- * to no namespace.
- *
- * @param string $namespace The new namespace to set.
- *
- * @return $this
- */
- public function setNamespace($namespace)
- {
- if ('global' !== $namespace
- && 'default' !== $namespace
- ) {
- // Srip leading and trailing slash
- $this->namespace = trim((string)$namespace, '\\');
- } else {
- $this->namespace = '';
- }
- return $this;
- }
-
- /**
- * Sets the namespace aliases, replacing all previous ones.
- *
- * @param array $namespace_aliases List of namespace aliases => Fully
- * Qualified Namespace.
- *
- * @return $this
- */
- public function setNamespaceAliases(array $namespace_aliases)
- {
- $this->namespace_aliases = array();
- foreach ($namespace_aliases as $alias => $fqnn) {
- $this->setNamespaceAlias($alias, $fqnn);
- }
- return $this;
- }
-
- /**
- * Adds a namespace alias to the context.
- *
- * @param string $alias The alias name (the part after "as", or the last
- * part of the Fully Qualified Namespace Name) to add.
- * @param string $fqnn The Fully Qualified Namespace Name for this alias.
- * Any form of leading/trailing slashes are accepted, but what will be
- * stored is a name, prefixed with a slash, and no trailing slash.
- *
- * @return $this
- */
- public function setNamespaceAlias($alias, $fqnn)
- {
- $this->namespace_aliases[$alias] = '\\' . trim((string)$fqnn, '\\');
- return $this;
- }
-
- /**
- * Sets a new Local Structural Element Name.
- *
- * Sets a new Local Structural Element Name. A local name also contains
- * punctuation determining the kind of structural element (e.g. trailing "("
- * and ")" for functions and methods).
- *
- * @param string $lsen The new local name of a structural element.
- *
- * @return $this
- */
- public function setLSEN($lsen)
- {
- $this->lsen = (string)$lsen;
- return $this;
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Description.php b/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Description.php
deleted file mode 100644
index d41142e2..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Description.php
+++ /dev/null
@@ -1,223 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock;
-
-use phpDocumentor\Reflection\DocBlock;
-
-/**
- * Parses a Description of a DocBlock or tag.
- *
- * @author Mike van Riel
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class Description implements \Reflector
-{
- /** @var string */
- protected $contents = '';
-
- /** @var array The contents, as an array of strings and Tag objects. */
- protected $parsedContents = null;
-
- /** @var DocBlock The DocBlock which this description belongs to. */
- protected $docblock = null;
-
- /**
- * Populates the fields of a description.
- *
- * @param string $content The description's conetnts.
- * @param DocBlock $docblock The DocBlock which this description belongs to.
- */
- public function __construct($content, DocBlock $docblock = null)
- {
- $this->setContent($content)->setDocBlock($docblock);
- }
-
- /**
- * Gets the text of this description.
- *
- * @return string
- */
- public function getContents()
- {
- return $this->contents;
- }
-
- /**
- * Sets the text of this description.
- *
- * @param string $content The new text of this description.
- *
- * @return $this
- */
- public function setContent($content)
- {
- $this->contents = trim($content);
-
- $this->parsedContents = null;
- return $this;
- }
-
- /**
- * Returns the parsed text of this description.
- *
- * @return array An array of strings and tag objects, in the order they
- * occur within the description.
- */
- public function getParsedContents()
- {
- if (null === $this->parsedContents) {
- $this->parsedContents = preg_split(
- '/\{
- # "{@}" is not a valid inline tag. This ensures that
- # we do not treat it as one, but treat it literally.
- (?!@\})
- # We want to capture the whole tag line, but without the
- # inline tag delimiters.
- (\@
- # Match everything up to the next delimiter.
- [^{}]*
- # Nested inline tag content should not be captured, or
- # it will appear in the result separately.
- (?:
- # Match nested inline tags.
- (?:
- # Because we did not catch the tag delimiters
- # earlier, we must be explicit with them here.
- # Notice that this also matches "{}", as a way
- # to later introduce it as an escape sequence.
- \{(?1)?\}
- |
- # Make sure we match hanging "{".
- \{
- )
- # Match content after the nested inline tag.
- [^{}]*
- )* # If there are more inline tags, match them as well.
- # We use "*" since there may not be any nested inline
- # tags.
- )
- \}/Sux',
- $this->contents,
- null,
- PREG_SPLIT_DELIM_CAPTURE
- );
-
- $count = count($this->parsedContents);
- for ($i=1; $i<$count; $i += 2) {
- $this->parsedContents[$i] = Tag::createInstance(
- $this->parsedContents[$i],
- $this->docblock
- );
- }
-
- //In order to allow "literal" inline tags, the otherwise invalid
- //sequence "{@}" is changed to "@", and "{}" is changed to "}".
- //See unit tests for examples.
- for ($i=0; $i<$count; $i += 2) {
- $this->parsedContents[$i] = str_replace(
- array('{@}', '{}'),
- array('@', '}'),
- $this->parsedContents[$i]
- );
- }
- }
- return $this->parsedContents;
- }
-
- /**
- * Return a formatted variant of the Long Description using MarkDown.
- *
- * @todo this should become a more intelligent piece of code where the
- * configuration contains a setting what format long descriptions are.
- *
- * @codeCoverageIgnore Will be removed soon, in favor of adapters at
- * PhpDocumentor itself that will process text in various formats.
- *
- * @return string
- */
- public function getFormattedContents()
- {
- $result = $this->contents;
-
- // if the long description contains a plain HTML element, surround
- // it with a pre element. Please note that we explicitly used str_replace
- // and not preg_replace to gain performance
- if (strpos($result, '') !== false) {
- $result = str_replace(
- array('', "\r\n", "\n", "\r", ''),
- array('', '', '', '', '
'),
- $result
- );
- }
-
- if (class_exists('Parsedown')) {
- $markdown = \Parsedown::instance();
- $result = $markdown->parse($result);
- } elseif (class_exists('dflydev\markdown\MarkdownExtraParser')) {
- $markdown = new \dflydev\markdown\MarkdownExtraParser();
- $result = $markdown->transformMarkdown($result);
- }
-
- return trim($result);
- }
-
- /**
- * Gets the docblock this tag belongs to.
- *
- * @return DocBlock The docblock this description belongs to.
- */
- public function getDocBlock()
- {
- return $this->docblock;
- }
-
- /**
- * Sets the docblock this tag belongs to.
- *
- * @param DocBlock $docblock The new docblock this description belongs to.
- * Setting NULL removes any association.
- *
- * @return $this
- */
- public function setDocBlock(DocBlock $docblock = null)
- {
- $this->docblock = $docblock;
-
- return $this;
- }
-
- /**
- * Builds a string representation of this object.
- *
- * @todo determine the exact format as used by PHP Reflection
- * and implement it.
- *
- * @return void
- * @codeCoverageIgnore Not yet implemented
- */
- public static function export()
- {
- throw new \Exception('Not yet implemented');
- }
-
- /**
- * Returns the long description as a string.
- *
- * @return string
- */
- public function __toString()
- {
- return $this->getContents();
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Location.php b/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Location.php
deleted file mode 100644
index 966ed44d..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Location.php
+++ /dev/null
@@ -1,76 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock;
-
-/**
- * The location a DocBlock occurs within a file.
- *
- * @author Vasil Rangelov
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class Location
-{
- /** @var int Line where the DocBlock text starts. */
- protected $lineNumber = 0;
-
- /** @var int Column where the DocBlock text starts. */
- protected $columnNumber = 0;
-
- public function __construct(
- $lineNumber = 0,
- $columnNumber = 0
- ) {
- $this->setLineNumber($lineNumber)->setColumnNumber($columnNumber);
- }
-
- /**
- * @return int Line where the DocBlock text starts.
- */
- public function getLineNumber()
- {
- return $this->lineNumber;
- }
-
- /**
- *
- * @param type $lineNumber
- * @return $this
- */
- public function setLineNumber($lineNumber)
- {
- $this->lineNumber = (int)$lineNumber;
-
- return $this;
- }
-
- /**
- * @return int Column where the DocBlock text starts.
- */
- public function getColumnNumber()
- {
- return $this->columnNumber;
- }
-
- /**
- *
- * @param int $columnNumber
- * @return $this
- */
- public function setColumnNumber($columnNumber)
- {
- $this->columnNumber = (int)$columnNumber;
-
- return $this;
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Serializer.php b/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Serializer.php
deleted file mode 100644
index c1617850..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Serializer.php
+++ /dev/null
@@ -1,198 +0,0 @@
-
- * @copyright 2013 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock;
-
-use phpDocumentor\Reflection\DocBlock;
-
-/**
- * Serializes a DocBlock instance.
- *
- * @author Barry vd. Heuvel
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class Serializer
-{
-
- /** @var string The string to indent the comment with. */
- protected $indentString = ' ';
-
- /** @var int The number of times the indent string is repeated. */
- protected $indent = 0;
-
- /** @var bool Whether to indent the first line. */
- protected $isFirstLineIndented = true;
-
- /** @var int|null The max length of a line. */
- protected $lineLength = null;
-
- /**
- * Create a Serializer instance.
- *
- * @param int $indent The number of times the indent string is
- * repeated.
- * @param string $indentString The string to indent the comment with.
- * @param bool $indentFirstLine Whether to indent the first line.
- * @param int|null $lineLength The max length of a line or NULL to
- * disable line wrapping.
- */
- public function __construct(
- $indent = 0,
- $indentString = ' ',
- $indentFirstLine = true,
- $lineLength = null
- ) {
- $this->setIndentationString($indentString);
- $this->setIndent($indent);
- $this->setIsFirstLineIndented($indentFirstLine);
- $this->setLineLength($lineLength);
- }
-
- /**
- * Sets the string to indent comments with.
- *
- * @param string $indentationString The string to indent comments with.
- *
- * @return $this This serializer object.
- */
- public function setIndentationString($indentString)
- {
- $this->indentString = (string)$indentString;
- return $this;
- }
-
- /**
- * Gets the string to indent comments with.
- *
- * @return string The indent string.
- */
- public function getIndentationString()
- {
- return $this->indentString;
- }
-
- /**
- * Sets the number of indents.
- *
- * @param int $indent The number of times the indent string is repeated.
- *
- * @return $this This serializer object.
- */
- public function setIndent($indent)
- {
- $this->indent = (int)$indent;
- return $this;
- }
-
- /**
- * Gets the number of indents.
- *
- * @return int The number of times the indent string is repeated.
- */
- public function getIndent()
- {
- return $this->indent;
- }
-
- /**
- * Sets whether or not the first line should be indented.
- *
- * Sets whether or not the first line (the one with the "/**") should be
- * indented.
- *
- * @param bool $indentFirstLine The new value for this setting.
- *
- * @return $this This serializer object.
- */
- public function setIsFirstLineIndented($indentFirstLine)
- {
- $this->isFirstLineIndented = (bool)$indentFirstLine;
- return $this;
- }
-
- /**
- * Gets whether or not the first line should be indented.
- *
- * @return bool Whether or not the first line should be indented.
- */
- public function isFirstLineIndented()
- {
- return $this->isFirstLineIndented;
- }
-
- /**
- * Sets the line length.
- *
- * Sets the length of each line in the serialization. Content will be
- * wrapped within this limit.
- *
- * @param int|null $lineLength The length of each line. NULL to disable line
- * wrapping altogether.
- *
- * @return $this This serializer object.
- */
- public function setLineLength($lineLength)
- {
- $this->lineLength = null === $lineLength ? null : (int)$lineLength;
- return $this;
- }
-
- /**
- * Gets the line length.
- *
- * @return int|null The length of each line or NULL if line wrapping is
- * disabled.
- */
- public function getLineLength()
- {
- return $this->lineLength;
- }
-
- /**
- * Generate a DocBlock comment.
- *
- * @param DocBlock The DocBlock to serialize.
- *
- * @return string The serialized doc block.
- */
- public function getDocComment(DocBlock $docblock)
- {
- $indent = str_repeat($this->indentString, $this->indent);
- $firstIndent = $this->isFirstLineIndented ? $indent : '';
-
- $text = $docblock->getText();
- if ($this->lineLength) {
- //3 === strlen(' * ')
- $wrapLength = $this->lineLength - strlen($indent) - 3;
- $text = wordwrap($text, $wrapLength);
- }
- $text = str_replace("\n", "\n{$indent} * ", $text);
-
- $comment = "{$firstIndent}/**\n{$indent} * {$text}\n{$indent} *\n";
-
- /** @var Tag $tag */
- foreach ($docblock->getTags() as $tag) {
- $tagText = (string) $tag;
- if ($this->lineLength) {
- $tagText = wordwrap($tagText, $wrapLength);
- }
- $tagText = str_replace("\n", "\n{$indent} * ", $tagText);
-
- $comment .= "{$indent} * {$tagText}\n";
- }
-
- $comment .= $indent . ' */';
-
- return $comment;
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag.php b/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag.php
deleted file mode 100644
index a96db095..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag.php
+++ /dev/null
@@ -1,377 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock;
-
-use phpDocumentor\Reflection\DocBlock;
-
-/**
- * Parses a tag definition for a DocBlock.
- *
- * @author Mike van Riel
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class Tag implements \Reflector
-{
- /**
- * PCRE regular expression matching a tag name.
- */
- const REGEX_TAGNAME = '[\w\-\_\\\\]+';
-
- /** @var string Name of the tag */
- protected $tag = '';
-
- /**
- * @var string|null Content of the tag.
- * When set to NULL, it means it needs to be regenerated.
- */
- protected $content = '';
-
- /** @var string Description of the content of this tag */
- protected $description = '';
-
- /**
- * @var array|null The description, as an array of strings and Tag objects.
- * When set to NULL, it means it needs to be regenerated.
- */
- protected $parsedDescription = null;
-
- /** @var Location Location of the tag. */
- protected $location = null;
-
- /** @var DocBlock The DocBlock which this tag belongs to. */
- protected $docblock = null;
-
- /**
- * @var array An array with a tag as a key, and an FQCN to a class that
- * handles it as an array value. The class is expected to inherit this
- * class.
- */
- private static $tagHandlerMappings = array(
- 'author'
- => '\phpDocumentor\Reflection\DocBlock\Tag\AuthorTag',
- 'covers'
- => '\phpDocumentor\Reflection\DocBlock\Tag\CoversTag',
- 'deprecated'
- => '\phpDocumentor\Reflection\DocBlock\Tag\DeprecatedTag',
- 'example'
- => '\phpDocumentor\Reflection\DocBlock\Tag\ExampleTag',
- 'link'
- => '\phpDocumentor\Reflection\DocBlock\Tag\LinkTag',
- 'method'
- => '\phpDocumentor\Reflection\DocBlock\Tag\MethodTag',
- 'param'
- => '\phpDocumentor\Reflection\DocBlock\Tag\ParamTag',
- 'property-read'
- => '\phpDocumentor\Reflection\DocBlock\Tag\PropertyReadTag',
- 'property'
- => '\phpDocumentor\Reflection\DocBlock\Tag\PropertyTag',
- 'property-write'
- => '\phpDocumentor\Reflection\DocBlock\Tag\PropertyWriteTag',
- 'return'
- => '\phpDocumentor\Reflection\DocBlock\Tag\ReturnTag',
- 'see'
- => '\phpDocumentor\Reflection\DocBlock\Tag\SeeTag',
- 'since'
- => '\phpDocumentor\Reflection\DocBlock\Tag\SinceTag',
- 'source'
- => '\phpDocumentor\Reflection\DocBlock\Tag\SourceTag',
- 'throw'
- => '\phpDocumentor\Reflection\DocBlock\Tag\ThrowsTag',
- 'throws'
- => '\phpDocumentor\Reflection\DocBlock\Tag\ThrowsTag',
- 'uses'
- => '\phpDocumentor\Reflection\DocBlock\Tag\UsesTag',
- 'var'
- => '\phpDocumentor\Reflection\DocBlock\Tag\VarTag',
- 'version'
- => '\phpDocumentor\Reflection\DocBlock\Tag\VersionTag'
- );
-
- /**
- * Factory method responsible for instantiating the correct sub type.
- *
- * @param string $tag_line The text for this tag, including description.
- * @param DocBlock $docblock The DocBlock which this tag belongs to.
- * @param Location $location Location of the tag.
- *
- * @throws \InvalidArgumentException if an invalid tag line was presented.
- *
- * @return static A new tag object.
- */
- final public static function createInstance(
- $tag_line,
- DocBlock $docblock = null,
- Location $location = null
- ) {
- if (!preg_match(
- '/^@(' . self::REGEX_TAGNAME . ')(?:\s*([^\s].*)|$)?/us',
- $tag_line,
- $matches
- )) {
- throw new \InvalidArgumentException(
- 'Invalid tag_line detected: ' . $tag_line
- );
- }
-
- $handler = __CLASS__;
- if (isset(self::$tagHandlerMappings[$matches[1]])) {
- $handler = self::$tagHandlerMappings[$matches[1]];
- } elseif (isset($docblock)) {
- $tagName = (string)new Type\Collection(
- array($matches[1]),
- $docblock->getContext()
- );
-
- if (isset(self::$tagHandlerMappings[$tagName])) {
- $handler = self::$tagHandlerMappings[$tagName];
- }
- }
-
- return new $handler(
- $matches[1],
- isset($matches[2]) ? $matches[2] : '',
- $docblock,
- $location
- );
- }
-
- /**
- * Registers a handler for tags.
- *
- * Registers a handler for tags. The class specified is autoloaded if it's
- * not available. It must inherit from this class.
- *
- * @param string $tag Name of tag to regiser a handler for. When
- * registering a namespaced tag, the full name, along with a prefixing
- * slash MUST be provided.
- * @param string|null $handler FQCN of handler. Specifing NULL removes the
- * handler for the specified tag, if any.
- *
- * @return bool TRUE on success, FALSE on failure.
- */
- final public static function registerTagHandler($tag, $handler)
- {
- $tag = trim((string)$tag);
-
- if (null === $handler) {
- unset(self::$tagHandlerMappings[$tag]);
- return true;
- }
-
- if ('' !== $tag
- && class_exists($handler, true)
- && is_subclass_of($handler, __CLASS__)
- && !strpos($tag, '\\') //Accept no slash, and 1st slash at offset 0.
- ) {
- self::$tagHandlerMappings[$tag] = $handler;
- return true;
- }
-
- return false;
- }
-
- /**
- * Parses a tag and populates the member variables.
- *
- * @param string $name Name of the tag.
- * @param string $content The contents of the given tag.
- * @param DocBlock $docblock The DocBlock which this tag belongs to.
- * @param Location $location Location of the tag.
- */
- public function __construct(
- $name,
- $content,
- DocBlock $docblock = null,
- Location $location = null
- ) {
- $this
- ->setName($name)
- ->setContent($content)
- ->setDocBlock($docblock)
- ->setLocation($location);
- }
-
- /**
- * Gets the name of this tag.
- *
- * @return string The name of this tag.
- */
- public function getName()
- {
- return $this->tag;
- }
-
- /**
- * Sets the name of this tag.
- *
- * @param string $name The new name of this tag.
- *
- * @return $this
- * @throws \InvalidArgumentException When an invalid tag name is provided.
- */
- public function setName($name)
- {
- if (!preg_match('/^' . self::REGEX_TAGNAME . '$/u', $name)) {
- throw new \InvalidArgumentException(
- 'Invalid tag name supplied: ' . $name
- );
- }
-
- $this->tag = $name;
-
- return $this;
- }
-
- /**
- * Gets the content of this tag.
- *
- * @return string
- */
- public function getContent()
- {
- if (null === $this->content) {
- $this->content = $this->description;
- }
-
- return $this->content;
- }
-
- /**
- * Sets the content of this tag.
- *
- * @param string $content The new content of this tag.
- *
- * @return $this
- */
- public function setContent($content)
- {
- $this->setDescription($content);
- $this->content = $content;
-
- return $this;
- }
-
- /**
- * Gets the description component of this tag.
- *
- * @return string
- */
- public function getDescription()
- {
- return $this->description;
- }
-
- /**
- * Sets the description component of this tag.
- *
- * @param string $description The new description component of this tag.
- *
- * @return $this
- */
- public function setDescription($description)
- {
- $this->content = null;
- $this->parsedDescription = null;
- $this->description = trim($description);
-
- return $this;
- }
-
- /**
- * Gets the parsed text of this description.
- *
- * @return array An array of strings and tag objects, in the order they
- * occur within the description.
- */
- public function getParsedDescription()
- {
- if (null === $this->parsedDescription) {
- $description = new Description($this->description, $this->docblock);
- $this->parsedDescription = $description->getParsedContents();
- }
- return $this->parsedDescription;
- }
-
- /**
- * Gets the docblock this tag belongs to.
- *
- * @return DocBlock The docblock this tag belongs to.
- */
- public function getDocBlock()
- {
- return $this->docblock;
- }
-
- /**
- * Sets the docblock this tag belongs to.
- *
- * @param DocBlock $docblock The new docblock this tag belongs to. Setting
- * NULL removes any association.
- *
- * @return $this
- */
- public function setDocBlock(DocBlock $docblock = null)
- {
- $this->docblock = $docblock;
-
- return $this;
- }
-
- /**
- * Gets the location of the tag.
- *
- * @return Location The tag's location.
- */
- public function getLocation()
- {
- return $this->location;
- }
-
- /**
- * Sets the location of the tag.
- *
- * @param Location $location The new location of the tag.
- *
- * @return $this
- */
- public function setLocation(Location $location = null)
- {
- $this->location = $location;
-
- return $this;
- }
-
- /**
- * Builds a string representation of this object.
- *
- * @todo determine the exact format as used by PHP Reflection and implement it.
- *
- * @return void
- * @codeCoverageIgnore Not yet implemented
- */
- public static function export()
- {
- throw new \Exception('Not yet implemented');
- }
-
- /**
- * Returns the tag as a serialized string
- *
- * @return string
- */
- public function __toString()
- {
- return "@{$this->getName()} {$this->getContent()}";
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/AuthorTag.php b/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/AuthorTag.php
deleted file mode 100644
index bacf52eb..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/AuthorTag.php
+++ /dev/null
@@ -1,131 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-use phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Reflection class for an @author tag in a Docblock.
- *
- * @author Mike van Riel
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class AuthorTag extends Tag
-{
- /**
- * PCRE regular expression matching any valid value for the name component.
- */
- const REGEX_AUTHOR_NAME = '[^\<]*';
-
- /**
- * PCRE regular expression matching any valid value for the email component.
- */
- const REGEX_AUTHOR_EMAIL = '[^\>]*';
-
- /** @var string The name of the author */
- protected $authorName = '';
-
- /** @var string The email of the author */
- protected $authorEmail = '';
-
- public function getContent()
- {
- if (null === $this->content) {
- $this->content = $this->authorName;
- if ('' != $this->authorEmail) {
- $this->content .= "<{$this->authorEmail}>";
- }
- }
-
- return $this->content;
- }
-
- /**
- * {@inheritdoc}
- */
- public function setContent($content)
- {
- parent::setContent($content);
- if (preg_match(
- '/^(' . self::REGEX_AUTHOR_NAME .
- ')(\<(' . self::REGEX_AUTHOR_EMAIL .
- ')\>)?$/u',
- $this->description,
- $matches
- )) {
- $this->authorName = trim($matches[1]);
- if (isset($matches[3])) {
- $this->authorEmail = trim($matches[3]);
- }
- }
-
- return $this;
- }
-
- /**
- * Gets the author's name.
- *
- * @return string The author's name.
- */
- public function getAuthorName()
- {
- return $this->authorName;
- }
-
- /**
- * Sets the author's name.
- *
- * @param string $authorName The new author name.
- * An invalid value will set an empty string.
- *
- * @return $this
- */
- public function setAuthorName($authorName)
- {
- $this->content = null;
- $this->authorName
- = preg_match('/^' . self::REGEX_AUTHOR_NAME . '$/u', $authorName)
- ? $authorName : '';
-
- return $this;
- }
-
- /**
- * Gets the author's email.
- *
- * @return string The author's email.
- */
- public function getAuthorEmail()
- {
- return $this->authorEmail;
- }
-
- /**
- * Sets the author's email.
- *
- * @param string $authorEmail The new author email.
- * An invalid value will set an empty string.
- *
- * @return $this
- */
- public function setAuthorEmail($authorEmail)
- {
- $this->authorEmail
- = preg_match('/^' . self::REGEX_AUTHOR_EMAIL . '$/u', $authorEmail)
- ? $authorEmail : '';
-
- $this->content = null;
- return $this;
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/CoversTag.php b/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/CoversTag.php
deleted file mode 100644
index bd31b56b..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/CoversTag.php
+++ /dev/null
@@ -1,24 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Reflection class for a @covers tag in a Docblock.
- *
- * @author Mike van Riel
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class CoversTag extends SeeTag
-{
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/DeprecatedTag.php b/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/DeprecatedTag.php
deleted file mode 100644
index 7226316b..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/DeprecatedTag.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-use phpDocumentor\Reflection\DocBlock\Tag\VersionTag;
-
-/**
- * Reflection class for a @deprecated tag in a Docblock.
- *
- * @author Vasil Rangelov
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class DeprecatedTag extends VersionTag
-{
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ExampleTag.php b/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ExampleTag.php
deleted file mode 100644
index 0e163ea0..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ExampleTag.php
+++ /dev/null
@@ -1,156 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-use phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Reflection class for a @example tag in a Docblock.
- *
- * @author Vasil Rangelov
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class ExampleTag extends SourceTag
-{
- /**
- * @var string Path to a file to use as an example.
- * May also be an absolute URI.
- */
- protected $filePath = '';
-
- /**
- * @var bool Whether the file path component represents an URI.
- * This determines how the file portion appears at {@link getContent()}.
- */
- protected $isURI = false;
-
- /**
- * {@inheritdoc}
- */
- public function getContent()
- {
- if (null === $this->content) {
- $filePath = '';
- if ($this->isURI) {
- if (false === strpos($this->filePath, ':')) {
- $filePath = str_replace(
- '%2F',
- '/',
- rawurlencode($this->filePath)
- );
- } else {
- $filePath = $this->filePath;
- }
- } else {
- $filePath = '"' . $this->filePath . '"';
- }
-
- $this->content = $filePath . ' ' . parent::getContent();
- }
-
- return $this->content;
- }
- /**
- * {@inheritdoc}
- */
- public function setContent($content)
- {
- Tag::setContent($content);
- if (preg_match(
- '/^
- # File component
- (?:
- # File path in quotes
- \"([^\"]+)\"
- |
- # File URI
- (\S+)
- )
- # Remaining content (parsed by SourceTag)
- (?:\s+(.*))?
- $/sux',
- $this->description,
- $matches
- )) {
- if ('' !== $matches[1]) {
- $this->setFilePath($matches[1]);
- } else {
- $this->setFileURI($matches[2]);
- }
-
- if (isset($matches[3])) {
- parent::setContent($matches[3]);
- } else {
- $this->setDescription('');
- }
- $this->content = $content;
- }
-
- return $this;
- }
-
- /**
- * Returns the file path.
- *
- * @return string Path to a file to use as an example.
- * May also be an absolute URI.
- */
- public function getFilePath()
- {
- return $this->filePath;
- }
-
- /**
- * Sets the file path.
- *
- * @param string $filePath The new file path to use for the example.
- *
- * @return $this
- */
- public function setFilePath($filePath)
- {
- $this->isURI = false;
- $this->filePath = trim($filePath);
-
- $this->content = null;
- return $this;
- }
-
- /**
- * Sets the file path as an URI.
- *
- * This function is equivalent to {@link setFilePath()}, except that it
- * convers an URI to a file path before that.
- *
- * There is no getFileURI(), as {@link getFilePath()} is compatible.
- *
- * @param type $uri The new file URI to use as an example.
- */
- public function setFileURI($uri)
- {
- $this->isURI = true;
- if (false === strpos($uri, ':')) {
- //Relative URL
- $this->filePath = rawurldecode(
- str_replace(array('/', '\\'), '%2F', $uri)
- );
- } else {
- //Absolute URL or URI.
- $this->filePath = $uri;
- }
-
- $this->content = null;
- return $this;
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/LinkTag.php b/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/LinkTag.php
deleted file mode 100644
index f79f25dd..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/LinkTag.php
+++ /dev/null
@@ -1,81 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-use phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Reflection class for a @link tag in a Docblock.
- *
- * @author Ben Selby
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class LinkTag extends Tag
-{
- /** @var string */
- protected $link = '';
-
- /**
- * {@inheritdoc}
- */
- public function getContent()
- {
- if (null === $this->content) {
- $this->content = "{$this->link} {$this->description}";
- }
-
- return $this->content;
- }
-
- /**
- * {@inheritdoc}
- */
- public function setContent($content)
- {
- parent::setContent($content);
- $parts = preg_split('/\s+/Su', $this->description, 2);
-
- $this->link = $parts[0];
-
- $this->setDescription(isset($parts[1]) ? $parts[1] : $parts[0]);
-
- $this->content = $content;
- return $this;
- }
-
- /**
- * Gets the link
- *
- * @return string
- */
- public function getLink()
- {
- return $this->link;
- }
-
- /**
- * Sets the link
- *
- * @param string $link The link
- *
- * @return $this
- */
- public function setLink($link)
- {
- $this->link = $link;
-
- $this->content = null;
- return $this;
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/MethodTag.php b/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/MethodTag.php
deleted file mode 100644
index 7a5ce790..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/MethodTag.php
+++ /dev/null
@@ -1,209 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-use phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Reflection class for a @method in a Docblock.
- *
- * @author Mike van Riel
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class MethodTag extends ReturnTag
-{
-
- /** @var string */
- protected $method_name = '';
-
- /** @var string */
- protected $arguments = '';
-
- /** @var bool */
- protected $isStatic = false;
-
- /**
- * {@inheritdoc}
- */
- public function getContent()
- {
- if (null === $this->content) {
- $this->content = '';
- if ($this->isStatic) {
- $this->content .= 'static ';
- }
- $this->content .= $this->type .
- " {$this->method_name}({$this->arguments}) " .
- $this->description;
- }
-
- return $this->content;
- }
-
- /**
- * {@inheritdoc}
- */
- public function setContent($content)
- {
- Tag::setContent($content);
- // 1. none or more whitespace
- // 2. optionally the keyword "static" followed by whitespace
- // 3. optionally a word with underscores followed by whitespace : as
- // type for the return value
- // 4. then optionally a word with underscores followed by () and
- // whitespace : as method name as used by phpDocumentor
- // 5. then a word with underscores, followed by ( and any character
- // until a ) and whitespace : as method name with signature
- // 6. any remaining text : as description
- if (preg_match(
- '/^
- # Static keyword
- # Declates a static method ONLY if type is also present
- (?:
- (static)
- \s+
- )?
- # Return type
- (?:
- ([\w\|_\\\\]+)
- \s+
- )?
- # Legacy method name (not captured)
- (?:
- [\w_]+\(\)\s+
- )?
- # Method name
- ([\w\|_\\\\]+)
- # Arguments
- \(([^\)]*)\)
- \s*
- # Description
- (.*)
- $/sux',
- $this->description,
- $matches
- )) {
- list(
- ,
- $static,
- $this->type,
- $this->method_name,
- $this->arguments,
- $this->description
- ) = $matches;
- if ($static) {
- if (!$this->type) {
- $this->type = 'static';
- } else {
- $this->isStatic = true;
- }
- } else {
- if (!$this->type) {
- $this->type = 'void';
- }
- }
- $this->parsedDescription = null;
- }
-
- return $this;
- }
-
- /**
- * Sets the name of this method.
- *
- * @param string $method_name The name of the method.
- *
- * @return $this
- */
- public function setMethodName($method_name)
- {
- $this->method_name = $method_name;
-
- $this->content = null;
- return $this;
- }
-
- /**
- * Retrieves the method name.
- *
- * @return string
- */
- public function getMethodName()
- {
- return $this->method_name;
- }
-
- /**
- * Sets the arguments for this method.
- *
- * @param string $arguments A comma-separated arguments line.
- *
- * @return void
- */
- public function setArguments($arguments)
- {
- $this->arguments = $arguments;
-
- $this->content = null;
- return $this;
- }
-
- /**
- * Returns an array containing each argument as array of type and name.
- *
- * Please note that the argument sub-array may only contain 1 element if no
- * type was specified.
- *
- * @return string[]
- */
- public function getArguments()
- {
- if (empty($this->arguments)) {
- return array();
- }
-
- $arguments = explode(',', $this->arguments);
- foreach ($arguments as $key => $value) {
- $arguments[$key] = explode(' ', trim($value));
- }
-
- return $arguments;
- }
-
- /**
- * Checks whether the method tag describes a static method or not.
- *
- * @return bool TRUE if the method declaration is for a static method, FALSE
- * otherwise.
- */
- public function isStatic()
- {
- return $this->isStatic;
- }
-
- /**
- * Sets a new value for whether the method is static or not.
- *
- * @param bool $isStatic The new value to set.
- *
- * @return $this
- */
- public function setIsStatic($isStatic)
- {
- $this->isStatic = $isStatic;
-
- $this->content = null;
- return $this;
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ParamTag.php b/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ParamTag.php
deleted file mode 100644
index 9bc0270d..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ParamTag.php
+++ /dev/null
@@ -1,119 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-use phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Reflection class for a @param tag in a Docblock.
- *
- * @author Mike van Riel
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class ParamTag extends ReturnTag
-{
- /** @var string */
- protected $variableName = '';
-
- /** @var bool determines whether this is a variadic argument */
- protected $isVariadic = false;
-
- /**
- * {@inheritdoc}
- */
- public function getContent()
- {
- if (null === $this->content) {
- $this->content
- = "{$this->type} {$this->variableName} {$this->description}";
- }
- return $this->content;
- }
- /**
- * {@inheritdoc}
- */
- public function setContent($content)
- {
- Tag::setContent($content);
- $parts = preg_split(
- '/(\s+)/Su',
- $this->description,
- 3,
- PREG_SPLIT_DELIM_CAPTURE
- );
-
- // if the first item that is encountered is not a variable; it is a type
- if (isset($parts[0])
- && (strlen($parts[0]) > 0)
- && ($parts[0][0] !== '$')
- ) {
- $this->type = array_shift($parts);
- array_shift($parts);
- }
-
- // if the next item starts with a $ or ...$ it must be the variable name
- if (isset($parts[0])
- && (strlen($parts[0]) > 0)
- && ($parts[0][0] == '$' || substr($parts[0], 0, 4) === '...$')
- ) {
- $this->variableName = array_shift($parts);
- array_shift($parts);
-
- if (substr($this->variableName, 0, 3) === '...') {
- $this->isVariadic = true;
- $this->variableName = substr($this->variableName, 3);
- }
- }
-
- $this->setDescription(implode('', $parts));
-
- $this->content = $content;
- return $this;
- }
-
- /**
- * Returns the variable's name.
- *
- * @return string
- */
- public function getVariableName()
- {
- return $this->variableName;
- }
-
- /**
- * Sets the variable's name.
- *
- * @param string $name The new name for this variable.
- *
- * @return $this
- */
- public function setVariableName($name)
- {
- $this->variableName = $name;
-
- $this->content = null;
- return $this;
- }
-
- /**
- * Returns whether this tag is variadic.
- *
- * @return boolean
- */
- public function isVariadic()
- {
- return $this->isVariadic;
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyReadTag.php b/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyReadTag.php
deleted file mode 100644
index 33406026..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyReadTag.php
+++ /dev/null
@@ -1,24 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Reflection class for a @property-read tag in a Docblock.
- *
- * @author Mike van Riel
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class PropertyReadTag extends PropertyTag
-{
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyTag.php b/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyTag.php
deleted file mode 100644
index 288ecff8..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyTag.php
+++ /dev/null
@@ -1,24 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Reflection class for a @property tag in a Docblock.
- *
- * @author Mike van Riel
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class PropertyTag extends ParamTag
-{
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyWriteTag.php b/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyWriteTag.php
deleted file mode 100644
index ec4e866d..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyWriteTag.php
+++ /dev/null
@@ -1,24 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Reflection class for a @property-write tag in a Docblock.
- *
- * @author Mike van Riel
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class PropertyWriteTag extends PropertyTag
-{
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ReturnTag.php b/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ReturnTag.php
deleted file mode 100644
index 9293db92..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ReturnTag.php
+++ /dev/null
@@ -1,99 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-use phpDocumentor\Reflection\DocBlock\Tag;
-use phpDocumentor\Reflection\DocBlock\Type\Collection;
-
-/**
- * Reflection class for a @return tag in a Docblock.
- *
- * @author Mike van Riel
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class ReturnTag extends Tag
-{
- /** @var string The raw type component. */
- protected $type = '';
-
- /** @var Collection The parsed type component. */
- protected $types = null;
-
- /**
- * {@inheritdoc}
- */
- public function getContent()
- {
- if (null === $this->content) {
- $this->content = "{$this->type} {$this->description}";
- }
-
- return $this->content;
- }
-
- /**
- * {@inheritdoc}
- */
- public function setContent($content)
- {
- parent::setContent($content);
-
- $parts = preg_split('/\s+/Su', $this->description, 2);
-
- // any output is considered a type
- $this->type = $parts[0];
- $this->types = null;
-
- $this->setDescription(isset($parts[1]) ? $parts[1] : '');
-
- $this->content = $content;
- return $this;
- }
-
- /**
- * Returns the unique types of the variable.
- *
- * @return string[]
- */
- public function getTypes()
- {
- return $this->getTypesCollection()->getArrayCopy();
- }
-
- /**
- * Returns the type section of the variable.
- *
- * @return string
- */
- public function getType()
- {
- return (string) $this->getTypesCollection();
- }
-
- /**
- * Returns the type collection.
- *
- * @return void
- */
- protected function getTypesCollection()
- {
- if (null === $this->types) {
- $this->types = new Collection(
- array($this->type),
- $this->docblock ? $this->docblock->getContext() : null
- );
- }
- return $this->types;
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SeeTag.php b/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SeeTag.php
deleted file mode 100644
index 4f5f22ce..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SeeTag.php
+++ /dev/null
@@ -1,81 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-use phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Reflection class for a @see tag in a Docblock.
- *
- * @author Mike van Riel
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class SeeTag extends Tag
-{
- /** @var string */
- protected $refers = null;
-
- /**
- * {@inheritdoc}
- */
- public function getContent()
- {
- if (null === $this->content) {
- $this->content = "{$this->refers} {$this->description}";
- }
- return $this->content;
- }
-
- /**
- * {@inheritdoc}
- */
- public function setContent($content)
- {
- parent::setContent($content);
- $parts = preg_split('/\s+/Su', $this->description, 2);
-
- // any output is considered a type
- $this->refers = $parts[0];
-
- $this->setDescription(isset($parts[1]) ? $parts[1] : '');
-
- $this->content = $content;
- return $this;
- }
-
- /**
- * Gets the structural element this tag refers to.
- *
- * @return string
- */
- public function getReference()
- {
- return $this->refers;
- }
-
- /**
- * Sets the structural element this tag refers to.
- *
- * @param string $refers The new type this tag refers to.
- *
- * @return $this
- */
- public function setReference($refers)
- {
- $this->refers = $refers;
-
- $this->content = null;
- return $this;
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SinceTag.php b/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SinceTag.php
deleted file mode 100644
index ba009c44..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SinceTag.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-use phpDocumentor\Reflection\DocBlock\Tag\VersionTag;
-
-/**
- * Reflection class for a @since tag in a Docblock.
- *
- * @author Vasil Rangelov
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class SinceTag extends VersionTag
-{
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SourceTag.php b/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SourceTag.php
deleted file mode 100644
index 3400220e..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SourceTag.php
+++ /dev/null
@@ -1,137 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-use phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Reflection class for a @source tag in a Docblock.
- *
- * @author Vasil Rangelov
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class SourceTag extends Tag
-{
- /**
- * @var int The starting line, relative to the structural element's
- * location.
- */
- protected $startingLine = 1;
-
- /**
- * @var int|null The number of lines, relative to the starting line. NULL
- * means "to the end".
- */
- protected $lineCount = null;
-
- /**
- * {@inheritdoc}
- */
- public function getContent()
- {
- if (null === $this->content) {
- $this->content
- = "{$this->startingLine} {$this->lineCount} {$this->description}";
- }
-
- return $this->content;
- }
-
- /**
- * {@inheritdoc}
- */
- public function setContent($content)
- {
- parent::setContent($content);
- if (preg_match(
- '/^
- # Starting line
- ([1-9]\d*)
- \s*
- # Number of lines
- (?:
- ((?1))
- \s+
- )?
- # Description
- (.*)
- $/sux',
- $this->description,
- $matches
- )) {
- $this->startingLine = (int)$matches[1];
- if (isset($matches[2]) && '' !== $matches[2]) {
- $this->lineCount = (int)$matches[2];
- }
- $this->setDescription($matches[3]);
- $this->content = $content;
- }
-
- return $this;
- }
-
- /**
- * Gets the starting line.
- *
- * @return int The starting line, relative to the structural element's
- * location.
- */
- public function getStartingLine()
- {
- return $this->startingLine;
- }
-
- /**
- * Sets the starting line.
- *
- * @param int $startingLine The new starting line, relative to the
- * structural element's location.
- *
- * @return $this
- */
- public function setStartingLine($startingLine)
- {
- $this->startingLine = $startingLine;
-
- $this->content = null;
- return $this;
- }
-
- /**
- * Returns the number of lines.
- *
- * @return int|null The number of lines, relative to the starting line. NULL
- * means "to the end".
- */
- public function getLineCount()
- {
- return $this->lineCount;
- }
-
- /**
- * Sets the number of lines.
- *
- * @param int|null $lineCount The new number of lines, relative to the
- * starting line. NULL means "to the end".
- *
- * @return $this
- */
- public function setLineCount($lineCount)
- {
- $this->lineCount = $lineCount;
-
- $this->content = null;
- return $this;
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ThrowsTag.php b/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ThrowsTag.php
deleted file mode 100644
index 58ee44a4..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ThrowsTag.php
+++ /dev/null
@@ -1,24 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Reflection class for a @throws tag in a Docblock.
- *
- * @author Mike van Riel
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class ThrowsTag extends ReturnTag
-{
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/UsesTag.php b/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/UsesTag.php
deleted file mode 100644
index da0d6638..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/UsesTag.php
+++ /dev/null
@@ -1,24 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Reflection class for a @uses tag in a Docblock.
- *
- * @author Mike van Riel
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class UsesTag extends SeeTag
-{
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/VarTag.php b/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/VarTag.php
deleted file mode 100644
index 236b2c8b..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/VarTag.php
+++ /dev/null
@@ -1,24 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Reflection class for a @var tag in a Docblock.
- *
- * @author Mike van Riel
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class VarTag extends ParamTag
-{
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/VersionTag.php b/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/VersionTag.php
deleted file mode 100644
index 260f6984..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/VersionTag.php
+++ /dev/null
@@ -1,108 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-use phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Reflection class for a @version tag in a Docblock.
- *
- * @author Vasil Rangelov
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class VersionTag extends Tag
-{
- /**
- * PCRE regular expression matching a version vector.
- * Assumes the "x" modifier.
- */
- const REGEX_VECTOR = '(?:
- # Normal release vectors.
- \d\S*
- |
- # VCS version vectors. Per PHPCS, they are expected to
- # follow the form of the VCS name, followed by ":", followed
- # by the version vector itself.
- # By convention, popular VCSes like CVS, SVN and GIT use "$"
- # around the actual version vector.
- [^\s\:]+\:\s*\$[^\$]+\$
- )';
-
- /** @var string The version vector. */
- protected $version = '';
-
- public function getContent()
- {
- if (null === $this->content) {
- $this->content = "{$this->version} {$this->description}";
- }
-
- return $this->content;
- }
-
- /**
- * {@inheritdoc}
- */
- public function setContent($content)
- {
- parent::setContent($content);
-
- if (preg_match(
- '/^
- # The version vector
- (' . self::REGEX_VECTOR . ')
- \s*
- # The description
- (.+)?
- $/sux',
- $this->description,
- $matches
- )) {
- $this->version = $matches[1];
- $this->setDescription(isset($matches[2]) ? $matches[2] : '');
- $this->content = $content;
- }
-
- return $this;
- }
-
- /**
- * Gets the version section of the tag.
- *
- * @return string The version section of the tag.
- */
- public function getVersion()
- {
- return $this->version;
- }
-
- /**
- * Sets the version section of the tag.
- *
- * @param string $version The new version section of the tag.
- * An invalid value will set an empty string.
- *
- * @return $this
- */
- public function setVersion($version)
- {
- $this->version
- = preg_match('/^' . self::REGEX_VECTOR . '$/ux', $version)
- ? $version
- : '';
-
- $this->content = null;
- return $this;
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Type/Collection.php b/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Type/Collection.php
deleted file mode 100644
index 90ead3ff..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Type/Collection.php
+++ /dev/null
@@ -1,221 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Type;
-
-use phpDocumentor\Reflection\DocBlock\Context;
-
-/**
- * Collection
- *
- * @author Mike van Riel
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class Collection extends \ArrayObject
-{
- /** @var string Definition of the OR operator for types */
- const OPERATOR_OR = '|';
-
- /** @var string Definition of the ARRAY operator for types */
- const OPERATOR_ARRAY = '[]';
-
- /** @var string Definition of the NAMESPACE operator in PHP */
- const OPERATOR_NAMESPACE = '\\';
-
- /** @var string[] List of recognized keywords */
- protected static $keywords = array(
- 'string', 'int', 'integer', 'bool', 'boolean', 'float', 'double',
- 'object', 'mixed', 'array', 'resource', 'void', 'null', 'scalar',
- 'callback', 'callable', 'false', 'true', 'self', '$this', 'static'
- );
-
- /**
- * Current invoking location.
- *
- * This is used to prepend to type with a relative location.
- * May also be 'default' or 'global', in which case they are ignored.
- *
- * @var Context
- */
- protected $context = null;
-
- /**
- * Registers the namespace and aliases; uses that to add and expand the
- * given types.
- *
- * @param string[] $types Array containing a list of types to add to this
- * container.
- * @param Context $location The current invoking location.
- */
- public function __construct(
- array $types = array(),
- Context $context = null
- ) {
- $this->context = null === $context ? new Context() : $context;
-
- foreach ($types as $type) {
- $this->add($type);
- }
- }
-
- /**
- * Returns the current invoking location.
- *
- * @return Context
- */
- public function getContext()
- {
- return $this->context;
- }
-
- /**
- * Adds a new type to the collection and expands it if it contains a
- * relative namespace.
- *
- * If a class in the type contains a relative namespace than this collection
- * will try to expand that into a FQCN.
- *
- * @param string $type A 'Type' as defined in the phpDocumentor
- * documentation.
- *
- * @throws \InvalidArgumentException if a non-string argument is passed.
- *
- * @see http://phpdoc.org/docs/latest/for-users/types.html for the
- * definition of a type.
- *
- * @return void
- */
- public function add($type)
- {
- if (!is_string($type)) {
- throw new \InvalidArgumentException(
- 'A type should be represented by a string, received: '
- .var_export($type, true)
- );
- }
-
- // separate the type by the OR operator
- $type_parts = explode(self::OPERATOR_OR, $type);
- foreach ($type_parts as $part) {
- $expanded_type = $this->expand($part);
- if ($expanded_type) {
- $this[] = $expanded_type;
- }
- }
- }
-
- /**
- * Returns a string representation of the collection.
- *
- * @return string The resolved types across the collection, separated with
- * {@link self::OPERATOR_OR}.
- */
- public function __toString()
- {
- return implode(self::OPERATOR_OR, $this->getArrayCopy());
- }
-
- /**
- * Analyzes the given type and returns the FQCN variant.
- *
- * When a type is provided this method checks whether it is not a keyword or
- * Fully Qualified Class Name. If so it will use the given namespace and
- * aliases to expand the type to a FQCN representation.
- *
- * This method only works as expected if the namespace and aliases are set;
- * no dynamic reflection is being performed here.
- *
- * @param string $type The relative or absolute type.
- *
- * @uses getNamespace to determine with what to prefix the type name.
- * @uses getNamespaceAliases to check whether the first part of the relative
- * type name should not be replaced with another namespace.
- *
- * @return string
- */
- protected function expand($type)
- {
- $type = trim($type);
- if (!$type) {
- return '';
- }
-
- if ($this->isTypeAnArray($type)) {
- return $this->expand(substr($type, 0, -2)) . self::OPERATOR_ARRAY;
- }
-
- if ($this->isRelativeType($type) && !$this->isTypeAKeyword($type)) {
- $type_parts = explode(self::OPERATOR_NAMESPACE, $type, 2);
-
- $namespace_aliases = $this->context->getNamespaceAliases();
- // if the first segment is not an alias; prepend namespace name and
- // return
- if (!isset($namespace_aliases[$type_parts[0]])) {
- $namespace = $this->context->getNamespace();
- if ('' !== $namespace) {
- $namespace .= self::OPERATOR_NAMESPACE;
- }
- return self::OPERATOR_NAMESPACE . $namespace . $type;
- }
-
- $type_parts[0] = $namespace_aliases[$type_parts[0]];
- $type = implode(self::OPERATOR_NAMESPACE, $type_parts);
- }
-
- return $type;
- }
-
- /**
- * Detects whether the given type represents an array.
- *
- * @param string $type A relative or absolute type as defined in the
- * phpDocumentor documentation.
- *
- * @return bool
- */
- protected function isTypeAnArray($type)
- {
- return substr($type, -2) === self::OPERATOR_ARRAY;
- }
-
- /**
- * Detects whether the given type represents a PHPDoc keyword.
- *
- * @param string $type A relative or absolute type as defined in the
- * phpDocumentor documentation.
- *
- * @return bool
- */
- protected function isTypeAKeyword($type)
- {
- return in_array(strtolower($type), static::$keywords, true);
- }
-
- /**
- * Detects whether the given type represents a relative or absolute path.
- *
- * This method will detect keywords as being absolute; even though they are
- * not preceeded by a namespace separator.
- *
- * @param string $type A relative or absolute type as defined in the
- * phpDocumentor documentation.
- *
- * @return bool
- */
- protected function isRelativeType($type)
- {
- return ($type[0] !== self::OPERATOR_NAMESPACE)
- || $this->isTypeAKeyword($type);
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/DescriptionTest.php b/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/DescriptionTest.php
deleted file mode 100644
index a6ca7b37..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/DescriptionTest.php
+++ /dev/null
@@ -1,245 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\Description
- *
- * @author Vasil Rangelov
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class DescriptionTest extends \PHPUnit_Framework_TestCase
-{
- public function testConstruct()
- {
- $fixture = <<assertSame($fixture, $object->getContents());
-
- $parsedContents = $object->getParsedContents();
- $this->assertCount(1, $parsedContents);
- $this->assertSame($fixture, $parsedContents[0]);
- }
-
- public function testInlineTagParsing()
- {
- $fixture = <<assertSame($fixture, $object->getContents());
-
- $parsedContents = $object->getParsedContents();
- $this->assertCount(3, $parsedContents);
- $this->assertSame('This is text for a ', $parsedContents[0]);
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag\LinkTag',
- $parsedContents[1]
- );
- $this->assertSame(
- ' that uses inline
-tags.',
- $parsedContents[2]
- );
- }
-
- public function testInlineTagAtStartParsing()
- {
- $fixture = <<assertSame($fixture, $object->getContents());
-
- $parsedContents = $object->getParsedContents();
- $this->assertCount(3, $parsedContents);
-
- $this->assertSame('', $parsedContents[0]);
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag\LinkTag',
- $parsedContents[1]
- );
- $this->assertSame(
- ' is text for a description that uses inline
-tags.',
- $parsedContents[2]
- );
- }
-
- public function testNestedInlineTagParsing()
- {
- $fixture = <<assertSame($fixture, $object->getContents());
-
- $parsedContents = $object->getParsedContents();
- $this->assertCount(3, $parsedContents);
-
- $this->assertSame(
- 'This is text for a description with ',
- $parsedContents[0]
- );
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag',
- $parsedContents[1]
- );
- $this->assertSame('.', $parsedContents[2]);
-
- $parsedDescription = $parsedContents[1]->getParsedDescription();
- $this->assertCount(3, $parsedDescription);
- $this->assertSame("inline tag with\n", $parsedDescription[0]);
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag\LinkTag',
- $parsedDescription[1]
- );
- $this->assertSame(' in it', $parsedDescription[2]);
- }
-
- public function testLiteralOpeningDelimiter()
- {
- $fixture = <<assertSame($fixture, $object->getContents());
-
- $parsedContents = $object->getParsedContents();
- $this->assertCount(1, $parsedContents);
- $this->assertSame($fixture, $parsedContents[0]);
- }
-
- public function testNestedLiteralOpeningDelimiter()
- {
- $fixture = <<assertSame($fixture, $object->getContents());
-
- $parsedContents = $object->getParsedContents();
- $this->assertCount(3, $parsedContents);
- $this->assertSame(
- 'This is text for a description containing ',
- $parsedContents[0]
- );
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag',
- $parsedContents[1]
- );
- $this->assertSame('.', $parsedContents[2]);
-
- $this->assertSame(
- array('inline tag that has { that
-is literal'),
- $parsedContents[1]->getParsedDescription()
- );
- }
-
- public function testLiteralClosingDelimiter()
- {
- $fixture = <<assertSame($fixture, $object->getContents());
-
- $parsedContents = $object->getParsedContents();
- $this->assertCount(1, $parsedContents);
- $this->assertSame(
- 'This is text for a description with } that is not a tag.',
- $parsedContents[0]
- );
- }
-
- public function testNestedLiteralClosingDelimiter()
- {
- $fixture = <<assertSame($fixture, $object->getContents());
-
- $parsedContents = $object->getParsedContents();
- $this->assertCount(3, $parsedContents);
- $this->assertSame(
- 'This is text for a description with ',
- $parsedContents[0]
- );
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag',
- $parsedContents[1]
- );
- $this->assertSame('.', $parsedContents[2]);
-
- $this->assertSame(
- array('inline tag with } that is not an
-inline tag'),
- $parsedContents[1]->getParsedDescription()
- );
- }
-
- public function testInlineTagEscapingSequence()
- {
- $fixture = <<assertSame($fixture, $object->getContents());
-
- $parsedContents = $object->getParsedContents();
- $this->assertCount(1, $parsedContents);
- $this->assertSame(
- 'This is text for a description with literal {@link}.',
- $parsedContents[0]
- );
- }
-
- public function testNestedInlineTagEscapingSequence()
- {
- $fixture = <<assertSame($fixture, $object->getContents());
-
- $parsedContents = $object->getParsedContents();
- $this->assertCount(3, $parsedContents);
- $this->assertSame(
- 'This is text for a description with an ',
- $parsedContents[0]
- );
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag',
- $parsedContents[1]
- );
- $this->assertSame('.', $parsedContents[2]);
-
- $this->assertSame(
- array('inline tag with literal
-{@link} in it'),
- $parsedContents[1]->getParsedDescription()
- );
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/CoversTagTest.php b/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/CoversTagTest.php
deleted file mode 100644
index ff257aa1..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/CoversTagTest.php
+++ /dev/null
@@ -1,86 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\Tag\CoversTag
- *
- * @author Daniel O'Connor
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class CoversTagTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * Test that the \phpDocumentor\Reflection\DocBlock\Tag\CoversTag can create
- * a link for the covers doc block.
- *
- * @param string $type
- * @param string $content
- * @param string $exContent
- * @param string $exReference
- *
- * @covers \phpDocumentor\Reflection\DocBlock\Tag\CoversTag
- * @dataProvider provideDataForConstuctor
- *
- * @return void
- */
- public function testConstructorParesInputsIntoCorrectFields(
- $type,
- $content,
- $exContent,
- $exDescription,
- $exReference
- ) {
- $tag = new CoversTag($type, $content);
-
- $this->assertEquals($type, $tag->getName());
- $this->assertEquals($exContent, $tag->getContent());
- $this->assertEquals($exDescription, $tag->getDescription());
- $this->assertEquals($exReference, $tag->getReference());
- }
-
- /**
- * Data provider for testConstructorParesInputsIntoCorrectFields
- *
- * @return array
- */
- public function provideDataForConstuctor()
- {
- // $type, $content, $exContent, $exDescription, $exReference
- return array(
- array(
- 'covers',
- 'Foo::bar()',
- 'Foo::bar()',
- '',
- 'Foo::bar()'
- ),
- array(
- 'covers',
- 'Foo::bar() Testing',
- 'Foo::bar() Testing',
- 'Testing',
- 'Foo::bar()',
- ),
- array(
- 'covers',
- 'Foo::bar() Testing comments',
- 'Foo::bar() Testing comments',
- 'Testing comments',
- 'Foo::bar()',
- ),
- );
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/DeprecatedTagTest.php b/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/DeprecatedTagTest.php
deleted file mode 100644
index 7a75e79c..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/DeprecatedTagTest.php
+++ /dev/null
@@ -1,115 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\Tag\DeprecatedTag
- *
- * @author Vasil Rangelov
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class DeprecatedTagTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * Test that the \phpDocumentor\Reflection\DocBlock\Tag\LinkTag can create
- * a link for the @deprecated doc block.
- *
- * @param string $type
- * @param string $content
- * @param string $exContent
- * @param string $exDescription
- * @param string $exVersion
- *
- * @covers \phpDocumentor\Reflection\DocBlock\Tag\DeprecatedTag
- * @dataProvider provideDataForConstuctor
- *
- * @return void
- */
- public function testConstructorParesInputsIntoCorrectFields(
- $type,
- $content,
- $exContent,
- $exDescription,
- $exVersion
- ) {
- $tag = new DeprecatedTag($type, $content);
-
- $this->assertEquals($type, $tag->getName());
- $this->assertEquals($exContent, $tag->getContent());
- $this->assertEquals($exDescription, $tag->getDescription());
- $this->assertEquals($exVersion, $tag->getVersion());
- }
-
- /**
- * Data provider for testConstructorParesInputsIntoCorrectFields
- *
- * @return array
- */
- public function provideDataForConstuctor()
- {
- // $type, $content, $exContent, $exDescription, $exVersion
- return array(
- array(
- 'deprecated',
- '1.0 First release.',
- '1.0 First release.',
- 'First release.',
- '1.0'
- ),
- array(
- 'deprecated',
- "1.0\nFirst release.",
- "1.0\nFirst release.",
- 'First release.',
- '1.0'
- ),
- array(
- 'deprecated',
- "1.0\nFirst\nrelease.",
- "1.0\nFirst\nrelease.",
- "First\nrelease.",
- '1.0'
- ),
- array(
- 'deprecated',
- 'Unfinished release',
- 'Unfinished release',
- 'Unfinished release',
- ''
- ),
- array(
- 'deprecated',
- '1.0',
- '1.0',
- '',
- '1.0'
- ),
- array(
- 'deprecated',
- 'GIT: $Id$',
- 'GIT: $Id$',
- '',
- 'GIT: $Id$'
- ),
- array(
- 'deprecated',
- 'GIT: $Id$ Dev build',
- 'GIT: $Id$ Dev build',
- 'Dev build',
- 'GIT: $Id$'
- )
- );
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ExampleTagTest.php b/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ExampleTagTest.php
deleted file mode 100644
index 519a61b3..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ExampleTagTest.php
+++ /dev/null
@@ -1,203 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\Tag\ExampleTag
- *
- * @author Vasil Rangelov
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class ExampleTagTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * Test that the \phpDocumentor\Reflection\DocBlock\Tag\SourceTag can
- * understand the @source DocBlock.
- *
- * @param string $type
- * @param string $content
- * @param string $exContent
- * @param string $exStartingLine
- * @param string $exLineCount
- * @param string $exFilepath
- *
- * @covers \phpDocumentor\Reflection\DocBlock\Tag\ExampleTag
- * @dataProvider provideDataForConstuctor
- *
- * @return void
- */
- public function testConstructorParesInputsIntoCorrectFields(
- $type,
- $content,
- $exContent,
- $exDescription,
- $exStartingLine,
- $exLineCount,
- $exFilePath
- ) {
- $tag = new ExampleTag($type, $content);
-
- $this->assertEquals($type, $tag->getName());
- $this->assertEquals($exContent, $tag->getContent());
- $this->assertEquals($exDescription, $tag->getDescription());
- $this->assertEquals($exStartingLine, $tag->getStartingLine());
- $this->assertEquals($exLineCount, $tag->getLineCount());
- $this->assertEquals($exFilePath, $tag->getFilePath());
- }
-
- /**
- * Data provider for testConstructorParesInputsIntoCorrectFields
- *
- * @return array
- */
- public function provideDataForConstuctor()
- {
- // $type,
- // $content,
- // $exContent,
- // $exDescription,
- // $exStartingLine,
- // $exLineCount,
- // $exFilePath
- return array(
- array(
- 'example',
- 'file.php',
- 'file.php',
- '',
- 1,
- null,
- 'file.php'
- ),
- array(
- 'example',
- 'Testing comments',
- 'Testing comments',
- 'comments',
- 1,
- null,
- 'Testing'
- ),
- array(
- 'example',
- 'file.php 2 Testing',
- 'file.php 2 Testing',
- 'Testing',
- 2,
- null,
- 'file.php'
- ),
- array(
- 'example',
- 'file.php 2 3 Testing comments',
- 'file.php 2 3 Testing comments',
- 'Testing comments',
- 2,
- 3,
- 'file.php'
- ),
- array(
- 'example',
- 'file.php 2 -1 Testing comments',
- 'file.php 2 -1 Testing comments',
- '-1 Testing comments',
- 2,
- null,
- 'file.php'
- ),
- array(
- 'example',
- 'file.php -1 1 Testing comments',
- 'file.php -1 1 Testing comments',
- '-1 1 Testing comments',
- 1,
- null,
- 'file.php'
- ),
- array(
- 'example',
- '"file with spaces.php" Testing comments',
- '"file with spaces.php" Testing comments',
- 'Testing comments',
- 1,
- null,
- 'file with spaces.php'
- ),
- array(
- 'example',
- '"file with spaces.php" 2 Testing comments',
- '"file with spaces.php" 2 Testing comments',
- 'Testing comments',
- 2,
- null,
- 'file with spaces.php'
- ),
- array(
- 'example',
- '"file with spaces.php" 2 3 Testing comments',
- '"file with spaces.php" 2 3 Testing comments',
- 'Testing comments',
- 2,
- 3,
- 'file with spaces.php'
- ),
- array(
- 'example',
- '"file with spaces.php" 2 -3 Testing comments',
- '"file with spaces.php" 2 -3 Testing comments',
- '-3 Testing comments',
- 2,
- null,
- 'file with spaces.php'
- ),
- array(
- 'example',
- '"file with spaces.php" -2 3 Testing comments',
- '"file with spaces.php" -2 3 Testing comments',
- '-2 3 Testing comments',
- 1,
- null,
- 'file with spaces.php'
- ),
- array(
- 'example',
- 'file%20with%20spaces.php Testing comments',
- 'file%20with%20spaces.php Testing comments',
- 'Testing comments',
- 1,
- null,
- 'file with spaces.php'
- ),
- array(
- 'example',
- 'folder/file%20with%20spaces.php Testing comments',
- 'folder/file%20with%20spaces.php Testing comments',
- 'Testing comments',
- 1,
- null,
- 'folder/file with spaces.php'
- ),
- array(
- 'example',
- 'http://example.com/file%20with%20spaces.php Testing comments',
- 'http://example.com/file%20with%20spaces.php Testing comments',
- 'Testing comments',
- 1,
- null,
- 'http://example.com/file%20with%20spaces.php'
- )
- );
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/LinkTagTest.php b/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/LinkTagTest.php
deleted file mode 100644
index 0c64ed08..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/LinkTagTest.php
+++ /dev/null
@@ -1,87 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\Tag\LinkTag
- *
- * @author Ben Selby
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class LinkTagTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * Test that the \phpDocumentor\Reflection\DocBlock\Tag\LinkTag can create
- * a link for the @link doc block.
- *
- * @param string $type
- * @param string $content
- * @param string $exContent
- * @param string $exDescription
- * @param string $exLink
- *
- * @covers \phpDocumentor\Reflection\DocBlock\Tag\LinkTag
- * @dataProvider provideDataForConstuctor
- *
- * @return void
- */
- public function testConstructorParesInputsIntoCorrectFields(
- $type,
- $content,
- $exContent,
- $exDescription,
- $exLink
- ) {
- $tag = new LinkTag($type, $content);
-
- $this->assertEquals($type, $tag->getName());
- $this->assertEquals($exContent, $tag->getContent());
- $this->assertEquals($exDescription, $tag->getDescription());
- $this->assertEquals($exLink, $tag->getLink());
- }
-
- /**
- * Data provider for testConstructorParesInputsIntoCorrectFields
- *
- * @return array
- */
- public function provideDataForConstuctor()
- {
- // $type, $content, $exContent, $exDescription, $exLink
- return array(
- array(
- 'link',
- 'http://www.phpdoc.org/',
- 'http://www.phpdoc.org/',
- 'http://www.phpdoc.org/',
- 'http://www.phpdoc.org/'
- ),
- array(
- 'link',
- 'http://www.phpdoc.org/ Testing',
- 'http://www.phpdoc.org/ Testing',
- 'Testing',
- 'http://www.phpdoc.org/'
- ),
- array(
- 'link',
- 'http://www.phpdoc.org/ Testing comments',
- 'http://www.phpdoc.org/ Testing comments',
- 'Testing comments',
- 'http://www.phpdoc.org/'
- ),
- );
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/MethodTagTest.php b/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/MethodTagTest.php
deleted file mode 100644
index efc3a15b..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/MethodTagTest.php
+++ /dev/null
@@ -1,146 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\Tag\MethodTag
- *
- * @author Mike van Riel
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class MethodTagTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * @param string $signature The signature to test.
- * @param bool $valid Whether the given signature is expected to
- * be valid.
- * @param string $expected_name The method name that is expected from this
- * signature.
- * @param string $expected_return The return type that is expected from this
- * signature.
- * @param bool $paramCount Number of parameters in the signature.
- * @param string $description The short description mentioned in the
- * signature.
- *
- * @covers \phpDocumentor\Reflection\DocBlock\Tag\MethodTag
- * @dataProvider getTestSignatures
- *
- * @return void
- */
- public function testConstruct(
- $signature,
- $valid,
- $expected_name,
- $expected_return,
- $expected_isStatic,
- $paramCount,
- $description
- ) {
- ob_start();
- $tag = new MethodTag('method', $signature);
- $stdout = ob_get_clean();
-
- $this->assertSame(
- $valid,
- empty($stdout),
- 'No error should have been output if the signature is valid'
- );
-
- if (!$valid) {
- return;
- }
-
- $this->assertEquals($expected_name, $tag->getMethodName());
- $this->assertEquals($expected_return, $tag->getType());
- $this->assertEquals($description, $tag->getDescription());
- $this->assertEquals($expected_isStatic, $tag->isStatic());
- $this->assertCount($paramCount, $tag->getArguments());
- }
-
- public function getTestSignatures()
- {
- return array(
- // TODO: Verify this case
-// array(
-// 'foo',
-// false, 'foo', '', false, 0, ''
-// ),
- array(
- 'foo()',
- true, 'foo', 'void', false, 0, ''
- ),
- array(
- 'foo() description',
- true, 'foo', 'void', false, 0, 'description'
- ),
- array(
- 'int foo()',
- true, 'foo', 'int', false, 0, ''
- ),
- array(
- 'int foo() description',
- true, 'foo', 'int', false, 0, 'description'
- ),
- array(
- 'int foo($a, $b)',
- true, 'foo', 'int', false, 2, ''
- ),
- array(
- 'int foo() foo(int $a, int $b)',
- true, 'foo', 'int', false, 2, ''
- ),
- array(
- 'int foo(int $a, int $b)',
- true, 'foo', 'int', false, 2, ''
- ),
- array(
- 'null|int foo(int $a, int $b)',
- true, 'foo', 'null|int', false, 2, ''
- ),
- array(
- 'int foo(null|int $a, int $b)',
- true, 'foo', 'int', false, 2, ''
- ),
- array(
- '\Exception foo() foo(Exception $a, Exception $b)',
- true, 'foo', '\Exception', false, 2, ''
- ),
- array(
- 'int foo() foo(Exception $a, Exception $b) description',
- true, 'foo', 'int', false, 2, 'description'
- ),
- array(
- 'int foo() foo(\Exception $a, \Exception $b) description',
- true, 'foo', 'int', false, 2, 'description'
- ),
- array(
- 'void()',
- true, 'void', 'void', false, 0, ''
- ),
- array(
- 'static foo()',
- true, 'foo', 'static', false, 0, ''
- ),
- array(
- 'static void foo()',
- true, 'foo', 'void', true, 0, ''
- ),
- array(
- 'static static foo()',
- true, 'foo', 'static', true, 0, ''
- )
- );
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ParamTagTest.php b/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ParamTagTest.php
deleted file mode 100644
index 0e05382f..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ParamTagTest.php
+++ /dev/null
@@ -1,118 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\ParamTag
- *
- * @author Mike van Riel
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class ParamTagTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * Test that the \phpDocumentor\Reflection\DocBlock\Tag\ParamTag can
- * understand the @param DocBlock.
- *
- * @param string $type
- * @param string $content
- * @param string $extractedType
- * @param string $extractedTypes
- * @param string $extractedVarName
- * @param string $extractedDescription
- *
- * @covers \phpDocumentor\Reflection\DocBlock\Tag\ParamTag
- * @dataProvider provideDataForConstructor
- *
- * @return void
- */
- public function testConstructorParsesInputsIntoCorrectFields(
- $type,
- $content,
- $extractedType,
- $extractedTypes,
- $extractedVarName,
- $extractedDescription
- ) {
- $tag = new ParamTag($type, $content);
-
- $this->assertEquals($type, $tag->getName());
- $this->assertEquals($extractedType, $tag->getType());
- $this->assertEquals($extractedTypes, $tag->getTypes());
- $this->assertEquals($extractedVarName, $tag->getVariableName());
- $this->assertEquals($extractedDescription, $tag->getDescription());
- }
-
- /**
- * Data provider for testConstructorParsesInputsIntoCorrectFields()
- *
- * @return array
- */
- public function provideDataForConstructor()
- {
- return array(
- array('param', 'int', 'int', array('int'), '', ''),
- array('param', '$bob', '', array(), '$bob', ''),
- array(
- 'param',
- 'int Number of bobs',
- 'int',
- array('int'),
- '',
- 'Number of bobs'
- ),
- array(
- 'param',
- 'int $bob',
- 'int',
- array('int'),
- '$bob',
- ''
- ),
- array(
- 'param',
- 'int $bob Number of bobs',
- 'int',
- array('int'),
- '$bob',
- 'Number of bobs'
- ),
- array(
- 'param',
- "int Description \n on multiple lines",
- 'int',
- array('int'),
- '',
- "Description \n on multiple lines"
- ),
- array(
- 'param',
- "int \n\$bob Variable name on a new line",
- 'int',
- array('int'),
- '$bob',
- "Variable name on a new line"
- ),
- array(
- 'param',
- "\nint \$bob Type on a new line",
- 'int',
- array('int'),
- '$bob',
- "Type on a new line"
- )
- );
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ReturnTagTest.php b/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ReturnTagTest.php
deleted file mode 100644
index 9e2aec0d..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ReturnTagTest.php
+++ /dev/null
@@ -1,102 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\ReturnTag
- *
- * @author Mike van Riel
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class ReturnTagTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * Test that the \phpDocumentor\Reflection\DocBlock\Tag\ReturnTag can
- * understand the @return DocBlock.
- *
- * @param string $type
- * @param string $content
- * @param string $extractedType
- * @param string $extractedTypes
- * @param string $extractedDescription
- *
- * @covers \phpDocumentor\Reflection\DocBlock\Tag\ReturnTag
- * @dataProvider provideDataForConstructor
- *
- * @return void
- */
- public function testConstructorParsesInputsIntoCorrectFields(
- $type,
- $content,
- $extractedType,
- $extractedTypes,
- $extractedDescription
- ) {
- $tag = new ReturnTag($type, $content);
-
- $this->assertEquals($type, $tag->getName());
- $this->assertEquals($extractedType, $tag->getType());
- $this->assertEquals($extractedTypes, $tag->getTypes());
- $this->assertEquals($extractedDescription, $tag->getDescription());
- }
-
- /**
- * Data provider for testConstructorParsesInputsIntoCorrectFields()
- *
- * @return array
- */
- public function provideDataForConstructor()
- {
- return array(
- array('return', '', '', array(), ''),
- array('return', 'int', 'int', array('int'), ''),
- array(
- 'return',
- 'int Number of Bobs',
- 'int',
- array('int'),
- 'Number of Bobs'
- ),
- array(
- 'return',
- 'int|double Number of Bobs',
- 'int|double',
- array('int', 'double'),
- 'Number of Bobs'
- ),
- array(
- 'return',
- "int Number of \n Bobs",
- 'int',
- array('int'),
- "Number of \n Bobs"
- ),
- array(
- 'return',
- " int Number of Bobs",
- 'int',
- array('int'),
- "Number of Bobs"
- ),
- array(
- 'return',
- "int\nNumber of Bobs",
- 'int',
- array('int'),
- "Number of Bobs"
- )
- );
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SeeTagTest.php b/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SeeTagTest.php
deleted file mode 100644
index 6829b046..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SeeTagTest.php
+++ /dev/null
@@ -1,86 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\Tag\SeeTag
- *
- * @author Daniel O'Connor
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class SeeTagTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * Test that the phpDocumentor_Reflection_DocBlock_Tag_See can create a link
- * for the @see doc block.
- *
- * @param string $type
- * @param string $content
- * @param string $exContent
- * @param string $exReference
- *
- * @covers \phpDocumentor\Reflection\DocBlock\Tag\SeeTag
- * @dataProvider provideDataForConstuctor
- *
- * @return void
- */
- public function testConstructorParesInputsIntoCorrectFields(
- $type,
- $content,
- $exContent,
- $exDescription,
- $exReference
- ) {
- $tag = new SeeTag($type, $content);
-
- $this->assertEquals($type, $tag->getName());
- $this->assertEquals($exContent, $tag->getContent());
- $this->assertEquals($exDescription, $tag->getDescription());
- $this->assertEquals($exReference, $tag->getReference());
- }
-
- /**
- * Data provider for testConstructorParesInputsIntoCorrectFields
- *
- * @return array
- */
- public function provideDataForConstuctor()
- {
- // $type, $content, $exContent, $exDescription, $exReference
- return array(
- array(
- 'see',
- 'Foo::bar()',
- 'Foo::bar()',
- '',
- 'Foo::bar()'
- ),
- array(
- 'see',
- 'Foo::bar() Testing',
- 'Foo::bar() Testing',
- 'Testing',
- 'Foo::bar()',
- ),
- array(
- 'see',
- 'Foo::bar() Testing comments',
- 'Foo::bar() Testing comments',
- 'Testing comments',
- 'Foo::bar()',
- ),
- );
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SinceTagTest.php b/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SinceTagTest.php
deleted file mode 100644
index 8caf25d1..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SinceTagTest.php
+++ /dev/null
@@ -1,115 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\Tag\SinceTag
- *
- * @author Vasil Rangelov
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class SinceTagTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * Test that the \phpDocumentor\Reflection\DocBlock\Tag\LinkTag can create
- * a link for the @since doc block.
- *
- * @param string $type
- * @param string $content
- * @param string $exContent
- * @param string $exDescription
- * @param string $exVersion
- *
- * @covers \phpDocumentor\Reflection\DocBlock\Tag\SinceTag
- * @dataProvider provideDataForConstuctor
- *
- * @return void
- */
- public function testConstructorParesInputsIntoCorrectFields(
- $type,
- $content,
- $exContent,
- $exDescription,
- $exVersion
- ) {
- $tag = new SinceTag($type, $content);
-
- $this->assertEquals($type, $tag->getName());
- $this->assertEquals($exContent, $tag->getContent());
- $this->assertEquals($exDescription, $tag->getDescription());
- $this->assertEquals($exVersion, $tag->getVersion());
- }
-
- /**
- * Data provider for testConstructorParesInputsIntoCorrectFields
- *
- * @return array
- */
- public function provideDataForConstuctor()
- {
- // $type, $content, $exContent, $exDescription, $exVersion
- return array(
- array(
- 'since',
- '1.0 First release.',
- '1.0 First release.',
- 'First release.',
- '1.0'
- ),
- array(
- 'since',
- "1.0\nFirst release.",
- "1.0\nFirst release.",
- 'First release.',
- '1.0'
- ),
- array(
- 'since',
- "1.0\nFirst\nrelease.",
- "1.0\nFirst\nrelease.",
- "First\nrelease.",
- '1.0'
- ),
- array(
- 'since',
- 'Unfinished release',
- 'Unfinished release',
- 'Unfinished release',
- ''
- ),
- array(
- 'since',
- '1.0',
- '1.0',
- '',
- '1.0'
- ),
- array(
- 'since',
- 'GIT: $Id$',
- 'GIT: $Id$',
- '',
- 'GIT: $Id$'
- ),
- array(
- 'since',
- 'GIT: $Id$ Dev build',
- 'GIT: $Id$ Dev build',
- 'Dev build',
- 'GIT: $Id$'
- )
- );
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SourceTagTest.php b/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SourceTagTest.php
deleted file mode 100644
index 2a40e0aa..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SourceTagTest.php
+++ /dev/null
@@ -1,116 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\Tag\SourceTag
- *
- * @author Vasil Rangelov
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class SourceTagTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * Test that the \phpDocumentor\Reflection\DocBlock\Tag\SourceTag can
- * understand the @source DocBlock.
- *
- * @param string $type
- * @param string $content
- * @param string $exContent
- * @param string $exStartingLine
- * @param string $exLineCount
- *
- * @covers \phpDocumentor\Reflection\DocBlock\Tag\SourceTag
- * @dataProvider provideDataForConstuctor
- *
- * @return void
- */
- public function testConstructorParesInputsIntoCorrectFields(
- $type,
- $content,
- $exContent,
- $exDescription,
- $exStartingLine,
- $exLineCount
- ) {
- $tag = new SourceTag($type, $content);
-
- $this->assertEquals($type, $tag->getName());
- $this->assertEquals($exContent, $tag->getContent());
- $this->assertEquals($exDescription, $tag->getDescription());
- $this->assertEquals($exStartingLine, $tag->getStartingLine());
- $this->assertEquals($exLineCount, $tag->getLineCount());
- }
-
- /**
- * Data provider for testConstructorParesInputsIntoCorrectFields
- *
- * @return array
- */
- public function provideDataForConstuctor()
- {
- // $type, $content, $exContent, $exDescription, $exStartingLine, $exLineCount
- return array(
- array(
- 'source',
- '2',
- '2',
- '',
- 2,
- null
- ),
- array(
- 'source',
- 'Testing',
- 'Testing',
- 'Testing',
- 1,
- null
- ),
- array(
- 'source',
- '2 Testing',
- '2 Testing',
- 'Testing',
- 2,
- null
- ),
- array(
- 'source',
- '2 3 Testing comments',
- '2 3 Testing comments',
- 'Testing comments',
- 2,
- 3
- ),
- array(
- 'source',
- '2 -1 Testing comments',
- '2 -1 Testing comments',
- '-1 Testing comments',
- 2,
- null
- ),
- array(
- 'source',
- '-1 1 Testing comments',
- '-1 1 Testing comments',
- '-1 1 Testing comments',
- 1,
- null
- )
- );
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ThrowsTagTest.php b/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ThrowsTagTest.php
deleted file mode 100644
index 3c669d55..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ThrowsTagTest.php
+++ /dev/null
@@ -1,102 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\ThrowsTag
- *
- * @author Mike van Riel
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class ThrowsTagTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * Test that the \phpDocumentor\Reflection\DocBlock\Tag\ThrowsTag can
- * understand the @throws DocBlock.
- *
- * @param string $type
- * @param string $content
- * @param string $extractedType
- * @param string $extractedTypes
- * @param string $extractedDescription
- *
- * @covers \phpDocumentor\Reflection\DocBlock\Tag\ThrowsTag
- * @dataProvider provideDataForConstructor
- *
- * @return void
- */
- public function testConstructorParsesInputsIntoCorrectFields(
- $type,
- $content,
- $extractedType,
- $extractedTypes,
- $extractedDescription
- ) {
- $tag = new ThrowsTag($type, $content);
-
- $this->assertEquals($type, $tag->getName());
- $this->assertEquals($extractedType, $tag->getType());
- $this->assertEquals($extractedTypes, $tag->getTypes());
- $this->assertEquals($extractedDescription, $tag->getDescription());
- }
-
- /**
- * Data provider for testConstructorParsesInputsIntoCorrectFields()
- *
- * @return array
- */
- public function provideDataForConstructor()
- {
- return array(
- array('throws', '', '', array(), ''),
- array('throws', 'int', 'int', array('int'), ''),
- array(
- 'throws',
- 'int Number of Bobs',
- 'int',
- array('int'),
- 'Number of Bobs'
- ),
- array(
- 'throws',
- 'int|double Number of Bobs',
- 'int|double',
- array('int', 'double'),
- 'Number of Bobs'
- ),
- array(
- 'throws',
- "int Number of \n Bobs",
- 'int',
- array('int'),
- "Number of \n Bobs"
- ),
- array(
- 'throws',
- " int Number of Bobs",
- 'int',
- array('int'),
- "Number of Bobs"
- ),
- array(
- 'throws',
- "int\nNumber of Bobs",
- 'int',
- array('int'),
- "Number of Bobs"
- )
- );
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/UsesTagTest.php b/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/UsesTagTest.php
deleted file mode 100644
index 45868d73..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/UsesTagTest.php
+++ /dev/null
@@ -1,86 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\Tag\UsesTag
- *
- * @author Daniel O'Connor
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class UsesTagTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * Test that the \phpDocumentor\Reflection\DocBlock\Tag\UsesTag can create
- * a link for the @uses doc block.
- *
- * @param string $type
- * @param string $content
- * @param string $exContent
- * @param string $exReference
- *
- * @covers \phpDocumentor\Reflection\DocBlock\Tag\UsesTag
- * @dataProvider provideDataForConstuctor
- *
- * @return void
- */
- public function testConstructorParesInputsIntoCorrectFields(
- $type,
- $content,
- $exContent,
- $exDescription,
- $exReference
- ) {
- $tag = new UsesTag($type, $content);
-
- $this->assertEquals($type, $tag->getName());
- $this->assertEquals($exContent, $tag->getContent());
- $this->assertEquals($exDescription, $tag->getDescription());
- $this->assertEquals($exReference, $tag->getReference());
- }
-
- /**
- * Data provider for testConstructorParesInputsIntoCorrectFields
- *
- * @return array
- */
- public function provideDataForConstuctor()
- {
- // $type, $content, $exContent, $exDescription, $exReference
- return array(
- array(
- 'uses',
- 'Foo::bar()',
- 'Foo::bar()',
- '',
- 'Foo::bar()'
- ),
- array(
- 'uses',
- 'Foo::bar() Testing',
- 'Foo::bar() Testing',
- 'Testing',
- 'Foo::bar()',
- ),
- array(
- 'uses',
- 'Foo::bar() Testing comments',
- 'Foo::bar() Testing comments',
- 'Testing comments',
- 'Foo::bar()',
- ),
- );
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/VarTagTest.php b/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/VarTagTest.php
deleted file mode 100644
index 9ae2aa5f..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/VarTagTest.php
+++ /dev/null
@@ -1,94 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\Tag\VarTag
- *
- * @author Daniel O'Connor
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class VarTagTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * Test that the \phpDocumentor\Reflection\DocBlock\Tag\VarTag can
- * understand the @var doc block.
- *
- * @param string $type
- * @param string $content
- * @param string $exType
- * @param string $exVariable
- * @param string $exDescription
- *
- * @covers \phpDocumentor\Reflection\DocBlock\Tag\VarTag
- * @dataProvider provideDataForConstuctor
- *
- * @return void
- */
- public function testConstructorParesInputsIntoCorrectFields(
- $type,
- $content,
- $exType,
- $exVariable,
- $exDescription
- ) {
- $tag = new VarTag($type, $content);
-
- $this->assertEquals($type, $tag->getName());
- $this->assertEquals($exType, $tag->getType());
- $this->assertEquals($exVariable, $tag->getVariableName());
- $this->assertEquals($exDescription, $tag->getDescription());
- }
-
- /**
- * Data provider for testConstructorParesInputsIntoCorrectFields
- *
- * @return array
- */
- public function provideDataForConstuctor()
- {
- // $type, $content, $exType, $exVariable, $exDescription
- return array(
- array(
- 'var',
- 'int',
- 'int',
- '',
- ''
- ),
- array(
- 'var',
- 'int $bob',
- 'int',
- '$bob',
- ''
- ),
- array(
- 'var',
- 'int $bob Number of bobs',
- 'int',
- '$bob',
- 'Number of bobs'
- ),
- array(
- 'var',
- '',
- '',
- '',
- ''
- ),
- );
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/VersionTagTest.php b/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/VersionTagTest.php
deleted file mode 100644
index e145386d..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/VersionTagTest.php
+++ /dev/null
@@ -1,115 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\Tag\VersionTag
- *
- * @author Vasil Rangelov
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class VersionTagTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * Test that the \phpDocumentor\Reflection\DocBlock\Tag\LinkTag can create
- * a link for the @version doc block.
- *
- * @param string $type
- * @param string $content
- * @param string $exContent
- * @param string $exDescription
- * @param string $exVersion
- *
- * @covers \phpDocumentor\Reflection\DocBlock\Tag\VersionTag
- * @dataProvider provideDataForConstuctor
- *
- * @return void
- */
- public function testConstructorParesInputsIntoCorrectFields(
- $type,
- $content,
- $exContent,
- $exDescription,
- $exVersion
- ) {
- $tag = new VersionTag($type, $content);
-
- $this->assertEquals($type, $tag->getName());
- $this->assertEquals($exContent, $tag->getContent());
- $this->assertEquals($exDescription, $tag->getDescription());
- $this->assertEquals($exVersion, $tag->getVersion());
- }
-
- /**
- * Data provider for testConstructorParesInputsIntoCorrectFields
- *
- * @return array
- */
- public function provideDataForConstuctor()
- {
- // $type, $content, $exContent, $exDescription, $exVersion
- return array(
- array(
- 'version',
- '1.0 First release.',
- '1.0 First release.',
- 'First release.',
- '1.0'
- ),
- array(
- 'version',
- "1.0\nFirst release.",
- "1.0\nFirst release.",
- 'First release.',
- '1.0'
- ),
- array(
- 'version',
- "1.0\nFirst\nrelease.",
- "1.0\nFirst\nrelease.",
- "First\nrelease.",
- '1.0'
- ),
- array(
- 'version',
- 'Unfinished release',
- 'Unfinished release',
- 'Unfinished release',
- ''
- ),
- array(
- 'version',
- '1.0',
- '1.0',
- '',
- '1.0'
- ),
- array(
- 'version',
- 'GIT: $Id$',
- 'GIT: $Id$',
- '',
- 'GIT: $Id$'
- ),
- array(
- 'version',
- 'GIT: $Id$ Dev build',
- 'GIT: $Id$ Dev build',
- 'Dev build',
- 'GIT: $Id$'
- )
- );
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/TagTest.php b/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/TagTest.php
deleted file mode 100644
index 9e873ecb..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/TagTest.php
+++ /dev/null
@@ -1,313 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock;
-
-use phpDocumentor\Reflection\DocBlock;
-use phpDocumentor\Reflection\DocBlock\Context;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\Tag\VarTag
- *
- * @author Daniel O'Connor
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class TagTest extends \PHPUnit_Framework_TestCase
-{
-
- /**
- * @expectedException \InvalidArgumentException
- *
- * @return void
- */
- public function testInvalidTagLine()
- {
- Tag::createInstance('Invalid tag line');
- }
-
- /**
- * @covers \phpDocumentor\Reflection\DocBlock\Tag::registerTagHandler
- *
- * @return void
- */
- public function testTagHandlerUnregistration()
- {
- $currentHandler = __NAMESPACE__ . '\Tag\VarTag';
- $tagPreUnreg = Tag::createInstance('@var mixed');
- $this->assertInstanceOf(
- $currentHandler,
- $tagPreUnreg
- );
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag',
- $tagPreUnreg
- );
-
- Tag::registerTagHandler('var', null);
-
- $tagPostUnreg = Tag::createInstance('@var mixed');
- $this->assertNotInstanceOf(
- $currentHandler,
- $tagPostUnreg
- );
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag',
- $tagPostUnreg
- );
-
- Tag::registerTagHandler('var', $currentHandler);
- }
-
- /**
- * @covers \phpDocumentor\Reflection\DocBlock\Tag::registerTagHandler
- *
- * @return void
- */
- public function testTagHandlerCorrectRegistration()
- {
- if (0 == ini_get('allow_url_include')) {
- $this->markTestSkipped('"data" URIs for includes are required.');
- }
- $currentHandler = __NAMESPACE__ . '\Tag\VarTag';
- $tagPreReg = Tag::createInstance('@var mixed');
- $this->assertInstanceOf(
- $currentHandler,
- $tagPreReg
- );
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag',
- $tagPreReg
- );
-
- include 'data:text/plain;base64,'. base64_encode(
-<<assertTrue(Tag::registerTagHandler('var', '\MyTagHandler'));
-
- $tagPostReg = Tag::createInstance('@var mixed');
- $this->assertNotInstanceOf(
- $currentHandler,
- $tagPostReg
- );
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag',
- $tagPostReg
- );
- $this->assertInstanceOf(
- '\MyTagHandler',
- $tagPostReg
- );
-
- $this->assertTrue(Tag::registerTagHandler('var', $currentHandler));
- }
-
- /**
- * @depends testTagHandlerCorrectRegistration
- * @covers \phpDocumentor\Reflection\DocBlock\Tag::registerTagHandler
- * @covers \phpDocumentor\Reflection\DocBlock\Tag::createInstance
- *
- * @return void
- */
- public function testNamespacedTagHandlerCorrectRegistration()
- {
- $tagPreReg = Tag::createInstance('@T something');
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag',
- $tagPreReg
- );
- $this->assertNotInstanceOf(
- '\MyTagHandler',
- $tagPreReg
- );
-
- $this->assertTrue(
- Tag::registerTagHandler('\MyNamespace\MyTag', '\MyTagHandler')
- );
-
- $tagPostReg = Tag::createInstance(
- '@T something',
- new DocBlock(
- '',
- new Context('', array('T' => '\MyNamespace\MyTag'))
- )
- );
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag',
- $tagPostReg
- );
- $this->assertInstanceOf(
- '\MyTagHandler',
- $tagPostReg
- );
-
- $this->assertTrue(
- Tag::registerTagHandler('\MyNamespace\MyTag', null)
- );
- }
-
- /**
- * @depends testTagHandlerCorrectRegistration
- * @covers \phpDocumentor\Reflection\DocBlock\Tag::registerTagHandler
- * @covers \phpDocumentor\Reflection\DocBlock\Tag::createInstance
- *
- * @return void
- */
- public function testNamespacedTagHandlerIncorrectRegistration()
- {
- $tagPreReg = Tag::createInstance('@T something');
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag',
- $tagPreReg
- );
- $this->assertNotInstanceOf(
- '\MyTagHandler',
- $tagPreReg
- );
-
- $this->assertFalse(
- Tag::registerTagHandler('MyNamespace\MyTag', '\MyTagHandler')
- );
-
- $tagPostReg = Tag::createInstance(
- '@T something',
- new DocBlock(
- '',
- new Context('', array('T' => '\MyNamespace\MyTag'))
- )
- );
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag',
- $tagPostReg
- );
- $this->assertNotInstanceOf(
- '\MyTagHandler',
- $tagPostReg
- );
- }
-
- /**
- * @covers \phpDocumentor\Reflection\DocBlock\Tag::registerTagHandler
- *
- * @return void
- */
- public function testNonExistentTagHandlerRegistration()
- {
- $currentHandler = __NAMESPACE__ . '\Tag\VarTag';
- $tagPreReg = Tag::createInstance('@var mixed');
- $this->assertInstanceOf(
- $currentHandler,
- $tagPreReg
- );
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag',
- $tagPreReg
- );
-
- $this->assertFalse(Tag::registerTagHandler('var', 'Non existent'));
-
- $tagPostReg = Tag::createInstance('@var mixed');
- $this->assertInstanceOf(
- $currentHandler,
- $tagPostReg
- );
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag',
- $tagPostReg
- );
- }
-
- /**
- * @covers \phpDocumentor\Reflection\DocBlock\Tag::registerTagHandler
- *
- * @return void
- */
- public function testIncompatibleTagHandlerRegistration()
- {
- $currentHandler = __NAMESPACE__ . '\Tag\VarTag';
- $tagPreReg = Tag::createInstance('@var mixed');
- $this->assertInstanceOf(
- $currentHandler,
- $tagPreReg
- );
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag',
- $tagPreReg
- );
-
- $this->assertFalse(
- Tag::registerTagHandler('var', __NAMESPACE__ . '\TagTest')
- );
-
- $tagPostReg = Tag::createInstance('@var mixed');
- $this->assertInstanceOf(
- $currentHandler,
- $tagPostReg
- );
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag',
- $tagPostReg
- );
- }
-
- /**
- * Test that the \phpDocumentor\Reflection\DocBlock\Tag\VarTag can
- * understand the @var doc block.
- *
- * @param string $type
- * @param string $content
- * @param string $exDescription
- *
- * @covers \phpDocumentor\Reflection\DocBlock\Tag
- * @dataProvider provideDataForConstuctor
- *
- * @return void
- */
- public function testConstructorParesInputsIntoCorrectFields(
- $type,
- $content,
- $exDescription
- ) {
- $tag = new Tag($type, $content);
-
- $this->assertEquals($type, $tag->getName());
- $this->assertEquals($content, $tag->getContent());
- $this->assertEquals($exDescription, $tag->getDescription());
- }
-
- /**
- * Data provider for testConstructorParesInputsIntoCorrectFields
- *
- * @return array
- */
- public function provideDataForConstuctor()
- {
- // $type, $content, $exDescription
- return array(
- array(
- 'unknown',
- 'some content',
- 'some content',
- ),
- array(
- 'unknown',
- '',
- '',
- )
- );
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Type/CollectionTest.php b/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Type/CollectionTest.php
deleted file mode 100644
index 78c7306d..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Type/CollectionTest.php
+++ /dev/null
@@ -1,195 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Type;
-
-use phpDocumentor\Reflection\DocBlock\Context;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\Type\Collection
- *
- * @covers phpDocumentor\Reflection\DocBlock\Type\Collection
- *
- * @author Mike van Riel
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class CollectionTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::__construct
- * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::getContext
- *
- * @return void
- */
- public function testConstruct()
- {
- $collection = new Collection();
- $this->assertCount(0, $collection);
- $this->assertEquals('', $collection->getContext()->getNamespace());
- $this->assertCount(0, $collection->getContext()->getNamespaceAliases());
- }
-
- /**
- * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::__construct
- *
- * @return void
- */
- public function testConstructWithTypes()
- {
- $collection = new Collection(array('integer', 'string'));
- $this->assertCount(2, $collection);
- }
-
- /**
- * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::__construct
- *
- * @return void
- */
- public function testConstructWithNamespace()
- {
- $collection = new Collection(array(), new Context('\My\Space'));
- $this->assertEquals('My\Space', $collection->getContext()->getNamespace());
-
- $collection = new Collection(array(), new Context('My\Space'));
- $this->assertEquals('My\Space', $collection->getContext()->getNamespace());
-
- $collection = new Collection(array(), null);
- $this->assertEquals('', $collection->getContext()->getNamespace());
- }
-
- /**
- * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::__construct
- *
- * @return void
- */
- public function testConstructWithNamespaceAliases()
- {
- $fixture = array('a' => 'b');
- $collection = new Collection(array(), new Context(null, $fixture));
- $this->assertEquals(
- array('a' => '\b'),
- $collection->getContext()->getNamespaceAliases()
- );
- }
-
- /**
- * @param string $fixture
- * @param array $expected
- *
- * @dataProvider provideTypesToExpand
- * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::add
- *
- * @return void
- */
- public function testAdd($fixture, $expected)
- {
- $collection = new Collection(
- array(),
- new Context('\My\Space', array('Alias' => '\My\Space\Aliasing'))
- );
- $collection->add($fixture);
-
- $this->assertSame($expected, $collection->getArrayCopy());
- }
-
- /**
- * @param string $fixture
- * @param array $expected
- *
- * @dataProvider provideTypesToExpandWithoutNamespace
- * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::add
- *
- * @return void
- */
- public function testAddWithoutNamespace($fixture, $expected)
- {
- $collection = new Collection(
- array(),
- new Context(null, array('Alias' => '\My\Space\Aliasing'))
- );
- $collection->add($fixture);
-
- $this->assertSame($expected, $collection->getArrayCopy());
- }
-
- /**
- * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::add
- * @expectedException InvalidArgumentException
- *
- * @return void
- */
- public function testAddWithInvalidArgument()
- {
- $collection = new Collection();
- $collection->add(array());
- }
-
- /**
- * Returns the types and their expected values to test the retrieval of
- * types.
- *
- * @param string $method Name of the method consuming this data provider.
- * @param string $namespace Name of the namespace to user as basis.
- *
- * @return string[]
- */
- public function provideTypesToExpand($method, $namespace = '\My\Space\\')
- {
- return array(
- array('', array()),
- array(' ', array()),
- array('int', array('int')),
- array('int ', array('int')),
- array('string', array('string')),
- array('DocBlock', array($namespace.'DocBlock')),
- array('DocBlock[]', array($namespace.'DocBlock[]')),
- array(' DocBlock ', array($namespace.'DocBlock')),
- array('\My\Space\DocBlock', array('\My\Space\DocBlock')),
- array('Alias\DocBlock', array('\My\Space\Aliasing\DocBlock')),
- array(
- 'DocBlock|Tag',
- array($namespace .'DocBlock', $namespace .'Tag')
- ),
- array(
- 'DocBlock|null',
- array($namespace.'DocBlock', 'null')
- ),
- array(
- '\My\Space\DocBlock|Tag',
- array('\My\Space\DocBlock', $namespace.'Tag')
- ),
- array(
- 'DocBlock[]|null',
- array($namespace.'DocBlock[]', 'null')
- ),
- array(
- 'DocBlock[]|int[]',
- array($namespace.'DocBlock[]', 'int[]')
- ),
- );
- }
-
- /**
- * Returns the types and their expected values to test the retrieval of
- * types when no namespace is available.
- *
- * @param string $method Name of the method consuming this data provider.
- *
- * @return string[]
- */
- public function provideTypesToExpandWithoutNamespace($method)
- {
- return $this->provideTypesToExpand($method, '\\');
- }
-}
diff --git a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlockTest.php b/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlockTest.php
deleted file mode 100644
index 30eedfc5..00000000
--- a/tests/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlockTest.php
+++ /dev/null
@@ -1,337 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection;
-
-use phpDocumentor\Reflection\DocBlock\Context;
-use phpDocumentor\Reflection\DocBlock\Location;
-use phpDocumentor\Reflection\DocBlock\Tag\ReturnTag;
-
-/**
- * Test class for phpDocumentor\Reflection\DocBlock
- *
- * @author Mike van Riel
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class DocBlockTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * @covers \phpDocumentor\Reflection\DocBlock
- *
- * @return void
- */
- public function testConstruct()
- {
- $fixture = << '\phpDocumentor')),
- new Location(2)
- );
- $this->assertEquals(
- 'This is a short description',
- $object->getShortDescription()
- );
- $this->assertEquals(
- 'This is a long description',
- $object->getLongDescription()->getContents()
- );
- $this->assertCount(2, $object->getTags());
- $this->assertTrue($object->hasTag('see'));
- $this->assertTrue($object->hasTag('return'));
- $this->assertFalse($object->hasTag('category'));
-
- $this->assertSame('MyNamespace', $object->getContext()->getNamespace());
- $this->assertSame(
- array('PHPDoc' => '\phpDocumentor'),
- $object->getContext()->getNamespaceAliases()
- );
- $this->assertSame(2, $object->getLocation()->getLineNumber());
- }
-
- /**
- * @covers \phpDocumentor\Reflection\DocBlock::splitDocBlock
- *
- * @return void
- */
- public function testConstructWithTagsOnly()
- {
- $fixture = <<assertEquals('', $object->getShortDescription());
- $this->assertEquals('', $object->getLongDescription()->getContents());
- $this->assertCount(2, $object->getTags());
- $this->assertTrue($object->hasTag('see'));
- $this->assertTrue($object->hasTag('return'));
- $this->assertFalse($object->hasTag('category'));
- }
-
- /**
- * @covers \phpDocumentor\Reflection\DocBlock::isTemplateStart
- */
- public function testIfStartOfTemplateIsDiscovered()
- {
- $fixture = <<assertEquals('', $object->getShortDescription());
- $this->assertEquals('', $object->getLongDescription()->getContents());
- $this->assertCount(2, $object->getTags());
- $this->assertTrue($object->hasTag('see'));
- $this->assertTrue($object->hasTag('return'));
- $this->assertFalse($object->hasTag('category'));
- $this->assertTrue($object->isTemplateStart());
- }
-
- /**
- * @covers \phpDocumentor\Reflection\DocBlock::isTemplateEnd
- */
- public function testIfEndOfTemplateIsDiscovered()
- {
- $fixture = <<assertEquals('', $object->getShortDescription());
- $this->assertEquals('', $object->getLongDescription()->getContents());
- $this->assertTrue($object->isTemplateEnd());
- }
-
- /**
- * @covers \phpDocumentor\Reflection\DocBlock::cleanInput
- *
- * @return void
- */
- public function testConstructOneLiner()
- {
- $fixture = '/** Short description and nothing more. */';
- $object = new DocBlock($fixture);
- $this->assertEquals(
- 'Short description and nothing more.',
- $object->getShortDescription()
- );
- $this->assertEquals('', $object->getLongDescription()->getContents());
- $this->assertCount(0, $object->getTags());
- }
-
- /**
- * @covers \phpDocumentor\Reflection\DocBlock::__construct
- *
- * @return void
- */
- public function testConstructFromReflector()
- {
- $object = new DocBlock(new \ReflectionClass($this));
- $this->assertEquals(
- 'Test class for phpDocumentor\Reflection\DocBlock',
- $object->getShortDescription()
- );
- $this->assertEquals('', $object->getLongDescription()->getContents());
- $this->assertCount(4, $object->getTags());
- $this->assertTrue($object->hasTag('author'));
- $this->assertTrue($object->hasTag('copyright'));
- $this->assertTrue($object->hasTag('license'));
- $this->assertTrue($object->hasTag('link'));
- $this->assertFalse($object->hasTag('category'));
- }
-
- /**
- * @expectedException \InvalidArgumentException
- *
- * @return void
- */
- public function testExceptionOnInvalidObject()
- {
- new DocBlock($this);
- }
-
- public function testDotSeperation()
- {
- $fixture = <<assertEquals(
- 'This is a short description.',
- $object->getShortDescription()
- );
- $this->assertEquals(
- "This is a long description.\nThis is a continuation of the long "
- ."description.",
- $object->getLongDescription()->getContents()
- );
- }
-
- /**
- * @covers \phpDocumentor\Reflection\DocBlock::parseTags
- * @expectedException \LogicException
- *
- * @return void
- */
- public function testInvalidTagBlock()
- {
- if (0 == ini_get('allow_url_include')) {
- $this->markTestSkipped('"data" URIs for includes are required.');
- }
-
- include 'data:text/plain;base64,'. base64_encode(
- <<assertEquals(
- 'This is a short description.',
- $object->getShortDescription()
- );
- $this->assertEquals(
- 'This is a long description.',
- $object->getLongDescription()->getContents()
- );
- $tags = $object->getTags();
- $this->assertCount(2, $tags);
- $this->assertTrue($object->hasTag('method'));
- $this->assertTrue($object->hasTag('Method'));
- $this->assertInstanceOf(
- __NAMESPACE__ . '\DocBlock\Tag\MethodTag',
- $tags[0]
- );
- $this->assertInstanceOf(
- __NAMESPACE__ . '\DocBlock\Tag',
- $tags[1]
- );
- $this->assertNotInstanceOf(
- __NAMESPACE__ . '\DocBlock\Tag\MethodTag',
- $tags[1]
- );
- }
-
- /**
- * @depends testConstructFromReflector
- * @covers \phpDocumentor\Reflection\DocBlock::getTagsByName
- *
- * @return void
- */
- public function testGetTagsByNameZeroAndOneMatch()
- {
- $object = new DocBlock(new \ReflectionClass($this));
- $this->assertEmpty($object->getTagsByName('category'));
- $this->assertCount(1, $object->getTagsByName('author'));
- }
-
- /**
- * @depends testConstructWithTagsOnly
- * @covers \phpDocumentor\Reflection\DocBlock::parseTags
- *
- * @return void
- */
- public function testParseMultilineTag()
- {
- $fixture = <<assertCount(1, $object->getTags());
- }
-
- /**
- * @depends testConstructWithTagsOnly
- * @covers \phpDocumentor\Reflection\DocBlock::parseTags
- *
- * @return void
- */
- public function testParseMultilineTagWithLineBreaks()
- {
- $fixture = <<assertCount(1, $tags = $object->getTags());
- /** @var ReturnTag $tag */
- $tag = reset($tags);
- $this->assertEquals("Content on\n multiple lines.\n\n One more, after the break.", $tag->getDescription());
- }
-
- /**
- * @depends testConstructWithTagsOnly
- * @covers \phpDocumentor\Reflection\DocBlock::getTagsByName
- *
- * @return void
- */
- public function testGetTagsByNameMultipleMatch()
- {
- $fixture = <<assertEmpty($object->getTagsByName('category'));
- $this->assertCount(1, $object->getTagsByName('return'));
- $this->assertCount(2, $object->getTagsByName('param'));
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/.gitignore b/tests/vendor/phpspec/prophecy/.gitignore
deleted file mode 100644
index c50c8c4a..00000000
--- a/tests/vendor/phpspec/prophecy/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-*.tgz
-*.phar
-bin
-vendor
diff --git a/tests/vendor/phpspec/prophecy/.travis.yml b/tests/vendor/phpspec/prophecy/.travis.yml
deleted file mode 100644
index 004e612a..00000000
--- a/tests/vendor/phpspec/prophecy/.travis.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-language: php
-
-php: [5.3, 5.4, 5.5, 5.6, 7, hhvm]
-
-sudo: false
-
-cache:
- directories:
- - $HOME/.composer/cache
-
-branches:
- except:
- - /^bugfix\/.*$/
- - /^feature\/.*$/
- - /^optimization\/.*$/
-
-before_script: travis_retry composer install --no-interaction
-
-script: vendor/bin/phpspec run -fpretty -v
diff --git a/tests/vendor/phpspec/prophecy/CHANGES.md b/tests/vendor/phpspec/prophecy/CHANGES.md
deleted file mode 100644
index c293f0d4..00000000
--- a/tests/vendor/phpspec/prophecy/CHANGES.md
+++ /dev/null
@@ -1,122 +0,0 @@
-1.5.0 / 2015-04-27
-==================
-
- * Add support for PHP7 scalar type hints (thanks @trowski)
- * Add support for PHP7 return types (thanks @trowski)
- * Update internal test suite to support PHP7
-
-1.4.1 / 2015-04-27
-==================
-
- * Fixed bug in closure-based argument tokens (#181)
-
-1.4.0 / 2015-03-27
-==================
-
- * Fixed errors in return type phpdocs (thanks @sobit)
- * Fixed stringifying of hash containing one value (thanks @avant1)
- * Improved clarity of method call expectation exception (thanks @dantleech)
- * Add ability to specify which argument is returned in willReturnArgument (thanks @coderbyheart)
- * Add more information to MethodNotFound exceptions (thanks @ciaranmcnulty)
- * Support for mocking classes with methods that return references (thanks @edsonmedina)
- * Improved object comparison (thanks @whatthejeff)
- * Adopted '^' in composer dependencies (thanks @GrahamCampbell)
- * Fixed non-typehinted arguments being treated as optional (thanks @whatthejeff)
- * Magic methods are now filtered for keywords (thanks @seagoj)
- * More readable errors for failure when expecting single calls (thanks @dantleech)
-
-1.3.1 / 2014-11-17
-==================
-
- * Fix the edge case when failed predictions weren't recorded for `getCheckedPredictions()`
-
-1.3.0 / 2014-11-14
-==================
-
- * Add a way to get checked predictions with `MethodProphecy::getCheckedPredictions()`
- * Fix HHVM compatibility
- * Remove dead code (thanks @stof)
- * Add support for DirectoryIterators (thanks @shanethehat)
-
-1.2.0 / 2014-07-18
-==================
-
- * Added support for doubling magic methods documented in the class phpdoc (thanks @armetiz)
- * Fixed a segfault appearing in some cases (thanks @dmoreaulf)
- * Fixed the doubling of methods with typehints on non-existent classes (thanks @gquemener)
- * Added support for internal classes using keywords as method names (thanks @milan)
- * Added IdenticalValueToken and Argument::is (thanks @florianv)
- * Removed the usage of scalar typehints in HHVM as HHVM 3 does not support them anymore in PHP code (thanks @whatthejeff)
-
-1.1.2 / 2014-01-24
-==================
-
- * Spy automatically promotes spied method call to an expected one
-
-1.1.1 / 2014-01-15
-==================
-
- * Added support for HHVM
-
-1.1.0 / 2014-01-01
-==================
-
- * Changed the generated class names to use a static counter instead of a random number
- * Added a clss patch for ReflectionClass::newInstance to make its argument optional consistently (thanks @docteurklein)
- * Fixed mirroring of classes with typehints on non-existent classes (thanks @docteurklein)
- * Fixed the support of array callables in CallbackPromise and CallbackPrediction (thanks @ciaranmcnulty)
- * Added support for properties in ObjectStateToken (thanks @adrienbrault)
- * Added support for mocking classes with a final constructor (thanks @ciaranmcnulty)
- * Added ArrayEveryEntryToken and Argument::withEveryEntry() (thanks @adrienbrault)
- * Added an exception when trying to prophesize on a final method instead of ignoring silently (thanks @docteurklein)
- * Added StringContainToken and Argument::containingString() (thanks @peterjmit)
- * Added ``shouldNotHaveBeenCalled`` on the MethodProphecy (thanks @ciaranmcnulty)
- * Fixed the comparison of objects in ExactValuetoken (thanks @sstok)
- * Deprecated ``shouldNotBeenCalled`` in favor of ``shouldNotHaveBeenCalled``
-
-1.0.4 / 2013-08-10
-==================
-
- * Better randomness for generated class names (thanks @sstok)
- * Add support for interfaces into TypeToken and Argument::type() (thanks @sstok)
- * Add support for old-style (method name === class name) constructors (thanks @l310 for report)
-
-1.0.3 / 2013-07-04
-==================
-
- * Support callable typehints (thanks @stof)
- * Do not attempt to autoload arrays when generating code (thanks @MarcoDeBortoli)
- * New ArrayEntryToken (thanks @kagux)
-
-1.0.2 / 2013-05-19
-==================
-
- * Logical `AND` token added (thanks @kagux)
- * Logical `NOT` token added (thanks @kagux)
- * Add support for setting custom constructor arguments
- * Properly stringify hashes
- * Record calls that throw exceptions
- * Migrate spec suite to PhpSpec 2.0
-
-1.0.1 / 2013-04-30
-==================
-
- * Fix broken UnexpectedCallException message
- * Trim AggregateException message
-
-1.0.0 / 2013-04-29
-==================
-
- * Improve exception messages
-
-1.0.0-BETA2 / 2013-04-03
-========================
-
- * Add more debug information to CallTimes and Call prediction exception messages
- * Fix MethodNotFoundException wrong namespace (thanks @gunnarlium)
- * Fix some typos in the exception messages (thanks @pborreli)
-
-1.0.0-BETA1 / 2013-03-25
-========================
-
- * Initial release
diff --git a/tests/vendor/phpspec/prophecy/CONTRIBUTING.md b/tests/vendor/phpspec/prophecy/CONTRIBUTING.md
deleted file mode 100644
index 3674aac4..00000000
--- a/tests/vendor/phpspec/prophecy/CONTRIBUTING.md
+++ /dev/null
@@ -1,21 +0,0 @@
-Contributing
-------------
-
-Prophecy is an open source, community-driven project. If you'd like to contribute,
-feel free to do this, but remember to follow this few simple rules:
-
-- Make your feature addition or bug fix,
-- Add either specs or examples for any changes you're making (bugfixes or additions)
- (please look into `spec/` folder for some examples). This is important so we don't break
- it in a future version unintentionally,
-- Commit your code, but do not mess with `CHANGES.md`,
-
-Running tests
--------------
-
-Make sure that you don't break anything with your changes by running:
-
-```bash
-$> composer install --dev --prefer-dist
-$> vendor/bin/phpspec run
-```
diff --git a/tests/vendor/phpspec/prophecy/LICENSE b/tests/vendor/phpspec/prophecy/LICENSE
deleted file mode 100644
index c8b36471..00000000
--- a/tests/vendor/phpspec/prophecy/LICENSE
+++ /dev/null
@@ -1,23 +0,0 @@
-Copyright (c) 2013 Konstantin Kudryashov
- Marcello Duarte
-
-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/tests/vendor/phpspec/prophecy/README.md b/tests/vendor/phpspec/prophecy/README.md
deleted file mode 100644
index 17e57c31..00000000
--- a/tests/vendor/phpspec/prophecy/README.md
+++ /dev/null
@@ -1,390 +0,0 @@
-# Prophecy
-
-[](https://travis-ci.org/phpspec/prophecy)
-
-Prophecy is a highly opinionated yet very powerful and flexible PHP object mocking
-framework. Though initially it was created to fulfil phpspec2 needs, it is flexible
-enough to be used inside any testing framework out there with minimal effort.
-
-## A simple example
-
-```php
-prophet->prophesize('App\Security\Hasher');
- $user = new App\Entity\User($hasher->reveal());
-
- $hasher->generateHash($user, 'qwerty')->willReturn('hashed_pass');
-
- $user->setPassword('qwerty');
-
- $this->assertEquals('hashed_pass', $user->getPassword());
- }
-
- protected function setup()
- {
- $this->prophet = new \Prophecy\Prophet;
- }
-
- protected function tearDown()
- {
- $this->prophet->checkPredictions();
- }
-}
-```
-
-## Installation
-
-### Prerequisites
-
-Prophecy requires PHP 5.3.3 or greater.
-
-### Setup through composer
-
-First, add Prophecy to the list of dependencies inside your `composer.json`:
-
-```json
-{
- "require-dev": {
- "phpspec/prophecy": "~1.0"
- }
-}
-```
-
-Then simply install it with composer:
-
-```bash
-$> composer install --prefer-dist
-```
-
-You can read more about Composer on its [official webpage](http://getcomposer.org).
-
-## How to use it
-
-First of all, in Prophecy every word has a logical meaning, even the name of the library
-itself (Prophecy). When you start feeling that, you'll become very fluid with this
-tool.
-
-For example, Prophecy has been named that way because it concentrates on describing the future
-behavior of objects with very limited knowledge about them. But as with any other prophecy,
-those object prophecies can't create themselves - there should be a Prophet:
-
-```php
-$prophet = new Prophecy\Prophet;
-```
-
-The Prophet creates prophecies by *prophesizing* them:
-
-```php
-$prophecy = $prophet->prophesize();
-```
-
-The result of the `prophesize()` method call is a new object of class `ObjectProphecy`. Yes,
-that's your specific object prophecy, which describes how your object would behave
-in the near future. But first, you need to specify which object you're talking about,
-right?
-
-```php
-$prophecy->willExtend('stdClass');
-$prophecy->willImplement('SessionHandlerInterface');
-```
-
-There are 2 interesting calls - `willExtend` and `willImplement`. The first one tells
-object prophecy that our object should extend specific class, the second one says that
-it should implement some interface. Obviously, objects in PHP can implement multiple
-interfaces, but extend only one parent class.
-
-### Dummies
-
-Ok, now we have our object prophecy. What can we do with it? First of all, we can get
-our object *dummy* by revealing its prophecy:
-
-```php
-$dummy = $prophecy->reveal();
-```
-
-The `$dummy` variable now holds a special dummy object. Dummy objects are objects that extend
-and/or implement preset classes/interfaces by overriding all their public methods. The key
-point about dummies is that they do not hold any logic - they just do nothing. Any method
-of the dummy will always return `null` and the dummy will never throw any exceptions.
-Dummy is your friend if you don't care about the actual behavior of this double and just need
-a token object to satisfy a method typehint.
-
-You need to understand one thing - a dummy is not a prophecy. Your object prophecy is still
-assigned to `$prophecy` variable and in order to manipulate with your expectations, you
-should work with it. `$dummy` is a dummy - a simple php object that tries to fulfil your
-prophecy.
-
-### Stubs
-
-Ok, now we know how to create basic prophecies and reveal dummies from them. That's
-awesome if we don't care about our _doubles_ (objects that reflect originals)
-interactions. If we do, we need to use *stubs* or *mocks*.
-
-A stub is an object double, which doesn't have any expectations about the object behavior,
-but when put in specific environment, behaves in specific way. Ok, I know, it's cryptic,
-but bear with me for a minute. Simply put, a stub is a dummy, which depending on the called
-method signature does different things (has logic). To create stubs in Prophecy:
-
-```php
-$prophecy->read('123')->willReturn('value');
-```
-
-Oh wow. We've just made an arbitrary call on the object prophecy? Yes, we did. And this
-call returned us a new object instance of class `MethodProphecy`. Yep, that's a specific
-method with arguments prophecy. Method prophecies give you the ability to create method
-promises or predictions. We'll talk about method predictions later in the _Mocks_ section.
-
-#### Promises
-
-Promises are logical blocks, that represent your fictional methods in prophecy terms
-and they are handled by the `MethodProphecy::will(PromiseInterface $promise)` method.
-As a matter of fact, the call that we made earlier (`willReturn('value')`) is a simple
-shortcut to:
-
-```php
-$prophecy->read('123')->will(new Prophecy\Promise\ReturnPromise(array('value')));
-```
-
-This promise will cause any call to our double's `read()` method with exactly one
-argument - `'123'` to always return `'value'`. But that's only for this
-promise, there's plenty others you can use:
-
-- `ReturnPromise` or `->willReturn(1)` - returns a value from a method call
-- `ReturnArgumentPromise` or `->willReturnArgument($index)` - returns the nth method argument from call
-- `ThrowPromise` or `->willThrow` - causes the method to throw specific exception
-- `CallbackPromise` or `->will($callback)` - gives you a quick way to define your own custom logic
-
-Keep in mind, that you can always add even more promises by implementing
-`Prophecy\Promise\PromiseInterface`.
-
-#### Method prophecies idempotency
-
-Prophecy enforces same method prophecies and, as a consequence, same promises and
-predictions for the same method calls with the same arguments. This means:
-
-```php
-$methodProphecy1 = $prophecy->read('123');
-$methodProphecy2 = $prophecy->read('123');
-$methodProphecy3 = $prophecy->read('321');
-
-$methodProphecy1 === $methodProphecy2;
-$methodProphecy1 !== $methodProphecy3;
-```
-
-That's interesting, right? Now you might ask me how would you define more complex
-behaviors where some method call changes behavior of others. In PHPUnit or Mockery
-you do that by predicting how many times your method will be called. In Prophecy,
-you'll use promises for that:
-
-```php
-$user->getName()->willReturn(null);
-
-// For PHP 5.4
-$user->setName('everzet')->will(function () {
- $this->getName()->willReturn('everzet');
-});
-
-// For PHP 5.3
-$user->setName('everzet')->will(function ($args, $user) {
- $user->getName()->willReturn('everzet');
-});
-
-// Or
-$user->setName('everzet')->will(function ($args) use ($user) {
- $user->getName()->willReturn('everzet');
-});
-```
-
-And now it doesn't matter how many times or in which order your methods are called.
-What matters is their behaviors and how well you faked it.
-
-#### Arguments wildcarding
-
-The previous example is awesome (at least I hope it is for you), but that's not
-optimal enough. We hardcoded `'everzet'` in our expectation. Isn't there a better
-way? In fact there is, but it involves understanding what this `'everzet'`
-actually is.
-
-You see, even if method arguments used during method prophecy creation look
-like simple method arguments, in reality they are not. They are argument token
-wildcards. As a matter of fact, `->setName('everzet')` looks like a simple call just
-because Prophecy automatically transforms it under the hood into:
-
-```php
-$user->setName(new Prophecy\Argument\Token\ExactValueToken('everzet'));
-```
-
-Those argument tokens are simple PHP classes, that implement
-`Prophecy\Argument\Token\TokenInterface` and tell Prophecy how to compare real arguments
-with your expectations. And yes, those classnames are damn big. That's why there's a
-shortcut class `Prophecy\Argument`, which you can use to create tokens like that:
-
-```php
-use Prophecy\Argument;
-
-$user->setName(Argument::exact('everzet'));
-```
-
-`ExactValueToken` is not very useful in our case as it forced us to hardcode the username.
-That's why Prophecy comes bundled with a bunch of other tokens:
-
-- `IdenticalValueToken` or `Argument::is($value)` - checks that the argument is identical to a specific value
-- `ExactValueToken` or `Argument::exact($value)` - checks that the argument matches a specific value
-- `TypeToken` or `Argument::type($typeOrClass)` - checks that the argument matches a specific type or
- classname
-- `ObjectStateToken` or `Argument::which($method, $value)` - checks that the argument method returns
- a specific value
-- `CallbackToken` or `Argument::that(callback)` - checks that the argument matches a custom callback
-- `AnyValueToken` or `Argument::any()` - matches any argument
-- `AnyValuesToken` or `Argument::cetera()` - matches any arguments to the rest of the signature
-- `StringContainsToken` or `Argument::containingString($value)` - checks that the argument contains a specific string value
-
-And you can add even more by implementing `TokenInterface` with your own custom classes.
-
-So, let's refactor our initial `{set,get}Name()` logic with argument tokens:
-
-```php
-use Prophecy\Argument;
-
-$user->getName()->willReturn(null);
-
-// For PHP 5.4
-$user->setName(Argument::type('string'))->will(function ($args) {
- $this->getName()->willReturn($args[0]);
-});
-
-// For PHP 5.3
-$user->setName(Argument::type('string'))->will(function ($args, $user) {
- $user->getName()->willReturn($args[0]);
-});
-
-// Or
-$user->setName(Argument::type('string'))->will(function ($args) use ($user) {
- $user->getName()->willReturn($args[0]);
-});
-```
-
-That's it. Now our `{set,get}Name()` prophecy will work with any string argument provided to it.
-We've just described how our stub object should behave, even though the original object could have
-no behavior whatsoever.
-
-One last bit about arguments now. You might ask, what happens in case of:
-
-```php
-use Prophecy\Argument;
-
-$user->getName()->willReturn(null);
-
-// For PHP 5.4
-$user->setName(Argument::type('string'))->will(function ($args) {
- $this->getName()->willReturn($args[0]);
-});
-
-// For PHP 5.3
-$user->setName(Argument::type('string'))->will(function ($args, $user) {
- $user->getName()->willReturn($args[0]);
-});
-
-// Or
-$user->setName(Argument::type('string'))->will(function ($args) use ($user) {
- $user->getName()->willReturn($args[0]);
-});
-
-$user->setName(Argument::any())->will(function () {
-});
-```
-
-Nothing. Your stub will continue behaving the way it did before. That's because of how
-arguments wildcarding works. Every argument token type has a different score level, which
-wildcard then uses to calculate the final arguments match score and use the method prophecy
-promise that has the highest score. In this case, `Argument::type()` in case of success
-scores `5` and `Argument::any()` scores `3`. So the type token wins, as does the first
-`setName()` method prophecy and its promise. The simple rule of thumb - more precise token
-always wins.
-
-#### Getting stub objects
-
-Ok, now we know how to define our prophecy method promises, let's get our stub from
-it:
-
-```php
-$stub = $prophecy->reveal();
-```
-
-As you might see, the only difference between how we get dummies and stubs is that with
-stubs we describe every object conversation instead of just agreeing with `null` returns
-(object being *dummy*). As a matter of fact, after you define your first promise
-(method call), Prophecy will force you to define all the communications - it throws
-the `UnexpectedCallException` for any call you didn't describe with object prophecy before
-calling it on a stub.
-
-### Mocks
-
-Now we know how to define doubles without behavior (dummies) and doubles with behavior, but
-no expectations (stubs). What's left is doubles for which we have some expectations. These
-are called mocks and in Prophecy they look almost exactly the same as stubs, except that
-they define *predictions* instead of *promises* on method prophecies:
-
-```php
-$entityManager->flush()->shouldBeCalled();
-```
-
-#### Predictions
-
-The `shouldBeCalled()` method here assigns `CallPrediction` to our method prophecy.
-Predictions are a delayed behavior check for your prophecies. You see, during the entire lifetime
-of your doubles, Prophecy records every single call you're making against it inside your
-code. After that, Prophecy can use this collected information to check if it matches defined
-predictions. You can assign predictions to method prophecies using the
-`MethodProphecy::should(PredictionInterface $prediction)` method. As a matter of fact,
-the `shouldBeCalled()` method we used earlier is just a shortcut to:
-
-```php
-$entityManager->flush()->should(new Prophecy\Prediction\CallPrediction());
-```
-
-It checks if your method of interest (that matches both the method name and the arguments wildcard)
-was called 1 or more times. If the prediction failed then it throws an exception. When does this
-check happen? Whenever you call `checkPredictions()` on the main Prophet object:
-
-```php
-$prophet->checkPredictions();
-```
-
-In PHPUnit, you would want to put this call into the `tearDown()` method. If no predictions
-are defined, it would do nothing. So it won't harm to call it after every test.
-
-There are plenty more predictions you can play with:
-
-- `CallPrediction` or `shouldBeCalled()` - checks that the method has been called 1 or more times
-- `NoCallsPrediction` or `shouldNotBeCalled()` - checks that the method has not been called
-- `CallTimesPrediction` or `shouldBeCalledTimes($count)` - checks that the method has been called
- `$count` times
-- `CallbackPrediction` or `should($callback)` - checks the method against your own custom callback
-
-Of course, you can always create your own custom prediction any time by implementing
-`PredictionInterface`.
-
-### Spies
-
-The last bit of awesomeness in Prophecy is out-of-the-box spies support. As I said in the previous
-section, Prophecy records every call made during the double's entire lifetime. This means
-you don't need to record predictions in order to check them. You can also do it
-manually by using the `MethodProphecy::shouldHave(PredictionInterface $prediction)` method:
-
-```php
-$em = $prophet->prophesize('Doctrine\ORM\EntityManager');
-
-$controller->createUser($em->reveal());
-
-$em->flush()->shouldHaveBeenCalled();
-```
-
-Such manipulation with doubles is called spying. And with Prophecy it just works.
diff --git a/tests/vendor/phpspec/prophecy/composer.json b/tests/vendor/phpspec/prophecy/composer.json
deleted file mode 100644
index 654aaadc..00000000
--- a/tests/vendor/phpspec/prophecy/composer.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "name": "phpspec/prophecy",
- "description": "Highly opinionated mocking framework for PHP 5.3+",
- "keywords": ["Mock", "Stub", "Dummy", "Double", "Fake", "Spy"],
- "homepage": "https://github.com/phpspec/prophecy",
- "type": "library",
- "license": "MIT",
- "authors": [
- {
- "name": "Konstantin Kudryashov",
- "email": "ever.zet@gmail.com",
- "homepage": "http://everzet.com"
- },
- {
- "name": "Marcello Duarte",
- "email": "marcello.duarte@gmail.com"
- }
- ],
- "require": {
- "phpdocumentor/reflection-docblock": "~2.0",
- "sebastian/comparator": "~1.1",
- "doctrine/instantiator": "^1.0.2"
- },
-
- "require-dev": {
- "phpspec/phpspec": "~2.0"
- },
-
- "autoload": {
- "psr-0": {
- "Prophecy\\": "src/"
- }
- },
-
- "extra": {
- "branch-alias": {
- "dev-master": "1.4.x-dev"
- }
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/composer.lock b/tests/vendor/phpspec/prophecy/composer.lock
deleted file mode 100644
index 0c5521a8..00000000
--- a/tests/vendor/phpspec/prophecy/composer.lock
+++ /dev/null
@@ -1,731 +0,0 @@
-{
- "_readme": [
- "This file locks the dependencies of your project to a known state",
- "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
- "This file is @generated automatically"
- ],
- "hash": "642fa332c5fa99e1d5086035641b5a74",
- "packages": [
- {
- "name": "doctrine/instantiator",
- "version": "1.0.5",
- "source": {
- "type": "git",
- "url": "https://github.com/doctrine/instantiator.git",
- "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d",
- "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3,<8.0-DEV"
- },
- "require-dev": {
- "athletic/athletic": "~0.1.8",
- "ext-pdo": "*",
- "ext-phar": "*",
- "phpunit/phpunit": "~4.0",
- "squizlabs/php_codesniffer": "~2.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Marco Pivetta",
- "email": "ocramius@gmail.com",
- "homepage": "http://ocramius.github.com/"
- }
- ],
- "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
- "homepage": "https://github.com/doctrine/instantiator",
- "keywords": [
- "constructor",
- "instantiate"
- ],
- "time": "2015-06-14 21:17:01"
- },
- {
- "name": "phpdocumentor/reflection-docblock",
- "version": "2.0.4",
- "source": {
- "type": "git",
- "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
- "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8",
- "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3"
- },
- "require-dev": {
- "phpunit/phpunit": "~4.0"
- },
- "suggest": {
- "dflydev/markdown": "~1.0",
- "erusev/parsedown": "~1.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.0.x-dev"
- }
- },
- "autoload": {
- "psr-0": {
- "phpDocumentor": [
- "src/"
- ]
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Mike van Riel",
- "email": "mike.vanriel@naenius.com"
- }
- ],
- "time": "2015-02-03 12:10:50"
- },
- {
- "name": "sebastian/comparator",
- "version": "1.2.0",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "937efb279bd37a375bcadf584dec0726f84dbf22"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22",
- "reference": "937efb279bd37a375bcadf584dec0726f84dbf22",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3",
- "sebastian/diff": "~1.2",
- "sebastian/exporter": "~1.2"
- },
- "require-dev": {
- "phpunit/phpunit": "~4.4"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.2.x-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Jeff Welch",
- "email": "whatthejeff@gmail.com"
- },
- {
- "name": "Volker Dusch",
- "email": "github@wallbash.com"
- },
- {
- "name": "Bernhard Schussek",
- "email": "bschussek@2bepublished.at"
- },
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- }
- ],
- "description": "Provides the functionality to compare PHP values for equality",
- "homepage": "http://www.github.com/sebastianbergmann/comparator",
- "keywords": [
- "comparator",
- "compare",
- "equality"
- ],
- "time": "2015-07-26 15:48:44"
- },
- {
- "name": "sebastian/diff",
- "version": "1.3.0",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3",
- "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3"
- },
- "require-dev": {
- "phpunit/phpunit": "~4.2"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.3-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Kore Nordmann",
- "email": "mail@kore-nordmann.de"
- },
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- }
- ],
- "description": "Diff implementation",
- "homepage": "http://www.github.com/sebastianbergmann/diff",
- "keywords": [
- "diff"
- ],
- "time": "2015-02-22 15:13:53"
- },
- {
- "name": "sebastian/exporter",
- "version": "1.2.1",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "7ae5513327cb536431847bcc0c10edba2701064e"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e",
- "reference": "7ae5513327cb536431847bcc0c10edba2701064e",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3",
- "sebastian/recursion-context": "~1.0"
- },
- "require-dev": {
- "phpunit/phpunit": "~4.4"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.2.x-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Jeff Welch",
- "email": "whatthejeff@gmail.com"
- },
- {
- "name": "Volker Dusch",
- "email": "github@wallbash.com"
- },
- {
- "name": "Bernhard Schussek",
- "email": "bschussek@2bepublished.at"
- },
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- },
- {
- "name": "Adam Harvey",
- "email": "aharvey@php.net"
- }
- ],
- "description": "Provides the functionality to export PHP variables for visualization",
- "homepage": "http://www.github.com/sebastianbergmann/exporter",
- "keywords": [
- "export",
- "exporter"
- ],
- "time": "2015-06-21 07:55:53"
- },
- {
- "name": "sebastian/recursion-context",
- "version": "1.0.1",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/recursion-context.git",
- "reference": "994d4a811bafe801fb06dccbee797863ba2792ba"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/994d4a811bafe801fb06dccbee797863ba2792ba",
- "reference": "994d4a811bafe801fb06dccbee797863ba2792ba",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3"
- },
- "require-dev": {
- "phpunit/phpunit": "~4.4"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Jeff Welch",
- "email": "whatthejeff@gmail.com"
- },
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- },
- {
- "name": "Adam Harvey",
- "email": "aharvey@php.net"
- }
- ],
- "description": "Provides functionality to recursively process PHP variables",
- "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
- "time": "2015-06-21 08:04:50"
- }
- ],
- "packages-dev": [
- {
- "name": "phpspec/php-diff",
- "version": "v1.0.2",
- "source": {
- "type": "git",
- "url": "https://github.com/phpspec/php-diff.git",
- "reference": "30e103d19519fe678ae64a60d77884ef3d71b28a"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/phpspec/php-diff/zipball/30e103d19519fe678ae64a60d77884ef3d71b28a",
- "reference": "30e103d19519fe678ae64a60d77884ef3d71b28a",
- "shasum": ""
- },
- "type": "library",
- "autoload": {
- "psr-0": {
- "Diff": "lib/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Chris Boulton",
- "homepage": "http://github.com/chrisboulton",
- "role": "Original developer"
- }
- ],
- "description": "A comprehensive library for generating differences between two hashable objects (strings or arrays).",
- "time": "2013-11-01 13:02:21"
- },
- {
- "name": "phpspec/phpspec",
- "version": "2.2.1",
- "source": {
- "type": "git",
- "url": "https://github.com/phpspec/phpspec.git",
- "reference": "e9a40577323e67f1de2e214abf32976a0352d8f8"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/phpspec/phpspec/zipball/e9a40577323e67f1de2e214abf32976a0352d8f8",
- "reference": "e9a40577323e67f1de2e214abf32976a0352d8f8",
- "shasum": ""
- },
- "require": {
- "doctrine/instantiator": "^1.0.1",
- "php": ">=5.3.3",
- "phpspec/php-diff": "~1.0.0",
- "phpspec/prophecy": "~1.4",
- "sebastian/exporter": "~1.0",
- "symfony/console": "~2.3",
- "symfony/event-dispatcher": "~2.1",
- "symfony/finder": "~2.1",
- "symfony/process": "~2.1",
- "symfony/yaml": "~2.1"
- },
- "require-dev": {
- "behat/behat": "^3.0.11",
- "bossa/phpspec2-expect": "~1.0",
- "phpunit/phpunit": "~4.4",
- "symfony/filesystem": "~2.1",
- "symfony/process": "~2.1"
- },
- "suggest": {
- "phpspec/nyan-formatters": "~1.0 – Adds Nyan formatters"
- },
- "bin": [
- "bin/phpspec"
- ],
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.2.x-dev"
- }
- },
- "autoload": {
- "psr-0": {
- "PhpSpec": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Konstantin Kudryashov",
- "email": "ever.zet@gmail.com",
- "homepage": "http://everzet.com"
- },
- {
- "name": "Marcello Duarte",
- "homepage": "http://marcelloduarte.net/"
- }
- ],
- "description": "Specification-oriented BDD framework for PHP 5.3+",
- "homepage": "http://phpspec.net/",
- "keywords": [
- "BDD",
- "SpecBDD",
- "TDD",
- "spec",
- "specification",
- "testing",
- "tests"
- ],
- "time": "2015-05-30 15:21:40"
- },
- {
- "name": "symfony/console",
- "version": "v2.7.3",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/Console.git",
- "reference": "d6cf02fe73634c96677e428f840704bfbcaec29e"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/Console/zipball/d6cf02fe73634c96677e428f840704bfbcaec29e",
- "reference": "d6cf02fe73634c96677e428f840704bfbcaec29e",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.9"
- },
- "require-dev": {
- "psr/log": "~1.0",
- "symfony/event-dispatcher": "~2.1",
- "symfony/phpunit-bridge": "~2.7",
- "symfony/process": "~2.1"
- },
- "suggest": {
- "psr/log": "For using the console logger",
- "symfony/event-dispatcher": "",
- "symfony/process": ""
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.7-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\Console\\": ""
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony Console Component",
- "homepage": "https://symfony.com",
- "time": "2015-07-28 15:18:12"
- },
- {
- "name": "symfony/event-dispatcher",
- "version": "v2.7.3",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/EventDispatcher.git",
- "reference": "9310b5f9a87ec2ea75d20fec0b0017c77c66dac3"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/9310b5f9a87ec2ea75d20fec0b0017c77c66dac3",
- "reference": "9310b5f9a87ec2ea75d20fec0b0017c77c66dac3",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.9"
- },
- "require-dev": {
- "psr/log": "~1.0",
- "symfony/config": "~2.0,>=2.0.5",
- "symfony/dependency-injection": "~2.6",
- "symfony/expression-language": "~2.6",
- "symfony/phpunit-bridge": "~2.7",
- "symfony/stopwatch": "~2.3"
- },
- "suggest": {
- "symfony/dependency-injection": "",
- "symfony/http-kernel": ""
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.7-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\EventDispatcher\\": ""
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony EventDispatcher Component",
- "homepage": "https://symfony.com",
- "time": "2015-06-18 19:21:56"
- },
- {
- "name": "symfony/finder",
- "version": "v2.7.3",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/Finder.git",
- "reference": "ae0f363277485094edc04c9f3cbe595b183b78e4"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/Finder/zipball/ae0f363277485094edc04c9f3cbe595b183b78e4",
- "reference": "ae0f363277485094edc04c9f3cbe595b183b78e4",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.9"
- },
- "require-dev": {
- "symfony/phpunit-bridge": "~2.7"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.7-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\Finder\\": ""
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony Finder Component",
- "homepage": "https://symfony.com",
- "time": "2015-07-09 16:07:40"
- },
- {
- "name": "symfony/process",
- "version": "v2.7.3",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/Process.git",
- "reference": "48aeb0e48600321c272955132d7606ab0a49adb3"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/Process/zipball/48aeb0e48600321c272955132d7606ab0a49adb3",
- "reference": "48aeb0e48600321c272955132d7606ab0a49adb3",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.9"
- },
- "require-dev": {
- "symfony/phpunit-bridge": "~2.7"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.7-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\Process\\": ""
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony Process Component",
- "homepage": "https://symfony.com",
- "time": "2015-07-01 11:25:50"
- },
- {
- "name": "symfony/yaml",
- "version": "v2.7.3",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/Yaml.git",
- "reference": "71340e996171474a53f3d29111d046be4ad8a0ff"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/Yaml/zipball/71340e996171474a53f3d29111d046be4ad8a0ff",
- "reference": "71340e996171474a53f3d29111d046be4ad8a0ff",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.9"
- },
- "require-dev": {
- "symfony/phpunit-bridge": "~2.7"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.7-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\Yaml\\": ""
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony Yaml Component",
- "homepage": "https://symfony.com",
- "time": "2015-07-28 14:07:07"
- }
- ],
- "aliases": [],
- "minimum-stability": "stable",
- "stability-flags": [],
- "prefer-stable": false,
- "prefer-lowest": false,
- "platform": [],
- "platform-dev": []
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/ArgumentsWildcardSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/ArgumentsWildcardSpec.php
deleted file mode 100644
index 5d6a2da3..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/ArgumentsWildcardSpec.php
+++ /dev/null
@@ -1,146 +0,0 @@
-beConstructedWith(array(42, 'zet', $object));
-
- $class = get_class($object->getWrappedObject());
- $hash = spl_object_hash($object->getWrappedObject());
-
- $this->__toString()->shouldReturn("exact(42), exact(\"zet\"), exact($class:$hash Object (\n 'objectProphecy' => Prophecy\Prophecy\ObjectProphecy Object (*Prophecy*)\n))");
- }
-
- /**
- * @param \Prophecy\Argument\Token\TokenInterface $token1
- * @param \Prophecy\Argument\Token\TokenInterface $token2
- * @param \Prophecy\Argument\Token\TokenInterface $token3
- */
- function it_generates_string_representation_from_all_tokens_imploded($token1, $token2, $token3)
- {
- $token1->__toString()->willReturn('token_1');
- $token2->__toString()->willReturn('token_2');
- $token3->__toString()->willReturn('token_3');
-
- $this->beConstructedWith(array($token1, $token2, $token3));
- $this->__toString()->shouldReturn('token_1, token_2, token_3');
- }
-
- /**
- * @param \Prophecy\Argument\Token\TokenInterface $token
- */
- function it_exposes_list_of_tokens($token)
- {
- $this->beConstructedWith(array($token));
-
- $this->getTokens()->shouldReturn(array($token));
- }
-
- function it_returns_score_of_1_if_there_are_no_tokens_and_arguments()
- {
- $this->beConstructedWith(array());
-
- $this->scoreArguments(array())->shouldReturn(1);
- }
-
- /**
- * @param \Prophecy\Argument\Token\TokenInterface $token1
- * @param \Prophecy\Argument\Token\TokenInterface $token2
- * @param \Prophecy\Argument\Token\TokenInterface $token3
- */
- function it_should_return_match_score_based_on_all_tokens_score($token1, $token2, $token3)
- {
- $token1->scoreArgument('one')->willReturn(3);
- $token1->isLast()->willReturn(false);
- $token2->scoreArgument(2)->willReturn(5);
- $token2->isLast()->willReturn(false);
- $token3->scoreArgument($obj = new \stdClass())->willReturn(10);
- $token3->isLast()->willReturn(false);
-
- $this->beConstructedWith(array($token1, $token2, $token3));
- $this->scoreArguments(array('one', 2, $obj))->shouldReturn(18);
- }
-
- /**
- * @param \Prophecy\Argument\Token\TokenInterface $token1
- * @param \Prophecy\Argument\Token\TokenInterface $token2
- * @param \Prophecy\Argument\Token\TokenInterface $token3
- */
- function it_returns_false_if_there_is_less_arguments_than_tokens($token1, $token2, $token3)
- {
- $token1->scoreArgument('one')->willReturn(3);
- $token1->isLast()->willReturn(false);
- $token2->scoreArgument(2)->willReturn(5);
- $token2->isLast()->willReturn(false);
- $token3->scoreArgument(null)->willReturn(false);
- $token3->isLast()->willReturn(false);
-
- $this->beConstructedWith(array($token1, $token2, $token3));
- $this->scoreArguments(array('one', 2))->shouldReturn(false);
- }
-
- /**
- * @param \Prophecy\Argument\Token\TokenInterface $token1
- * @param \Prophecy\Argument\Token\TokenInterface $token2
- * @param \Prophecy\Argument\Token\TokenInterface $token3
- */
- function it_returns_false_if_there_is_less_tokens_than_arguments($token1, $token2, $token3)
- {
- $token1->scoreArgument('one')->willReturn(3);
- $token1->isLast()->willReturn(false);
- $token2->scoreArgument(2)->willReturn(5);
- $token2->isLast()->willReturn(false);
- $token3->scoreArgument($obj = new \stdClass())->willReturn(10);
- $token3->isLast()->willReturn(false);
-
- $this->beConstructedWith(array($token1, $token2, $token3));
- $this->scoreArguments(array('one', 2, $obj, 4))->shouldReturn(false);
- }
-
- /**
- * @param \Prophecy\Argument\Token\TokenInterface $token1
- * @param \Prophecy\Argument\Token\TokenInterface $token2
- * @param \Prophecy\Argument\Token\TokenInterface $token3
- */
- function it_should_return_false_if_one_of_the_tokens_returns_false($token1, $token2, $token3)
- {
- $token1->scoreArgument('one')->willReturn(3);
- $token1->isLast()->willReturn(false);
- $token2->scoreArgument(2)->willReturn(false);
- $token2->isLast()->willReturn(false);
- $token3->scoreArgument($obj = new \stdClass())->willReturn(10);
- $token3->isLast()->willReturn(false);
-
- $this->beConstructedWith(array($token1, $token2, $token3));
- $this->scoreArguments(array('one', 2, $obj))->shouldReturn(false);
- }
-
- /**
- * @param \Prophecy\Argument\Token\TokenInterface $token1
- * @param \Prophecy\Argument\Token\TokenInterface $token2
- * @param \Prophecy\Argument\Token\TokenInterface $token3
- */
- function it_should_calculate_score_until_last_token($token1, $token2, $token3)
- {
- $token1->scoreArgument('one')->willReturn(3);
- $token1->isLast()->willReturn(false);
-
- $token2->scoreArgument(2)->willReturn(7);
- $token2->isLast()->willReturn(true);
-
- $token3->scoreArgument($obj = new \stdClass())->willReturn(10);
- $token3->isLast()->willReturn(false);
-
- $this->beConstructedWith(array($token1, $token2, $token3));
- $this->scoreArguments(array('one', 2, $obj))->shouldReturn(10);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValueTokenSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValueTokenSpec.php
deleted file mode 100644
index a43e923c..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValueTokenSpec.php
+++ /dev/null
@@ -1,28 +0,0 @@
-shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface');
- }
-
- function it_is_not_last()
- {
- $this->shouldNotBeLast();
- }
-
- function its_string_representation_is_star()
- {
- $this->__toString()->shouldReturn('*');
- }
-
- function it_scores_any_argument_as_3()
- {
- $this->scoreArgument(42)->shouldReturn(3);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValuesTokenSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValuesTokenSpec.php
deleted file mode 100644
index c29076f5..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValuesTokenSpec.php
+++ /dev/null
@@ -1,28 +0,0 @@
-shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface');
- }
-
- function it_is_last()
- {
- $this->shouldBeLast();
- }
-
- function its_string_representation_is_star_with_followup()
- {
- $this->__toString()->shouldReturn('* [, ...]');
- }
-
- function it_scores_any_argument_as_2()
- {
- $this->scoreArgument(42)->shouldReturn(2);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayCountTokenSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayCountTokenSpec.php
deleted file mode 100644
index 5d040d59..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayCountTokenSpec.php
+++ /dev/null
@@ -1,64 +0,0 @@
-beConstructedWith(2);
- }
-
- function it_implements_TokenInterface()
- {
- $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface');
- }
-
- function it_is_not_last()
- {
- $this->shouldNotBeLast();
- }
-
- function it_scores_6_if_argument_array_has_proper_count()
- {
- $this->scoreArgument(array(1,2))->shouldReturn(6);
- }
-
- /**
- * @param \Countable $countable
- */
- function it_scores_6_if_argument_countable_object_has_proper_count($countable)
- {
- $countable->count()->willReturn(2);
- $this->scoreArgument($countable)->shouldReturn(6);
- }
-
- function it_does_not_score_if_argument_is_neither_array_nor_countable_object()
- {
- $this->scoreArgument('string')->shouldBe(false);
- $this->scoreArgument(5)->shouldBe(false);
- $this->scoreArgument(new \stdClass)->shouldBe(false);
- }
-
- function it_does_not_score_if_argument_array_has_wrong_count()
- {
- $this->scoreArgument(array(1))->shouldReturn(false);
- }
-
- /**
- * @param \Countable $countable
- */
- function it_does_not_score_if_argument_countable_object_has_wrong_count($countable)
- {
- $countable->count()->willReturn(3);
- $this->scoreArgument($countable)->shouldReturn(false);
- }
-
- function it_has_simple_string_representation()
- {
- $this->__toString()->shouldBe('count(2)');
- }
-
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEntryTokenSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEntryTokenSpec.php
deleted file mode 100644
index 8ff0f158..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEntryTokenSpec.php
+++ /dev/null
@@ -1,229 +0,0 @@
-beConstructedWith($key, $value);
- }
-
- function it_implements_TokenInterface()
- {
- $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface');
- }
-
- function it_is_not_last()
- {
- $this->shouldNotBeLast();
- }
-
- function it_holds_key_and_value($key, $value)
- {
- $this->getKey()->shouldBe($key);
- $this->getValue()->shouldBe($value);
- }
-
- function its_string_representation_tells_that_its_an_array_containing_the_key_value_pair($key, $value)
- {
- $key->__toString()->willReturn('key');
- $value->__toString()->willReturn('value');
- $this->__toString()->shouldBe('[..., key => value, ...]');
- }
-
- /**
- * @param \Prophecy\Argument\Token\TokenInterface $key
- * @param \stdClass $object
- */
- function it_wraps_non_token_value_into_ExactValueToken($key, $object)
- {
- $this->beConstructedWith($key, $object);
- $this->getValue()->shouldHaveType('\Prophecy\Argument\Token\ExactValueToken');
- }
-
- /**
- * @param \stdClass $object
- * @param \Prophecy\Argument\Token\TokenInterface $value
- */
- function it_wraps_non_token_key_into_ExactValueToken($object, $value)
- {
- $this->beConstructedWith($object, $value);
- $this->getKey()->shouldHaveType('\Prophecy\Argument\Token\ExactValueToken');
- }
-
- function it_scores_array_half_of_combined_scores_from_key_and_value_tokens($key, $value)
- {
- $key->scoreArgument('key')->willReturn(4);
- $value->scoreArgument('value')->willReturn(6);
- $this->scoreArgument(array('key'=>'value'))->shouldBe(5);
- }
-
- /**
- * @param \Prophecy\Argument\Token\TokenInterface $key
- * @param \Prophecy\Argument\Token\TokenInterface $value
- * @param \Iterator $object
- */
- function it_scores_traversable_object_half_of_combined_scores_from_key_and_value_tokens($key, $value, $object)
- {
- $object->current()->will(function () use ($object) {
- $object->valid()->willReturn(false);
-
- return 'value';
- });
- $object->key()->willReturn('key');
- $object->rewind()->willReturn(null);
- $object->next()->willReturn(null);
- $object->valid()->willReturn(true);
- $key->scoreArgument('key')->willReturn(6);
- $value->scoreArgument('value')->willReturn(2);
- $this->scoreArgument($object)->shouldBe(4);
- }
-
- /**
- * @param \Prophecy\Argument\Token\AnyValuesToken $key
- * @param \Prophecy\Argument\Token\TokenInterface $value
- * @param \ArrayAccess $object
- */
- function it_throws_exception_during_scoring_of_array_accessible_object_if_key_is_not_ExactValueToken($key, $value, $object)
- {
- $key->__toString()->willReturn('any_token');
- $this->beConstructedWith($key,$value);
- $errorMessage = 'You can only use exact value tokens to match key of ArrayAccess object'.PHP_EOL.
- 'But you used `any_token`.';
- $this->shouldThrow(new InvalidArgumentException($errorMessage))->duringScoreArgument($object);
- }
-
- /**
- * @param \Prophecy\Argument\Token\ExactValueToken $key
- * @param \Prophecy\Argument\Token\TokenInterface $value
- * @param \ArrayAccess $object
- */
- function it_scores_array_accessible_object_half_of_combined_scores_from_key_and_value_tokens($key, $value, $object)
- {
- $object->offsetExists('key')->willReturn(true);
- $object->offsetGet('key')->willReturn('value');
- $key->getValue()->willReturn('key');
- $key->scoreArgument('key')->willReturn(3);
- $value->scoreArgument('value')->willReturn(1);
- $this->scoreArgument($object)->shouldBe(2);
- }
-
- /**
- * @param \Prophecy\Argument\Token\AnyValuesToken $key
- * @param \Prophecy\Argument\Token\TokenInterface $value
- * @param \ArrayIterator $object
- */
- function it_accepts_any_key_token_type_to_score_object_that_is_both_traversable_and_array_accessible($key, $value, $object)
- {
- $this->beConstructedWith($key, $value);
- $object->current()->will(function () use ($object) {
- $object->valid()->willReturn(false);
-
- return 'value';
- });
- $object->key()->willReturn('key');
- $object->rewind()->willReturn(null);
- $object->next()->willReturn(null);
- $object->valid()->willReturn(true);
- $this->shouldNotThrow(new InvalidArgumentException)->duringScoreArgument($object);
- }
-
- function it_does_not_score_if_argument_is_neither_array_nor_traversable_nor_array_accessible()
- {
- $this->scoreArgument('string')->shouldBe(false);
- $this->scoreArgument(new \stdClass)->shouldBe(false);
- }
-
- function it_does_not_score_empty_array()
- {
- $this->scoreArgument(array())->shouldBe(false);
- }
-
- function it_does_not_score_array_if_key_and_value_tokens_do_not_score_same_entry($key, $value)
- {
- $argument = array(1 => 'foo', 2 => 'bar');
- $key->scoreArgument(1)->willReturn(true);
- $key->scoreArgument(2)->willReturn(false);
- $value->scoreArgument('foo')->willReturn(false);
- $value->scoreArgument('bar')->willReturn(true);
- $this->scoreArgument($argument)->shouldBe(false);
- }
-
- /**
- * @param \Iterator $object
- */
- function it_does_not_score_traversable_object_without_entries($object)
- {
- $object->rewind()->willReturn(null);
- $object->next()->willReturn(null);
- $object->valid()->willReturn(false);
- $this->scoreArgument($object)->shouldBe(false);
- }
-
- /**
- * @param \Prophecy\Argument\Token\TokenInterface $key
- * @param \Prophecy\Argument\Token\TokenInterface $value
- * @param \Iterator $object
- */
- function it_does_not_score_traversable_object_if_key_and_value_tokens_do_not_score_same_entry($key, $value, $object)
- {
- $object->current()->willReturn('foo');
- $object->current()->will(function () use ($object) {
- $object->valid()->willReturn(false);
-
- return 'bar';
- });
- $object->key()->willReturn(1);
- $object->key()->willReturn(2);
- $object->rewind()->willReturn(null);
- $object->next()->willReturn(null);
- $object->valid()->willReturn(true);
- $key->scoreArgument(1)->willReturn(true);
- $key->scoreArgument(2)->willReturn(false);
- $value->scoreArgument('foo')->willReturn(false);
- $value->scoreArgument('bar')->willReturn(true);
- $this->scoreArgument($object)->shouldBe(false);
- }
-
- /**
- * @param \Prophecy\Argument\Token\ExactValueToken $key
- * @param \ArrayAccess $object
- */
- function it_does_not_score_array_accessible_object_if_it_has_no_offset_with_key_token_value($key, $object)
- {
- $object->offsetExists('key')->willReturn(false);
- $key->getValue()->willReturn('key');
- $this->scoreArgument($object)->shouldBe(false);
- }
-
- /**
- * @param \Prophecy\Argument\Token\ExactValueToken $key
- * @param \Prophecy\Argument\Token\TokenInterface $value
- * @param \ArrayAccess $object
- */
- function it_does_not_score_array_accessible_object_if_key_and_value_tokens_do_not_score_same_entry($key, $value, $object)
- {
- $object->offsetExists('key')->willReturn(true);
- $object->offsetGet('key')->willReturn('value');
- $key->getValue()->willReturn('key');
- $value->scoreArgument('value')->willReturn(false);
- $key->scoreArgument('key')->willReturn(true);
- $this->scoreArgument($object)->shouldBe(false);
- }
-
- function its_score_is_capped_at_8($key, $value)
- {
- $key->scoreArgument('key')->willReturn(10);
- $value->scoreArgument('value')->willReturn(10);
- $this->scoreArgument(array('key'=>'value'))->shouldBe(8);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEveryEntryTokenSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEveryEntryTokenSpec.php
deleted file mode 100644
index 8662e7d1..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEveryEntryTokenSpec.php
+++ /dev/null
@@ -1,109 +0,0 @@
-beConstructedWith($value);
- }
-
- function it_implements_TokenInterface()
- {
- $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface');
- }
-
- function it_is_not_last()
- {
- $this->shouldNotBeLast();
- }
-
- function it_holds_value($value)
- {
- $this->getValue()->shouldBe($value);
- }
-
- function its_string_representation_tells_that_its_an_array_containing_only_value($value)
- {
- $value->__toString()->willReturn('value');
- $this->__toString()->shouldBe('[value, ..., value]');
- }
-
- /**
- * @param \stdClass $stdClass
- */
- function it_wraps_non_token_value_into_ExactValueToken($stdClass)
- {
- $this->beConstructedWith($stdClass);
- $this->getValue()->shouldHaveType('Prophecy\Argument\Token\ExactValueToken');
- }
-
- function it_does_not_score_if_argument_is_neither_array_nor_traversable()
- {
- $this->scoreArgument('string')->shouldBe(false);
- $this->scoreArgument(new \stdClass)->shouldBe(false);
- }
-
- function it_does_not_score_empty_array()
- {
- $this->scoreArgument(array())->shouldBe(false);
- }
-
- /**
- * @param \Iterator $object
- */
- function it_does_not_score_traversable_object_without_entries($object)
- {
- $object->rewind()->willReturn(null);
- $object->next()->willReturn(null);
- $object->valid()->willReturn(false);
- $this->scoreArgument($object)->shouldBe(false);
- }
-
- function it_scores_avg_of_scores_from_value_tokens($value)
- {
- $value->scoreArgument('value1')->willReturn(6);
- $value->scoreArgument('value2')->willReturn(3);
- $this->scoreArgument(array('value1', 'value2'))->shouldBe(4.5);
- }
-
- function it_scores_false_if_entry_scores_false($value)
- {
- $value->scoreArgument('value1')->willReturn(6);
- $value->scoreArgument('value2')->willReturn(false);
- $this->scoreArgument(array('value1', 'value2'))->shouldBe(false);
- }
-
- function it_does_not_score_array_keys($value)
- {
- $value->scoreArgument('value')->willReturn(6);
- $value->scoreArgument('key')->shouldNotBeCalled(0);
- $this->scoreArgument(array('key' => 'value'))->shouldBe(6);
- }
-
- /**
- * @param \Prophecy\Argument\Token\TokenInterface $value
- * @param \Iterator $object
- */
- function it_scores_traversable_object_from_value_token($value, $object)
- {
- $object->current()->will(function ($args, $object) {
- $object->valid()->willReturn(false);
-
- return 'value';
- });
- $object->key()->willReturn('key');
- $object->rewind()->willReturn(null);
- $object->next()->willReturn(null);
- $object->valid()->willReturn(true);
- $value->scoreArgument('value')->willReturn(2);
- $this->scoreArgument($object)->shouldBe(2);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/CallbackTokenSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/CallbackTokenSpec.php
deleted file mode 100644
index 4395bf09..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/CallbackTokenSpec.php
+++ /dev/null
@@ -1,42 +0,0 @@
-beConstructedWith('get_class');
- }
-
- function it_implements_TokenInterface()
- {
- $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface');
- }
-
- function it_is_not_last()
- {
- $this->shouldNotBeLast();
- }
-
- function it_scores_7_if_argument_matches_callback()
- {
- $this->beConstructedWith(function ($argument) { return 2 === $argument; });
-
- $this->scoreArgument(2)->shouldReturn(7);
- }
-
- function it_does_not_scores_if_argument_does_not_match_callback()
- {
- $this->beConstructedWith(function ($argument) { return 2 === $argument; });
-
- $this->scoreArgument(5)->shouldReturn(false);
- }
-
- function its_string_representation_should_tell_that_its_callback()
- {
- $this->__toString()->shouldReturn('callback()');
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ExactValueTokenSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ExactValueTokenSpec.php
deleted file mode 100644
index 9e46e021..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ExactValueTokenSpec.php
+++ /dev/null
@@ -1,155 +0,0 @@
-beConstructedWith(42);
- }
-
- function it_implements_TokenInterface()
- {
- $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface');
- }
-
- function it_is_not_last()
- {
- $this->shouldNotBeLast();
- }
-
- function it_holds_value()
- {
- $this->getValue()->shouldReturn(42);
- }
-
- function it_scores_10_if_value_is_equal_to_argument()
- {
- $this->scoreArgument(42)->shouldReturn(10);
- $this->scoreArgument('42')->shouldReturn(10);
- }
-
- function it_scores_10_if_value_is_an_object_and_equal_to_argument()
- {
- $value = new \DateTime();
- $value2 = clone $value;
-
- $this->beConstructedWith($value);
- $this->scoreArgument($value2)->shouldReturn(10);
- }
-
- function it_does_not_scores_if_value_is_not_equal_to_argument()
- {
- $this->scoreArgument(50)->shouldReturn(false);
- $this->scoreArgument(new \stdClass())->shouldReturn(false);
- }
-
- function it_does_not_scores_if_value_an_object_and_is_not_equal_to_argument()
- {
- $value = new ExactValueTokenFixtureB('ABC');
- $value2 = new ExactValueTokenFixtureB('CBA');
-
- $this->beConstructedWith($value);
- $this->scoreArgument($value2)->shouldReturn(false);
- }
-
- function it_does_not_scores_if_value_type_and_is_not_equal_to_argument()
- {
- $this->beConstructedWith(false);
- $this->scoreArgument(0)->shouldReturn(false);
- }
-
- function it_generates_proper_string_representation_for_integer()
- {
- $this->beConstructedWith(42);
- $this->__toString()->shouldReturn('exact(42)');
- }
-
- function it_generates_proper_string_representation_for_string()
- {
- $this->beConstructedWith('some string');
- $this->__toString()->shouldReturn('exact("some string")');
- }
-
- function it_generates_single_line_representation_for_multiline_string()
- {
- $this->beConstructedWith("some\nstring");
- $this->__toString()->shouldReturn('exact("some\\nstring")');
- }
-
- function it_generates_proper_string_representation_for_double()
- {
- $this->beConstructedWith(42.3);
- $this->__toString()->shouldReturn('exact(42.3)');
- }
-
- function it_generates_proper_string_representation_for_boolean_true()
- {
- $this->beConstructedWith(true);
- $this->__toString()->shouldReturn('exact(true)');
- }
-
- function it_generates_proper_string_representation_for_boolean_false()
- {
- $this->beConstructedWith(false);
- $this->__toString()->shouldReturn('exact(false)');
- }
-
- function it_generates_proper_string_representation_for_null()
- {
- $this->beConstructedWith(null);
- $this->__toString()->shouldReturn('exact(null)');
- }
-
- function it_generates_proper_string_representation_for_empty_array()
- {
- $this->beConstructedWith(array());
- $this->__toString()->shouldReturn('exact([])');
- }
-
- function it_generates_proper_string_representation_for_array()
- {
- $this->beConstructedWith(array('zet', 42));
- $this->__toString()->shouldReturn('exact(["zet", 42])');
- }
-
- function it_generates_proper_string_representation_for_resource()
- {
- $resource = fopen(__FILE__, 'r');
- $this->beConstructedWith($resource);
- $this->__toString()->shouldReturn('exact(stream:'.$resource.')');
- }
-
- /**
- * @param \stdClass $object
- */
- function it_generates_proper_string_representation_for_object($object)
- {
- $objHash = sprintf('%s:%s',
- get_class($object->getWrappedObject()),
- spl_object_hash($object->getWrappedObject())
- );
-
- $this->beConstructedWith($object);
- $this->__toString()->shouldReturn("exact($objHash Object (\n 'objectProphecy' => Prophecy\Prophecy\ObjectProphecy Object (*Prophecy*)\n))");
- }
-}
-
-class ExactValueTokenFixtureA
-{
- public $errors;
-}
-
-class ExactValueTokenFixtureB extends ExactValueTokenFixtureA
-{
- public $errors;
- public $value = null;
-
- public function __construct($value)
- {
- $this->value = $value;
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/IdenticalValueTokenSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/IdenticalValueTokenSpec.php
deleted file mode 100644
index 00c3a215..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/IdenticalValueTokenSpec.php
+++ /dev/null
@@ -1,152 +0,0 @@
-beConstructedWith(42);
- }
-
- function it_is_initializable()
- {
- $this->shouldHaveType('Prophecy\Argument\Token\IdenticalValueToken');
- }
-
- function it_scores_11_if_string_value_is_identical_to_argument()
- {
- $this->beConstructedWith('foo');
- $this->scoreArgument('foo')->shouldReturn(11);
- }
-
- function it_scores_11_if_boolean_value_is_identical_to_argument()
- {
- $this->beConstructedWith(false);
- $this->scoreArgument(false)->shouldReturn(11);
- }
-
- function it_scores_11_if_integer_value_is_identical_to_argument()
- {
- $this->beConstructedWith(31);
- $this->scoreArgument(31)->shouldReturn(11);
- }
-
- function it_scores_11_if_float_value_is_identical_to_argument()
- {
- $this->beConstructedWith(31.12);
- $this->scoreArgument(31.12)->shouldReturn(11);
- }
-
- function it_scores_11_if_array_value_is_identical_to_argument()
- {
- $this->beConstructedWith(array('foo' => 'bar'));
- $this->scoreArgument(array('foo' => 'bar'))->shouldReturn(11);
- }
-
- function it_scores_11_if_object_value_is_identical_to_argument()
- {
- $object = new \stdClass();
-
- $this->beConstructedWith($object);
- $this->scoreArgument($object)->shouldReturn(11);
- }
-
- function it_scores_false_if_value_is_not_identical_to_argument()
- {
- $this->beConstructedWith(new \stdClass());
- $this->scoreArgument('foo')->shouldReturn(false);
- }
-
- function it_scores_false_if_object_value_is_not_the_same_instance_than_argument()
- {
- $this->beConstructedWith(new \stdClass());
- $this->scoreArgument(new \stdClass())->shouldReturn(false);
- }
-
- function it_scores_false_if_integer_value_is_not_identical_to_boolean_argument()
- {
- $this->beConstructedWith(1);
- $this->scoreArgument(true)->shouldReturn(false);
- }
-
- function it_is_not_last()
- {
- $this->shouldNotBeLast();
- }
-
- function it_generates_proper_string_representation_for_integer()
- {
- $this->beConstructedWith(42);
- $this->__toString()->shouldReturn('identical(42)');
- }
-
- function it_generates_proper_string_representation_for_string()
- {
- $this->beConstructedWith('some string');
- $this->__toString()->shouldReturn('identical("some string")');
- }
-
- function it_generates_single_line_representation_for_multiline_string()
- {
- $this->beConstructedWith("some\nstring");
- $this->__toString()->shouldReturn('identical("some\\nstring")');
- }
-
- function it_generates_proper_string_representation_for_double()
- {
- $this->beConstructedWith(42.3);
- $this->__toString()->shouldReturn('identical(42.3)');
- }
-
- function it_generates_proper_string_representation_for_boolean_true()
- {
- $this->beConstructedWith(true);
- $this->__toString()->shouldReturn('identical(true)');
- }
-
- function it_generates_proper_string_representation_for_boolean_false()
- {
- $this->beConstructedWith(false);
- $this->__toString()->shouldReturn('identical(false)');
- }
-
- function it_generates_proper_string_representation_for_null()
- {
- $this->beConstructedWith(null);
- $this->__toString()->shouldReturn('identical(null)');
- }
-
- function it_generates_proper_string_representation_for_empty_array()
- {
- $this->beConstructedWith(array());
- $this->__toString()->shouldReturn('identical([])');
- }
-
- function it_generates_proper_string_representation_for_array()
- {
- $this->beConstructedWith(array('zet', 42));
- $this->__toString()->shouldReturn('identical(["zet", 42])');
- }
-
- function it_generates_proper_string_representation_for_resource()
- {
- $resource = fopen(__FILE__, 'r');
- $this->beConstructedWith($resource);
- $this->__toString()->shouldReturn('identical(stream:'.$resource.')');
- }
-
- function it_generates_proper_string_representation_for_object($object)
- {
- $objHash = sprintf('%s:%s',
- get_class($object->getWrappedObject()),
- spl_object_hash($object->getWrappedObject())
- );
-
- $this->beConstructedWith($object);
- $this->__toString()->shouldReturn("identical($objHash Object (\n 'objectProphecy' => Prophecy\Prophecy\ObjectProphecy Object (*Prophecy*)\n))");
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalAndTokenSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalAndTokenSpec.php
deleted file mode 100644
index bb5e3840..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalAndTokenSpec.php
+++ /dev/null
@@ -1,78 +0,0 @@
-beConstructedWith(array());
- $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface');
- }
-
- function it_is_not_last()
- {
- $this->beConstructedWith(array());
- $this->shouldNotBeLast();
- }
-
- /**
- * @param \Prophecy\Argument\Token\TokenInterface $token1
- * @param \Prophecy\Argument\Token\TokenInterface $token2
- * @param \Prophecy\Argument\Token\TokenInterface $token3
- */
- function it_generates_string_representation_from_all_tokens_imploded($token1, $token2, $token3)
- {
- $token1->__toString()->willReturn('token_1');
- $token2->__toString()->willReturn('token_2');
- $token3->__toString()->willReturn('token_3');
-
- $this->beConstructedWith(array($token1, $token2, $token3));
- $this->__toString()->shouldReturn('bool(token_1 AND token_2 AND token_3)');
- }
-
- function it_wraps_non_token_arguments_into_ExactValueToken()
- {
- $this->beConstructedWith(array(15, '1985'));
- $this->__toString()->shouldReturn("bool(exact(15) AND exact(\"1985\"))");
- }
-
- /**
- * @param \Prophecy\Argument\Token\TokenInterface $token1
- * @param \Prophecy\Argument\Token\TokenInterface $token2
- */
- function it_scores_the_maximum_score_from_all_scores_returned_by_tokens($token1, $token2)
- {
- $token1->scoreArgument(1)->willReturn(10);
- $token2->scoreArgument(1)->willReturn(5);
- $this->beConstructedWith(array($token1, $token2));
- $this->scoreArgument(1)->shouldReturn(10);
- }
-
- function it_does_not_score_if_there_are_no_arguments_or_tokens()
- {
- $this->beConstructedWith(array());
- $this->scoreArgument('any')->shouldReturn(false);
- }
-
- /**
- * @param \Prophecy\Argument\Token\TokenInterface $token1
- * @param \Prophecy\Argument\Token\TokenInterface $token2
- */
- function it_does_not_score_if_either_of_tokens_does_not_score($token1, $token2)
- {
- $token1->scoreArgument(1)->willReturn(10);
- $token1->scoreArgument(2)->willReturn(false);
-
- $token2->scoreArgument(1)->willReturn(false);
- $token2->scoreArgument(2)->willReturn(10);
-
- $this->beConstructedWith(array($token1, $token2));
-
- $this->scoreArgument(1)->shouldReturn(false);
- $this->scoreArgument(2)->shouldReturn(false);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalNotTokenSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalNotTokenSpec.php
deleted file mode 100644
index 7ce7f3d8..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalNotTokenSpec.php
+++ /dev/null
@@ -1,65 +0,0 @@
-beConstructedWith($token);
- }
-
- function it_implements_TokenInterface()
- {
- $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface');
- }
-
- function it_holds_originating_token($token)
- {
- $this->getOriginatingToken()->shouldReturn($token);
- }
-
- function it_has_simple_string_representation($token)
- {
- $token->__toString()->willReturn('value');
- $this->__toString()->shouldBe('not(value)');
- }
-
- function it_wraps_non_token_argument_into_ExactValueToken()
- {
- $this->beConstructedWith(5);
- $token = $this->getOriginatingToken();
- $token->shouldhaveType('Prophecy\Argument\Token\ExactValueToken');
- $token->getValue()->shouldBe(5);
- }
-
- function it_scores_4_if_preset_token_does_not_match_the_argument($token)
- {
- $token->scoreArgument('argument')->willReturn(false);
- $this->scoreArgument('argument')->shouldBe(4);
- }
-
- function it_does_not_score_if_preset_token_matches_argument($token)
- {
- $token->scoreArgument('argument')->willReturn(5);
- $this->scoreArgument('argument')->shouldBe(false);
- }
-
- function it_is_last_if_preset_token_is_last($token)
- {
- $token->isLast()->willReturn(true);
- $this->shouldBeLast();
- }
-
- function it_is_not_last_if_preset_token_is_not_last($token)
- {
- $token->isLast()->willReturn(false);
- $this->shouldNotBeLast();
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ObjectStateTokenSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ObjectStateTokenSpec.php
deleted file mode 100644
index a783a15f..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ObjectStateTokenSpec.php
+++ /dev/null
@@ -1,101 +0,0 @@
-beConstructedWith('getName', 'stdClass');
- }
-
- function it_implements_TokenInterface()
- {
- $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface');
- }
-
- function it_is_not_last()
- {
- $this->shouldNotBeLast();
- }
-
- /**
- * @param \ReflectionClass $reflection
- */
- function it_scores_8_if_argument_object_has_specific_method_state($reflection)
- {
- $reflection->getName()->willReturn('stdClass');
-
- $this->scoreArgument($reflection)->shouldReturn(8);
- }
-
- /**
- * @param \stdClass $class
- */
- function it_scores_8_if_argument_object_has_specific_property_state($class)
- {
- $class->getName = 'stdClass';
-
- $this->scoreArgument($class)->shouldReturn(8);
- }
-
- function it_does_not_score_if_argument_method_state_does_not_match()
- {
- $value = new ObjectStateTokenFixtureB('ABC');
- $value2 = new ObjectStateTokenFixtureB('CBA');
-
- $this->beConstructedWith('getSelf', $value);
- $this->scoreArgument($value2)->shouldReturn(false);
- }
-
- /**
- * @param \stdClass $class
- */
- function it_does_not_score_if_argument_property_state_does_not_match($class)
- {
- $class->getName = 'SplFileInfo';
-
- $this->scoreArgument($class)->shouldReturn(false);
- }
-
- /**
- * @param \spec\Prophecy\Argument\Token\ObjectStateTokenFixtureA $class
- */
- function it_does_not_score_if_argument_object_does_not_have_method_or_property($class)
- {
- $this->scoreArgument($class)->shouldReturn(false);
- }
-
- function it_does_not_score_if_argument_is_not_object()
- {
- $this->scoreArgument(42)->shouldReturn(false);
- }
-
- function it_has_simple_string_representation()
- {
- $this->__toString()->shouldReturn('state(getName(), "stdClass")');
- }
-}
-
-class ObjectStateTokenFixtureA
-{
- public $errors;
-}
-
-class ObjectStateTokenFixtureB extends ObjectStateTokenFixtureA
-{
- public $errors;
- public $value = null;
-
- public function __construct($value)
- {
- $this->value = $value;
- }
-
- public function getSelf()
- {
- return $this;
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/StringContainsTokenSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/StringContainsTokenSpec.php
deleted file mode 100644
index c7fd2652..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/StringContainsTokenSpec.php
+++ /dev/null
@@ -1,49 +0,0 @@
-beConstructedWith('a substring');
- }
-
- function it_is_initializable()
- {
- $this->shouldHaveType('Prophecy\Argument\Token\StringContainsToken');
- }
-
- function it_implements_TokenInterface()
- {
- $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface');
- }
-
- function it_holds_value()
- {
- $this->getValue()->shouldReturn('a substring');
- }
-
- function it_is_not_last()
- {
- $this->shouldNotBeLast();
- }
-
- function it_scores_6_if_the_argument_contains_the_value()
- {
- $this->scoreArgument('Argument containing a substring')->shouldReturn(6);
- }
-
- function it_does_not_score_if_the_argument_does_not_contain_the_value()
- {
- $this->scoreArgument('Argument will not match')->shouldReturn(false);
- }
-
- function its_string_representation_shows_substring()
- {
- $this->__toString()->shouldReturn('contains("a substring")');
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/TypeTokenSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/TypeTokenSpec.php
deleted file mode 100644
index ae3e26e4..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/TypeTokenSpec.php
+++ /dev/null
@@ -1,62 +0,0 @@
-beConstructedWith('integer');
- }
-
- function it_implements_TokenInterface()
- {
- $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface');
- }
-
- function it_is_not_last()
- {
- $this->shouldNotBeLast();
- }
-
- function it_scores_5_if_argument_matches_simple_type()
- {
- $this->beConstructedWith('integer');
-
- $this->scoreArgument(42)->shouldReturn(5);
- }
-
- function it_does_not_scores_if_argument_does_not_match_simple_type()
- {
- $this->beConstructedWith('integer');
-
- $this->scoreArgument(42.0)->shouldReturn(false);
- }
-
- /**
- * @param \ReflectionObject $object
- */
- function it_scores_5_if_argument_is_an_instance_of_specified_class($object)
- {
- $this->beConstructedWith('ReflectionClass');
-
- $this->scoreArgument($object)->shouldReturn(5);
- }
-
- function it_has_simple_string_representation()
- {
- $this->__toString()->shouldReturn('type(integer)');
- }
-
- /**
- * @param \Prophecy\Argument\Token\TokenInterface $interface
- */
- function it_scores_5_if_argument_is_an_instance_of_specified_interface($interface)
- {
- $this->beConstructedWith('Prophecy\Argument\Token\TokenInterface');
-
- $this->scoreArgument($interface)->shouldReturn(5);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/ArgumentSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/ArgumentSpec.php
deleted file mode 100644
index 990aa80a..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/ArgumentSpec.php
+++ /dev/null
@@ -1,101 +0,0 @@
-exact(42);
- $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ExactValueToken');
- $token->getValue()->shouldReturn(42);
- }
-
- function it_has_a_shortcut_for_any_argument_token()
- {
- $token = $this->any();
- $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\AnyValueToken');
- }
-
- function it_has_a_shortcut_for_multiple_arguments_token()
- {
- $token = $this->cetera();
- $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\AnyValuesToken');
- }
-
- function it_has_a_shortcut_for_type_token()
- {
- $token = $this->type('integer');
- $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\TypeToken');
- }
-
- function it_has_a_shortcut_for_callback_token()
- {
- $token = $this->that('get_class');
- $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\CallbackToken');
- }
-
- function it_has_a_shortcut_for_object_state_token()
- {
- $token = $this->which('getName', 'everzet');
- $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ObjectStateToken');
- }
-
- function it_has_a_shortcut_for_logical_and_token()
- {
- $token = $this->allOf('integer', 5);
- $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\LogicalAndToken');
- }
-
- function it_has_a_shortcut_for_array_count_token()
- {
- $token = $this->size(5);
- $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ArrayCountToken');
- }
-
- function it_has_a_shortcut_for_array_entry_token()
- {
- $token = $this->withEntry('key', 'value');
- $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ArrayEntryToken');
- }
-
- function it_has_a_shortcut_for_array_every_entry_token()
- {
- $token = $this->withEveryEntry('value');
- $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ArrayEveryEntryToken');
- }
-
- function it_has_a_shortcut_for_identical_value_token()
- {
- $token = $this->is('value');
- $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\IdenticalValueToken');
- }
-
- function it_has_a_shortcut_for_array_entry_token_matching_any_key()
- {
- $token = $this->containing('value');
- $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ArrayEntryToken');
- $token->getKey()->shouldHaveType('Prophecy\Argument\Token\AnyValueToken');
- }
-
- function it_has_a_shortcut_for_array_entry_token_matching_any_value()
- {
- $token = $this->withKey('key');
- $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ArrayEntryToken');
- $token->getValue()->shouldHaveType('Prophecy\Argument\Token\AnyValueToken');
- }
-
- function it_has_a_shortcut_for_logical_not_token()
- {
- $token = $this->not('kagux');
- $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\LogicalNotToken');
- }
-
- function it_has_a_shortcut_for_string_contains_token()
- {
- $token = $this->containingString('string');
- $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\StringContainsToken');
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Call/CallCenterSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Call/CallCenterSpec.php
deleted file mode 100644
index acf8d783..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Call/CallCenterSpec.php
+++ /dev/null
@@ -1,195 +0,0 @@
-scoreArguments(array(5, 2, 3))->willReturn(10);
- $objectProphecy->getMethodProphecies()->willReturn(array());
-
- $this->makeCall($objectProphecy, 'setValues', array(5, 2, 3));
-
- $calls = $this->findCalls('setValues', $wildcard);
- $calls->shouldHaveCount(1);
-
- $calls[0]->shouldBeAnInstanceOf('Prophecy\Call\Call');
- $calls[0]->getMethodName()->shouldReturn('setValues');
- $calls[0]->getArguments()->shouldReturn(array(5, 2, 3));
- $calls[0]->getReturnValue()->shouldReturn(null);
- }
-
- function it_returns_null_for_any_call_through_makeCall_if_no_method_prophecies_added(
- $objectProphecy
- )
- {
- $objectProphecy->getMethodProphecies()->willReturn(array());
-
- $this->makeCall($objectProphecy, 'setValues', array(5, 2, 3))->shouldReturn(null);
- }
-
- /**
- * @param \Prophecy\Prophecy\MethodProphecy $method1
- * @param \Prophecy\Prophecy\MethodProphecy $method2
- * @param \Prophecy\Prophecy\MethodProphecy $method3
- * @param \Prophecy\Argument\ArgumentsWildcard $arguments1
- * @param \Prophecy\Argument\ArgumentsWildcard $arguments2
- * @param \Prophecy\Argument\ArgumentsWildcard $arguments3
- * @param \Prophecy\Promise\PromiseInterface $promise
- */
- function it_executes_promise_of_method_prophecy_that_matches_signature_passed_to_makeCall(
- $objectProphecy, $method1, $method2, $method3, $arguments1, $arguments2, $arguments3,
- $promise
- )
- {
- $method1->getMethodName()->willReturn('getName');
- $method1->getArgumentsWildcard()->willReturn($arguments1);
- $arguments1->scoreArguments(array('world', 'everything'))->willReturn(false);
-
- $method2->getMethodName()->willReturn('setTitle');
- $method2->getArgumentsWildcard()->willReturn($arguments2);
- $arguments2->scoreArguments(array('world', 'everything'))->willReturn(false);
-
- $method3->getMethodName()->willReturn('getName');
- $method3->getArgumentsWildcard()->willReturn($arguments3);
- $method3->getPromise()->willReturn($promise);
- $arguments3->scoreArguments(array('world', 'everything'))->willReturn(200);
-
- $objectProphecy->getMethodProphecies()->willReturn(array(
- 'method1' => array($method1),
- 'method2' => array($method2, $method3)
- ));
- $objectProphecy->getMethodProphecies('getName')->willReturn(array($method1, $method3));
- $objectProphecy->reveal()->willReturn(new \stdClass());
-
- $promise->execute(array('world', 'everything'), $objectProphecy->getWrappedObject(), $method3)->willReturn(42);
-
- $this->makeCall($objectProphecy, 'getName', array('world', 'everything'))->shouldReturn(42);
-
- $calls = $this->findCalls('getName', $arguments3);
- $calls->shouldHaveCount(1);
- $calls[0]->getReturnValue()->shouldReturn(42);
- }
-
- /**
- * @param \Prophecy\Prophecy\MethodProphecy $method1
- * @param \Prophecy\Prophecy\MethodProphecy $method2
- * @param \Prophecy\Prophecy\MethodProphecy $method3
- * @param \Prophecy\Argument\ArgumentsWildcard $arguments1
- * @param \Prophecy\Argument\ArgumentsWildcard $arguments2
- * @param \Prophecy\Argument\ArgumentsWildcard $arguments3
- * @param \Prophecy\Promise\PromiseInterface $promise
- */
- function it_executes_promise_of_method_prophecy_that_matches_with_highest_score_to_makeCall(
- $objectProphecy, $method1, $method2, $method3, $arguments1, $arguments2, $arguments3,
- $promise
- )
- {
- $method1->getMethodName()->willReturn('getName');
- $method1->getArgumentsWildcard()->willReturn($arguments1);
- $arguments1->scoreArguments(array('world', 'everything'))->willReturn(50);
-
- $method2->getMethodName()->willReturn('getName');
- $method2->getArgumentsWildcard()->willReturn($arguments2);
- $method2->getPromise()->willReturn($promise);
- $arguments2->scoreArguments(array('world', 'everything'))->willReturn(300);
-
- $method3->getMethodName()->willReturn('getName');
- $method3->getArgumentsWildcard()->willReturn($arguments3);
- $arguments3->scoreArguments(array('world', 'everything'))->willReturn(200);
-
- $objectProphecy->getMethodProphecies()->willReturn(array(
- 'method1' => array($method1),
- 'method2' => array($method2, $method3)
- ));
- $objectProphecy->getMethodProphecies('getName')->willReturn(array(
- $method1, $method2, $method3
- ));
- $objectProphecy->reveal()->willReturn(new \stdClass());
-
- $promise->execute(array('world', 'everything'), $objectProphecy->getWrappedObject(), $method2)
- ->willReturn('second');
-
- $this->makeCall($objectProphecy, 'getName', array('world', 'everything'))
- ->shouldReturn('second');
- }
-
- /**
- * @param \Prophecy\Prophecy\MethodProphecy $method
- * @param \Prophecy\Argument\ArgumentsWildcard $arguments
- */
- function it_throws_exception_if_call_does_not_match_any_of_defined_method_prophecies(
- $objectProphecy, $method, $arguments
- )
- {
- $method->getMethodName()->willReturn('getName');
- $method->getArgumentsWildcard()->willReturn($arguments);
- $arguments->scoreArguments(array('world', 'everything'))->willReturn(false);
- $arguments->__toString()->willReturn('arg1, arg2');
-
- $objectProphecy->getMethodProphecies()->willReturn(array('method1' => array($method)));
- $objectProphecy->getMethodProphecies('getName')->willReturn(array($method));
-
- $this->shouldThrow('Prophecy\Exception\Call\UnexpectedCallException')
- ->duringMakeCall($objectProphecy, 'getName', array('world', 'everything'));
- }
-
- /**
- * @param \Prophecy\Prophecy\MethodProphecy $method
- * @param \Prophecy\Argument\ArgumentsWildcard $arguments
- */
- function it_returns_null_if_method_prophecy_that_matches_makeCall_arguments_has_no_promise(
- $objectProphecy, $method, $arguments
- )
- {
- $method->getMethodName()->willReturn('getName');
- $method->getArgumentsWildcard()->willReturn($arguments);
- $method->getPromise()->willReturn(null);
- $arguments->scoreArguments(array('world', 'everything'))->willReturn(100);
-
- $objectProphecy->getMethodProphecies()->willReturn(array($method));
- $objectProphecy->getMethodProphecies('getName')->willReturn(array($method));
-
- $this->makeCall($objectProphecy, 'getName', array('world', 'everything'))
- ->shouldReturn(null);
- }
-
- /**
- * @param \Prophecy\Argument\ArgumentsWildcard $wildcard
- */
- function it_finds_recorded_calls_by_a_method_name_and_arguments_wildcard(
- $objectProphecy, $wildcard
- )
- {
- $objectProphecy->getMethodProphecies()->willReturn(array());
-
- $this->makeCall($objectProphecy, 'getName', array('world'));
- $this->makeCall($objectProphecy, 'getName', array('everything'));
- $this->makeCall($objectProphecy, 'setName', array(42));
-
- $wildcard->scoreArguments(array('world'))->willReturn(false);
- $wildcard->scoreArguments(array('everything'))->willReturn(10);
-
- $calls = $this->findCalls('getName', $wildcard);
-
- $calls->shouldHaveCount(1);
- $calls[0]->getMethodName()->shouldReturn('getName');
- $calls[0]->getArguments()->shouldReturn(array('everything'));
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Call/CallSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Call/CallSpec.php
deleted file mode 100644
index d1a85391..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Call/CallSpec.php
+++ /dev/null
@@ -1,54 +0,0 @@
-beConstructedWith('setValues', array(5, 2), 42, $exception, 'some_file.php', 23);
- }
-
- function it_exposes_method_name_through_getter()
- {
- $this->getMethodName()->shouldReturn('setValues');
- }
-
- function it_exposes_arguments_through_getter()
- {
- $this->getArguments()->shouldReturn(array(5, 2));
- }
-
- function it_exposes_return_value_through_getter()
- {
- $this->getReturnValue()->shouldReturn(42);
- }
-
- function it_exposes_exception_through_getter($exception)
- {
- $this->getException()->shouldReturn($exception);
- }
-
- function it_exposes_file_and_line_through_getter()
- {
- $this->getFile()->shouldReturn('some_file.php');
- $this->getLine()->shouldReturn(23);
- }
-
- function it_returns_shortpath_to_callPlace()
- {
- $this->getCallPlace()->shouldReturn('some_file.php:23');
- }
-
- function it_returns_unknown_as_callPlace_if_no_file_or_line_provided()
- {
- $this->beConstructedWith('setValues', array(), 0, null, null, null);
-
- $this->getCallPlace()->shouldReturn('unknown');
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Comparator/ClosureComparatorSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Comparator/ClosureComparatorSpec.php
deleted file mode 100644
index c174e73c..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Comparator/ClosureComparatorSpec.php
+++ /dev/null
@@ -1,39 +0,0 @@
-shouldHaveType('SebastianBergmann\Comparator\Comparator');
- }
-
- function it_accepts_only_closures()
- {
- $this->accepts(123, 321)->shouldReturn(false);
- $this->accepts('string', 'string')->shouldReturn(false);
- $this->accepts(false, true)->shouldReturn(false);
- $this->accepts(true, false)->shouldReturn(false);
- $this->accepts((object)array(), (object)array())->shouldReturn(false);
- $this->accepts(function(){}, (object)array())->shouldReturn(false);
- $this->accepts(function(){}, (object)array())->shouldReturn(false);
-
- $this->accepts(function(){}, function(){})->shouldReturn(true);
- }
-
- function it_asserts_that_all_closures_are_different()
- {
- $this->shouldThrow()->duringAssertEquals(function(){}, function(){});
- }
-
- function it_asserts_that_all_closures_are_different_even_if_its_the_same_closure()
- {
- $closure = function(){};
-
- $this->shouldThrow()->duringAssertEquals($closure, $closure);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Comparator/FactorySpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Comparator/FactorySpec.php
deleted file mode 100644
index 6b13336d..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Comparator/FactorySpec.php
+++ /dev/null
@@ -1,20 +0,0 @@
-shouldHaveType('SebastianBergmann\Comparator\Factory');
- }
-
- function it_should_have_ClosureComparator_registered()
- {
- $comparator = $this->getInstance()->getComparatorFor(function(){}, function(){});
- $comparator->shouldHaveType('Prophecy\Comparator\ClosureComparator');
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/DisableConstructorPatchSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/DisableConstructorPatchSpec.php
deleted file mode 100644
index 2d7d934d..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/DisableConstructorPatchSpec.php
+++ /dev/null
@@ -1,59 +0,0 @@
-shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface');
- }
-
- function its_priority_is_100()
- {
- $this->getPriority()->shouldReturn(100);
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\ClassNode $node
- */
- function it_supports_anything($node)
- {
- $this->supports($node)->shouldReturn(true);
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\ClassNode $class
- * @param \Prophecy\Doubler\Generator\Node\MethodNode $method
- * @param \Prophecy\Doubler\Generator\Node\ArgumentNode $arg1
- * @param \Prophecy\Doubler\Generator\Node\ArgumentNode $arg2
- */
- function it_makes_all_constructor_arguments_optional($class, $method, $arg1, $arg2)
- {
- $class->hasMethod('__construct')->willReturn(true);
- $class->getMethod('__construct')->willReturn($method);
- $method->getArguments()->willReturn(array($arg1, $arg2));
-
- $arg1->setDefault(null)->shouldBeCalled();
- $arg2->setDefault(null)->shouldBeCalled();
-
- $method->setCode(Argument::type('string'))->shouldBeCalled();
-
- $this->apply($class);
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\ClassNode $class
- */
- function it_creates_new_constructor_if_object_has_none($class)
- {
- $class->hasMethod('__construct')->willReturn(false);
- $class->addMethod(Argument::type('Prophecy\Doubler\Generator\Node\MethodNode'))
- ->shouldBeCalled();
-
- $this->apply($class);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/HhvmExceptionPatchSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/HhvmExceptionPatchSpec.php
deleted file mode 100644
index 8c348b86..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/HhvmExceptionPatchSpec.php
+++ /dev/null
@@ -1,37 +0,0 @@
-shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface');
- }
-
- function its_priority_is_minus_50()
- {
- $this->getPriority()->shouldReturn(-50);
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\ClassNode $node
- * @param \Prophecy\Doubler\Generator\Node\MethodNode $method
- * @param \Prophecy\Doubler\Generator\Node\MethodNode $getterMethod
- */
- function it_uses_parent_code_for_setTraceOptions($node, $method, $getterMethod)
- {
- $node->hasMethod('setTraceOptions')->willReturn(true);
- $node->getMethod('setTraceOptions')->willReturn($method);
- $node->hasMethod('getTraceOptions')->willReturn(true);
- $node->getMethod('getTraceOptions')->willReturn($getterMethod);
-
- $method->useParentCode()->shouldBeCalled();
- $getterMethod->useParentCode()->shouldBeCalled();
-
- $this->apply($node);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/KeywordPatchSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/KeywordPatchSpec.php
deleted file mode 100644
index 200d9619..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/KeywordPatchSpec.php
+++ /dev/null
@@ -1,44 +0,0 @@
-shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface');
- }
-
- function its_priority_is_49()
- {
- $this->getPriority()->shouldReturn(49);
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\ClassNode $node
- * @param \Prophecy\Doubler\Generator\Node\MethodNode $method1
- * @param \Prophecy\Doubler\Generator\Node\MethodNode $method2
- * @param \Prophecy\Doubler\Generator\Node\MethodNode $method3
- */
- function it_will_remove_echo_and_eval_methods($node, $method1, $method2, $method3)
- {
- $node->removeMethod('eval')->shouldBeCalled();
- $node->removeMethod('echo')->shouldBeCalled();
-
- $method1->getName()->willReturn('echo');
- $method2->getName()->willReturn('eval');
- $method3->getName()->willReturn('notKeyword');
-
- $node->getMethods()->willReturn(array(
- 'echo' => $method1,
- 'eval' => $method2,
- 'notKeyword' => $method3,
- ));
-
- $this->apply($node);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/MagicCallPatchSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/MagicCallPatchSpec.php
deleted file mode 100644
index cb1d0f01..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/MagicCallPatchSpec.php
+++ /dev/null
@@ -1,76 +0,0 @@
-shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface');
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\ClassNode $node
- */
- function it_supports_anything($node)
- {
- $this->supports($node)->shouldReturn(true);
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\ClassNode $node
- */
- function it_discovers_api_using_phpdoc($node)
- {
- $node->getParentClass()->willReturn('spec\Prophecy\Doubler\ClassPatch\MagicalApi');
-
- $node->addMethod(new MethodNode('undefinedMethod'))->shouldBeCalled();
-
- $this->apply($node);
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\ClassNode $node
- */
- function it_ignores_existing_methods($node)
- {
- $node->getParentClass()->willReturn('spec\Prophecy\Doubler\ClassPatch\MagicalApiExtended');
-
- $node->addMethod(new MethodNode('undefinedMethod'))->shouldBeCalled();
- $node->addMethod(new MethodNode('definedMethod'))->shouldNotBeCalled();
-
- $this->apply($node);
- }
-
- function it_has_50_priority()
- {
- $this->getPriority()->shouldReturn(50);
- }
-}
-
-/**
- * @method void undefinedMethod()
- */
-class MagicalApi
-{
- /**
- * @return void
- */
- public function definedMethod()
- {
-
- }
-}
-
-/**
- * @method void undefinedMethod()
- * @method void definedMethod()
- */
-class MagicalApiExtended extends MagicalApi
-{
-
-}
\ No newline at end of file
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ProphecySubjectPatchSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ProphecySubjectPatchSpec.php
deleted file mode 100644
index c460814c..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ProphecySubjectPatchSpec.php
+++ /dev/null
@@ -1,83 +0,0 @@
-shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface');
- }
-
- function it_has_priority_of_0()
- {
- $this->getPriority()->shouldReturn(0);
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\ClassNode $node
- */
- function it_supports_any_class($node)
- {
- $this->supports($node)->shouldReturn(true);
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\ClassNode $node
- */
- function it_forces_class_to_implement_ProphecySubjectInterface($node)
- {
- $node->addInterface('Prophecy\Prophecy\ProphecySubjectInterface')->shouldBeCalled();
-
- $node->addProperty('objectProphecy', 'private')->willReturn(null);
- $node->getMethods()->willReturn(array());
- $node->hasMethod(Argument::any())->willReturn(false);
- $node->addMethod(Argument::type('Prophecy\Doubler\Generator\Node\MethodNode'))->willReturn(null);
- $node->addMethod(Argument::type('Prophecy\Doubler\Generator\Node\MethodNode'))->willReturn(null);
-
- $this->apply($node);
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\ClassNode $node
- * @param \Prophecy\Doubler\Generator\Node\MethodNode $constructor
- * @param \Prophecy\Doubler\Generator\Node\MethodNode $method1
- * @param \Prophecy\Doubler\Generator\Node\MethodNode $method2
- * @param \Prophecy\Doubler\Generator\Node\MethodNode $method3
- */
- function it_forces_all_class_methods_except_constructor_to_proxy_calls_into_prophecy_makeCall(
- $node, $constructor, $method1, $method2, $method3
- )
- {
- $node->addInterface('Prophecy\Prophecy\ProphecySubjectInterface')->willReturn(null);
- $node->addProperty('objectProphecy', 'private')->willReturn(null);
- $node->hasMethod(Argument::any())->willReturn(false);
- $node->addMethod(Argument::type('Prophecy\Doubler\Generator\Node\MethodNode'))->willReturn(null);
- $node->addMethod(Argument::type('Prophecy\Doubler\Generator\Node\MethodNode'))->willReturn(null);
-
- $constructor->getName()->willReturn('__construct');
- $method1->getName()->willReturn('method1');
- $method2->getName()->willReturn('method2');
- $method3->getName()->willReturn('method3');
-
- $node->getMethods()->willReturn(array(
- 'method1' => $method1,
- 'method2' => $method2,
- 'method3' => $method3,
- ));
-
- $constructor->setCode(Argument::any())->shouldNotBeCalled();
-
- $method1->setCode('return $this->getProphecy()->makeProphecyMethodCall(__FUNCTION__, func_get_args());')
- ->shouldBeCalled();
- $method2->setCode('return $this->getProphecy()->makeProphecyMethodCall(__FUNCTION__, func_get_args());')
- ->shouldBeCalled();
- $method3->setCode('return $this->getProphecy()->makeProphecyMethodCall(__FUNCTION__, func_get_args());')
- ->shouldBeCalled();
-
- $this->apply($node);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatchSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatchSpec.php
deleted file mode 100644
index 4116e4df..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatchSpec.php
+++ /dev/null
@@ -1,47 +0,0 @@
-shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface');
- }
-
- function its_priority_is_50()
- {
- $this->getPriority()->shouldReturn(50);
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\ClassNode $reflectionClassNode
- * @param \Prophecy\Doubler\Generator\Node\ClassNode $anotherClassNode
- */
- function it_supports_ReflectionClass_only($reflectionClassNode, $anotherClassNode)
- {
- $reflectionClassNode->getParentClass()->willReturn('ReflectionClass');
- $anotherClassNode->getParentClass()->willReturn('stdClass');
-
- $this->supports($reflectionClassNode)->shouldReturn(true);
- $this->supports($anotherClassNode)->shouldReturn(false);
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\ClassNode $class
- * @param \Prophecy\Doubler\Generator\Node\MethodNode $method
- * @param \Prophecy\Doubler\Generator\Node\ArgumentNode $arg1
- * @param \Prophecy\Doubler\Generator\Node\ArgumentNode $arg2
- */
- function it_makes_all_newInstance_arguments_optional($class, $method, $arg1, $arg2)
- {
- $class->getMethod('newInstance')->willReturn($method);
- $method->getArguments()->willReturn(array($arg1));
- $arg1->setDefault(null)->shouldBeCalled();
-
- $this->apply($class);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/SplFileInfoPatchSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/SplFileInfoPatchSpec.php
deleted file mode 100644
index 37fe82f6..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/SplFileInfoPatchSpec.php
+++ /dev/null
@@ -1,91 +0,0 @@
-shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface');
- }
-
- function its_priority_is_50()
- {
- $this->getPriority()->shouldReturn(50);
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\ClassNode $node
- */
- function it_does_not_support_nodes_without_parent_class($node)
- {
- $node->getParentClass()->willReturn('stdClass');
- $this->supports($node)->shouldReturn(false);
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\ClassNode $node
- */
- function it_supports_nodes_with_SplFileInfo_as_parent_class($node)
- {
- $node->getParentClass()->willReturn('SplFileInfo');
- $this->supports($node)->shouldReturn(true);
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\ClassNode $node
- */
- function it_supports_nodes_with_derivative_of_SplFileInfo_as_parent_class($node)
- {
- $node->getParentClass()->willReturn('SplFileInfo');
- $this->supports($node)->shouldReturn(true);
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\ClassNode $node
- */
- function it_adds_a_method_to_node_if_not_exists($node)
- {
- $node->hasMethod('__construct')->willReturn(false);
- $node->addMethod(Argument::any())->shouldBeCalled();
- $node->getParentClass()->shouldBeCalled();
-
- $this->apply($node);
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\ClassNode $node
- * @param \Prophecy\Doubler\Generator\Node\MethodNode $method
- */
- function it_updates_existing_method_if_found($node, $method)
- {
- $node->hasMethod('__construct')->willReturn(true);
- $node->getMethod('__construct')->willReturn($method);
- $node->getParentClass()->shouldBeCalled();
-
- $method->useParentCode()->shouldBeCalled();
-
- $this->apply($node);
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\ClassNode $node
- * @param \Prophecy\Doubler\Generator\Node\MethodNode $method
- */
- function it_should_not_supply_a_file_for_a_directory_iterator($node, $method)
- {
- $node->hasMethod('__construct')->willReturn(true);
- $node->getMethod('__construct')->willReturn($method);
- $node->getParentClass()->willReturn('DirectoryIterator');
-
- $method->setCode(Argument::that(function($value) {
- return strpos($value, '.php') === false;
- }))->shouldBeCalled();
-
- $this->apply($node);
- }
-
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/TraversablePatchSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/TraversablePatchSpec.php
deleted file mode 100644
index 2279b720..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/TraversablePatchSpec.php
+++ /dev/null
@@ -1,61 +0,0 @@
-shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface');
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\ClassNode $node
- */
- function it_supports_class_that_implements_only_Traversable($node)
- {
- $node->getInterfaces()->willReturn(array('Traversable'));
-
- $this->supports($node)->shouldReturn(true);
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\ClassNode $node
- */
- function it_does_not_support_class_that_implements_Iterator($node)
- {
- $node->getInterfaces()->willReturn(array('Traversable', 'Iterator'));
-
- $this->supports($node)->shouldReturn(false);
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\ClassNode $node
- */
- function it_does_not_support_class_that_implements_IteratorAggregate($node)
- {
- $node->getInterfaces()->willReturn(array('Traversable', 'IteratorAggregate'));
-
- $this->supports($node)->shouldReturn(false);
- }
-
- function it_has_100_priority()
- {
- $this->getPriority()->shouldReturn(100);
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\ClassNode $node
- */
- function it_forces_node_to_implement_IteratorAggregate($node)
- {
- $node->addInterface('Iterator')->shouldBeCalled();
-
- $node->addMethod(Argument::type('Prophecy\Doubler\Generator\Node\MethodNode'))->willReturn(null);
-
- $this->apply($node);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/DoublerSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/DoublerSpec.php
deleted file mode 100644
index a39fa87f..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/DoublerSpec.php
+++ /dev/null
@@ -1,122 +0,0 @@
-beConstructedWith($mirror, $creator, $namer);
- }
-
- function it_does_not_have_patches_by_default()
- {
- $this->getClassPatches()->shouldHaveCount(0);
- }
-
- /**
- * @param \Prophecy\Doubler\ClassPatch\ClassPatchInterface $patch
- */
- function its_registerClassPatch_adds_a_patch_to_the_doubler($patch)
- {
- $this->registerClassPatch($patch);
- $this->getClassPatches()->shouldReturn(array($patch));
- }
-
- /**
- * @param \Prophecy\Doubler\ClassPatch\ClassPatchInterface $alt1
- * @param \Prophecy\Doubler\ClassPatch\ClassPatchInterface $alt2
- * @param \Prophecy\Doubler\ClassPatch\ClassPatchInterface $alt3
- * @param \Prophecy\Doubler\ClassPatch\ClassPatchInterface $alt4
- */
- function its_getClassPatches_sorts_patches_by_priority($alt1, $alt2, $alt3, $alt4)
- {
- $alt1->getPriority()->willReturn(2);
- $alt2->getPriority()->willReturn(50);
- $alt3->getPriority()->willReturn(10);
- $alt4->getPriority()->willReturn(0);
-
- $this->registerClassPatch($alt1);
- $this->registerClassPatch($alt2);
- $this->registerClassPatch($alt3);
- $this->registerClassPatch($alt4);
-
- $this->getClassPatches()->shouldReturn(array($alt2, $alt3, $alt1, $alt4));
- }
-
- /**
- * @param \Prophecy\Doubler\ClassPatch\ClassPatchInterface $alt1
- * @param \Prophecy\Doubler\ClassPatch\ClassPatchInterface $alt2
- * @param \ReflectionClass $class
- * @param \ReflectionClass $interface1
- * @param \ReflectionClass $interface2
- * @param \Prophecy\Doubler\Generator\Node\ClassNode $node
- */
- function its_double_mirrors_alterates_and_instantiates_provided_class(
- $mirror, $creator, $namer, $alt1, $alt2, $class, $interface1, $interface2, $node
- )
- {
- $mirror->reflect($class, array($interface1, $interface2))->willReturn($node);
- $alt1->supports($node)->willReturn(true);
- $alt2->supports($node)->willReturn(false);
- $alt1->getPriority()->willReturn(1);
- $alt2->getPriority()->willReturn(2);
- $namer->name($class, array($interface1, $interface2))->willReturn('SplStack');
- $class->getName()->willReturn('stdClass');
- $interface1->getName()->willReturn('ArrayAccess');
- $interface2->getName()->willReturn('Iterator');
-
- $alt1->apply($node)->shouldBeCalled();
- $alt2->apply($node)->shouldNotBeCalled();
- $creator->create('SplStack', $node)->shouldBeCalled();
-
- $this->registerClassPatch($alt1);
- $this->registerClassPatch($alt2);
-
- $this->double($class, array($interface1, $interface2))
- ->shouldReturnAnInstanceOf('SplStack');
- }
-
- /**
- * @param \ReflectionClass $class
- * @param \Prophecy\Doubler\Generator\Node\ClassNode $node
- */
- function it_double_instantiates_a_class_with_constructor_argument($mirror, $class, $node, $namer)
- {
- $class->getName()->willReturn('ReflectionClass');
- $mirror->reflect($class, array())->willReturn($node);
- $namer->name($class, array())->willReturn('ReflectionClass');
-
- $double = $this->double($class, array(), array('stdClass'));
- $double->shouldBeAnInstanceOf('ReflectionClass');
- $double->getName()->shouldReturn('stdClass');
- }
-
- /**
- * @param \ReflectionClass $class
- * @param \Prophecy\Doubler\Generator\Node\ClassNode $node
- */
- function it_can_instantiate_class_with_final_constructor($mirror, $class, $node, $namer)
- {
- $class->getName()->willReturn('spec\Prophecy\Doubler\WithFinalConstructor');
- $mirror->reflect($class, array())->willReturn($node);
- $namer->name($class, array())->willReturn('spec\Prophecy\Doubler\WithFinalConstructor');
-
- $double = $this->double($class, array());
-
- $double->shouldBeAnInstanceOf('spec\Prophecy\Doubler\WithFinalConstructor');
- }
-}
-
-class WithFinalConstructor
-{
- final public function __construct() {}
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCodeGeneratorSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCodeGeneratorSpec.php
deleted file mode 100644
index fa65bc15..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCodeGeneratorSpec.php
+++ /dev/null
@@ -1,191 +0,0 @@
-getParentClass()->willReturn('RuntimeException');
- $class->getInterfaces()->willReturn(array(
- 'Prophecy\Doubler\Generator\MirroredInterface', 'ArrayAccess', 'ArrayIterator'
- ));
- $class->getProperties()->willReturn(array('name' => 'public', 'email' => 'private'));
- $class->getMethods()->willReturn(array($method1, $method2, $method3));
-
- $method1->getName()->willReturn('getName');
- $method1->getVisibility()->willReturn('public');
- $method1->returnsReference()->willReturn(false);
- $method1->isStatic()->willReturn(true);
- $method1->getArguments()->willReturn(array($argument11, $argument12));
- $method1->hasReturnType()->willReturn(true);
- $method1->getReturnType()->willReturn('string');
- $method1->getCode()->willReturn('return $this->name;');
-
- $method2->getName()->willReturn('getEmail');
- $method2->getVisibility()->willReturn('protected');
- $method2->returnsReference()->willReturn(false);
- $method2->isStatic()->willReturn(false);
- $method2->getArguments()->willReturn(array($argument21));
- $method2->hasReturnType()->willReturn(false);
- $method2->getCode()->willReturn('return $this->email;');
-
- $method3->getName()->willReturn('getRefValue');
- $method3->getVisibility()->willReturn('public');
- $method3->returnsReference()->willReturn(true);
- $method3->isStatic()->willReturn(false);
- $method3->getArguments()->willReturn(array($argument31));
- $method3->hasReturnType()->willReturn(false);
- $method3->getCode()->willReturn('return $this->refValue;');
-
- $argument11->getName()->willReturn('fullname');
- $argument11->getTypeHint()->willReturn('array');
- $argument11->isOptional()->willReturn(true);
- $argument11->getDefault()->willReturn(null);
- $argument11->isPassedByReference()->willReturn(false);
-
- $argument12->getName()->willReturn('class');
- $argument12->getTypeHint()->willReturn('ReflectionClass');
- $argument12->isOptional()->willReturn(false);
- $argument12->isPassedByReference()->willReturn(false);
-
- $argument21->getName()->willReturn('default');
- $argument21->getTypeHint()->willReturn(null);
- $argument21->isOptional()->willReturn(true);
- $argument21->getDefault()->willReturn('ever.zet@gmail.com');
- $argument21->isPassedByReference()->willReturn(false);
-
- $argument31->getName()->willReturn('refValue');
- $argument31->getTypeHint()->willReturn(null);
- $argument31->isOptional()->willReturn(false);
- $argument31->getDefault()->willReturn();
- $argument31->isPassedByReference()->willReturn(false);
-
- $code = $this->generate('CustomClass', $class);
- $expected = <<<'PHP'
-namespace {
-class CustomClass extends \RuntimeException implements \Prophecy\Doubler\Generator\MirroredInterface, \ArrayAccess, \ArrayIterator {
-public $name;
-private $email;
-
-public static function getName(array $fullname = NULL, \ReflectionClass $class): string {
-return $this->name;
-}
-protected function getEmail( $default = 'ever.zet@gmail.com') {
-return $this->email;
-}
-public function &getRefValue( $refValue) {
-return $this->refValue;
-}
-
-}
-}
-PHP;
- $expected = strtr($expected, array("\r\n" => "\n", "\r" => "\n"));
- $code->shouldBe($expected);
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\ClassNode $class
- * @param \Prophecy\Doubler\Generator\Node\MethodNode $method
- * @param \Prophecy\Doubler\Generator\Node\ArgumentNode $argument
- */
- function it_overrides_properly_methods_with_args_passed_by_reference(
- $class, $method, $argument
- )
- {
- $class->getParentClass()->willReturn('RuntimeException');
- $class->getInterfaces()->willReturn(array('Prophecy\Doubler\Generator\MirroredInterface'));
- $class->getProperties()->willReturn(array());
- $class->getMethods()->willReturn(array($method));
-
- $method->getName()->willReturn('getName');
- $method->getVisibility()->willReturn('public');
- $method->isStatic()->willReturn(false);
- $method->getArguments()->willReturn(array($argument));
- $method->hasReturnType()->willReturn(false);
- $method->returnsReference()->willReturn(false);
- $method->getCode()->willReturn('return $this->name;');
-
- $argument->getName()->willReturn('fullname');
- $argument->getTypeHint()->willReturn('array');
- $argument->isOptional()->willReturn(true);
- $argument->getDefault()->willReturn(null);
- $argument->isPassedByReference()->willReturn(true);
-
- $code = $this->generate('CustomClass', $class);
- $expected =<<<'PHP'
-namespace {
-class CustomClass extends \RuntimeException implements \Prophecy\Doubler\Generator\MirroredInterface {
-
-public function getName(array &$fullname = NULL) {
-return $this->name;
-}
-
-}
-}
-PHP;
- $expected = strtr($expected, array("\r\n" => "\n", "\r" => "\n"));
- $code->shouldBe($expected);
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\ClassNode $class
- */
- function it_generates_empty_class_for_empty_ClassNode($class)
- {
- $class->getParentClass()->willReturn('stdClass');
- $class->getInterfaces()->willReturn(array('Prophecy\Doubler\Generator\MirroredInterface'));
- $class->getProperties()->willReturn(array());
- $class->getMethods()->willReturn(array());
-
- $code = $this->generate('CustomClass', $class);
- $expected =<<<'PHP'
-namespace {
-class CustomClass extends \stdClass implements \Prophecy\Doubler\Generator\MirroredInterface {
-
-
-}
-}
-PHP;
- $expected = strtr($expected, array("\r\n" => "\n", "\r" => "\n"));
- $code->shouldBe($expected);
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\ClassNode $class
- */
- function it_wraps_class_in_namespace_if_it_is_namespaced($class)
- {
- $class->getParentClass()->willReturn('stdClass');
- $class->getInterfaces()->willReturn(array('Prophecy\Doubler\Generator\MirroredInterface'));
- $class->getProperties()->willReturn(array());
- $class->getMethods()->willReturn(array());
-
- $code = $this->generate('My\Awesome\CustomClass', $class);
- $expected =<<<'PHP'
-namespace My\Awesome {
-class CustomClass extends \stdClass implements \Prophecy\Doubler\Generator\MirroredInterface {
-
-
-}
-}
-PHP;
- $expected = strtr($expected, array("\r\n" => "\n", "\r" => "\n"));
- $code->shouldBe($expected);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCreatorSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCreatorSpec.php
deleted file mode 100644
index c7b57009..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCreatorSpec.php
+++ /dev/null
@@ -1,44 +0,0 @@
-beConstructedWith($generator);
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\ClassNode $class
- */
- function it_evaluates_code_generated_by_ClassCodeGenerator($generator, $class)
- {
- $generator->generate('stdClass', $class)->shouldBeCalled()->willReturn(
- 'return 42;'
- );
-
- $this->create('stdClass', $class)->shouldReturn(42);
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\ClassNode $class
- */
- function it_throws_an_exception_if_class_does_not_exist_after_evaluation($generator, $class)
- {
- $generator->generate('CustomClass', $class)->shouldBeCalled()->willReturn(
- 'return 42;'
- );
-
- $class->getParentClass()->willReturn('stdClass');
- $class->getInterfaces()->willReturn(array('Interface1', 'Interface2'));
-
- $this->shouldThrow('Prophecy\Exception\Doubler\ClassCreatorException')
- ->duringCreate('CustomClass', $class);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassMirrorSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassMirrorSpec.php
deleted file mode 100644
index 161f8509..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassMirrorSpec.php
+++ /dev/null
@@ -1,610 +0,0 @@
-getName()->willReturn('Custom\ClassName');
- $class->isInterface()->willReturn(false);
- $class->isFinal()->willReturn(false);
- $class->getMethods(ReflectionMethod::IS_ABSTRACT)->willReturn(array());
- $class->getMethods(ReflectionMethod::IS_PUBLIC)->willReturn(array(
- $method1, $method2, $method3
- ));
-
- $method1->getName()->willReturn('getName');
- $method2->getName()->willReturn('isPublic');
- $method3->getName()->willReturn('isAbstract');
-
- $method1->isFinal()->willReturn(false);
- $method2->isFinal()->willReturn(false);
- $method3->isFinal()->willReturn(false);
-
- $method1->isProtected()->willReturn(false);
- $method2->isProtected()->willReturn(false);
- $method3->isProtected()->willReturn(false);
-
- $method1->isStatic()->willReturn(false);
- $method2->isStatic()->willReturn(false);
- $method3->isStatic()->willReturn(false);
-
- $method1->returnsReference()->willReturn(false);
- $method2->returnsReference()->willReturn(false);
- $method3->returnsReference()->willReturn(false);
-
- $method1->getParameters()->willReturn(array());
- $method2->getParameters()->willReturn(array());
- $method3->getParameters()->willReturn(array());
-
- if (version_compare(PHP_VERSION, '7.0', '>=')) {
- $method1->hasReturnType()->willReturn(false);
- $method2->hasReturnType()->willReturn(false);
- $method3->hasReturnType()->willReturn(false);
- }
-
- $classNode = $this->reflect($class, array());
- $classNode->shouldBeAnInstanceOf('Prophecy\Doubler\Generator\Node\ClassNode');
- $classNode->getParentClass()->shouldReturn('Custom\ClassName');
-
- $methodNodes = $classNode->getMethods();
- $methodNodes->shouldHaveCount(3);
-
- $classNode->hasMethod('getName')->shouldReturn(true);
- $classNode->hasMethod('isPublic')->shouldReturn(true);
- $classNode->hasMethod('isAbstract')->shouldReturn(true);
- }
-
- /**
- * @param ReflectionClass $class
- * @param ReflectionMethod $method
- * @param ReflectionParameter $parameter
- */
- function it_changes_argument_names_if_they_are_varying($class, $method, $parameter)
- {
-
- $class->getName()->willReturn('Custom\ClassName');
- $class->isInterface()->willReturn(false);
- $class->isFinal()->willReturn(false);
- $class->getMethods(ReflectionMethod::IS_PUBLIC)->willReturn(array($method));
- $class->getMethods(ReflectionMethod::IS_ABSTRACT)->willReturn(array());
-
- $method->getParameters()->willReturn(array($parameter));
- $method->getName()->willReturn('methodName');
- $method->isFinal()->willReturn(false);
- $method->isProtected()->willReturn(false);
- $method->isStatic()->willReturn(false);
- $method->returnsReference()->willReturn(false);
-
- if (version_compare(PHP_VERSION, '7.0', '>=')) {
- $method->hasReturnType()->willReturn(false);
- }
-
- $parameter->getName()->willReturn('...');
- $parameter->isDefaultValueAvailable()->willReturn(true);
- $parameter->getDefaultValue()->willReturn(null);
- $parameter->isPassedByReference()->willReturn(false);
- $parameter->getClass()->willReturn($class);
-
- $classNode = $this->reflect($class, array());
-
- $methodNodes = $classNode->getMethods();
-
- $argumentNodes = $methodNodes['methodName']->getArguments();
- $argumentNode = $argumentNodes[0];
-
- $argumentNode->getName()->shouldReturn('__dot_dot_dot__');
- }
-
- /**
- * @param ReflectionClass $class
- * @param ReflectionMethod $method
- */
- function it_reflects_protected_abstract_methods($class, $method)
- {
- $class->getName()->willReturn('Custom\ClassName');
- $class->isInterface()->willReturn(false);
- $class->isFinal()->willReturn(false);
- $class->getMethods(ReflectionMethod::IS_ABSTRACT)->willReturn(array($method));
- $class->getMethods(ReflectionMethod::IS_PUBLIC)->willReturn(array());
-
- $method->isProtected()->willReturn(true);
- $method->isStatic()->willReturn(false);
- $method->getParameters()->willReturn(array());
- $method->getName()->willReturn('innerDetail');
- $method->returnsReference()->willReturn(false);
-
- if (version_compare(PHP_VERSION, '7.0', '>=')) {
- $method->hasReturnType()->willReturn(false);
- }
-
- $classNode = $this->reflect($class, array());
- $classNode->shouldBeAnInstanceOf('Prophecy\Doubler\Generator\Node\ClassNode');
- $classNode->getParentClass()->shouldReturn('Custom\ClassName');
-
- $methodNodes = $classNode->getMethods();
- $methodNodes->shouldHaveCount(1);
-
- $methodNodes['innerDetail']->getVisibility()->shouldReturn('protected');
- }
-
- /**
- * @param ReflectionClass $class
- * @param ReflectionMethod $method
- */
- function it_reflects_public_static_methods($class, $method)
- {
- $class->getName()->willReturn('Custom\ClassName');
- $class->isInterface()->willReturn(false);
- $class->isFinal()->willReturn(false);
- $class->getMethods(ReflectionMethod::IS_ABSTRACT)->willReturn(array($method));
- $class->getMethods(ReflectionMethod::IS_PUBLIC)->willReturn(array());
-
- $method->isProtected()->willReturn(true);
- $method->isStatic()->willReturn(true);
- $method->getParameters()->willReturn(array());
- $method->getName()->willReturn('innerDetail');
- $method->returnsReference()->willReturn(false);
-
- if (version_compare(PHP_VERSION, '7.0', '>=')) {
- $method->hasReturnType()->willReturn(false);
- }
-
- $classNode = $this->reflect($class, array());
- $classNode->shouldBeAnInstanceOf('Prophecy\Doubler\Generator\Node\ClassNode');
- $classNode->getParentClass()->shouldReturn('Custom\ClassName');
-
- $methodNodes = $classNode->getMethods();
- $methodNodes->shouldHaveCount(1);
-
- $methodNodes['innerDetail']->getVisibility()->shouldReturn('protected');
- $methodNodes['innerDetail']->isStatic()->shouldReturn(true);
- }
-
- /**
- * @param ReflectionClass $class
- * @param ReflectionMethod $method
- * @param ReflectionParameter $param1
- * @param ReflectionParameter $param2
- * @param ReflectionClass $typeHint
- * @param ReflectionParameter $param3
- */
- function it_properly_reads_methods_arguments_with_types(
- $class, $method, $param1, $param2, $typeHint, $param3
- )
- {
- $class->getName()->willReturn('Custom\ClassName');
- $class->isInterface()->willReturn(false);
- $class->isFinal()->willReturn(false);
- $class->getMethods(ReflectionMethod::IS_ABSTRACT)->willReturn(array());
- $class->getMethods(ReflectionMethod::IS_PUBLIC)->willReturn(array($method));
-
- $method->getName()->willReturn('methodWithArgs');
- $method->isFinal()->willReturn(false);
- $method->isProtected()->willReturn(true);
- $method->isStatic()->willReturn(false);
- $method->returnsReference()->willReturn(false);
- $method->getParameters()->willReturn(array($param1, $param2, $param3));
-
- if (version_compare(PHP_VERSION, '7.0', '>=')) {
- $method->hasReturnType()->willReturn(false);
- }
-
- $param1->getName()->willReturn('arg_1');
- $param1->isArray()->willReturn(true);
- $param1->getClass()->willReturn(null);
- $param1->isDefaultValueAvailable()->willReturn(true);
- $param1->isPassedByReference()->willReturn(false);
- $param1->allowsNull()->willReturn(false);
- $param1->getDefaultValue()->willReturn(array());
-
- $param2->getName()->willReturn('arg2');
- $param2->isArray()->willReturn(false);
- $param2->getClass()->willReturn($typeHint);
- $param2->isDefaultValueAvailable()->willReturn(false);
- $param2->isOptional()->willReturn(false);
- $param2->isPassedByReference()->willReturn(false);
- $param2->allowsNull()->willReturn(false);
- $typeHint->getName()->willReturn('ArrayAccess');
-
- $param3->getName()->willReturn('arg_3');
- $param3->isArray()->willReturn(false);
- if (version_compare(PHP_VERSION, '5.4', '>=')) {
- $param3->isCallable()->willReturn(true);
- }
- $param3->getClass()->willReturn(null);
- $param3->isOptional()->willReturn(false);
- $param3->isDefaultValueAvailable()->willReturn(false);
- $param3->isPassedByReference()->willReturn(false);
- $param3->allowsNull()->willReturn(true);
-
- $classNode = $this->reflect($class, array());
- $methodNodes = $classNode->getMethods();
- $argNodes = $methodNodes['methodWithArgs']->getArguments();
-
- $argNodes[0]->getName()->shouldReturn('arg_1');
- $argNodes[0]->getTypeHint()->shouldReturn('array');
- $argNodes[0]->isOptional()->shouldReturn(true);
- $argNodes[0]->getDefault()->shouldReturn(array());
-
- $argNodes[1]->getName()->shouldReturn('arg2');
- $argNodes[1]->getTypeHint()->shouldReturn('ArrayAccess');
- $argNodes[1]->isOptional()->shouldReturn(false);
-
- $argNodes[2]->getName()->shouldReturn('arg_3');
- if (version_compare(PHP_VERSION, '5.4', '>=')) {
- $argNodes[2]->getTypeHint()->shouldReturn('callable');
- $argNodes[2]->isOptional()->shouldReturn(true);
- $argNodes[2]->getDefault()->shouldReturn(null);
- } else {
- $argNodes[2]->isOptional()->shouldReturn(false);
- }
- }
-
- /**
- * @param ReflectionClass $class
- * @param ReflectionMethod $method
- * @param ReflectionParameter $param1
- */
- function it_marks_required_args_without_types_as_not_optional(
- $class, $method, $param1
- )
- {
- $class->getName()->willReturn('Custom\ClassName');
- $class->isInterface()->willReturn(false);
- $class->isFinal()->willReturn(false);
- $class->getMethods(ReflectionMethod::IS_ABSTRACT)->willReturn(array());
- $class->getMethods(ReflectionMethod::IS_PUBLIC)->willReturn(array($method));
-
- $method->getName()->willReturn('methodWithArgs');
- $method->isFinal()->willReturn(false);
- $method->isProtected()->willReturn(false);
- $method->isStatic()->willReturn(false);
- $method->returnsReference()->willReturn(false);
- $method->getParameters()->willReturn(array($param1));
-
- if (version_compare(PHP_VERSION, '7.0', '>=')) {
- $method->hasReturnType()->willReturn(false);
- }
-
- $param1->getName()->willReturn('arg_1');
- $param1->isArray()->willReturn(false);
- if (version_compare(PHP_VERSION, '5.4', '>=')) {
- $param1->isCallable()->willReturn(false);
- }
- $param1->getClass()->willReturn(null);
-
- if (version_compare(PHP_VERSION, '7.0', '>=')) {
- $param1->hasType()->willReturn(false);
- }
-
- $param1->isDefaultValueAvailable()->willReturn(false);
- $param1->isOptional()->willReturn(false);
- $param1->isPassedByReference()->willReturn(false);
- $param1->allowsNull()->willReturn(true);
- if (defined('HHVM_VERSION')) {
- $param1->getTypehintText()->willReturn(null);
- }
-
- $classNode = $this->reflect($class, array());
- $methodNodes = $classNode->getMethods();
- $argNodes = $methodNodes['methodWithArgs']->getArguments();
-
- $argNodes[0]->isOptional()->shouldReturn(false);
- }
-
- /**
- * @param ReflectionClass $class
- * @param ReflectionMethod $method
- * @param ReflectionParameter $param1
- * @param ReflectionParameter $param2
- * @param ReflectionClass $typeHint
- */
- function it_marks_passed_by_reference_args_as_passed_by_reference(
- $class, $method, $param1, $param2, $typeHint
- )
- {
- $class->getName()->willReturn('Custom\ClassName');
- $class->isInterface()->willReturn(false);
- $class->isFinal()->willReturn(false);
- $class->getMethods(ReflectionMethod::IS_ABSTRACT)->willReturn(array());
- $class->getMethods(ReflectionMethod::IS_PUBLIC)->willReturn(array($method));
-
- $method->getName()->willReturn('methodWithArgs');
- $method->isFinal()->willReturn(false);
- $method->isProtected()->willReturn(false);
- $method->isStatic()->willReturn(false);
- $method->returnsReference()->willReturn(false);
- $method->getParameters()->willReturn(array($param1, $param2));
-
- if (version_compare(PHP_VERSION, '7.0', '>=')) {
- $method->hasReturnType()->willReturn(false);
- }
-
- $param1->getName()->willReturn('arg_1');
- $param1->isArray()->willReturn(false);
- if (version_compare(PHP_VERSION, '5.4', '>=')) {
- $param1->isCallable()->willReturn(false);
- }
- $param1->getClass()->willReturn(null);
- $param1->isDefaultValueAvailable()->willReturn(false);
- $param1->isOptional()->willReturn(true);
- $param1->isPassedByReference()->willReturn(true);
-
- if (version_compare(PHP_VERSION, '7.0', '>=')) {
- $param1->hasType()->willReturn(false);
- }
-
- $param1->allowsNull()->willReturn(false);
- if (defined('HHVM_VERSION')) {
- $param1->getTypehintText()->willReturn(null);
- }
-
- $param2->getName()->willReturn('arg2');
- $param2->isArray()->willReturn(false);
- $param2->getClass()->willReturn($typeHint);
- $param2->isDefaultValueAvailable()->willReturn(false);
- $param2->isOptional()->willReturn(false);
- $param2->isPassedByReference()->willReturn(false);
-
- if (version_compare(PHP_VERSION, '7.0', '>=')) {
- $param2->hasType()->willReturn(false);
- }
-
- $param2->allowsNull()->willReturn(false);
- $typeHint->getName()->willReturn('ArrayAccess');
-
- $classNode = $this->reflect($class, array());
- $methodNodes = $classNode->getMethods();
- $argNodes = $methodNodes['methodWithArgs']->getArguments();
-
- $argNodes[0]->isPassedByReference()->shouldReturn(true);
- $argNodes[1]->isPassedByReference()->shouldReturn(false);
- }
-
- /**
- * @param ReflectionClass $class
- */
- function it_throws_an_exception_if_class_is_final($class)
- {
- $class->isInterface()->willReturn(false);
- $class->isFinal()->willReturn(true);
- $class->getName()->willReturn('Custom\ClassName');
-
- $this->shouldThrow('Prophecy\Exception\Doubler\ClassMirrorException')
- ->duringReflect($class, array());
- }
-
- /**
- * @param ReflectionClass $class
- * @param ReflectionMethod $method
- */
- function it_ignores_final_methods($class, $method)
- {
- $class->getName()->willReturn('Custom\ClassName');
- $class->isInterface()->willReturn(false);
- $class->isFinal()->willReturn(false);
- $class->getMethods(ReflectionMethod::IS_ABSTRACT)->willReturn(array());
- $class->getMethods(ReflectionMethod::IS_PUBLIC)->willReturn(array($method));
-
- $method->isFinal()->willReturn(true);
- $method->getName()->willReturn('finalImplementation');
-
- $classNode = $this->reflect($class, array());
- $classNode->getMethods()->shouldHaveCount(0);
- }
-
- /**
- * @param ReflectionClass $interface
- */
- function it_throws_an_exception_if_interface_provided_instead_of_class($interface)
- {
- $interface->isInterface()->willReturn(true);
- $interface->getName()->willReturn('Custom\ClassName');
-
- $this->shouldThrow('Prophecy\Exception\InvalidArgumentException')
- ->duringReflect($interface, array());
- }
-
- /**
- * @param ReflectionClass $interface1
- * @param ReflectionClass $interface2
- * @param ReflectionMethod $method1
- * @param ReflectionMethod $method2
- * @param ReflectionMethod $method3
- */
- function it_reflects_all_interfaces_methods(
- $interface1, $interface2, $method1, $method2, $method3
- )
- {
- $interface1->getName()->willReturn('MyInterface1');
- $interface2->getName()->willReturn('MyInterface2');
-
- $interface1->isInterface()->willReturn(true);
- $interface2->isInterface()->willReturn(true);
-
- $interface1->getMethods()->willReturn(array($method1));
- $interface2->getMethods()->willReturn(array($method2, $method3));
-
- $method1->getName()->willReturn('getName');
- $method2->getName()->willReturn('isPublic');
- $method3->getName()->willReturn('isAbstract');
-
- $method1->isProtected()->willReturn(false);
- $method2->isProtected()->willReturn(false);
- $method3->isProtected()->willReturn(false);
-
- $method1->returnsReference()->willReturn(false);
- $method2->returnsReference()->willReturn(false);
- $method3->returnsReference()->willReturn(false);
-
- $method1->isStatic()->willReturn(false);
- $method2->isStatic()->willReturn(false);
- $method3->isStatic()->willReturn(false);
-
- $method1->getParameters()->willReturn(array());
- $method2->getParameters()->willReturn(array());
- $method3->getParameters()->willReturn(array());
-
- if (version_compare(PHP_VERSION, '7.0', '>=')) {
- $method1->hasReturnType()->willReturn(false);
- $method2->hasReturnType()->willReturn(false);
- $method3->hasReturnType()->willReturn(false);
- }
-
- $classNode = $this->reflect(null, array($interface1, $interface2));
-
- $classNode->shouldBeAnInstanceOf('Prophecy\Doubler\Generator\Node\ClassNode');
- $classNode->getParentClass()->shouldReturn('stdClass');
- $classNode->getInterfaces()->shouldReturn(array(
- 'Prophecy\Doubler\Generator\ReflectionInterface', 'MyInterface2', 'MyInterface1',
- ));
-
- $methodNodes = $classNode->getMethods();
- $methodNodes->shouldHaveCount(3);
-
- $classNode->hasMethod('getName')->shouldReturn(true);
- $classNode->hasMethod('isPublic')->shouldReturn(true);
- $classNode->hasMethod('isAbstract')->shouldReturn(true);
- }
-
- /**
- * @param ReflectionClass $class
- * @param ReflectionMethod $method1
- * @param ReflectionMethod $method2
- * @param ReflectionMethod $method3
- */
- function it_ignores_virtually_private_methods($class, $method1, $method2, $method3)
- {
- $class->getName()->willReturn('SomeClass');
- $class->isInterface()->willReturn(false);
- $class->isFinal()->willReturn(false);
- $class->getMethods(ReflectionMethod::IS_ABSTRACT)->willReturn(array());
- $class->getMethods(ReflectionMethod::IS_PUBLIC)->willReturn(array($method1, $method2, $method3));
-
- $method1->getName()->willReturn('_getName');
- $method2->getName()->willReturn('__toString');
- $method3->getName()->willReturn('isAbstract');
-
- $method1->isFinal()->willReturn(false);
- $method2->isFinal()->willReturn(false);
- $method3->isFinal()->willReturn(false);
-
- $method1->isProtected()->willReturn(false);
- $method2->isProtected()->willReturn(false);
- $method3->isProtected()->willReturn(false);
-
- $method1->isStatic()->willReturn(false);
- $method2->isStatic()->willReturn(false);
- $method3->isStatic()->willReturn(false);
-
- $method1->returnsReference()->willReturn(false);
- $method2->returnsReference()->willReturn(false);
- $method3->returnsReference()->willReturn(false);
-
- $method1->getParameters()->willReturn(array());
- $method2->getParameters()->willReturn(array());
- $method3->getParameters()->willReturn(array());
-
- if (version_compare(PHP_VERSION, '7.0', '>=')) {
- $method1->hasReturnType()->willReturn(false);
- $method2->hasReturnType()->willReturn(false);
- $method3->hasReturnType()->willReturn(false);
- }
-
- $classNode = $this->reflect($class, array());
- $methodNodes = $classNode->getMethods();
- $methodNodes->shouldHaveCount(2);
-
- $classNode->hasMethod('isAbstract')->shouldReturn(true);
- }
-
- /**
- * @param ReflectionClass $class
- * @param ReflectionMethod $method
- */
- function it_does_not_throw_exception_for_virtually_private_finals($class, $method)
- {
- $class->getName()->willReturn('SomeClass');
- $class->isInterface()->willReturn(false);
- $class->isFinal()->willReturn(false);
- $class->getMethods(ReflectionMethod::IS_ABSTRACT)->willReturn(array());
- $class->getMethods(ReflectionMethod::IS_PUBLIC)->willReturn(array($method));
-
- $method->getName()->willReturn('__toString');
- $method->isFinal()->willReturn(true);
-
- $this->shouldNotThrow()->duringReflect($class, array());
- }
-
- /**
- * @param ReflectionClass $class
- */
- function it_throws_an_exception_if_class_provided_in_interfaces_list($class)
- {
- $class->getName()->willReturn('MyClass');
- $class->isInterface()->willReturn(false);
-
- $this->shouldThrow('InvalidArgumentException')
- ->duringReflect(null, array($class));
- }
-
- function it_throws_an_exception_if_not_reflection_provided_as_interface()
- {
- $this->shouldThrow('InvalidArgumentException')
- ->duringReflect(null, array(null));
- }
-
- function it_doesnt_fail_to_typehint_nonexistent_FQCN()
- {
- $classNode = $this->reflect(new ReflectionClass('spec\Prophecy\Doubler\Generator\OptionalDepsClass'), array());
- $method = $classNode->getMethod('iHaveAStrangeTypeHintedArg');
- $arguments = $method->getArguments();
- $arguments[0]->getTypeHint()->shouldBe('I\Simply\Am\Nonexistent');
- }
-
- function it_doesnt_fail_to_typehint_nonexistent_RQCN()
- {
- $classNode = $this->reflect(new ReflectionClass('spec\Prophecy\Doubler\Generator\OptionalDepsClass'), array());
- $method = $classNode->getMethod('iHaveAnEvenStrangerTypeHintedArg');
- $arguments = $method->getArguments();
- $arguments[0]->getTypeHint()->shouldBe('I\Simply\Am\Not');
- }
-
- function it_doesnt_use_scalar_typehints()
- {
- $classNode = $this->reflect(new ReflectionClass('ReflectionMethod'), array());
- $method = $classNode->getMethod('export');
- $arguments = $method->getArguments();
- $arguments[0]->getTypeHint()->shouldReturn(null);
- $arguments[1]->getTypeHint()->shouldReturn(null);
- $arguments[2]->getTypeHint()->shouldReturn(null);
- }
-}
-
-class OptionalDepsClass
-{
- public function iHaveAStrangeTypeHintedArg(\I\Simply\Am\Nonexistent $class)
- {
- }
-
- public function iHaveAnEvenStrangerTypeHintedArg(Simply\Am\Not $class)
- {
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ArgumentNodeSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ArgumentNodeSpec.php
deleted file mode 100644
index cea578fa..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ArgumentNodeSpec.php
+++ /dev/null
@@ -1,62 +0,0 @@
-beConstructedWith('name');
- }
-
- function it_is_not_be_passed_by_reference_by_default()
- {
- $this->shouldNotBePassedByReference();
- }
-
- function it_is_passed_by_reference_if_marked()
- {
- $this->setAsPassedByReference();
- $this->shouldBePassedByReference();
- }
-
- function it_has_name_with_which_it_was_been_constructed()
- {
- $this->getName()->shouldReturn('name');
- }
-
- function it_has_no_typehint_by_default()
- {
- $this->getTypeHint()->shouldReturn(null);
- }
-
- function its_typeHint_is_mutable()
- {
- $this->setTypeHint('array');
- $this->getTypeHint()->shouldReturn('array');
- }
-
- function it_does_not_have_default_value_by_default()
- {
- $this->getDefault()->shouldReturn(null);
- }
-
- function it_is_not_optional_by_default()
- {
- $this->isOptional()->shouldReturn(false);
- }
-
- function its_default_is_mutable()
- {
- $this->setDefault(array());
- $this->getDefault()->shouldReturn(array());
- }
-
- function it_is_marked_as_optional_when_default_is_set()
- {
- $this->setDefault(null);
- $this->isOptional()->shouldReturn(true);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ClassNodeSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ClassNodeSpec.php
deleted file mode 100644
index 18f0e1cc..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ClassNodeSpec.php
+++ /dev/null
@@ -1,154 +0,0 @@
-getParentClass()->shouldReturn('stdClass');
- }
-
- function its_parentClass_is_mutable()
- {
- $this->setParentClass('Exception');
- $this->getParentClass()->shouldReturn('Exception');
- }
-
- function its_parentClass_is_set_to_stdClass_if_user_set_null()
- {
- $this->setParentClass(null);
- $this->getParentClass()->shouldReturn('stdClass');
- }
-
- function it_does_not_implement_any_interface_by_default()
- {
- $this->getInterfaces()->shouldHaveCount(0);
- }
-
- function its_addInterface_adds_item_to_the_list_of_implemented_interfaces()
- {
- $this->addInterface('MyInterface');
- $this->getInterfaces()->shouldHaveCount(1);
- }
-
- function its_hasInterface_returns_true_if_class_implements_interface()
- {
- $this->addInterface('MyInterface');
- $this->hasInterface('MyInterface')->shouldReturn(true);
- }
-
- function its_hasInterface_returns_false_if_class_does_not_implements_interface()
- {
- $this->hasInterface('MyInterface')->shouldReturn(false);
- }
-
- function it_supports_implementation_of_multiple_interfaces()
- {
- $this->addInterface('MyInterface');
- $this->addInterface('MySecondInterface');
- $this->getInterfaces()->shouldHaveCount(2);
- }
-
- function it_ignores_same_interfaces_added_twice()
- {
- $this->addInterface('MyInterface');
- $this->addInterface('MyInterface');
-
- $this->getInterfaces()->shouldHaveCount(1);
- $this->getInterfaces()->shouldReturn(array('MyInterface'));
- }
-
- function it_does_not_have_methods_by_default()
- {
- $this->getMethods()->shouldHaveCount(0);
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\MethodNode $method1
- * @param \Prophecy\Doubler\Generator\Node\MethodNode $method2
- */
- function it_can_has_methods($method1, $method2)
- {
- $method1->getName()->willReturn('__construct');
- $method2->getName()->willReturn('getName');
-
- $this->addMethod($method1);
- $this->addMethod($method2);
-
- $this->getMethods()->shouldReturn(array(
- '__construct' => $method1,
- 'getName' => $method2
- ));
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\MethodNode $method
- */
- function its_hasMethod_returns_true_if_method_exists($method)
- {
- $method->getName()->willReturn('getName');
-
- $this->addMethod($method);
-
- $this->hasMethod('getName')->shouldReturn(true);
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\MethodNode $method
- */
- function its_getMethod_returns_method_by_name($method)
- {
- $method->getName()->willReturn('getName');
-
- $this->addMethod($method);
-
- $this->getMethod('getName')->shouldReturn($method);
- }
-
- function its_hasMethod_returns_false_if_method_does_not_exists()
- {
- $this->hasMethod('getName')->shouldReturn(false);
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\MethodNode $method
- */
- function its_hasMethod_returns_false_if_method_has_been_removed($method)
- {
- $method->getName()->willReturn('getName');
- $this->addMethod($method);
- $this->removeMethod('getName');
-
- $this->hasMethod('getName')->shouldReturn(false);
- }
-
-
- function it_does_not_have_properties_by_default()
- {
- $this->getProperties()->shouldHaveCount(0);
- }
-
- function it_is_able_to_have_properties()
- {
- $this->addProperty('title');
- $this->addProperty('text', 'private');
- $this->getProperties()->shouldReturn(array(
- 'title' => 'public',
- 'text' => 'private'
- ));
- }
-
- function its_addProperty_does_not_accept_unsupported_visibility()
- {
- $this->shouldThrow('InvalidArgumentException')->duringAddProperty('title', 'town');
- }
-
- function its_addProperty_lowercases_visibility_before_setting()
- {
- $this->addProperty('text', 'PRIVATE');
- $this->getProperties()->shouldReturn(array('text' => 'private'));
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/MethodNodeSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/MethodNodeSpec.php
deleted file mode 100644
index d67646da..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/MethodNodeSpec.php
+++ /dev/null
@@ -1,138 +0,0 @@
-beConstructedWith('getTitle');
- }
-
- function it_has_a_name()
- {
- $this->getName()->shouldReturn('getTitle');
- }
-
- function it_has_public_visibility_by_default()
- {
- $this->getVisibility()->shouldReturn('public');
- }
-
- function its_visibility_is_mutable()
- {
- $this->setVisibility('private');
- $this->getVisibility()->shouldReturn('private');
- }
-
- function it_is_not_static_by_default()
- {
- $this->shouldNotBeStatic();
- }
-
- function it_does_not_return_a_reference_by_default()
- {
- $this->returnsReference()->shouldReturn(false);
- }
-
- function it_should_be_settable_as_returning_a_reference_through_setter()
- {
- $this->setReturnsReference();
- $this->returnsReference()->shouldReturn(true);
- }
-
- function it_should_be_settable_as_static_through_setter()
- {
- $this->setStatic();
- $this->shouldBeStatic();
- }
-
- function it_accepts_only_supported_visibilities()
- {
- $this->shouldThrow('InvalidArgumentException')->duringSetVisibility('stealth');
- }
-
- function it_lowercases_visibility_before_setting_it()
- {
- $this->setVisibility('Public');
- $this->getVisibility()->shouldReturn('public');
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\ArgumentNode $argument1
- * @param \Prophecy\Doubler\Generator\Node\ArgumentNode $argument2
- */
- function its_useParentCode_causes_method_to_call_parent($argument1, $argument2)
- {
- $argument1->getName()->willReturn('objectName');
- $argument2->getName()->willReturn('default');
-
- $this->addArgument($argument1);
- $this->addArgument($argument2);
-
- $this->useParentCode();
-
- $this->getCode()->shouldReturn(
- 'return parent::getTitle($objectName, $default);'
- );
- }
-
- function its_code_is_mutable()
- {
- $this->setCode('echo "code";');
- $this->getCode()->shouldReturn('echo "code";');
- }
-
- function its_reference_returning_methods_will_generate_exceptions()
- {
- $this->setCode('echo "code";');
- $this->setReturnsReference();
- $this->getCode()->shouldReturn("throw new \Prophecy\Exception\Doubler\ReturnByReferenceException('Returning by reference not supported', get_class(\$this), 'getTitle');");
- }
-
- function its_setCode_provided_with_null_cleans_method_body()
- {
- $this->setCode(null);
- $this->getCode()->shouldReturn('');
- }
-
- function it_is_constructable_with_code()
- {
- $this->beConstructedWith('getTitle', 'die();');
- $this->getCode()->shouldReturn('die();');
- }
-
- function it_does_not_have_arguments_by_default()
- {
- $this->getArguments()->shouldHaveCount(0);
- }
-
- /**
- * @param \Prophecy\Doubler\Generator\Node\ArgumentNode $argument1
- * @param \Prophecy\Doubler\Generator\Node\ArgumentNode $argument2
- */
- function it_supports_adding_arguments($argument1, $argument2)
- {
- $this->addArgument($argument1);
- $this->addArgument($argument2);
-
- $this->getArguments()->shouldReturn(array($argument1, $argument2));
- }
-
- function it_does_not_have_return_type_by_default()
- {
- $this->hasReturnType()->shouldReturn(false);
- }
-
- function it_setReturnType_sets_return_type()
- {
- $returnType = 'string';
-
- $this->setReturnType($returnType);
-
- $this->hasReturnType()->shouldReturn(true);
- $this->getReturnType()->shouldReturn($returnType);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/LazyDoubleSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/LazyDoubleSpec.php
deleted file mode 100644
index 7026126f..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/LazyDoubleSpec.php
+++ /dev/null
@@ -1,96 +0,0 @@
-beConstructedWith($doubler);
- }
-
- /**
- * @param \Prophecy\Prophecy\ProphecySubjectInterface $double
- */
- function it_returns_anonymous_double_instance_by_default($doubler, $double)
- {
- $doubler->double(null, array())->willReturn($double);
-
- $this->getInstance()->shouldReturn($double);
- }
-
- /**
- * @param \Prophecy\Prophecy\ProphecySubjectInterface $double
- * @param \ReflectionClass $class
- */
- function it_returns_class_double_instance_if_set($doubler, $double, $class)
- {
- $doubler->double($class, array())->willReturn($double);
-
- $this->setParentClass($class);
-
- $this->getInstance()->shouldReturn($double);
- }
-
- /**
- * @param \Prophecy\Prophecy\ProphecySubjectInterface $double1
- * @param \Prophecy\Prophecy\ProphecySubjectInterface $double2
- */
- function it_returns_same_double_instance_if_called_2_times(
- $doubler, $double1, $double2
- )
- {
- $doubler->double(null, array())->willReturn($double1);
- $doubler->double(null, array())->willReturn($double2);
-
- $this->getInstance()->shouldReturn($double2);
- $this->getInstance()->shouldReturn($double2);
- }
-
- function its_setParentClass_throws_ClassNotFoundException_if_class_not_found()
- {
- $this->shouldThrow('Prophecy\Exception\Doubler\ClassNotFoundException')
- ->duringSetParentClass('SomeUnexistingClass');
- }
-
- /**
- * @param \Prophecy\Prophecy\ProphecySubjectInterface $double
- */
- function its_setParentClass_throws_exception_if_prophecy_is_already_created(
- $doubler, $double
- )
- {
- $doubler->double(null, array())->willReturn($double);
-
- $this->getInstance();
-
- $this->shouldThrow('Prophecy\Exception\Doubler\DoubleException')
- ->duringSetParentClass('stdClass');
- }
-
- function its_addInterface_throws_InterfaceNotFoundException_if_no_interface_found()
- {
- $this->shouldThrow('Prophecy\Exception\Doubler\InterfaceNotFoundException')
- ->duringAddInterface('SomeUnexistingInterface');
- }
-
- /**
- * @param \Prophecy\Prophecy\ProphecySubjectInterface $double
- */
- function its_addInterface_throws_exception_if_prophecy_is_already_created(
- $doubler, $double
- )
- {
- $doubler->double(null, array())->willReturn($double);
-
- $this->getInstance();
-
- $this->shouldThrow('Prophecy\Exception\Doubler\DoubleException')
- ->duringAddInterface('ArrayAccess');
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/NameGeneratorSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/NameGeneratorSpec.php
deleted file mode 100644
index a3e74919..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Doubler/NameGeneratorSpec.php
+++ /dev/null
@@ -1,72 +0,0 @@
-getName()->willReturn('stdClass');
- $this->name($class, array())->shouldStartWith('Double\stdClass\\');
- }
-
- /**
- * @param \ReflectionClass $class
- */
- function its_name_generates_name_based_on_namespaced_class_reflection($class)
- {
- $class->getName()->willReturn('Some\Custom\Class');
- $this->name($class, array())->shouldStartWith('Double\Some\Custom\Class\P');
- }
-
- /**
- * @param \ReflectionClass $interface1
- * @param \ReflectionClass $interface2
- */
- function its_name_generates_name_based_on_interface_shortnames($interface1, $interface2)
- {
- $interface1->getShortName()->willReturn('HandlerInterface');
- $interface2->getShortName()->willReturn('LoaderInterface');
-
- $this->name(null, array($interface1, $interface2))->shouldStartWith(
- 'Double\HandlerInterface\LoaderInterface\P'
- );
- }
-
- function it_generates_proper_name_for_no_class_and_interfaces_list()
- {
- $this->name(null, array())->shouldStartWith('Double\stdClass\P');
- }
-
- /**
- * @param \ReflectionClass $class
- * @param \ReflectionClass $interface1
- * @param \ReflectionClass $interface2
- */
- function its_name_generates_name_based_only_on_class_if_its_available(
- $class, $interface1, $interface2
- )
- {
- $class->getName()->willReturn('Some\Custom\Class');
- $interface1->getShortName()->willReturn('HandlerInterface');
- $interface2->getShortName()->willReturn('LoaderInterface');
-
- $this->name($class, array($interface1, $interface2))->shouldStartWith(
- 'Double\Some\Custom\Class\P'
- );
- }
-
- public function getMatchers()
- {
- return array(
- 'startWith' => function ($subject, $string) {
- return 0 === strpos($subject, $string);
- },
- );
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Call/UnexpectedCallExceptionSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Call/UnexpectedCallExceptionSpec.php
deleted file mode 100644
index 6fd1a5c3..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Call/UnexpectedCallExceptionSpec.php
+++ /dev/null
@@ -1,32 +0,0 @@
-beConstructedWith('msg', $objectProphecy, 'getName', array('arg1', 'arg2'));
- }
-
- function it_is_prophecy_exception()
- {
- $this->shouldBeAnInstanceOf('Prophecy\Exception\Prophecy\ObjectProphecyException');
- }
-
- function it_exposes_method_name_through_getter()
- {
- $this->getMethodName()->shouldReturn('getName');
- }
-
- function it_exposes_arguments_through_getter()
- {
- $this->getArguments()->shouldReturn(array('arg1', 'arg2'));
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassCreatorExceptionSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassCreatorExceptionSpec.php
deleted file mode 100644
index 58241385..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassCreatorExceptionSpec.php
+++ /dev/null
@@ -1,28 +0,0 @@
-beConstructedWith('', $node);
- }
-
- function it_is_a_prophecy_exception()
- {
- $this->shouldBeAnInstanceOf('Prophecy\Exception\Exception');
- $this->shouldBeAnInstanceOf('Prophecy\Exception\Doubler\DoublerException');
- }
-
- function it_contains_a_reflected_node($node)
- {
- $this->getClassNode()->shouldReturn($node);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassMirrorExceptionSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassMirrorExceptionSpec.php
deleted file mode 100644
index 21e31a34..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassMirrorExceptionSpec.php
+++ /dev/null
@@ -1,27 +0,0 @@
-beConstructedWith('', $class);
- }
-
- function it_is_a_prophecy_exception()
- {
- $this->shouldBeAnInstanceOf('Prophecy\Exception\Exception');
- $this->shouldBeAnInstanceOf('Prophecy\Exception\Doubler\DoublerException');
- }
-
- function it_contains_a_reflected_class_link($class)
- {
- $this->getReflectedClass()->shouldReturn($class);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassNotFoundExceptionSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassNotFoundExceptionSpec.php
deleted file mode 100644
index 251512b9..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassNotFoundExceptionSpec.php
+++ /dev/null
@@ -1,25 +0,0 @@
-beConstructedWith('msg', 'CustomClass');
- }
-
- function it_is_a_prophecy_exception()
- {
- $this->shouldBeAnInstanceOf('Prophecy\Exception\Exception');
- $this->shouldBeAnInstanceOf('Prophecy\Exception\Doubler\DoubleException');
- }
-
- function its_getClassname_returns_classname()
- {
- $this->getClassname()->shouldReturn('CustomClass');
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/DoubleExceptionSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/DoubleExceptionSpec.php
deleted file mode 100644
index 6fe5a19a..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/DoubleExceptionSpec.php
+++ /dev/null
@@ -1,14 +0,0 @@
-shouldBeAnInstanceOf('RuntimeException');
- $this->shouldBeAnInstanceOf('Prophecy\Exception\Doubler\DoublerException');
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/InterfaceNotFoundExceptionSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/InterfaceNotFoundExceptionSpec.php
deleted file mode 100644
index ad1a439e..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/InterfaceNotFoundExceptionSpec.php
+++ /dev/null
@@ -1,24 +0,0 @@
-beConstructedWith('msg', 'CustomInterface');
- }
-
- function it_extends_ClassNotFoundException()
- {
- $this->shouldBeAnInstanceOf('Prophecy\Exception\Doubler\ClassNotFoundException');
- }
-
- function its_getClassname_returns_classname()
- {
- $this->getClassname()->shouldReturn('CustomInterface');
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/MethodNotFoundExceptionSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/MethodNotFoundExceptionSpec.php
deleted file mode 100644
index a889dd7e..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/MethodNotFoundExceptionSpec.php
+++ /dev/null
@@ -1,40 +0,0 @@
-beConstructedWith('', 'User', 'getName', array(1, 2, 3));
- }
-
- function it_is_DoubleException()
- {
- $this->shouldHaveType('Prophecy\Exception\Doubler\DoubleException');
- }
-
- function it_has_MethodName()
- {
- $this->getMethodName()->shouldReturn('getName');
- }
-
- function it_has_classnamej()
- {
- $this->getClassname()->shouldReturn('User');
- }
-
- function it_has_an_arguments_list()
- {
- $this->getArguments()->shouldReturn(array(1, 2, 3));
- }
-
- function it_has_a_default_null_argument_list()
- {
- $this->beConstructedWith('', 'User', 'getName');
- $this->getArguments()->shouldReturn(null);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/AggregateExceptionSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/AggregateExceptionSpec.php
deleted file mode 100644
index 22a5ebdb..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/AggregateExceptionSpec.php
+++ /dev/null
@@ -1,57 +0,0 @@
-beConstructedWith(null);
- }
-
- function it_is_prediction_exception()
- {
- $this->shouldBeAnInstanceOf('RuntimeException');
- $this->shouldBeAnInstanceOf('Prophecy\Exception\Prediction\PredictionException');
- }
-
- /**
- * @param \Prophecy\Prophecy\ObjectProphecy $object
- */
- function it_can_store_objectProphecy_link($object)
- {
- $this->setObjectProphecy($object);
- $this->getObjectProphecy()->shouldReturn($object);
- }
-
- function it_should_not_have_exceptions_at_the_beginning()
- {
- $this->getExceptions()->shouldHaveCount(0);
- }
-
- /**
- * @param \Prophecy\Exception\Prediction\PredictionException $exception
- */
- function it_should_append_exception_through_append_method($exception)
- {
- $exception->getMessage()->willReturn('Exception #1');
-
- $this->append($exception);
-
- $this->getExceptions()->shouldReturn(array($exception));
- }
-
- /**
- * @param \Prophecy\Exception\Prediction\PredictionException $exception
- */
- function it_should_update_message_during_append($exception)
- {
- $exception->getMessage()->willReturn('Exception #1');
-
- $this->append($exception);
-
- $this->getMessage()->shouldReturn(" Exception #1");
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/NoCallsExceptionSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/NoCallsExceptionSpec.php
deleted file mode 100644
index 473f1a2d..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/NoCallsExceptionSpec.php
+++ /dev/null
@@ -1,29 +0,0 @@
-getObjectProphecy()->willReturn($objectProphecy);
-
- $this->beConstructedWith('message', $methodProphecy);
- }
-
- function it_is_PredictionException()
- {
- $this->shouldHaveType('Prophecy\Exception\Prediction\PredictionException');
- }
-
- function it_extends_MethodProphecyException()
- {
- $this->shouldHaveType('Prophecy\Exception\Prophecy\MethodProphecyException');
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsCountExceptionSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsCountExceptionSpec.php
deleted file mode 100644
index adad975b..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsCountExceptionSpec.php
+++ /dev/null
@@ -1,31 +0,0 @@
-getObjectProphecy()->willReturn($objectProphecy);
-
- $this->beConstructedWith('message', $methodProphecy, 5, array($call1, $call2));
- }
-
- function it_extends_UnexpectedCallsException()
- {
- $this->shouldBeAnInstanceOf('Prophecy\Exception\Prediction\UnexpectedCallsException');
- }
-
- function it_should_expose_expectedCount_through_getter()
- {
- $this->getExpectedCount()->shouldReturn(5);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsExceptionSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsExceptionSpec.php
deleted file mode 100644
index c0fe24d7..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsExceptionSpec.php
+++ /dev/null
@@ -1,36 +0,0 @@
-getObjectProphecy()->willReturn($objectProphecy);
-
- $this->beConstructedWith('message', $methodProphecy, array($call1, $call2));
- }
-
- function it_is_PredictionException()
- {
- $this->shouldHaveType('Prophecy\Exception\Prediction\PredictionException');
- }
-
- function it_extends_MethodProphecyException()
- {
- $this->shouldHaveType('Prophecy\Exception\Prophecy\MethodProphecyException');
- }
-
- function it_should_expose_calls_list_through_getter($call1, $call2)
- {
- $this->getCalls()->shouldReturn(array($call1, $call2));
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/MethodProphecyExceptionSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/MethodProphecyExceptionSpec.php
deleted file mode 100644
index 97cf9e10..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/MethodProphecyExceptionSpec.php
+++ /dev/null
@@ -1,30 +0,0 @@
-getObjectProphecy()->willReturn($objectProphecy);
-
- $this->beConstructedWith('message', $methodProphecy);
- }
-
- function it_extends_DoubleException()
- {
- $this->shouldBeAnInstanceOf('Prophecy\Exception\Prophecy\ObjectProphecyException');
- }
-
- function it_holds_a_stub_reference($methodProphecy)
- {
- $this->getMethodProphecy()->shouldReturn($methodProphecy);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/ObjectProphecyExceptionSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/ObjectProphecyExceptionSpec.php
deleted file mode 100644
index bcacfedc..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/ObjectProphecyExceptionSpec.php
+++ /dev/null
@@ -1,27 +0,0 @@
-beConstructedWith('message', $objectProphecy);
- }
-
- function it_should_be_a_prophecy_exception()
- {
- $this->shouldBeAnInstanceOf('Prophecy\Exception\Prophecy\ProphecyException');
- }
-
- function it_holds_double_reference($objectProphecy)
- {
- $this->getObjectProphecy()->shouldReturn($objectProphecy);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallPredictionSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallPredictionSpec.php
deleted file mode 100644
index 3da8c599..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallPredictionSpec.php
+++ /dev/null
@@ -1,42 +0,0 @@
-shouldHaveType('Prophecy\Prediction\PredictionInterface');
- }
-
- /**
- * @param \Prophecy\Prophecy\ObjectProphecy $object
- * @param \Prophecy\Prophecy\MethodProphecy $method
- * @param \Prophecy\Call\Call $call
- */
- function it_does_nothing_if_there_is_more_than_one_call_been_made($object, $method, $call)
- {
- $this->check(array($call), $object, $method)->shouldReturn(null);
- }
-
- /**
- * @param \Prophecy\Prophecy\ObjectProphecy $object
- * @param \Prophecy\Prophecy\MethodProphecy $method
- * @param \Prophecy\Argument\ArgumentsWildcard $arguments
- */
- function it_throws_NoCallsException_if_no_calls_found($object, $method, $arguments)
- {
- $method->getObjectProphecy()->willReturn($object);
- $method->getMethodName()->willReturn('getName');
- $method->getArgumentsWildcard()->willReturn($arguments);
- $arguments->__toString()->willReturn('123');
- $object->reveal()->willReturn(new \stdClass());
- $object->findProphecyMethodCalls('getName', Argument::any())->willReturn(array());
-
- $this->shouldThrow('Prophecy\Exception\Prediction\NoCallsException')
- ->duringCheck(array(), $object, $method);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallTimesPredictionSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallTimesPredictionSpec.php
deleted file mode 100644
index c6708927..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallTimesPredictionSpec.php
+++ /dev/null
@@ -1,54 +0,0 @@
-beConstructedWith(2);
- }
-
- function it_is_prediction()
- {
- $this->shouldHaveType('Prophecy\Prediction\PredictionInterface');
- }
-
- /**
- * @param \Prophecy\Prophecy\ObjectProphecy $object
- * @param \Prophecy\Prophecy\MethodProphecy $method
- * @param \Prophecy\Call\Call $call1
- * @param \Prophecy\Call\Call $call2
- */
- function it_does_nothing_if_there_were_exact_amount_of_calls_being_made(
- $object, $method, $call1, $call2
- )
- {
- $this->check(array($call1, $call2), $object, $method)->shouldReturn(null);
- }
-
- /**
- * @param \Prophecy\Prophecy\ObjectProphecy $object
- * @param \Prophecy\Prophecy\MethodProphecy $method
- * @param \Prophecy\Call\Call $call
- * @param \Prophecy\Argument\ArgumentsWildcard $arguments
- */
- function it_throws_UnexpectedCallsCountException_if_calls_found(
- $object, $method, $call, $arguments
- )
- {
- $method->getObjectProphecy()->willReturn($object);
- $method->getMethodName()->willReturn('getName');
- $method->getArgumentsWildcard()->willReturn($arguments);
- $arguments->__toString()->willReturn('123');
-
- $call->getMethodName()->willReturn('getName');
- $call->getArguments()->willReturn(array(5, 4, 'three'));
- $call->getCallPlace()->willReturn('unknown');
-
- $this->shouldThrow('Prophecy\Exception\Prediction\UnexpectedCallsCountException')
- ->duringCheck(array($call), $object, $method);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallbackPredictionSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallbackPredictionSpec.php
deleted file mode 100644
index 7fe475ef..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallbackPredictionSpec.php
+++ /dev/null
@@ -1,36 +0,0 @@
-beConstructedWith('get_class');
- }
-
- function it_is_prediction()
- {
- $this->shouldHaveType('Prophecy\Prediction\PredictionInterface');
- }
-
- /**
- * @param \Prophecy\Prophecy\ObjectProphecy $object
- * @param \Prophecy\Prophecy\MethodProphecy $method
- * @param \Prophecy\Call\Call $call
- */
- function it_proxies_call_to_callback($object, $method, $call)
- {
- $returnFirstCallCallback = function ($calls, $object, $method) {
- throw new RuntimeException;
- };
-
- $this->beConstructedWith($returnFirstCallCallback);
-
- $this->shouldThrow('RuntimeException')->duringCheck(array($call), $object, $method);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Prediction/NoCallsPredictionSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Prediction/NoCallsPredictionSpec.php
deleted file mode 100644
index a3ef9bcb..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Prediction/NoCallsPredictionSpec.php
+++ /dev/null
@@ -1,43 +0,0 @@
-shouldHaveType('Prophecy\Prediction\PredictionInterface');
- }
-
- /**
- * @param \Prophecy\Prophecy\ObjectProphecy $object
- * @param \Prophecy\Prophecy\MethodProphecy $method
- */
- function it_does_nothing_if_there_is_no_calls_made($object, $method)
- {
- $this->check(array(), $object, $method)->shouldReturn(null);
- }
-
- /**
- * @param \Prophecy\Prophecy\ObjectProphecy $object
- * @param \Prophecy\Prophecy\MethodProphecy $method
- * @param \Prophecy\Call\Call $call
- * @param \Prophecy\Argument\ArgumentsWildcard $arguments
- */
- function it_throws_UnexpectedCallsException_if_calls_found($object, $method, $call, $arguments)
- {
- $method->getObjectProphecy()->willReturn($object);
- $method->getMethodName()->willReturn('getName');
- $method->getArgumentsWildcard()->willReturn($arguments);
- $arguments->__toString()->willReturn('123');
-
- $call->getMethodName()->willReturn('getName');
- $call->getArguments()->willReturn(array(5, 4, 'three'));
- $call->getCallPlace()->willReturn('unknown');
-
- $this->shouldThrow('Prophecy\Exception\Prediction\UnexpectedCallsException')
- ->duringCheck(array($call), $object, $method);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Promise/CallbackPromiseSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Promise/CallbackPromiseSpec.php
deleted file mode 100644
index 5d99b1b1..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Promise/CallbackPromiseSpec.php
+++ /dev/null
@@ -1,110 +0,0 @@
-beConstructedWith('get_class');
- }
-
- function it_is_promise()
- {
- $this->shouldBeAnInstanceOf('Prophecy\Promise\PromiseInterface');
- }
-
- /**
- * @param \Prophecy\Prophecy\ObjectProphecy $object
- * @param \Prophecy\Prophecy\MethodProphecy $method
- */
- function it_should_execute_closure_callback($object, $method)
- {
- $firstArgumentCallback = function ($args) {
- return $args[0];
- };
-
- $this->beConstructedWith($firstArgumentCallback);
-
- $this->execute(array('one', 'two'), $object, $method)->shouldReturn('one');
- }
-
- /**
- * @param \Prophecy\Prophecy\ObjectProphecy $object
- * @param \Prophecy\Prophecy\MethodProphecy $method
- */
- function it_should_execute_static_array_callback($object, $method)
- {
- $firstArgumentCallback = array('spec\Prophecy\Promise\ClassCallback', 'staticCallbackMethod');
-
- $this->beConstructedWith($firstArgumentCallback);
-
- $this->execute(array('one', 'two'), $object, $method)->shouldReturn('one');
- }
-
- /**
- * @param \Prophecy\Prophecy\ObjectProphecy $object
- * @param \Prophecy\Prophecy\MethodProphecy $method
- */
- function it_should_execute_instance_array_callback($object, $method)
- {
- $class = new ClassCallback();
- $firstArgumentCallback = array($class, 'callbackMethod');
-
- $this->beConstructedWith($firstArgumentCallback);
-
- $this->execute(array('one', 'two'), $object, $method)->shouldReturn('one');
- }
-
- /**
- * @param \Prophecy\Prophecy\ObjectProphecy $object
- * @param \Prophecy\Prophecy\MethodProphecy $method
- */
- function it_should_execute_string_function_callback($object, $method)
- {
- $firstArgumentCallback = 'spec\Prophecy\Promise\functionCallbackFirstArgument';
-
- $this->beConstructedWith($firstArgumentCallback);
-
- $this->execute(array('one', 'two'), $object, $method)->shouldReturn('one');
- }
-
-}
-
-/**
- * Class used to test callbackpromise
- *
- * @param array
- * @return string
- */
-class ClassCallback
-{
- /**
- * @param array $args
- */
- function callbackMethod($args)
- {
- return $args[0];
- }
-
- /**
- * @param array $args
- */
- static function staticCallbackMethod($args)
- {
- return $args[0];
- }
-}
-
-/**
- * Callback function used to test callbackpromise
- *
- * @param array
- * @return string
- */
-function functionCallbackFirstArgument($args)
-{
- return $args[0];
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnArgumentPromiseSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnArgumentPromiseSpec.php
deleted file mode 100644
index 4acb7bb0..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnArgumentPromiseSpec.php
+++ /dev/null
@@ -1,41 +0,0 @@
-shouldBeAnInstanceOf('Prophecy\Promise\PromiseInterface');
- }
-
- /**
- * @param \Prophecy\Prophecy\ObjectProphecy $object
- * @param \Prophecy\Prophecy\MethodProphecy $method
- */
- function it_should_return_first_argument_if_provided($object, $method)
- {
- $this->execute(array('one', 'two'), $object, $method)->shouldReturn('one');
- }
-
- /**
- * @param \Prophecy\Prophecy\ObjectProphecy $object
- * @param \Prophecy\Prophecy\MethodProphecy $method
- */
- function it_should_return_null_if_no_arguments_provided($object, $method)
- {
- $this->execute(array(), $object, $method)->shouldReturn(null);
- }
-
- /**
- * @param \Prophecy\Prophecy\ObjectProphecy $object
- * @param \Prophecy\Prophecy\MethodProphecy $method
- */
- function it_should_return_nth_argument_if_provided($object, $method)
- {
- $this->beConstructedWith(1);
- $this->execute(array('one', 'two'), $object, $method)->shouldReturn('two');
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnPromiseSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnPromiseSpec.php
deleted file mode 100644
index 18bfd87a..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnPromiseSpec.php
+++ /dev/null
@@ -1,61 +0,0 @@
-beConstructedWith(array(42));
- }
-
- function it_is_promise()
- {
- $this->shouldBeAnInstanceOf('Prophecy\Promise\PromiseInterface');
- }
-
- /**
- * @param \Prophecy\Prophecy\ObjectProphecy $object
- * @param \Prophecy\Prophecy\MethodProphecy $method
- */
- function it_returns_value_it_was_constructed_with($object, $method)
- {
- $this->execute(array(), $object, $method)->shouldReturn(42);
- }
-
- /**
- * @param \Prophecy\Prophecy\ObjectProphecy $object
- * @param \Prophecy\Prophecy\MethodProphecy $method
- */
- function it_always_returns_last_value_left_in_the_return_values($object, $method)
- {
- $this->execute(array(), $object, $method)->shouldReturn(42);
- $this->execute(array(), $object, $method)->shouldReturn(42);
- }
-
- /**
- * @param \Prophecy\Prophecy\ObjectProphecy $object
- * @param \Prophecy\Prophecy\MethodProphecy $method
- */
- function it_consequently_returns_multiple_values_it_was_constructed_with($object, $method)
- {
- $this->beConstructedWith(array(42, 24, 12));
-
- $this->execute(array(), $object, $method)->shouldReturn(42);
- $this->execute(array(), $object, $method)->shouldReturn(24);
- $this->execute(array(), $object, $method)->shouldReturn(12);
- }
-
- /**
- * @param \Prophecy\Prophecy\ObjectProphecy $object
- * @param \Prophecy\Prophecy\MethodProphecy $method
- */
- function it_returns_null_if_constructed_with_empty_array($object, $method)
- {
- $this->beConstructedWith(array());
-
- $this->execute(array(), $object, $method)->shouldReturn(null);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Promise/ThrowPromiseSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Promise/ThrowPromiseSpec.php
deleted file mode 100644
index 5f448979..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Promise/ThrowPromiseSpec.php
+++ /dev/null
@@ -1,58 +0,0 @@
-beConstructedWith('RuntimeException');
- }
-
- function it_is_promise()
- {
- $this->shouldBeAnInstanceOf('Prophecy\Promise\PromiseInterface');
- }
-
- /**
- * @param \Prophecy\Prophecy\ObjectProphecy $object
- * @param \Prophecy\Prophecy\MethodProphecy $method
- */
- function it_instantiates_and_throws_exception_from_provided_classname($object, $method)
- {
- $this->beConstructedWith('InvalidArgumentException');
-
- $this->shouldThrow('InvalidArgumentException')
- ->duringExecute(array(), $object, $method);
- }
-
- /**
- * @param \Prophecy\Prophecy\ObjectProphecy $object
- * @param \Prophecy\Prophecy\MethodProphecy $method
- */
- function it_instantiates_exceptions_with_required_arguments($object, $method)
- {
- $this->beConstructedWith('spec\Prophecy\Promise\RequiredArgumentException');
-
- $this->shouldThrow('spec\Prophecy\Promise\RequiredArgumentException')
- ->duringExecute(array(), $object, $method);
- }
-
- /**
- * @param \Prophecy\Prophecy\ObjectProphecy $object
- * @param \Prophecy\Prophecy\MethodProphecy $method
- */
- function it_throws_provided_exception($object, $method)
- {
- $this->beConstructedWith($exc = new \RuntimeException('Some exception'));
-
- $this->shouldThrow($exc)->duringExecute(array(), $object, $method);
- }
-}
-
-class RequiredArgumentException extends \Exception
-{
- final public function __construct($message, $code) {}
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/MethodProphecySpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/MethodProphecySpec.php
deleted file mode 100644
index 41ee8cde..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/MethodProphecySpec.php
+++ /dev/null
@@ -1,384 +0,0 @@
-reveal()->willReturn($reflection);
-
- $this->beConstructedWith($objectProphecy, 'getName', null);
- }
-
- function it_is_initializable()
- {
- $this->shouldHaveType('Prophecy\Prophecy\MethodProphecy');
- }
-
- function its_constructor_throws_MethodNotFoundException_for_unexisting_method($objectProphecy)
- {
- $this->shouldThrow('Prophecy\Exception\Doubler\MethodNotFoundException')->during(
- '__construct', array($objectProphecy, 'getUnexisting', null)
- );
- }
-
- /**
- * @param ClassWithFinalMethod $subject
- */
- function its_constructor_throws_MethodProphecyException_for_final_methods($objectProphecy, $subject)
- {
- $objectProphecy->reveal()->willReturn($subject);
-
- $this->shouldThrow('Prophecy\Exception\Prophecy\MethodProphecyException')->during(
- '__construct', array($objectProphecy, 'finalMethod', null)
- );
- }
-
- function its_constructor_transforms_array_passed_as_3rd_argument_to_ArgumentsWildcard(
- $objectProphecy
- )
- {
- $this->beConstructedWith($objectProphecy, 'getName', array(42, 33));
-
- $wildcard = $this->getArgumentsWildcard();
- $wildcard->shouldNotBe(null);
- $wildcard->__toString()->shouldReturn('exact(42), exact(33)');
- }
-
- function its_constructor_does_not_touch_third_argument_if_it_is_null($objectProphecy)
- {
- $this->beConstructedWith($objectProphecy, 'getName', null);
-
- $wildcard = $this->getArgumentsWildcard();
- $wildcard->shouldBe(null);
- }
-
- /**
- * @param \Prophecy\Promise\PromiseInterface $promise
- */
- function it_records_promise_through_will_method($promise, $objectProphecy)
- {
- $objectProphecy->addMethodProphecy($this)->willReturn(null);
-
- $this->will($promise);
- $this->getPromise()->shouldReturn($promise);
- }
-
- /**
- * @param \Prophecy\Promise\PromiseInterface $promise
- */
- function it_adds_itself_to_ObjectProphecy_during_call_to_will($objectProphecy, $promise)
- {
- $objectProphecy->addMethodProphecy($this)->shouldBeCalled();
-
- $this->will($promise);
- }
-
- function it_adds_ReturnPromise_during_willReturn_call($objectProphecy)
- {
- $objectProphecy->addMethodProphecy($this)->willReturn(null);
-
- $this->willReturn(42);
- $this->getPromise()->shouldBeAnInstanceOf('Prophecy\Promise\ReturnPromise');
- }
-
- function it_adds_ThrowPromise_during_willThrow_call($objectProphecy)
- {
- $objectProphecy->addMethodProphecy($this)->willReturn(null);
-
- $this->willThrow('RuntimeException');
- $this->getPromise()->shouldBeAnInstanceOf('Prophecy\Promise\ThrowPromise');
- }
-
- function it_adds_ReturnArgumentPromise_during_willReturnArgument_call($objectProphecy)
- {
- $objectProphecy->addMethodProphecy($this)->willReturn(null);
-
- $this->willReturnArgument();
- $this->getPromise()->shouldBeAnInstanceOf('Prophecy\Promise\ReturnArgumentPromise');
- }
-
- function it_adds_ReturnArgumentPromise_during_willReturnArgument_call_with_index_argument($objectProphecy)
- {
- $objectProphecy->addMethodProphecy($this)->willReturn(null);
-
- $this->willReturnArgument(1);
- $promise = $this->getPromise();
- $promise->shouldBeAnInstanceOf('Prophecy\Promise\ReturnArgumentPromise');
- $promise->execute(array('one', 'two'), $objectProphecy, $this)->shouldReturn('two');
- }
-
- function it_adds_CallbackPromise_during_will_call_with_callback_argument($objectProphecy)
- {
- $objectProphecy->addMethodProphecy($this)->willReturn(null);
-
- $callback = function () {};
-
- $this->will($callback);
- $this->getPromise()->shouldBeAnInstanceOf('Prophecy\Promise\CallbackPromise');
- }
-
- /**
- * @param \Prophecy\Prediction\PredictionInterface $prediction
- */
- function it_records_prediction_through_should_method($prediction, $objectProphecy)
- {
- $objectProphecy->addMethodProphecy($this)->willReturn(null);
-
- $this->callOnWrappedObject('should', array($prediction));
- $this->getPrediction()->shouldReturn($prediction);
- }
-
- function it_adds_CallbackPrediction_during_should_call_with_callback_argument($objectProphecy)
- {
- $objectProphecy->addMethodProphecy($this)->willReturn(null);
-
- $callback = function () {};
-
- $this->callOnWrappedObject('should', array($callback));
- $this->getPrediction()->shouldBeAnInstanceOf('Prophecy\Prediction\CallbackPrediction');
- }
-
- /**
- * @param \Prophecy\Prediction\PredictionInterface $prediction
- */
- function it_adds_itself_to_ObjectProphecy_during_call_to_should($objectProphecy, $prediction)
- {
- $objectProphecy->addMethodProphecy($this)->shouldBeCalled();
-
- $this->callOnWrappedObject('should', array($prediction));
- }
-
- function it_adds_CallPrediction_during_shouldBeCalled_call($objectProphecy)
- {
- $objectProphecy->addMethodProphecy($this)->willReturn(null);
-
- $this->callOnWrappedObject('shouldBeCalled', array());
- $this->getPrediction()->shouldBeAnInstanceOf('Prophecy\Prediction\CallPrediction');
- }
-
- function it_adds_NoCallsPrediction_during_shouldNotBeCalled_call($objectProphecy)
- {
- $objectProphecy->addMethodProphecy($this)->willReturn(null);
-
- $this->callOnWrappedObject('shouldNotBeCalled', array());
- $this->getPrediction()->shouldBeAnInstanceOf('Prophecy\Prediction\NoCallsPrediction');
- }
-
- function it_adds_CallTimesPrediction_during_shouldBeCalledTimes_call($objectProphecy)
- {
- $objectProphecy->addMethodProphecy($this)->willReturn(null);
-
- $this->callOnWrappedObject('shouldBeCalledTimes', array(5));
- $this->getPrediction()->shouldBeAnInstanceOf('Prophecy\Prediction\CallTimesPrediction');
- }
-
- /**
- * @param \Prophecy\Argument\ArgumentsWildcard $arguments
- * @param \Prophecy\Prediction\PredictionInterface $prediction
- * @param \Prophecy\Call\Call $call1
- * @param \Prophecy\Call\Call $call2
- */
- function it_checks_prediction_via_shouldHave_method_call(
- $objectProphecy, $arguments, $prediction, $call1, $call2
- )
- {
- $objectProphecy->addMethodProphecy($this)->willReturn(null);
- $prediction->check(array($call1, $call2), $objectProphecy->getWrappedObject(), $this)->shouldBeCalled();
- $objectProphecy->findProphecyMethodCalls('getName', $arguments)->willReturn(array($call1, $call2));
-
- $this->withArguments($arguments);
- $this->callOnWrappedObject('shouldHave', array($prediction));
- }
-
- /**
- * @param \Prophecy\Argument\ArgumentsWildcard $arguments
- * @param \Prophecy\Prediction\PredictionInterface $prediction
- * @param \Prophecy\Call\Call $call1
- * @param \Prophecy\Call\Call $call2
- */
- function it_sets_return_promise_during_shouldHave_call_if_none_was_set_before(
- $objectProphecy, $arguments, $prediction, $call1, $call2
- )
- {
- $objectProphecy->addMethodProphecy($this)->willReturn(null);
- $prediction->check(array($call1, $call2), $objectProphecy->getWrappedObject(), $this)->shouldBeCalled();
- $objectProphecy->findProphecyMethodCalls('getName', $arguments)->willReturn(array($call1, $call2));
-
- $this->withArguments($arguments);
- $this->callOnWrappedObject('shouldHave', array($prediction));
-
- $this->getPromise()->shouldReturnAnInstanceOf('Prophecy\Promise\ReturnPromise');
- }
-
- /**
- * @param \Prophecy\Argument\ArgumentsWildcard $arguments
- * @param \Prophecy\Prediction\PredictionInterface $prediction
- * @param \Prophecy\Call\Call $call1
- * @param \Prophecy\Call\Call $call2
- * @param \Prophecy\Promise\PromiseInterface $promise
- */
- function it_does_not_set_return_promise_during_shouldHave_call_if_it_was_set_before(
- $objectProphecy, $arguments, $prediction, $call1, $call2, $promise
- )
- {
- $objectProphecy->addMethodProphecy($this)->willReturn(null);
- $prediction->check(array($call1, $call2), $objectProphecy->getWrappedObject(), $this)->shouldBeCalled();
- $objectProphecy->findProphecyMethodCalls('getName', $arguments)->willReturn(array($call1, $call2));
-
- $this->will($promise);
- $this->withArguments($arguments);
- $this->callOnWrappedObject('shouldHave', array($prediction));
-
- $this->getPromise()->shouldReturn($promise);
- }
-
- /**
- * @param \Prophecy\Argument\ArgumentsWildcard $arguments
- * @param \Prophecy\Prediction\PredictionInterface $prediction1
- * @param \Prophecy\Prediction\PredictionInterface $prediction2
- * @param \Prophecy\Call\Call $call1
- * @param \Prophecy\Call\Call $call2
- * @param \Prophecy\Promise\PromiseInterface $promise
- */
- function it_records_checked_predictions(
- $objectProphecy, $arguments, $prediction1, $prediction2, $call1, $call2, $promise
- )
- {
- $objectProphecy->addMethodProphecy($this)->willReturn(null);
- $prediction1->check(array($call1, $call2), $objectProphecy->getWrappedObject(), $this)->willReturn();
- $prediction2->check(array($call1, $call2), $objectProphecy->getWrappedObject(), $this)->willReturn();
- $objectProphecy->findProphecyMethodCalls('getName', $arguments)->willReturn(array($call1, $call2));
-
- $this->will($promise);
- $this->withArguments($arguments);
- $this->callOnWrappedObject('shouldHave', array($prediction1));
- $this->callOnWrappedObject('shouldHave', array($prediction2));
-
- $this->getCheckedPredictions()->shouldReturn(array($prediction1, $prediction2));
- }
-
- /**
- * @param \Prophecy\Argument\ArgumentsWildcard $arguments
- * @param \Prophecy\Prediction\PredictionInterface $prediction
- * @param \Prophecy\Call\Call $call1
- * @param \Prophecy\Call\Call $call2
- * @param \Prophecy\Promise\PromiseInterface $promise
- */
- function it_records_even_failed_checked_predictions(
- $objectProphecy, $arguments, $prediction, $call1, $call2, $promise
- )
- {
- $objectProphecy->addMethodProphecy($this)->willReturn(null);
- $prediction->check(array($call1, $call2), $objectProphecy->getWrappedObject(), $this)->willThrow(new \RuntimeException());
- $objectProphecy->findProphecyMethodCalls('getName', $arguments)->willReturn(array($call1, $call2));
-
- $this->will($promise);
- $this->withArguments($arguments);
-
- try {
- $this->callOnWrappedObject('shouldHave', array($prediction));
- } catch (\Exception $e) {}
-
- $this->getCheckedPredictions()->shouldReturn(array($prediction));
- }
-
- /**
- * @param \Prophecy\Argument\ArgumentsWildcard $arguments
- * @param \Prophecy\Prediction\PredictionInterface $prediction
- * @param \Prophecy\Call\Call $call1
- * @param \Prophecy\Call\Call $call2
- */
- function it_checks_prediction_via_shouldHave_method_call_with_callback(
- $objectProphecy, $arguments, $prediction, $call1, $call2
- )
- {
- $callback = function ($calls, $object, $method) {
- throw new \RuntimeException;
- };
- $objectProphecy->findProphecyMethodCalls('getName', $arguments)->willReturn(array($call1, $call2));
-
- $this->withArguments($arguments);
- $this->shouldThrow('RuntimeException')->duringShouldHave($callback);
- }
-
- function it_does_nothing_during_checkPrediction_if_no_prediction_set()
- {
- $this->checkPrediction()->shouldReturn(null);
- }
-
- /**
- * @param \Prophecy\Argument\ArgumentsWildcard $arguments
- * @param \Prophecy\Prediction\PredictionInterface $prediction
- * @param \Prophecy\Call\Call $call1
- * @param \Prophecy\Call\Call $call2
- */
- function it_checks_set_prediction_during_checkPrediction(
- $objectProphecy, $arguments, $prediction, $call1, $call2
- )
- {
- $prediction->check(array($call1, $call2), $objectProphecy->getWrappedObject(), $this)->shouldBeCalled();
- $objectProphecy->findProphecyMethodCalls('getName', $arguments)->willReturn(array($call1, $call2));
- $objectProphecy->addMethodProphecy($this)->willReturn(null);
-
- $this->withArguments($arguments);
- $this->callOnWrappedObject('should', array($prediction));
- $this->checkPrediction();
- }
-
- function it_links_back_to_ObjectProphecy_through_getter($objectProphecy)
- {
- $this->getObjectProphecy()->shouldReturn($objectProphecy);
- }
-
- function it_has_MethodName()
- {
- $this->getMethodName()->shouldReturn('getName');
- }
-
- /**
- * @param \Prophecy\Argument\ArgumentsWildcard $wildcard
- */
- function it_contains_ArgumentsWildcard_it_was_constructed_with($objectProphecy, $wildcard)
- {
- $this->beConstructedWith($objectProphecy, 'getName', $wildcard);
-
- $this->getArgumentsWildcard()->shouldReturn($wildcard);
- }
-
- /**
- * @param \Prophecy\Argument\ArgumentsWildcard $wildcard
- */
- function its_ArgumentWildcard_is_mutable_through_setter($wildcard)
- {
- $this->withArguments($wildcard);
-
- $this->getArgumentsWildcard()->shouldReturn($wildcard);
- }
-
- function its_withArguments_transforms_passed_array_into_ArgumentsWildcard()
- {
- $this->withArguments(array(42, 33));
-
- $wildcard = $this->getArgumentsWildcard();
- $wildcard->shouldNotBe(null);
- $wildcard->__toString()->shouldReturn('exact(42), exact(33)');
- }
-
- function its_withArguments_throws_exception_if_wrong_arguments_provided()
- {
- $this->shouldThrow('Prophecy\Exception\InvalidArgumentException')->duringWithArguments(42);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/ObjectProphecySpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/ObjectProphecySpec.php
deleted file mode 100644
index 7e249d9b..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/ObjectProphecySpec.php
+++ /dev/null
@@ -1,319 +0,0 @@
-beConstructedWith($lazyDouble);
-
- $lazyDouble->getInstance()->willReturn($double);
- }
-
- function it_implements_ProphecyInterface()
- {
- $this->shouldBeAnInstanceOf('Prophecy\Prophecy\ProphecyInterface');
- }
-
- function it_sets_parentClass_during_willExtend_call($lazyDouble)
- {
- $lazyDouble->setParentClass('123')->shouldBeCalled();
-
- $this->willExtend('123');
- }
-
- function it_adds_interface_during_willImplement_call($lazyDouble)
- {
- $lazyDouble->addInterface('222')->shouldBeCalled();
-
- $this->willImplement('222');
- }
-
- function it_sets_constructor_arguments_during_willBeConstructedWith_call($lazyDouble)
- {
- $lazyDouble->setArguments(array(1, 2, 5))->shouldBeCalled();
-
- $this->willBeConstructedWith(array(1, 2, 5));
- }
-
- function it_does_not_have_method_prophecies_by_default()
- {
- $this->getMethodProphecies()->shouldHaveCount(0);
- }
-
- /**
- * @param \Prophecy\Prophecy\MethodProphecy $method1
- * @param \Prophecy\Prophecy\MethodProphecy $method2
- * @param \Prophecy\Argument\ArgumentsWildcard $arguments
- */
- function it_should_get_method_prophecies_by_method_name($method1, $method2, $arguments)
- {
- $method1->getMethodName()->willReturn('getName');
- $method1->getArgumentsWildcard()->willReturn($arguments);
- $method2->getMethodName()->willReturn('setName');
- $method2->getArgumentsWildcard()->willReturn($arguments);
-
- $this->addMethodProphecy($method1);
- $this->addMethodProphecy($method2);
-
- $methods = $this->getMethodProphecies('setName');
- $methods->shouldHaveCount(1);
- $methods[0]->getMethodName()->shouldReturn('setName');
- }
-
- function it_should_return_empty_array_if_no_method_prophecies_found()
- {
- $methods = $this->getMethodProphecies('setName');
- $methods->shouldHaveCount(0);
- }
-
- /**
- * @param \Prophecy\Call\CallCenter $callCenter
- */
- function it_should_proxy_makeProphecyMethodCall_to_CallCenter($lazyDouble, $callCenter)
- {
- $this->beConstructedWith($lazyDouble, $callCenter);
-
- $callCenter->makeCall($this->getWrappedObject(), 'setName', array('everzet'))->willReturn(42);
-
- $this->makeProphecyMethodCall('setName', array('everzet'))->shouldReturn(42);
- }
-
- /**
- * @param \Prophecy\Call\CallCenter $callCenter
- * @param \Prophecy\Prophecy\RevealerInterface $revealer
- */
- function it_should_reveal_arguments_and_return_values_from_callCenter(
- $lazyDouble, $callCenter, $revealer
- )
- {
- $this->beConstructedWith($lazyDouble, $callCenter, $revealer);
-
- $revealer->reveal(array('question'))->willReturn(array('life'));
- $revealer->reveal('answer')->willReturn(42);
-
- $callCenter->makeCall($this->getWrappedObject(), 'setName', array('life'))->willReturn('answer');
-
- $this->makeProphecyMethodCall('setName', array('question'))->shouldReturn(42);
- }
-
- /**
- * @param \Prophecy\Call\CallCenter $callCenter
- * @param \Prophecy\Argument\ArgumentsWildcard $wildcard
- * @param \Prophecy\Call\Call $call
- */
- function it_should_proxy_getProphecyMethodCalls_to_CallCenter(
- $lazyDouble, $callCenter, $wildcard, $call
- )
- {
- $this->beConstructedWith($lazyDouble, $callCenter);
-
- $callCenter->findCalls('setName', $wildcard)->willReturn(array($call));
-
- $this->findProphecyMethodCalls('setName', $wildcard)->shouldReturn(array($call));
- }
-
- /**
- * @param \Prophecy\Prophecy\MethodProphecy $methodProphecy
- * @param \Prophecy\Argument\ArgumentsWildcard $argumentsWildcard
- */
- function its_addMethodProphecy_adds_method_prophecy(
- $methodProphecy, $argumentsWildcard
- )
- {
- $methodProphecy->getArgumentsWildcard()->willReturn($argumentsWildcard);
- $methodProphecy->getMethodName()->willReturn('getUsername');
-
- $this->addMethodProphecy($methodProphecy);
-
- $this->getMethodProphecies()->shouldReturn(array(
- 'getUsername' => array($methodProphecy)
- ));
- }
-
- /**
- * @param \Prophecy\Prophecy\MethodProphecy $methodProphecy1
- * @param \Prophecy\Prophecy\MethodProphecy $methodProphecy2
- * @param \Prophecy\Argument\ArgumentsWildcard $argumentsWildcard1
- * @param \Prophecy\Argument\ArgumentsWildcard $argumentsWildcard2
- */
- function its_addMethodProphecy_handles_prophecies_with_different_arguments(
- $methodProphecy1, $methodProphecy2, $argumentsWildcard1, $argumentsWildcard2
- )
- {
- $methodProphecy1->getArgumentsWildcard()->willReturn($argumentsWildcard1);
- $methodProphecy1->getMethodName()->willReturn('getUsername');
-
- $methodProphecy2->getArgumentsWildcard()->willReturn($argumentsWildcard2);
- $methodProphecy2->getMethodName()->willReturn('getUsername');
-
- $this->addMethodProphecy($methodProphecy1);
- $this->addMethodProphecy($methodProphecy2);
-
- $this->getMethodProphecies()->shouldReturn(array(
- 'getUsername' => array(
- $methodProphecy1,
- $methodProphecy2,
- )
- ));
- }
-
- /**
- * @param \Prophecy\Prophecy\MethodProphecy $methodProphecy1
- * @param \Prophecy\Prophecy\MethodProphecy $methodProphecy2
- * @param \Prophecy\Argument\ArgumentsWildcard $argumentsWildcard1
- * @param \Prophecy\Argument\ArgumentsWildcard $argumentsWildcard2
- */
- function its_addMethodProphecy_handles_prophecies_for_different_methods(
- $methodProphecy1, $methodProphecy2, $argumentsWildcard1, $argumentsWildcard2
- )
- {
- $methodProphecy1->getArgumentsWildcard()->willReturn($argumentsWildcard1);
- $methodProphecy1->getMethodName()->willReturn('getUsername');
-
- $methodProphecy2->getArgumentsWildcard()->willReturn($argumentsWildcard2);
- $methodProphecy2->getMethodName()->willReturn('isUsername');
-
- $this->addMethodProphecy($methodProphecy1);
- $this->addMethodProphecy($methodProphecy2);
-
- $this->getMethodProphecies()->shouldReturn(array(
- 'getUsername' => array(
- $methodProphecy1
- ),
- 'isUsername' => array(
- $methodProphecy2
- )
- ));
- }
-
- /**
- * @param \Prophecy\Prophecy\MethodProphecy $methodProphecy
- */
- function its_addMethodProphecy_throws_exception_when_method_has_no_ArgumentsWildcard(
- $methodProphecy
- )
- {
- $methodProphecy->getArgumentsWildcard()->willReturn(null);
- $methodProphecy->getObjectProphecy()->willReturn($this);
- $methodProphecy->getMethodName()->willReturn('getTitle');
-
- $this->shouldThrow('Prophecy\Exception\Prophecy\MethodProphecyException')->duringAddMethodProphecy(
- $methodProphecy
- );
- }
-
- function it_returns_null_after_checkPredictions_call_if_there_is_no_method_prophecies()
- {
- $this->checkProphecyMethodsPredictions()->shouldReturn(null);
- }
-
- /**
- * @param \Prophecy\Prophecy\MethodProphecy $methodProphecy1
- * @param \Prophecy\Prophecy\MethodProphecy $methodProphecy2
- * @param \Prophecy\Argument\ArgumentsWildcard $argumentsWildcard1
- * @param \Prophecy\Argument\ArgumentsWildcard $argumentsWildcard2
- */
- function it_throws_AggregateException_during_checkPredictions_if_predictions_fail(
- $methodProphecy1, $methodProphecy2, $argumentsWildcard1, $argumentsWildcard2
- )
- {
- $methodProphecy1->getMethodName()->willReturn('getName');
- $methodProphecy1->getArgumentsWildcard()->willReturn($argumentsWildcard1);
- $methodProphecy1->checkPrediction()
- ->willThrow('Prophecy\Exception\Prediction\AggregateException');
-
- $methodProphecy2->getMethodName()->willReturn('setName');
- $methodProphecy2->getArgumentsWildcard()->willReturn($argumentsWildcard2);
- $methodProphecy2->checkPrediction()
- ->willThrow('Prophecy\Exception\Prediction\AggregateException');
-
- $this->addMethodProphecy($methodProphecy1);
- $this->addMethodProphecy($methodProphecy2);
-
- $this->shouldThrow('Prophecy\Exception\Prediction\AggregateException')
- ->duringCheckProphecyMethodsPredictions();
- }
-
- /**
- * @param \Prophecy\Doubler\Doubler $doubler
- * @param \Prophecy\Prophecy\ProphecySubjectInterface $reflection
- */
- function it_returns_new_MethodProphecy_instance_for_arbitrary_call($doubler, $reflection)
- {
- $doubler->double(Argument::any())->willReturn($reflection);
-
- $return = $this->getProphecy();
- $return->shouldBeAnInstanceOf('Prophecy\Prophecy\MethodProphecy');
- $return->getMethodName()->shouldReturn('getProphecy');
- }
-
- /**
- * @param \Prophecy\Doubler\Doubler $doubler
- * @param \Prophecy\Prophecy\ProphecySubjectInterface $reflection
- */
- function it_returns_same_MethodProphecy_for_same_registered_signature($doubler, $reflection)
- {
- $doubler->double(Argument::any())->willReturn($reflection);
-
- $this->addMethodProphecy($methodProphecy1 = $this->getProphecy(1, 2, 3));
- $methodProphecy2 = $this->getProphecy(1, 2, 3);
-
- $methodProphecy2->shouldBe($methodProphecy1);
- }
-
- /**
- * @param \Prophecy\Doubler\Doubler $doubler
- * @param \Prophecy\Prophecy\ProphecySubjectInterface $reflection
- */
- function it_returns_new_MethodProphecy_for_different_signatures($doubler, $reflection)
- {
- $doubler->double(Argument::any())->willReturn($reflection);
-
- $value = new ObjectProphecySpecFixtureB('ABC');
- $value2 = new ObjectProphecySpecFixtureB('CBA');
-
- $this->addMethodProphecy($methodProphecy1 = $this->getProphecy(1, 2, 3, $value));
- $methodProphecy2 = $this->getProphecy(1, 2, 3, $value2);
-
- $methodProphecy2->shouldNotBe($methodProphecy1);
- }
-
- /**
- * @param \Prophecy\Doubler\Doubler $doubler
- * @param \Prophecy\Prophecy\ProphecySubjectInterface $reflection
- */
- function it_returns_new_MethodProphecy_for_all_callback_signatures($doubler, $reflection)
- {
- $doubler->double(Argument::any())->willReturn($reflection);
-
- $this->addMethodProphecy($methodProphecy1 = $this->getProphecy(function(){}));
- $methodProphecy2 = $this->getProphecy(function(){});
-
- $methodProphecy2->shouldNotBe($methodProphecy1);
- }
-}
-
-class ObjectProphecySpecFixtureA
-{
- public $errors;
-}
-
-class ObjectProphecySpecFixtureB extends ObjectProphecySpecFixtureA
-{
- public $errors;
- public $value = null;
-
- public function __construct($value)
- {
- $this->value = $value;
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/RevealerSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/RevealerSpec.php
deleted file mode 100644
index 4d83d739..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/RevealerSpec.php
+++ /dev/null
@@ -1,51 +0,0 @@
-shouldBeAnInstanceOf('Prophecy\Prophecy\RevealerInterface');
- }
-
- /**
- * @param \Prophecy\Prophecy\ProphecyInterface $prophecy
- * @param \stdClass $object
- */
- function it_reveals_single_instance_of_ProphecyInterface($prophecy, $object)
- {
- $prophecy->reveal()->willReturn($object);
-
- $this->reveal($prophecy)->shouldReturn($object);
- }
-
- /**
- * @param \Prophecy\Prophecy\ProphecyInterface $prophecy1
- * @param \Prophecy\Prophecy\ProphecyInterface $prophecy2
- * @param \stdClass $object1
- * @param \stdClass $object2
- */
- function it_reveals_instances_of_ProphecyInterface_inside_array(
- $prophecy1, $prophecy2, $object1, $object2
- )
- {
- $prophecy1->reveal()->willReturn($object1);
- $prophecy2->reveal()->willReturn($object2);
-
- $this->reveal(array(
- array('item' => $prophecy2),
- $prophecy1
- ))->shouldReturn(array(
- array('item' => $object2),
- $object1
- ));
- }
-
- function it_does_not_touch_non_prophecy_interface()
- {
- $this->reveal(42)->shouldReturn(42);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/ProphetSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/ProphetSpec.php
deleted file mode 100644
index 74d5976a..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/ProphetSpec.php
+++ /dev/null
@@ -1,91 +0,0 @@
-double(null, array())->willReturn($double);
-
- $this->beConstructedWith($doubler);
- }
-
- function it_constructs_new_prophecy_on_prophesize_call()
- {
- $prophecy = $this->prophesize();
- $prophecy->shouldBeAnInstanceOf('Prophecy\Prophecy\ObjectProphecy');
- }
-
- /**
- * @param \Prophecy\Prophecy\ProphecySubjectInterface $newDouble
- */
- function it_constructs_new_prophecy_with_parent_class_if_specified($doubler, $newDouble)
- {
- $doubler->double(Argument::any(), array())->willReturn($newDouble);
-
- $this->prophesize('Prophecy\Prophet')->reveal()->shouldReturn($newDouble);
- }
-
- /**
- * @param \Prophecy\Prophecy\ProphecySubjectInterface $newDouble
- */
- function it_constructs_new_prophecy_with_interface_if_specified($doubler, $newDouble)
- {
- $doubler->double(null, Argument::any())->willReturn($newDouble);
-
- $this->prophesize('ArrayAccess')->reveal()->shouldReturn($newDouble);
- }
-
- function it_exposes_all_created_prophecies_through_getter()
- {
- $prophecy1 = $this->prophesize();
- $prophecy2 = $this->prophesize();
-
- $this->getProphecies()->shouldReturn(array($prophecy1, $prophecy2));
- }
-
- function it_does_nothing_during_checkPredictions_call_if_no_predictions_defined()
- {
- $this->checkPredictions()->shouldReturn(null);
- }
-
- /**
- * @param \Prophecy\Prophecy\MethodProphecy $method1
- * @param \Prophecy\Prophecy\MethodProphecy $method2
- * @param \Prophecy\Argument\ArgumentsWildcard $arguments1
- * @param \Prophecy\Argument\ArgumentsWildcard $arguments2
- */
- function it_throws_AggregateException_if_defined_predictions_fail(
- $method1, $method2, $arguments1, $arguments2
- )
- {
- $method1->getMethodName()->willReturn('getName');
- $method1->getArgumentsWildcard()->willReturn($arguments1);
- $method1->checkPrediction()->willReturn(null);
-
- $method2->getMethodName()->willReturn('isSet');
- $method2->getArgumentsWildcard()->willReturn($arguments2);
- $method2->checkPrediction()->willThrow(
- 'Prophecy\Exception\Prediction\AggregateException'
- );
-
- $this->prophesize()->addMethodProphecy($method1);
- $this->prophesize()->addMethodProphecy($method2);
-
- $this->shouldThrow('Prophecy\Exception\Prediction\AggregateException')
- ->duringCheckPredictions();
- }
-
- function it_exposes_doubler_through_getter($doubler)
- {
- $this->getDoubler()->shouldReturn($doubler);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/spec/Prophecy/Util/StringUtilSpec.php b/tests/vendor/phpspec/prophecy/spec/Prophecy/Util/StringUtilSpec.php
deleted file mode 100644
index a4eef59f..00000000
--- a/tests/vendor/phpspec/prophecy/spec/Prophecy/Util/StringUtilSpec.php
+++ /dev/null
@@ -1,97 +0,0 @@
-stringify(42)->shouldReturn('42');
- }
-
- function it_generates_proper_string_representation_for_string()
- {
- $this->stringify('some string')->shouldReturn('"some string"');
- }
-
- function it_generates_single_line_representation_for_multiline_string()
- {
- $this->stringify("some\nstring")->shouldReturn('"some\\nstring"');
- }
-
- function it_generates_proper_string_representation_for_double()
- {
- $this->stringify(42.3)->shouldReturn('42.3');
- }
-
- function it_generates_proper_string_representation_for_boolean_true()
- {
- $this->stringify(true)->shouldReturn('true');
- }
-
- function it_generates_proper_string_representation_for_boolean_false()
- {
- $this->stringify(false)->shouldReturn('false');
- }
-
- function it_generates_proper_string_representation_for_null()
- {
- $this->stringify(null)->shouldReturn('null');
- }
-
- function it_generates_proper_string_representation_for_empty_array()
- {
- $this->stringify(array())->shouldReturn('[]');
- }
-
- function it_generates_proper_string_representation_for_array()
- {
- $this->stringify(array('zet', 42))->shouldReturn('["zet", 42]');
- }
-
- function it_generates_proper_string_representation_for_hash_containing_one_value()
- {
- $this->stringify(array('ever' => 'zet'))->shouldReturn('["ever" => "zet"]');
- }
-
- function it_generates_proper_string_representation_for_hash()
- {
- $this->stringify(array('ever' => 'zet', 52 => 'hey', 'num' => 42))->shouldReturn(
- '["ever" => "zet", 52 => "hey", "num" => 42]'
- );
- }
-
- function it_generates_proper_string_representation_for_resource()
- {
- $resource = fopen(__FILE__, 'r');
- $this->stringify($resource)->shouldReturn('stream:'.$resource);
- }
-
- /**
- * @param \stdClass $object
- */
- function it_generates_proper_string_representation_for_object($object)
- {
- $objHash = sprintf('%s:%s',
- get_class($object->getWrappedObject()),
- spl_object_hash($object->getWrappedObject())
- ) . " Object (\n 'objectProphecy' => Prophecy\Prophecy\ObjectProphecy Object (*Prophecy*)\n)";
-
- $this->stringify($object)->shouldReturn("$objHash");
- }
-
- /**
- * @param stdClass $object
- */
- function it_generates_proper_string_representation_for_object_without_exporting($object)
- {
- $objHash = sprintf('%s:%s',
- get_class($object->getWrappedObject()),
- spl_object_hash($object->getWrappedObject())
- );
-
- $this->stringify($object, false)->shouldReturn("$objHash");
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Argument.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Argument.php
deleted file mode 100644
index f2b33648..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Argument.php
+++ /dev/null
@@ -1,198 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy;
-
-use Prophecy\Argument\Token;
-
-/**
- * Argument tokens shortcuts.
- *
- * @author Konstantin Kudryashov
- */
-class Argument
-{
- /**
- * Checks that argument is exact value or object.
- *
- * @param mixed $value
- *
- * @return Token\ExactValueToken
- */
- public static function exact($value)
- {
- return new Token\ExactValueToken($value);
- }
-
- /**
- * Checks that argument is of specific type or instance of specific class.
- *
- * @param string $type Type name (`integer`, `string`) or full class name
- *
- * @return Token\TypeToken
- */
- public static function type($type)
- {
- return new Token\TypeToken($type);
- }
-
- /**
- * Checks that argument object has specific state.
- *
- * @param string $methodName
- * @param mixed $value
- *
- * @return Token\ObjectStateToken
- */
- public static function which($methodName, $value)
- {
- return new Token\ObjectStateToken($methodName, $value);
- }
-
- /**
- * Checks that argument matches provided callback.
- *
- * @param callable $callback
- *
- * @return Token\CallbackToken
- */
- public static function that($callback)
- {
- return new Token\CallbackToken($callback);
- }
-
- /**
- * Matches any single value.
- *
- * @return Token\AnyValueToken
- */
- public static function any()
- {
- return new Token\AnyValueToken;
- }
-
- /**
- * Matches all values to the rest of the signature.
- *
- * @return Token\AnyValuesToken
- */
- public static function cetera()
- {
- return new Token\AnyValuesToken;
- }
-
- /**
- * Checks that argument matches all tokens
- *
- * @param mixed ... a list of tokens
- *
- * @return Token\LogicalAndToken
- */
- public static function allOf()
- {
- return new Token\LogicalAndToken(func_get_args());
- }
-
- /**
- * Checks that argument array or countable object has exact number of elements.
- *
- * @param integer $value array elements count
- *
- * @return Token\ArrayCountToken
- */
- public static function size($value)
- {
- return new Token\ArrayCountToken($value);
- }
-
- /**
- * Checks that argument array contains (key, value) pair
- *
- * @param mixed $key exact value or token
- * @param mixed $value exact value or token
- *
- * @return Token\ArrayEntryToken
- */
- public static function withEntry($key, $value)
- {
- return new Token\ArrayEntryToken($key, $value);
- }
-
- /**
- * Checks that arguments array entries all match value
- *
- * @param mixed $value
- *
- * @return Token\ArrayEveryEntryToken
- */
- public static function withEveryEntry($value)
- {
- return new Token\ArrayEveryEntryToken($value);
- }
-
- /**
- * Checks that argument array contains value
- *
- * @param mixed $value
- *
- * @return Token\ArrayEntryToken
- */
- public static function containing($value)
- {
- return new Token\ArrayEntryToken(self::any(), $value);
- }
-
- /**
- * Checks that argument array has key
- *
- * @param mixed $key exact value or token
- *
- * @return Token\ArrayEntryToken
- */
- public static function withKey($key)
- {
- return new Token\ArrayEntryToken($key, self::any());
- }
-
- /**
- * Checks that argument does not match the value|token.
- *
- * @param mixed $value either exact value or argument token
- *
- * @return Token\LogicalNotToken
- */
- public static function not($value)
- {
- return new Token\LogicalNotToken($value);
- }
-
- /**
- * @param string $value
- *
- * @return Token\StringContainsToken
- */
- public static function containingString($value)
- {
- return new Token\StringContainsToken($value);
- }
-
- /**
- * Checks that argument is identical value.
- *
- * @param mixed $value
- *
- * @return Token\IdenticalValueToken
- */
- public static function is($value)
- {
- return new Token\IdenticalValueToken($value);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/ArgumentsWildcard.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/ArgumentsWildcard.php
deleted file mode 100644
index a088f21d..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/ArgumentsWildcard.php
+++ /dev/null
@@ -1,101 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Argument;
-
-/**
- * Arguments wildcarding.
- *
- * @author Konstantin Kudryashov
- */
-class ArgumentsWildcard
-{
- /**
- * @var Token\TokenInterface[]
- */
- private $tokens = array();
- private $string;
-
- /**
- * Initializes wildcard.
- *
- * @param array $arguments Array of argument tokens or values
- */
- public function __construct(array $arguments)
- {
- foreach ($arguments as $argument) {
- if (!$argument instanceof Token\TokenInterface) {
- $argument = new Token\ExactValueToken($argument);
- }
-
- $this->tokens[] = $argument;
- }
- }
-
- /**
- * Calculates wildcard match score for provided arguments.
- *
- * @param array $arguments
- *
- * @return false|int False OR integer score (higher - better)
- */
- public function scoreArguments(array $arguments)
- {
- if (0 == count($arguments) && 0 == count($this->tokens)) {
- return 1;
- }
-
- $arguments = array_values($arguments);
- $totalScore = 0;
- foreach ($this->tokens as $i => $token) {
- $argument = isset($arguments[$i]) ? $arguments[$i] : null;
- if (1 >= $score = $token->scoreArgument($argument)) {
- return false;
- }
-
- $totalScore += $score;
-
- if (true === $token->isLast()) {
- return $totalScore;
- }
- }
-
- if (count($arguments) > count($this->tokens)) {
- return false;
- }
-
- return $totalScore;
- }
-
- /**
- * Returns string representation for wildcard.
- *
- * @return string
- */
- public function __toString()
- {
- if (null === $this->string) {
- $this->string = implode(', ', array_map(function ($token) {
- return (string) $token;
- }, $this->tokens));
- }
-
- return $this->string;
- }
-
- /**
- * @return array
- */
- public function getTokens()
- {
- return $this->tokens;
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValueToken.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValueToken.php
deleted file mode 100644
index 50988112..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValueToken.php
+++ /dev/null
@@ -1,52 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Argument\Token;
-
-/**
- * Any single value token.
- *
- * @author Konstantin Kudryashov
- */
-class AnyValueToken implements TokenInterface
-{
- /**
- * Always scores 3 for any argument.
- *
- * @param $argument
- *
- * @return int
- */
- public function scoreArgument($argument)
- {
- return 3;
- }
-
- /**
- * Returns false.
- *
- * @return bool
- */
- public function isLast()
- {
- return false;
- }
-
- /**
- * Returns string representation for token.
- *
- * @return string
- */
- public function __toString()
- {
- return '*';
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValuesToken.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValuesToken.php
deleted file mode 100644
index f76b17bc..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValuesToken.php
+++ /dev/null
@@ -1,52 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Argument\Token;
-
-/**
- * Any values token.
- *
- * @author Konstantin Kudryashov
- */
-class AnyValuesToken implements TokenInterface
-{
- /**
- * Always scores 2 for any argument.
- *
- * @param $argument
- *
- * @return int
- */
- public function scoreArgument($argument)
- {
- return 2;
- }
-
- /**
- * Returns true to stop wildcard from processing other tokens.
- *
- * @return bool
- */
- public function isLast()
- {
- return true;
- }
-
- /**
- * Returns string representation for token.
- *
- * @return string
- */
- public function __toString()
- {
- return '* [, ...]';
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayCountToken.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayCountToken.php
deleted file mode 100644
index 96b4befd..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayCountToken.php
+++ /dev/null
@@ -1,86 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Argument\Token;
-
-/**
- * Array elements count token.
- *
- * @author Boris Mikhaylov
- */
-
-class ArrayCountToken implements TokenInterface
-{
- private $count;
-
- /**
- * @param integer $value
- */
- public function __construct($value)
- {
- $this->count = $value;
- }
-
- /**
- * Scores 6 when argument has preset number of elements.
- *
- * @param $argument
- *
- * @return bool|int
- */
- public function scoreArgument($argument)
- {
- return $this->isCountable($argument) && $this->hasProperCount($argument) ? 6 : false;
- }
-
- /**
- * Returns false.
- *
- * @return boolean
- */
- public function isLast()
- {
- return false;
- }
-
- /**
- * Returns string representation for token.
- *
- * @return string
- */
- public function __toString()
- {
- return sprintf('count(%s)', $this->count);
- }
-
- /**
- * Returns true if object is either array or instance of \Countable
- *
- * @param $argument
- * @return bool
- */
- private function isCountable($argument)
- {
- return (is_array($argument) || $argument instanceof \Countable);
- }
-
- /**
- * Returns true if $argument has expected number of elements
- *
- * @param array|\Countable $argument
- *
- * @return bool
- */
- private function hasProperCount($argument)
- {
- return $this->count === count($argument);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEntryToken.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEntryToken.php
deleted file mode 100644
index 0305fc72..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEntryToken.php
+++ /dev/null
@@ -1,143 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Argument\Token;
-
-use Prophecy\Exception\InvalidArgumentException;
-
-/**
- * Array entry token.
- *
- * @author Boris Mikhaylov
- */
-class ArrayEntryToken implements TokenInterface
-{
- /** @var \Prophecy\Argument\Token\TokenInterface */
- private $key;
- /** @var \Prophecy\Argument\Token\TokenInterface */
- private $value;
-
- /**
- * @param mixed $key exact value or token
- * @param mixed $value exact value or token
- */
- public function __construct($key, $value)
- {
- $this->key = $this->wrapIntoExactValueToken($key);
- $this->value = $this->wrapIntoExactValueToken($value);
- }
-
- /**
- * Scores half of combined scores from key and value tokens for same entry. Capped at 8.
- * If argument implements \ArrayAccess without \Traversable, then key token is restricted to ExactValueToken.
- *
- * @param array|\ArrayAccess|\Traversable $argument
- *
- * @throws \Prophecy\Exception\InvalidArgumentException
- * @return bool|int
- */
- public function scoreArgument($argument)
- {
- if ($argument instanceof \Traversable) {
- $argument = iterator_to_array($argument);
- }
-
- if ($argument instanceof \ArrayAccess) {
- $argument = $this->convertArrayAccessToEntry($argument);
- }
-
- if (!is_array($argument) || empty($argument)) {
- return false;
- }
-
- $keyScores = array_map(array($this->key,'scoreArgument'), array_keys($argument));
- $valueScores = array_map(array($this->value,'scoreArgument'), $argument);
- $scoreEntry = function ($value, $key) {
- return $value && $key ? min(8, ($key + $value) / 2) : false;
- };
-
- return max(array_map($scoreEntry, $valueScores, $keyScores));
- }
-
- /**
- * Returns false.
- *
- * @return boolean
- */
- public function isLast()
- {
- return false;
- }
-
- /**
- * Returns string representation for token.
- *
- * @return string
- */
- public function __toString()
- {
- return sprintf('[..., %s => %s, ...]', $this->key, $this->value);
- }
-
- /**
- * Returns key
- *
- * @return TokenInterface
- */
- public function getKey()
- {
- return $this->key;
- }
-
- /**
- * Returns value
- *
- * @return TokenInterface
- */
- public function getValue()
- {
- return $this->value;
- }
-
- /**
- * Wraps non token $value into ExactValueToken
- *
- * @param $value
- * @return TokenInterface
- */
- private function wrapIntoExactValueToken($value)
- {
- return $value instanceof TokenInterface ? $value : new ExactValueToken($value);
- }
-
- /**
- * Converts instance of \ArrayAccess to key => value array entry
- *
- * @param \ArrayAccess $object
- *
- * @return array|null
- * @throws \Prophecy\Exception\InvalidArgumentException
- */
- private function convertArrayAccessToEntry(\ArrayAccess $object)
- {
- if (!$this->key instanceof ExactValueToken) {
- throw new InvalidArgumentException(sprintf(
- 'You can only use exact value tokens to match key of ArrayAccess object'.PHP_EOL.
- 'But you used `%s`.',
- $this->key
- ));
- }
-
- $key = $this->key->getValue();
-
- return $object->offsetExists($key) ? array($key => $object[$key]) : array();
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEveryEntryToken.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEveryEntryToken.php
deleted file mode 100644
index 5d41fa48..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEveryEntryToken.php
+++ /dev/null
@@ -1,82 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Argument\Token;
-
-/**
- * Array every entry token.
- *
- * @author Adrien Brault
- */
-class ArrayEveryEntryToken implements TokenInterface
-{
- /**
- * @var TokenInterface
- */
- private $value;
-
- /**
- * @param mixed $value exact value or token
- */
- public function __construct($value)
- {
- if (!$value instanceof TokenInterface) {
- $value = new ExactValueToken($value);
- }
-
- $this->value = $value;
- }
-
- /**
- * {@inheritdoc}
- */
- public function scoreArgument($argument)
- {
- if (!$argument instanceof \Traversable && !is_array($argument)) {
- return false;
- }
-
- $scores = array();
- foreach ($argument as $key => $argumentEntry) {
- $scores[] = $this->value->scoreArgument($argumentEntry);
- }
-
- if (empty($scores) || in_array(false, $scores, true)) {
- return false;
- }
-
- return array_sum($scores) / count($scores);
- }
-
- /**
- * {@inheritdoc}
- */
- public function isLast()
- {
- return false;
- }
-
- /**
- * {@inheritdoc}
- */
- public function __toString()
- {
- return sprintf('[%s, ..., %s]', $this->value, $this->value);
- }
-
- /**
- * @return TokenInterface
- */
- public function getValue()
- {
- return $this->value;
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/CallbackToken.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/CallbackToken.php
deleted file mode 100644
index f45ba20b..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/CallbackToken.php
+++ /dev/null
@@ -1,75 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Argument\Token;
-
-use Prophecy\Exception\InvalidArgumentException;
-
-/**
- * Callback-verified token.
- *
- * @author Konstantin Kudryashov
- */
-class CallbackToken implements TokenInterface
-{
- private $callback;
-
- /**
- * Initializes token.
- *
- * @param callable $callback
- *
- * @throws \Prophecy\Exception\InvalidArgumentException
- */
- public function __construct($callback)
- {
- if (!is_callable($callback)) {
- throw new InvalidArgumentException(sprintf(
- 'Callable expected as an argument to CallbackToken, but got %s.',
- gettype($callback)
- ));
- }
-
- $this->callback = $callback;
- }
-
- /**
- * Scores 7 if callback returns true, false otherwise.
- *
- * @param $argument
- *
- * @return bool|int
- */
- public function scoreArgument($argument)
- {
- return call_user_func($this->callback, $argument) ? 7 : false;
- }
-
- /**
- * Returns false.
- *
- * @return bool
- */
- public function isLast()
- {
- return false;
- }
-
- /**
- * Returns string representation for token.
- *
- * @return string
- */
- public function __toString()
- {
- return 'callback()';
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ExactValueToken.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ExactValueToken.php
deleted file mode 100644
index aa960f3f..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ExactValueToken.php
+++ /dev/null
@@ -1,116 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Argument\Token;
-
-use SebastianBergmann\Comparator\ComparisonFailure;
-use Prophecy\Comparator\Factory as ComparatorFactory;
-use Prophecy\Util\StringUtil;
-
-/**
- * Exact value token.
- *
- * @author Konstantin Kudryashov
- */
-class ExactValueToken implements TokenInterface
-{
- private $value;
- private $string;
- private $util;
- private $comparatorFactory;
-
- /**
- * Initializes token.
- *
- * @param mixed $value
- * @param StringUtil $util
- * @param ComparatorFactory $comparatorFactory
- */
- public function __construct($value, StringUtil $util = null, ComparatorFactory $comparatorFactory = null)
- {
- $this->value = $value;
- $this->util = $util ?: new StringUtil();
-
- $this->comparatorFactory = $comparatorFactory ?: ComparatorFactory::getInstance();
- }
-
- /**
- * Scores 10 if argument matches preset value.
- *
- * @param $argument
- *
- * @return bool|int
- */
- public function scoreArgument($argument)
- {
- if (is_object($argument) && is_object($this->value)) {
- $comparator = $this->comparatorFactory->getComparatorFor(
- $argument, $this->value
- );
-
- try {
- $comparator->assertEquals($argument, $this->value);
- return 10;
- } catch (ComparisonFailure $failure) {}
- }
-
- // If either one is an object it should be castable to a string
- if (is_object($argument) xor is_object($this->value)) {
- if (is_object($argument) && !method_exists($argument, '__toString')) {
- return false;
- }
-
- if (is_object($this->value) && !method_exists($this->value, '__toString')) {
- return false;
- }
- } elseif (is_numeric($argument) && is_numeric($this->value)) {
- // noop
- } elseif (gettype($argument) !== gettype($this->value)) {
- return false;
- }
-
- return $argument == $this->value ? 10 : false;
- }
-
- /**
- * Returns preset value against which token checks arguments.
- *
- * @return mixed
- */
- public function getValue()
- {
- return $this->value;
- }
-
- /**
- * Returns false.
- *
- * @return bool
- */
- public function isLast()
- {
- return false;
- }
-
- /**
- * Returns string representation for token.
- *
- * @return string
- */
- public function __toString()
- {
- if (null === $this->string) {
- $this->string = sprintf('exact(%s)', $this->util->stringify($this->value));
- }
-
- return $this->string;
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/IdenticalValueToken.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/IdenticalValueToken.php
deleted file mode 100644
index 0b6d23ab..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/IdenticalValueToken.php
+++ /dev/null
@@ -1,74 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Argument\Token;
-
-use Prophecy\Util\StringUtil;
-
-/**
- * Identical value token.
- *
- * @author Florian Voutzinos
- */
-class IdenticalValueToken implements TokenInterface
-{
- private $value;
- private $string;
- private $util;
-
- /**
- * Initializes token.
- *
- * @param mixed $value
- * @param StringUtil $util
- */
- public function __construct($value, StringUtil $util = null)
- {
- $this->value = $value;
- $this->util = $util ?: new StringUtil();
- }
-
- /**
- * Scores 11 if argument matches preset value.
- *
- * @param $argument
- *
- * @return bool|int
- */
- public function scoreArgument($argument)
- {
- return $argument === $this->value ? 11 : false;
- }
-
- /**
- * Returns false.
- *
- * @return bool
- */
- public function isLast()
- {
- return false;
- }
-
- /**
- * Returns string representation for token.
- *
- * @return string
- */
- public function __toString()
- {
- if (null === $this->string) {
- $this->string = sprintf('identical(%s)', $this->util->stringify($this->value));
- }
-
- return $this->string;
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalAndToken.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalAndToken.php
deleted file mode 100644
index 4ee1b25e..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalAndToken.php
+++ /dev/null
@@ -1,80 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Argument\Token;
-
-/**
- * Logical AND token.
- *
- * @author Boris Mikhaylov
- */
-class LogicalAndToken implements TokenInterface
-{
- private $tokens = array();
-
- /**
- * @param array $arguments exact values or tokens
- */
- public function __construct(array $arguments)
- {
- foreach ($arguments as $argument) {
- if (!$argument instanceof TokenInterface) {
- $argument = new ExactValueToken($argument);
- }
- $this->tokens[] = $argument;
- }
- }
-
- /**
- * Scores maximum score from scores returned by tokens for this argument if all of them score.
- *
- * @param $argument
- *
- * @return bool|int
- */
- public function scoreArgument($argument)
- {
- if (0 === count($this->tokens)) {
- return false;
- }
-
- $maxScore = 0;
- foreach ($this->tokens as $token) {
- $score = $token->scoreArgument($argument);
- if (false === $score) {
- return false;
- }
- $maxScore = max($score, $maxScore);
- }
-
- return $maxScore;
- }
-
- /**
- * Returns false.
- *
- * @return boolean
- */
- public function isLast()
- {
- return false;
- }
-
- /**
- * Returns string representation for token.
- *
- * @return string
- */
- public function __toString()
- {
- return sprintf('bool(%s)', implode(' AND ', $this->tokens));
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalNotToken.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalNotToken.php
deleted file mode 100644
index 623efa57..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalNotToken.php
+++ /dev/null
@@ -1,73 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Argument\Token;
-
-/**
- * Logical NOT token.
- *
- * @author Boris Mikhaylov
- */
-class LogicalNotToken implements TokenInterface
-{
- /** @var \Prophecy\Argument\Token\TokenInterface */
- private $token;
-
- /**
- * @param mixed $value exact value or token
- */
- public function __construct($value)
- {
- $this->token = $value instanceof TokenInterface? $value : new ExactValueToken($value);
- }
-
- /**
- * Scores 4 when preset token does not match the argument.
- *
- * @param $argument
- *
- * @return bool|int
- */
- public function scoreArgument($argument)
- {
- return false === $this->token->scoreArgument($argument) ? 4 : false;
- }
-
- /**
- * Returns true if preset token is last.
- *
- * @return bool|int
- */
- public function isLast()
- {
- return $this->token->isLast();
- }
-
- /**
- * Returns originating token.
- *
- * @return TokenInterface
- */
- public function getOriginatingToken()
- {
- return $this->token;
- }
-
- /**
- * Returns string representation for token.
- *
- * @return string
- */
- public function __toString()
- {
- return sprintf('not(%s)', $this->token);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ObjectStateToken.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ObjectStateToken.php
deleted file mode 100644
index 8d93bfd6..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ObjectStateToken.php
+++ /dev/null
@@ -1,104 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Argument\Token;
-
-use SebastianBergmann\Comparator\ComparisonFailure;
-use Prophecy\Comparator\Factory as ComparatorFactory;
-use Prophecy\Util\StringUtil;
-
-/**
- * Object state-checker token.
- *
- * @author Konstantin Kudryashov
- */
-class ObjectStateToken implements TokenInterface
-{
- private $name;
- private $value;
- private $util;
- private $comparatorFactory;
-
- /**
- * Initializes token.
- *
- * @param string $methodName
- * @param mixed $value Expected return value
- * @param null|StringUtil $util
- * @param ComparatorFactory $comparatorFactory
- */
- public function __construct(
- $methodName,
- $value,
- StringUtil $util = null,
- ComparatorFactory $comparatorFactory = null
- ) {
- $this->name = $methodName;
- $this->value = $value;
- $this->util = $util ?: new StringUtil;
-
- $this->comparatorFactory = $comparatorFactory ?: ComparatorFactory::getInstance();
- }
-
- /**
- * Scores 8 if argument is an object, which method returns expected value.
- *
- * @param mixed $argument
- *
- * @return bool|int
- */
- public function scoreArgument($argument)
- {
- if (is_object($argument) && method_exists($argument, $this->name)) {
- $actual = call_user_func(array($argument, $this->name));
-
- $comparator = $this->comparatorFactory->getComparatorFor(
- $actual, $this->value
- );
-
- try {
- $comparator->assertEquals($actual, $this->value);
- return 8;
- } catch (ComparisonFailure $failure) {
- return false;
- }
- }
-
- if (is_object($argument) && property_exists($argument, $this->name)) {
- return $argument->{$this->name} === $this->value ? 8 : false;
- }
-
- return false;
- }
-
- /**
- * Returns false.
- *
- * @return bool
- */
- public function isLast()
- {
- return false;
- }
-
- /**
- * Returns string representation for token.
- *
- * @return string
- */
- public function __toString()
- {
- return sprintf('state(%s(), %s)',
- $this->name,
- $this->util->stringify($this->value)
- );
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/StringContainsToken.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/StringContainsToken.php
deleted file mode 100644
index 24ff8c2e..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/StringContainsToken.php
+++ /dev/null
@@ -1,67 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Argument\Token;
-
-/**
- * String contains token.
- *
- * @author Peter Mitchell
- */
-class StringContainsToken implements TokenInterface
-{
- private $value;
-
- /**
- * Initializes token.
- *
- * @param string $value
- */
- public function __construct($value)
- {
- $this->value = $value;
- }
-
- public function scoreArgument($argument)
- {
- return strpos($argument, $this->value) !== false ? 6 : false;
- }
-
- /**
- * Returns preset value against which token checks arguments.
- *
- * @return mixed
- */
- public function getValue()
- {
- return $this->value;
- }
-
- /**
- * Returns false.
- *
- * @return bool
- */
- public function isLast()
- {
- return false;
- }
-
- /**
- * Returns string representation for token.
- *
- * @return string
- */
- public function __toString()
- {
- return sprintf('contains("%s")', $this->value);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TokenInterface.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TokenInterface.php
deleted file mode 100644
index 625d3bad..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TokenInterface.php
+++ /dev/null
@@ -1,43 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Argument\Token;
-
-/**
- * Argument token interface.
- *
- * @author Konstantin Kudryashov
- */
-interface TokenInterface
-{
- /**
- * Calculates token match score for provided argument.
- *
- * @param $argument
- *
- * @return bool|int
- */
- public function scoreArgument($argument);
-
- /**
- * Returns true if this token prevents check of other tokens (is last one).
- *
- * @return bool|int
- */
- public function isLast();
-
- /**
- * Returns string representation for token.
- *
- * @return string
- */
- public function __toString();
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TypeToken.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TypeToken.php
deleted file mode 100644
index cb65132c..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TypeToken.php
+++ /dev/null
@@ -1,76 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Argument\Token;
-
-use Prophecy\Exception\InvalidArgumentException;
-
-/**
- * Value type token.
- *
- * @author Konstantin Kudryashov
- */
-class TypeToken implements TokenInterface
-{
- private $type;
-
- /**
- * @param string $type
- */
- public function __construct($type)
- {
- $checker = "is_{$type}";
- if (!function_exists($checker) && !interface_exists($type) && !class_exists($type)) {
- throw new InvalidArgumentException(sprintf(
- 'Type or class name expected as an argument to TypeToken, but got %s.', $type
- ));
- }
-
- $this->type = $type;
- }
-
- /**
- * Scores 5 if argument has the same type this token was constructed with.
- *
- * @param $argument
- *
- * @return bool|int
- */
- public function scoreArgument($argument)
- {
- $checker = "is_{$this->type}";
- if (function_exists($checker)) {
- return call_user_func($checker, $argument) ? 5 : false;
- }
-
- return $argument instanceof $this->type ? 5 : false;
- }
-
- /**
- * Returns false.
- *
- * @return bool
- */
- public function isLast()
- {
- return false;
- }
-
- /**
- * Returns string representation for token.
- *
- * @return string
- */
- public function __toString()
- {
- return sprintf('type(%s)', $this->type);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Call/Call.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Call/Call.php
deleted file mode 100644
index 2f3fbadb..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Call/Call.php
+++ /dev/null
@@ -1,127 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Call;
-
-use Exception;
-
-/**
- * Call object.
- *
- * @author Konstantin Kudryashov
- */
-class Call
-{
- private $methodName;
- private $arguments;
- private $returnValue;
- private $exception;
- private $file;
- private $line;
-
- /**
- * Initializes call.
- *
- * @param string $methodName
- * @param array $arguments
- * @param mixed $returnValue
- * @param Exception $exception
- * @param null|string $file
- * @param null|int $line
- */
- public function __construct($methodName, array $arguments, $returnValue,
- Exception $exception = null, $file, $line)
- {
- $this->methodName = $methodName;
- $this->arguments = $arguments;
- $this->returnValue = $returnValue;
- $this->exception = $exception;
-
- if ($file) {
- $this->file = $file;
- $this->line = intval($line);
- }
- }
-
- /**
- * Returns called method name.
- *
- * @return string
- */
- public function getMethodName()
- {
- return $this->methodName;
- }
-
- /**
- * Returns called method arguments.
- *
- * @return array
- */
- public function getArguments()
- {
- return $this->arguments;
- }
-
- /**
- * Returns called method return value.
- *
- * @return null|mixed
- */
- public function getReturnValue()
- {
- return $this->returnValue;
- }
-
- /**
- * Returns exception that call thrown.
- *
- * @return null|Exception
- */
- public function getException()
- {
- return $this->exception;
- }
-
- /**
- * Returns callee filename.
- *
- * @return string
- */
- public function getFile()
- {
- return $this->file;
- }
-
- /**
- * Returns callee line number.
- *
- * @return int
- */
- public function getLine()
- {
- return $this->line;
- }
-
- /**
- * Returns short notation for callee place.
- *
- * @return string
- */
- public function getCallPlace()
- {
- if (null === $this->file) {
- return 'unknown';
- }
-
- return sprintf('%s:%d', $this->file, $this->line);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php
deleted file mode 100644
index 74958551..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php
+++ /dev/null
@@ -1,152 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Call;
-
-use Prophecy\Prophecy\MethodProphecy;
-use Prophecy\Prophecy\ObjectProphecy;
-use Prophecy\Argument\ArgumentsWildcard;
-use Prophecy\Util\StringUtil;
-use Prophecy\Exception\Call\UnexpectedCallException;
-
-/**
- * Calls receiver & manager.
- *
- * @author Konstantin Kudryashov
- */
-class CallCenter
-{
- private $util;
-
- /**
- * @var Call[]
- */
- private $recordedCalls = array();
-
- /**
- * Initializes call center.
- *
- * @param StringUtil $util
- */
- public function __construct(StringUtil $util = null)
- {
- $this->util = $util ?: new StringUtil;
- }
-
- /**
- * Makes and records specific method call for object prophecy.
- *
- * @param ObjectProphecy $prophecy
- * @param string $methodName
- * @param array $arguments
- *
- * @return mixed Returns null if no promise for prophecy found or promise return value.
- *
- * @throws \Prophecy\Exception\Call\UnexpectedCallException If no appropriate method prophecy found
- */
- public function makeCall(ObjectProphecy $prophecy, $methodName, array $arguments)
- {
- $backtrace = debug_backtrace();
-
- $file = $line = null;
- if (isset($backtrace[2]) && isset($backtrace[2]['file'])) {
- $file = $backtrace[2]['file'];
- $line = $backtrace[2]['line'];
- }
-
- // If no method prophecies defined, then it's a dummy, so we'll just return null
- if ('__destruct' === $methodName || 0 == count($prophecy->getMethodProphecies())) {
- $this->recordedCalls[] = new Call($methodName, $arguments, null, null, $file, $line);
-
- return null;
- }
-
- // There are method prophecies, so it's a fake/stub. Searching prophecy for this call
- $matches = array();
- foreach ($prophecy->getMethodProphecies($methodName) as $methodProphecy) {
- if (0 < $score = $methodProphecy->getArgumentsWildcard()->scoreArguments($arguments)) {
- $matches[] = array($score, $methodProphecy);
- }
- }
-
- // If fake/stub doesn't have method prophecy for this call - throw exception
- if (!count($matches)) {
- throw $this->createUnexpectedCallException($prophecy, $methodName, $arguments);
- }
-
- // Sort matches by their score value
- @usort($matches, function ($match1, $match2) { return $match2[0] - $match1[0]; });
-
- // If Highest rated method prophecy has a promise - execute it or return null instead
- $returnValue = null;
- $exception = null;
- if ($promise = $matches[0][1]->getPromise()) {
- try {
- $returnValue = $promise->execute($arguments, $prophecy, $matches[0][1]);
- } catch (\Exception $e) {
- $exception = $e;
- }
- }
-
- $this->recordedCalls[] = new Call(
- $methodName, $arguments, $returnValue, $exception, $file, $line
- );
-
- if (null !== $exception) {
- throw $exception;
- }
-
- return $returnValue;
- }
-
- /**
- * Searches for calls by method name & arguments wildcard.
- *
- * @param string $methodName
- * @param ArgumentsWildcard $wildcard
- *
- * @return Call[]
- */
- public function findCalls($methodName, ArgumentsWildcard $wildcard)
- {
- return array_values(
- array_filter($this->recordedCalls, function (Call $call) use ($methodName, $wildcard) {
- return $methodName === $call->getMethodName()
- && 0 < $wildcard->scoreArguments($call->getArguments())
- ;
- })
- );
- }
-
- private function createUnexpectedCallException(ObjectProphecy $prophecy, $methodName,
- array $arguments)
- {
- $classname = get_class($prophecy->reveal());
- $argstring = implode(', ', array_map(array($this->util, 'stringify'), $arguments));
- $expected = implode("\n", array_map(function (MethodProphecy $methodProphecy) {
- return sprintf(' - %s(%s)',
- $methodProphecy->getMethodName(),
- $methodProphecy->getArgumentsWildcard()
- );
- }, call_user_func_array('array_merge', $prophecy->getMethodProphecies())));
-
- return new UnexpectedCallException(
- sprintf(
- "Method call:\n".
- " - %s(%s)\n".
- "on %s was not expected, expected calls were:\n%s",
-
- $methodName, $argstring, $classname, $expected
- ),
- $prophecy, $methodName, $arguments
- );
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Comparator/ClosureComparator.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Comparator/ClosureComparator.php
deleted file mode 100644
index 874e474c..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Comparator/ClosureComparator.php
+++ /dev/null
@@ -1,42 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Comparator;
-
-use SebastianBergmann\Comparator\Comparator;
-use SebastianBergmann\Comparator\ComparisonFailure;
-
-/**
- * Closure comparator.
- *
- * @author Konstantin Kudryashov
- */
-final class ClosureComparator extends Comparator
-{
- public function accepts($expected, $actual)
- {
- return is_object($expected) && $expected instanceof \Closure
- && is_object($actual) && $actual instanceof \Closure;
- }
-
- public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false)
- {
- throw new ComparisonFailure(
- $expected,
- $actual,
- // we don't need a diff
- '',
- '',
- false,
- 'all closures are born different'
- );
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Comparator/Factory.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Comparator/Factory.php
deleted file mode 100644
index a7a12001..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Comparator/Factory.php
+++ /dev/null
@@ -1,46 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Comparator;
-
-use SebastianBergmann\Comparator\Factory as BaseFactory;
-
-/**
- * Prophecy comparator factory.
- *
- * @author Konstantin Kudryashov
- */
-final class Factory extends BaseFactory
-{
- /**
- * @var Factory
- */
- private static $instance;
-
- public function __construct()
- {
- parent::__construct();
-
- $this->register(new ClosureComparator());
- }
-
- /**
- * @return Factory
- */
- public static function getInstance()
- {
- if (self::$instance === null) {
- self::$instance = new Factory;
- }
-
- return self::$instance;
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php
deleted file mode 100644
index d6b6b1a9..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php
+++ /dev/null
@@ -1,68 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Doubler;
-
-use ReflectionClass;
-
-/**
- * Cached class doubler.
- * Prevents mirroring/creation of the same structure twice.
- *
- * @author Konstantin Kudryashov
- */
-class CachedDoubler extends Doubler
-{
- private $classes = array();
-
- /**
- * {@inheritdoc}
- */
- public function registerClassPatch(ClassPatch\ClassPatchInterface $patch)
- {
- $this->classes[] = array();
-
- parent::registerClassPatch($patch);
- }
-
- /**
- * {@inheritdoc}
- */
- protected function createDoubleClass(ReflectionClass $class = null, array $interfaces)
- {
- $classId = $this->generateClassId($class, $interfaces);
- if (isset($this->classes[$classId])) {
- return $this->classes[$classId];
- }
-
- return $this->classes[$classId] = parent::createDoubleClass($class, $interfaces);
- }
-
- /**
- * @param ReflectionClass $class
- * @param ReflectionClass[] $interfaces
- *
- * @return string
- */
- private function generateClassId(ReflectionClass $class = null, array $interfaces)
- {
- $parts = array();
- if (null !== $class) {
- $parts[] = $class->getName();
- }
- foreach ($interfaces as $interface) {
- $parts[] = $interface->getName();
- }
- sort($parts);
-
- return md5(implode('', $parts));
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ClassPatchInterface.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ClassPatchInterface.php
deleted file mode 100644
index d6d19685..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ClassPatchInterface.php
+++ /dev/null
@@ -1,48 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Doubler\ClassPatch;
-
-use Prophecy\Doubler\Generator\Node\ClassNode;
-
-/**
- * Class patch interface.
- * Class patches extend doubles functionality or help
- * Prophecy to avoid some internal PHP bugs.
- *
- * @author Konstantin Kudryashov
- */
-interface ClassPatchInterface
-{
- /**
- * Checks if patch supports specific class node.
- *
- * @param ClassNode $node
- *
- * @return bool
- */
- public function supports(ClassNode $node);
-
- /**
- * Applies patch to the specific class node.
- *
- * @param ClassNode $node
- * @return void
- */
- public function apply(ClassNode $node);
-
- /**
- * Returns patch priority, which determines when patch will be applied.
- *
- * @return int Priority number (higher - earlier)
- */
- public function getPriority();
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php
deleted file mode 100644
index 61998fc4..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php
+++ /dev/null
@@ -1,72 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Doubler\ClassPatch;
-
-use Prophecy\Doubler\Generator\Node\ClassNode;
-use Prophecy\Doubler\Generator\Node\MethodNode;
-
-/**
- * Disable constructor.
- * Makes all constructor arguments optional.
- *
- * @author Konstantin Kudryashov
- */
-class DisableConstructorPatch implements ClassPatchInterface
-{
- /**
- * Checks if class has `__construct` method.
- *
- * @param ClassNode $node
- *
- * @return bool
- */
- public function supports(ClassNode $node)
- {
- return true;
- }
-
- /**
- * Makes all class constructor arguments optional.
- *
- * @param ClassNode $node
- */
- public function apply(ClassNode $node)
- {
- if (!$node->hasMethod('__construct')) {
- $node->addMethod(new MethodNode('__construct', ''));
-
- return;
- }
-
- $constructor = $node->getMethod('__construct');
- foreach ($constructor->getArguments() as $argument) {
- $argument->setDefault(null);
- }
-
- $constructor->setCode(<<
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Doubler\ClassPatch;
-
-use Prophecy\Doubler\Generator\Node\ClassNode;
-
-/**
- * Exception patch for HHVM to remove the stubs from special methods
- *
- * @author Christophe Coevoet
- */
-class HhvmExceptionPatch implements ClassPatchInterface
-{
- /**
- * Supports exceptions on HHVM.
- *
- * @param ClassNode $node
- *
- * @return bool
- */
- public function supports(ClassNode $node)
- {
- if (!defined('HHVM_VERSION')) {
- return false;
- }
-
- return 'Exception' === $node->getParentClass() || is_subclass_of($node->getParentClass(), 'Exception');
- }
-
- /**
- * Removes special exception static methods from the doubled methods.
- *
- * @param ClassNode $node
- *
- * @return void
- */
- public function apply(ClassNode $node)
- {
- if ($node->hasMethod('setTraceOptions')) {
- $node->getMethod('setTraceOptions')->useParentCode();
- }
- if ($node->hasMethod('getTraceOptions')) {
- $node->getMethod('getTraceOptions')->useParentCode();
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function getPriority()
- {
- return -50;
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/KeywordPatch.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/KeywordPatch.php
deleted file mode 100644
index b0d9793a..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/KeywordPatch.php
+++ /dev/null
@@ -1,135 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Doubler\ClassPatch;
-
-use Prophecy\Doubler\Generator\Node\ClassNode;
-
-/**
- * Remove method functionality from the double which will clash with php keywords.
- *
- * @author Milan Magudia
- */
-class KeywordPatch implements ClassPatchInterface
-{
- /**
- * Support any class
- *
- * @param ClassNode $node
- *
- * @return boolean
- */
- public function supports(ClassNode $node)
- {
- return true;
- }
-
- /**
- * Remove methods that clash with php keywords
- *
- * @param ClassNode $node
- */
- public function apply(ClassNode $node)
- {
- $methodNames = array_keys($node->getMethods());
- $methodsToRemove = array_intersect($methodNames, $this->getKeywords());
- foreach ($methodsToRemove as $methodName) {
- $node->removeMethod($methodName);
- }
- }
-
- /**
- * Returns patch priority, which determines when patch will be applied.
- *
- * @return int Priority number (higher - earlier)
- */
- public function getPriority() {
- return 49;
- }
-
- /**
- * Returns array of php keywords.
- *
- * @return array
- */
- private function getKeywords() {
-
- return array(
- '__halt_compiler',
- 'abstract',
- 'and',
- 'array',
- 'as',
- 'break',
- 'callable',
- 'case',
- 'catch',
- 'class',
- 'clone',
- 'const',
- 'continue',
- 'declare',
- 'default',
- 'die',
- 'do',
- 'echo',
- 'else',
- 'elseif',
- 'empty',
- 'enddeclare',
- 'endfor',
- 'endforeach',
- 'endif',
- 'endswitch',
- 'endwhile',
- 'eval',
- 'exit',
- 'extends',
- 'final',
- 'finally',
- 'for',
- 'foreach',
- 'function',
- 'global',
- 'goto',
- 'if',
- 'implements',
- 'include',
- 'include_once',
- 'instanceof',
- 'insteadof',
- 'interface',
- 'isset',
- 'list',
- 'namespace',
- 'new',
- 'or',
- 'print',
- 'private',
- 'protected',
- 'public',
- 'require',
- 'require_once',
- 'return',
- 'static',
- 'switch',
- 'throw',
- 'trait',
- 'try',
- 'unset',
- 'use',
- 'var',
- 'while',
- 'xor',
- 'yield',
- );
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php
deleted file mode 100644
index da454501..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php
+++ /dev/null
@@ -1,73 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Doubler\ClassPatch;
-
-use phpDocumentor\Reflection\DocBlock;
-use Prophecy\Doubler\Generator\Node\ClassNode;
-use Prophecy\Doubler\Generator\Node\MethodNode;
-
-/**
- * Discover Magical API using "@method" PHPDoc format.
- *
- * @author Thomas Tourlourat
- */
-class MagicCallPatch implements ClassPatchInterface
-{
- /**
- * Support any class
- *
- * @param ClassNode $node
- *
- * @return boolean
- */
- public function supports(ClassNode $node)
- {
- return true;
- }
-
- /**
- * Discover Magical API
- *
- * @param ClassNode $node
- */
- public function apply(ClassNode $node)
- {
- $parentClass = $node->getParentClass();
- $reflectionClass = new \ReflectionClass($parentClass);
-
- $phpdoc = new DocBlock($reflectionClass->getDocComment());
-
- $tagList = $phpdoc->getTagsByName('method');
-
- foreach($tagList as $tag) {
- $methodName = $tag->getMethodName();
-
- if (!$reflectionClass->hasMethod($methodName)) {
- $methodNode = new MethodNode($tag->getMethodName());
- $methodNode->setStatic($tag->isStatic());
-
- $node->addMethod($methodNode);
- }
- }
- }
-
- /**
- * Returns patch priority, which determines when patch will be applied.
- *
- * @return integer Priority number (higher - earlier)
- */
- public function getPriority()
- {
- return 50;
- }
-}
-
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php
deleted file mode 100644
index ab0bb7c7..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php
+++ /dev/null
@@ -1,98 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Doubler\ClassPatch;
-
-use Prophecy\Doubler\Generator\Node\ClassNode;
-use Prophecy\Doubler\Generator\Node\MethodNode;
-use Prophecy\Doubler\Generator\Node\ArgumentNode;
-
-/**
- * Add Prophecy functionality to the double.
- * This is a core class patch for Prophecy.
- *
- * @author Konstantin Kudryashov
- */
-class ProphecySubjectPatch implements ClassPatchInterface
-{
- /**
- * Always returns true.
- *
- * @param ClassNode $node
- *
- * @return bool
- */
- public function supports(ClassNode $node)
- {
- return true;
- }
-
- /**
- * Apply Prophecy functionality to class node.
- *
- * @param ClassNode $node
- */
- public function apply(ClassNode $node)
- {
- $node->addInterface('Prophecy\Prophecy\ProphecySubjectInterface');
- $node->addProperty('objectProphecy', 'private');
-
- foreach ($node->getMethods() as $name => $method) {
- if ('__construct' === strtolower($name)) {
- continue;
- }
-
- $method->setCode(
- 'return $this->getProphecy()->makeProphecyMethodCall(__FUNCTION__, func_get_args());'
- );
- }
-
- $prophecySetter = new MethodNode('setProphecy');
- $prophecyArgument = new ArgumentNode('prophecy');
- $prophecyArgument->setTypeHint('Prophecy\Prophecy\ProphecyInterface');
- $prophecySetter->addArgument($prophecyArgument);
- $prophecySetter->setCode('$this->objectProphecy = $prophecy;');
-
- $prophecyGetter = new MethodNode('getProphecy');
- $prophecyGetter->setCode('return $this->objectProphecy;');
-
- if ($node->hasMethod('__call')) {
- $__call = $node->getMethod('__call');
- } else {
- $__call = new MethodNode('__call');
- $__call->addArgument(new ArgumentNode('name'));
- $__call->addArgument(new ArgumentNode('arguments'));
-
- $node->addMethod($__call);
- }
-
- $__call->setCode(<<getProphecy(), func_get_arg(0)
-);
-PHP
- );
-
- $node->addMethod($prophecySetter);
- $node->addMethod($prophecyGetter);
- }
-
- /**
- * Returns patch priority, which determines when patch will be applied.
- *
- * @return int Priority number (higher - earlier)
- */
- public function getPriority()
- {
- return 0;
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatch.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatch.php
deleted file mode 100644
index 9166aeef..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatch.php
+++ /dev/null
@@ -1,57 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Doubler\ClassPatch;
-
-use Prophecy\Doubler\Generator\Node\ClassNode;
-
-/**
- * ReflectionClass::newInstance patch.
- * Makes first argument of newInstance optional, since it works but signature is misleading
- *
- * @author Florian Klein
- */
-class ReflectionClassNewInstancePatch implements ClassPatchInterface
-{
- /**
- * Supports ReflectionClass
- *
- * @param ClassNode $node
- *
- * @return bool
- */
- public function supports(ClassNode $node)
- {
- return 'ReflectionClass' === $node->getParentClass();
- }
-
- /**
- * Updates newInstance's first argument to make it optional
- *
- * @param ClassNode $node
- */
- public function apply(ClassNode $node)
- {
- foreach ($node->getMethod('newInstance')->getArguments() as $argument) {
- $argument->setDefault(null);
- }
- }
-
- /**
- * Returns patch priority, which determines when patch will be applied.
- *
- * @return int Priority number (higher = earlier)
- */
- public function getPriority()
- {
- return 50;
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php
deleted file mode 100644
index 84011598..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php
+++ /dev/null
@@ -1,85 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Doubler\ClassPatch;
-
-use Prophecy\Doubler\Generator\Node\ClassNode;
-use Prophecy\Doubler\Generator\Node\MethodNode;
-
-/**
- * SplFileInfo patch.
- * Makes SplFileInfo and derivative classes usable with Prophecy.
- *
- * @author Konstantin Kudryashov
- */
-class SplFileInfoPatch implements ClassPatchInterface
-{
- /**
- * Supports everything that extends SplFileInfo.
- *
- * @param ClassNode $node
- *
- * @return bool
- */
- public function supports(ClassNode $node)
- {
- if (null === $node->getParentClass()) {
- return false;
- }
-
- return 'SplFileInfo' === $node->getParentClass()
- || is_subclass_of($node->getParentClass(), 'SplFileInfo')
- ;
- }
-
- /**
- * Updated constructor code to call parent one with dummy file argument.
- *
- * @param ClassNode $node
- */
- public function apply(ClassNode $node)
- {
- if ($node->hasMethod('__construct')) {
- $constructor = $node->getMethod('__construct');
- } else {
- $constructor = new MethodNode('__construct');
- $node->addMethod($constructor);
- }
-
- if ($this->nodeIsDirectoryIterator($node)) {
- $constructor->setCode('return parent::__construct("' . __DIR__ . '");');
- return;
- }
-
- $constructor->useParentCode();
- }
-
- /**
- * Returns patch priority, which determines when patch will be applied.
- *
- * @return int Priority number (higher - earlier)
- */
- public function getPriority()
- {
- return 50;
- }
-
- /**
- * @param ClassNode $node
- * @return boolean
- */
- private function nodeIsDirectoryIterator(ClassNode $node)
- {
- $parent = $node->getParentClass();
- return 'DirectoryIterator' === $parent
- || is_subclass_of($parent, 'DirectoryIterator');
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/TraversablePatch.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/TraversablePatch.php
deleted file mode 100644
index eea02028..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/TraversablePatch.php
+++ /dev/null
@@ -1,83 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Doubler\ClassPatch;
-
-use Prophecy\Doubler\Generator\Node\ClassNode;
-use Prophecy\Doubler\Generator\Node\MethodNode;
-
-/**
- * Traversable interface patch.
- * Forces classes that implement interfaces, that extend Traversable to also implement Iterator.
- *
- * @author Konstantin Kudryashov
- */
-class TraversablePatch implements ClassPatchInterface
-{
- /**
- * Supports nodetree, that implement Traversable, but not Iterator or IteratorAggregate.
- *
- * @param ClassNode $node
- *
- * @return bool
- */
- public function supports(ClassNode $node)
- {
- if (in_array('Iterator', $node->getInterfaces())) {
- return false;
- }
- if (in_array('IteratorAggregate', $node->getInterfaces())) {
- return false;
- }
-
- foreach ($node->getInterfaces() as $interface) {
- if ('Traversable' !== $interface && !is_subclass_of($interface, 'Traversable')) {
- continue;
- }
- if ('Iterator' === $interface || is_subclass_of($interface, 'Iterator')) {
- continue;
- }
- if ('IteratorAggregate' === $interface || is_subclass_of($interface, 'IteratorAggregate')) {
- continue;
- }
-
- return true;
- }
-
- return false;
- }
-
- /**
- * Forces class to implement Iterator interface.
- *
- * @param ClassNode $node
- */
- public function apply(ClassNode $node)
- {
- $node->addInterface('Iterator');
-
- $node->addMethod(new MethodNode('current'));
- $node->addMethod(new MethodNode('key'));
- $node->addMethod(new MethodNode('next'));
- $node->addMethod(new MethodNode('rewind'));
- $node->addMethod(new MethodNode('valid'));
- }
-
- /**
- * Returns patch priority, which determines when patch will be applied.
- *
- * @return int Priority number (higher - earlier)
- */
- public function getPriority()
- {
- return 100;
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/DoubleInterface.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/DoubleInterface.php
deleted file mode 100644
index 699be3a2..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/DoubleInterface.php
+++ /dev/null
@@ -1,22 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Doubler;
-
-/**
- * Core double interface.
- * All doubled classes will implement this one.
- *
- * @author Konstantin Kudryashov
- */
-interface DoubleInterface
-{
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php
deleted file mode 100644
index a378ae27..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php
+++ /dev/null
@@ -1,146 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Doubler;
-
-use Doctrine\Instantiator\Instantiator;
-use Prophecy\Doubler\ClassPatch\ClassPatchInterface;
-use Prophecy\Doubler\Generator\ClassMirror;
-use Prophecy\Doubler\Generator\ClassCreator;
-use Prophecy\Exception\InvalidArgumentException;
-use ReflectionClass;
-
-/**
- * Cached class doubler.
- * Prevents mirroring/creation of the same structure twice.
- *
- * @author Konstantin Kudryashov
- */
-class Doubler
-{
- private $mirror;
- private $creator;
- private $namer;
-
- /**
- * @var ClassPatchInterface[]
- */
- private $patches = array();
-
- /**
- * @var \Doctrine\Instantiator\Instantiator
- */
- private $instantiator;
-
- /**
- * Initializes doubler.
- *
- * @param ClassMirror $mirror
- * @param ClassCreator $creator
- * @param NameGenerator $namer
- */
- public function __construct(ClassMirror $mirror = null, ClassCreator $creator = null,
- NameGenerator $namer = null)
- {
- $this->mirror = $mirror ?: new ClassMirror;
- $this->creator = $creator ?: new ClassCreator;
- $this->namer = $namer ?: new NameGenerator;
- }
-
- /**
- * Returns list of registered class patches.
- *
- * @return ClassPatchInterface[]
- */
- public function getClassPatches()
- {
- return $this->patches;
- }
-
- /**
- * Registers new class patch.
- *
- * @param ClassPatchInterface $patch
- */
- public function registerClassPatch(ClassPatchInterface $patch)
- {
- $this->patches[] = $patch;
-
- @usort($this->patches, function (ClassPatchInterface $patch1, ClassPatchInterface $patch2) {
- return $patch2->getPriority() - $patch1->getPriority();
- });
- }
-
- /**
- * Creates double from specific class or/and list of interfaces.
- *
- * @param ReflectionClass $class
- * @param ReflectionClass[] $interfaces Array of ReflectionClass instances
- * @param array $args Constructor arguments
- *
- * @return DoubleInterface
- *
- * @throws \Prophecy\Exception\InvalidArgumentException
- */
- public function double(ReflectionClass $class = null, array $interfaces, array $args = null)
- {
- foreach ($interfaces as $interface) {
- if (!$interface instanceof ReflectionClass) {
- throw new InvalidArgumentException(sprintf(
- "[ReflectionClass \$interface1 [, ReflectionClass \$interface2]] array expected as\n".
- "a second argument to `Doubler::double(...)`, but got %s.",
- is_object($interface) ? get_class($interface).' class' : gettype($interface)
- ));
- }
- }
-
- $classname = $this->createDoubleClass($class, $interfaces);
- $reflection = new ReflectionClass($classname);
-
- if (null !== $args) {
- return $reflection->newInstanceArgs($args);
- }
- if ((null === $constructor = $reflection->getConstructor())
- || ($constructor->isPublic() && !$constructor->isFinal())) {
- return $reflection->newInstance();
- }
-
- if (!$this->instantiator) {
- $this->instantiator = new Instantiator();
- }
-
- return $this->instantiator->instantiate($classname);
- }
-
- /**
- * Creates double class and returns its FQN.
- *
- * @param ReflectionClass $class
- * @param ReflectionClass[] $interfaces
- *
- * @return string
- */
- protected function createDoubleClass(ReflectionClass $class = null, array $interfaces)
- {
- $name = $this->namer->name($class, $interfaces);
- $node = $this->mirror->reflect($class, $interfaces);
-
- foreach ($this->patches as $patch) {
- if ($patch->supports($node)) {
- $patch->apply($node);
- }
- }
-
- $this->creator->create($name, $node);
-
- return $name;
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php
deleted file mode 100644
index 4d474e5b..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php
+++ /dev/null
@@ -1,92 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Doubler\Generator;
-
-/**
- * Class code creator.
- * Generates PHP code for specific class node tree.
- *
- * @author Konstantin Kudryashov
- */
-class ClassCodeGenerator
-{
- /**
- * Generates PHP code for class node.
- *
- * @param string $classname
- * @param Node\ClassNode $class
- *
- * @return string
- */
- public function generate($classname, Node\ClassNode $class)
- {
- $parts = explode('\\', $classname);
- $classname = array_pop($parts);
- $namespace = implode('\\', $parts);
-
- $code = sprintf("class %s extends \%s implements %s {\n",
- $classname, $class->getParentClass(), implode(', ',
- array_map(function ($interface) {return '\\'.$interface;}, $class->getInterfaces())
- )
- );
-
- foreach ($class->getProperties() as $name => $visibility) {
- $code .= sprintf("%s \$%s;\n", $visibility, $name);
- }
- $code .= "\n";
-
- foreach ($class->getMethods() as $method) {
- $code .= $this->generateMethod($method)."\n";
- }
- $code .= "\n}";
-
- return sprintf("namespace %s {\n%s\n}", $namespace, $code);
- }
-
- private function generateMethod(Node\MethodNode $method)
- {
- $php = sprintf("%s %s function %s%s(%s)%s {\n",
- $method->getVisibility(),
- $method->isStatic() ? 'static' : '',
- $method->returnsReference() ? '&':'',
- $method->getName(),
- implode(', ', $this->generateArguments($method->getArguments())),
- $method->hasReturnType() ? sprintf(': %s', $method->getReturnType()) : ''
- );
- $php .= $method->getCode()."\n";
-
- return $php.'}';
- }
-
- private function generateArguments(array $arguments)
- {
- return array_map(function (Node\ArgumentNode $argument) {
- $php = '';
-
- if ($hint = $argument->getTypeHint()) {
- if ('array' === $hint || 'callable' === $hint) {
- $php .= $hint;
- } else {
- $php .= '\\'.$hint;
- }
- }
-
- $php .= ' '.($argument->isPassedByReference() ? '&' : '').'$'.$argument->getName();
-
- if ($argument->isOptional()) {
- $php .= ' = '.var_export($argument->getDefault(), true);
- }
-
- return $php;
- }, $arguments);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php
deleted file mode 100644
index 882a4a4b..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php
+++ /dev/null
@@ -1,67 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Doubler\Generator;
-
-use Prophecy\Exception\Doubler\ClassCreatorException;
-
-/**
- * Class creator.
- * Creates specific class in current environment.
- *
- * @author Konstantin Kudryashov
- */
-class ClassCreator
-{
- private $generator;
-
- /**
- * Initializes creator.
- *
- * @param ClassCodeGenerator $generator
- */
- public function __construct(ClassCodeGenerator $generator = null)
- {
- $this->generator = $generator ?: new ClassCodeGenerator;
- }
-
- /**
- * Creates class.
- *
- * @param string $classname
- * @param Node\ClassNode $class
- *
- * @return mixed
- *
- * @throws \Prophecy\Exception\Doubler\ClassCreatorException
- */
- public function create($classname, Node\ClassNode $class)
- {
- $code = $this->generator->generate($classname, $class);
- $return = eval($code);
-
- if (!class_exists($classname, false)) {
- if (count($class->getInterfaces())) {
- throw new ClassCreatorException(sprintf(
- 'Could not double `%s` and implement interfaces: [%s].',
- $class->getParentClass(), implode(', ', $class->getInterfaces())
- ), $class);
- }
-
- throw new ClassCreatorException(
- sprintf('Could not double `%s`.', $class->getParentClass()),
- $class
- );
- }
-
- return $return;
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php
deleted file mode 100644
index 6a4ebde5..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php
+++ /dev/null
@@ -1,210 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Doubler\Generator;
-
-use Prophecy\Exception\InvalidArgumentException;
-use Prophecy\Exception\Doubler\ClassMirrorException;
-use ReflectionClass;
-use ReflectionMethod;
-use ReflectionParameter;
-
-/**
- * Class mirror.
- * Core doubler class. Mirrors specific class and/or interfaces into class node tree.
- *
- * @author Konstantin Kudryashov
- */
-class ClassMirror
-{
- private static $reflectableMethods = array(
- '__construct',
- '__destruct',
- '__sleep',
- '__wakeup',
- '__toString',
- '__call',
- );
-
- /**
- * Reflects provided arguments into class node.
- *
- * @param ReflectionClass $class
- * @param ReflectionClass[] $interfaces
- *
- * @return Node\ClassNode
- *
- * @throws \Prophecy\Exception\InvalidArgumentException
- */
- public function reflect(ReflectionClass $class = null, array $interfaces)
- {
- $node = new Node\ClassNode;
-
- if (null !== $class) {
- if (true === $class->isInterface()) {
- throw new InvalidArgumentException(sprintf(
- "Could not reflect %s as a class, because it\n".
- "is interface - use the second argument instead.",
- $class->getName()
- ));
- }
-
- $this->reflectClassToNode($class, $node);
- }
-
- foreach ($interfaces as $interface) {
- if (!$interface instanceof ReflectionClass) {
- throw new InvalidArgumentException(sprintf(
- "[ReflectionClass \$interface1 [, ReflectionClass \$interface2]] array expected as\n".
- "a second argument to `ClassMirror::reflect(...)`, but got %s.",
- is_object($interface) ? get_class($interface).' class' : gettype($interface)
- ));
- }
- if (false === $interface->isInterface()) {
- throw new InvalidArgumentException(sprintf(
- "Could not reflect %s as an interface, because it\n".
- "is class - use the first argument instead.",
- $interface->getName()
- ));
- }
-
- $this->reflectInterfaceToNode($interface, $node);
- }
-
- $node->addInterface('Prophecy\Doubler\Generator\ReflectionInterface');
-
- return $node;
- }
-
- private function reflectClassToNode(ReflectionClass $class, Node\ClassNode $node)
- {
- if (true === $class->isFinal()) {
- throw new ClassMirrorException(sprintf(
- 'Could not reflect class %s as it is marked final.', $class->getName()
- ), $class);
- }
-
- $node->setParentClass($class->getName());
-
- foreach ($class->getMethods(ReflectionMethod::IS_ABSTRACT) as $method) {
- if (false === $method->isProtected()) {
- continue;
- }
-
- $this->reflectMethodToNode($method, $node);
- }
-
- foreach ($class->getMethods(ReflectionMethod::IS_PUBLIC) as $method) {
- if (0 === strpos($method->getName(), '_')
- && !in_array($method->getName(), self::$reflectableMethods)) {
- continue;
- }
-
- if (true === $method->isFinal()) {
- continue;
- }
-
- $this->reflectMethodToNode($method, $node);
- }
- }
-
- private function reflectInterfaceToNode(ReflectionClass $interface, Node\ClassNode $node)
- {
- $node->addInterface($interface->getName());
-
- foreach ($interface->getMethods() as $method) {
- $this->reflectMethodToNode($method, $node);
- }
- }
-
- private function reflectMethodToNode(ReflectionMethod $method, Node\ClassNode $classNode)
- {
- $node = new Node\MethodNode($method->getName());
-
- if (true === $method->isProtected()) {
- $node->setVisibility('protected');
- }
-
- if (true === $method->isStatic()) {
- $node->setStatic();
- }
-
- if (true === $method->returnsReference()) {
- $node->setReturnsReference();
- }
-
- if (version_compare(PHP_VERSION, '7.0', '>=') && true === $method->hasReturnType()) {
- $node->setReturnType((string) $method->getReturnType());
- }
-
- if (is_array($params = $method->getParameters()) && count($params)) {
- foreach ($params as $param) {
- $this->reflectArgumentToNode($param, $node);
- }
- }
-
- $classNode->addMethod($node);
- }
-
- private function reflectArgumentToNode(ReflectionParameter $parameter, Node\MethodNode $methodNode)
- {
- $name = $parameter->getName() == '...' ? '__dot_dot_dot__' : $parameter->getName();
- $node = new Node\ArgumentNode($name);
-
- $typeHint = $this->getTypeHint($parameter);
- $node->setTypeHint($typeHint);
-
- if (true === $parameter->isDefaultValueAvailable()) {
- $node->setDefault($parameter->getDefaultValue());
- } elseif (true === $parameter->isOptional()
- || (true === $parameter->allowsNull() && $typeHint)) {
- $node->setDefault(null);
- }
-
- if (true === $parameter->isPassedByReference()) {
- $node->setAsPassedByReference();
- }
-
- $methodNode->addArgument($node);
- }
-
- private function getTypeHint(ReflectionParameter $parameter)
- {
- if (null !== $className = $this->getParameterClassName($parameter)) {
- return $className;
- }
-
- if (true === $parameter->isArray()) {
- return 'array';
- }
-
- if (version_compare(PHP_VERSION, '5.4', '>=') && true === $parameter->isCallable()) {
- return 'callable';
- }
-
- if (version_compare(PHP_VERSION, '7.0', '>=') && true === $parameter->hasType()) {
- return (string) $parameter->getType();
- }
-
- return null;
- }
-
- private function getParameterClassName(ReflectionParameter $parameter)
- {
- try {
- return $parameter->getClass() ? $parameter->getClass()->getName() : null;
- } catch (\ReflectionException $e) {
- preg_match('/\[\s\<\w+?>\s([\w,\\\]+)/s', $parameter, $matches);
-
- return isset($matches[1]) ? $matches[1] : null;
- }
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentNode.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentNode.php
deleted file mode 100644
index a6c42a38..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentNode.php
+++ /dev/null
@@ -1,75 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Doubler\Generator\Node;
-
-/**
- * Argument node.
- *
- * @author Konstantin Kudryashov
- */
-class ArgumentNode
-{
- private $name;
- private $typeHint;
- private $default;
- private $optional = false;
- private $byReference = false;
-
- /**
- * @param string $name
- */
- public function __construct($name)
- {
- $this->name = $name;
- }
-
- public function getName()
- {
- return $this->name;
- }
-
- public function getTypeHint()
- {
- return $this->typeHint;
- }
-
- public function setTypeHint($typeHint = null)
- {
- $this->typeHint = $typeHint;
- }
-
- public function getDefault()
- {
- return $this->default;
- }
-
- public function setDefault($default = null)
- {
- $this->optional = true;
- $this->default = $default;
- }
-
- public function isOptional()
- {
- return $this->optional;
- }
-
- public function setAsPassedByReference($byReference = true)
- {
- $this->byReference = $byReference;
- }
-
- public function isPassedByReference()
- {
- return $this->byReference;
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ClassNode.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ClassNode.php
deleted file mode 100644
index b38cb4ea..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ClassNode.php
+++ /dev/null
@@ -1,130 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Doubler\Generator\Node;
-
-use Prophecy\Exception\InvalidArgumentException;
-
-/**
- * Class node.
- *
- * @author Konstantin Kudryashov
- */
-class ClassNode
-{
- private $parentClass = 'stdClass';
- private $interfaces = array();
- private $properties = array();
-
- /**
- * @var MethodNode[]
- */
- private $methods = array();
-
- public function getParentClass()
- {
- return $this->parentClass;
- }
-
- /**
- * @param string $class
- */
- public function setParentClass($class)
- {
- $this->parentClass = $class ?: 'stdClass';
- }
-
- /**
- * @return string[]
- */
- public function getInterfaces()
- {
- return $this->interfaces;
- }
-
- /**
- * @param string $interface
- */
- public function addInterface($interface)
- {
- if ($this->hasInterface($interface)) {
- return;
- }
-
- array_unshift($this->interfaces, $interface);
- }
-
- /**
- * @param string $interface
- *
- * @return bool
- */
- public function hasInterface($interface)
- {
- return in_array($interface, $this->interfaces);
- }
-
- public function getProperties()
- {
- return $this->properties;
- }
-
- public function addProperty($name, $visibility = 'public')
- {
- $visibility = strtolower($visibility);
-
- if (!in_array($visibility, array('public', 'private', 'protected'))) {
- throw new InvalidArgumentException(sprintf(
- '`%s` property visibility is not supported.', $visibility
- ));
- }
-
- $this->properties[$name] = $visibility;
- }
-
- /**
- * @return MethodNode[]
- */
- public function getMethods()
- {
- return $this->methods;
- }
-
- public function addMethod(MethodNode $method)
- {
- $this->methods[$method->getName()] = $method;
- }
-
- public function removeMethod($name)
- {
- unset($this->methods[$name]);
- }
-
- /**
- * @param string $name
- *
- * @return MethodNode|null
- */
- public function getMethod($name)
- {
- return $this->hasMethod($name) ? $this->methods[$name] : null;
- }
-
- /**
- * @param string $name
- *
- * @return bool
- */
- public function hasMethod($name)
- {
- return isset($this->methods[$name]);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php
deleted file mode 100644
index eb953524..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php
+++ /dev/null
@@ -1,177 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Doubler\Generator\Node;
-
-use Prophecy\Exception\InvalidArgumentException;
-
-/**
- * Method node.
- *
- * @author Konstantin Kudryashov
- */
-class MethodNode
-{
- private $name;
- private $code;
- private $visibility = 'public';
- private $static = false;
- private $returnsReference = false;
- private $returnType;
-
- /**
- * @var ArgumentNode[]
- */
- private $arguments = array();
-
- /**
- * @param string $name
- * @param string $code
- */
- public function __construct($name, $code = null)
- {
- $this->name = $name;
- $this->code = $code;
- }
-
- public function getVisibility()
- {
- return $this->visibility;
- }
-
- /**
- * @param string $visibility
- */
- public function setVisibility($visibility)
- {
- $visibility = strtolower($visibility);
-
- if (!in_array($visibility, array('public', 'private', 'protected'))) {
- throw new InvalidArgumentException(sprintf(
- '`%s` method visibility is not supported.', $visibility
- ));
- }
-
- $this->visibility = $visibility;
- }
-
- public function isStatic()
- {
- return $this->static;
- }
-
- public function setStatic($static = true)
- {
- $this->static = (bool) $static;
- }
-
- public function returnsReference()
- {
- return $this->returnsReference;
- }
-
- public function setReturnsReference()
- {
- $this->returnsReference = true;
- }
-
- public function getName()
- {
- return $this->name;
- }
-
- public function addArgument(ArgumentNode $argument)
- {
- $this->arguments[] = $argument;
- }
-
- /**
- * @return ArgumentNode[]
- */
- public function getArguments()
- {
- return $this->arguments;
- }
-
- public function hasReturnType()
- {
- return null !== $this->returnType;
- }
-
- /**
- * @param string $type
- */
- public function setReturnType($type = null)
- {
- switch ($type) {
- case '':
- $this->returnType = null;
- break;
-
- case 'string';
- case 'float':
- case 'int':
- case 'bool':
- case 'array':
- case 'callable':
- $this->returnType = $type;
- break;
-
- case 'double':
- case 'real':
- $this->returnType = 'float';
- break;
-
- case 'boolean':
- $this->returnType = 'bool';
- break;
-
- case 'integer':
- $this->returnType = 'int';
- break;
-
- default:
- $this->returnType = '\\' . ltrim($type, '\\');
- }
- }
-
- public function getReturnType()
- {
- return $this->returnType;
- }
-
- /**
- * @param string $code
- */
- public function setCode($code)
- {
- $this->code = $code;
- }
-
- public function getCode()
- {
- if ($this->returnsReference)
- {
- return "throw new \Prophecy\Exception\Doubler\ReturnByReferenceException('Returning by reference not supported', get_class(\$this), '{$this->name}');";
- }
-
- return (string) $this->code;
- }
-
- public function useParentCode()
- {
- $this->code = sprintf(
- 'return parent::%s(%s);', $this->getName(), implode(', ',
- array_map(function (ArgumentNode $arg) { return '$'.$arg->getName(); }, $this->arguments)
- )
- );
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ReflectionInterface.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ReflectionInterface.php
deleted file mode 100644
index d720b151..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ReflectionInterface.php
+++ /dev/null
@@ -1,22 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Doubler\Generator;
-
-/**
- * Reflection interface.
- * All reflected classes implement this interface.
- *
- * @author Konstantin Kudryashov
- */
-interface ReflectionInterface
-{
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/LazyDouble.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/LazyDouble.php
deleted file mode 100644
index 8a99c4ce..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/LazyDouble.php
+++ /dev/null
@@ -1,127 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Doubler;
-
-use Prophecy\Exception\Doubler\DoubleException;
-use Prophecy\Exception\Doubler\ClassNotFoundException;
-use Prophecy\Exception\Doubler\InterfaceNotFoundException;
-use ReflectionClass;
-
-/**
- * Lazy double.
- * Gives simple interface to describe double before creating it.
- *
- * @author Konstantin Kudryashov
- */
-class LazyDouble
-{
- private $doubler;
- private $class;
- private $interfaces = array();
- private $arguments = null;
- private $double;
-
- /**
- * Initializes lazy double.
- *
- * @param Doubler $doubler
- */
- public function __construct(Doubler $doubler)
- {
- $this->doubler = $doubler;
- }
-
- /**
- * Tells doubler to use specific class as parent one for double.
- *
- * @param string|ReflectionClass $class
- *
- * @throws \Prophecy\Exception\Doubler\ClassNotFoundException
- * @throws \Prophecy\Exception\Doubler\DoubleException
- */
- public function setParentClass($class)
- {
- if (null !== $this->double) {
- throw new DoubleException('Can not extend class with already instantiated double.');
- }
-
- if (!$class instanceof ReflectionClass) {
- if (!class_exists($class)) {
- throw new ClassNotFoundException(sprintf('Class %s not found.', $class), $class);
- }
-
- $class = new ReflectionClass($class);
- }
-
- $this->class = $class;
- }
-
- /**
- * Tells doubler to implement specific interface with double.
- *
- * @param string|ReflectionClass $interface
- *
- * @throws \Prophecy\Exception\Doubler\InterfaceNotFoundException
- * @throws \Prophecy\Exception\Doubler\DoubleException
- */
- public function addInterface($interface)
- {
- if (null !== $this->double) {
- throw new DoubleException(
- 'Can not implement interface with already instantiated double.'
- );
- }
-
- if (!$interface instanceof ReflectionClass) {
- if (!interface_exists($interface)) {
- throw new InterfaceNotFoundException(
- sprintf('Interface %s not found.', $interface),
- $interface
- );
- }
-
- $interface = new ReflectionClass($interface);
- }
-
- $this->interfaces[] = $interface;
- }
-
- /**
- * Sets constructor arguments.
- *
- * @param array $arguments
- */
- public function setArguments(array $arguments = null)
- {
- $this->arguments = $arguments;
- }
-
- /**
- * Creates double instance or returns already created one.
- *
- * @return DoubleInterface
- */
- public function getInstance()
- {
- if (null === $this->double) {
- if (null !== $this->arguments) {
- return $this->double = $this->doubler->double(
- $this->class, $this->interfaces, $this->arguments
- );
- }
-
- $this->double = $this->doubler->double($this->class, $this->interfaces);
- }
-
- return $this->double;
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/NameGenerator.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/NameGenerator.php
deleted file mode 100644
index d67ec6a4..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Doubler/NameGenerator.php
+++ /dev/null
@@ -1,52 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Doubler;
-
-use ReflectionClass;
-
-/**
- * Name generator.
- * Generates classname for double.
- *
- * @author Konstantin Kudryashov
- */
-class NameGenerator
-{
- private static $counter = 1;
-
- /**
- * Generates name.
- *
- * @param ReflectionClass $class
- * @param ReflectionClass[] $interfaces
- *
- * @return string
- */
- public function name(ReflectionClass $class = null, array $interfaces)
- {
- $parts = array();
-
- if (null !== $class) {
- $parts[] = $class->getName();
- } else {
- foreach ($interfaces as $interface) {
- $parts[] = $interface->getShortName();
- }
- }
-
- if (!count($parts)) {
- $parts[] = 'stdClass';
- }
-
- return sprintf('Double\%s\P%d', implode('\\', $parts), self::$counter++);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Call/UnexpectedCallException.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Call/UnexpectedCallException.php
deleted file mode 100644
index 48ed2254..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Call/UnexpectedCallException.php
+++ /dev/null
@@ -1,40 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Exception\Call;
-
-use Prophecy\Exception\Prophecy\ObjectProphecyException;
-use Prophecy\Prophecy\ObjectProphecy;
-
-class UnexpectedCallException extends ObjectProphecyException
-{
- private $methodName;
- private $arguments;
-
- public function __construct($message, ObjectProphecy $objectProphecy,
- $methodName, array $arguments)
- {
- parent::__construct($message, $objectProphecy);
-
- $this->methodName = $methodName;
- $this->arguments = $arguments;
- }
-
- public function getMethodName()
- {
- return $this->methodName;
- }
-
- public function getArguments()
- {
- return $this->arguments;
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassCreatorException.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassCreatorException.php
deleted file mode 100644
index 822918a2..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassCreatorException.php
+++ /dev/null
@@ -1,31 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Exception\Doubler;
-
-use Prophecy\Doubler\Generator\Node\ClassNode;
-
-class ClassCreatorException extends \RuntimeException implements DoublerException
-{
- private $node;
-
- public function __construct($message, ClassNode $node)
- {
- parent::__construct($message);
-
- $this->node = $node;
- }
-
- public function getClassNode()
- {
- return $this->node;
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassMirrorException.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassMirrorException.php
deleted file mode 100644
index 8fc53b8b..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassMirrorException.php
+++ /dev/null
@@ -1,31 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Exception\Doubler;
-
-use ReflectionClass;
-
-class ClassMirrorException extends \RuntimeException implements DoublerException
-{
- private $class;
-
- public function __construct($message, ReflectionClass $class)
- {
- parent::__construct($message);
-
- $this->class = $class;
- }
-
- public function getReflectedClass()
- {
- return $this->class;
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassNotFoundException.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassNotFoundException.php
deleted file mode 100644
index 5bc826d7..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassNotFoundException.php
+++ /dev/null
@@ -1,33 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Exception\Doubler;
-
-class ClassNotFoundException extends DoubleException
-{
- private $classname;
-
- /**
- * @param string $message
- * @param string $classname
- */
- public function __construct($message, $classname)
- {
- parent::__construct($message);
-
- $this->classname = $classname;
- }
-
- public function getClassname()
- {
- return $this->classname;
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoubleException.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoubleException.php
deleted file mode 100644
index 6642a58f..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoubleException.php
+++ /dev/null
@@ -1,18 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Exception\Doubler;
-
-use RuntimeException;
-
-class DoubleException extends RuntimeException implements DoublerException
-{
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoublerException.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoublerException.php
deleted file mode 100644
index 9d6be179..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoublerException.php
+++ /dev/null
@@ -1,18 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Exception\Doubler;
-
-use Prophecy\Exception\Exception;
-
-interface DoublerException extends Exception
-{
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/InterfaceNotFoundException.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/InterfaceNotFoundException.php
deleted file mode 100644
index e344dead..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/InterfaceNotFoundException.php
+++ /dev/null
@@ -1,20 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Exception\Doubler;
-
-class InterfaceNotFoundException extends ClassNotFoundException
-{
- public function getInterfaceName()
- {
- return $this->getClassname();
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotFoundException.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotFoundException.php
deleted file mode 100644
index b113941f..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotFoundException.php
+++ /dev/null
@@ -1,60 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Exception\Doubler;
-
-class MethodNotFoundException extends DoubleException
-{
- /**
- * @var string
- */
- private $classname;
-
- /**
- * @var string
- */
- private $methodName;
-
- /**
- * @var array
- */
- private $arguments;
-
- /**
- * @param string $message
- * @param string $classname
- * @param string $methodName
- * @param null|Argument\ArgumentsWildcard|array $arguments
- */
- public function __construct($message, $classname, $methodName, $arguments = null)
- {
- parent::__construct($message);
-
- $this->classname = $classname;
- $this->methodName = $methodName;
- $this->arguments = $arguments;
- }
-
- public function getClassname()
- {
- return $this->classname;
- }
-
- public function getMethodName()
- {
- return $this->methodName;
- }
-
- public function getArguments()
- {
- return $this->arguments;
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ReturnByReferenceException.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ReturnByReferenceException.php
deleted file mode 100644
index 63030497..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ReturnByReferenceException.php
+++ /dev/null
@@ -1,41 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Exception\Doubler;
-
-class ReturnByReferenceException extends DoubleException
-{
- private $classname;
- private $methodName;
-
- /**
- * @param string $message
- * @param string $classname
- * @param string $methodName
- */
- public function __construct($message, $classname, $methodName)
- {
- parent::__construct($message);
-
- $this->classname = $classname;
- $this->methodName = $methodName;
- }
-
- public function getClassname()
- {
- return $this->classname;
- }
-
- public function getMethodName()
- {
- return $this->methodName;
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Exception.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Exception.php
deleted file mode 100644
index ac9fe4dd..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Exception.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Exception;
-
-/**
- * Core Prophecy exception interface.
- * All Prophecy exceptions implement it.
- *
- * @author Konstantin Kudryashov
- */
-interface Exception
-{
- /**
- * @return string
- */
- public function getMessage();
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/InvalidArgumentException.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/InvalidArgumentException.php
deleted file mode 100644
index bc91c690..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/InvalidArgumentException.php
+++ /dev/null
@@ -1,16 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Exception;
-
-class InvalidArgumentException extends \InvalidArgumentException implements Exception
-{
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/AggregateException.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/AggregateException.php
deleted file mode 100644
index 44b598a4..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/AggregateException.php
+++ /dev/null
@@ -1,50 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Exception\Prediction;
-
-use Prophecy\Prophecy\ObjectProphecy;
-
-class AggregateException extends \RuntimeException implements PredictionException
-{
- private $exceptions = array();
- private $objectProphecy;
-
- public function append(PredictionException $exception)
- {
- $message = $exception->getMessage();
- $message = ' '.strtr($message, array("\n" => "\n "))."\n";
-
- $this->message = rtrim($this->message.$message);
- $this->exceptions[] = $exception;
- }
-
- /**
- * @return PredictionException[]
- */
- public function getExceptions()
- {
- return $this->exceptions;
- }
-
- public function setObjectProphecy(ObjectProphecy $objectProphecy)
- {
- $this->objectProphecy = $objectProphecy;
- }
-
- /**
- * @return ObjectProphecy
- */
- public function getObjectProphecy()
- {
- return $this->objectProphecy;
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/FailedPredictionException.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/FailedPredictionException.php
deleted file mode 100644
index bbbbc3d9..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/FailedPredictionException.php
+++ /dev/null
@@ -1,24 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Exception\Prediction;
-
-use RuntimeException;
-
-/**
- * Basic failed prediction exception.
- * Use it for custom prediction failures.
- *
- * @author Konstantin Kudryashov
- */
-class FailedPredictionException extends RuntimeException implements PredictionException
-{
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/NoCallsException.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/NoCallsException.php
deleted file mode 100644
index 05ea4aad..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/NoCallsException.php
+++ /dev/null
@@ -1,18 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Exception\Prediction;
-
-use Prophecy\Exception\Prophecy\MethodProphecyException;
-
-class NoCallsException extends MethodProphecyException implements PredictionException
-{
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/PredictionException.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/PredictionException.php
deleted file mode 100644
index 2596b1ef..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/PredictionException.php
+++ /dev/null
@@ -1,18 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Exception\Prediction;
-
-use Prophecy\Exception\Exception;
-
-interface PredictionException extends Exception
-{
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsCountException.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsCountException.php
deleted file mode 100644
index 9d905431..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsCountException.php
+++ /dev/null
@@ -1,31 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Exception\Prediction;
-
-use Prophecy\Prophecy\MethodProphecy;
-
-class UnexpectedCallsCountException extends UnexpectedCallsException
-{
- private $expectedCount;
-
- public function __construct($message, MethodProphecy $methodProphecy, $count, array $calls)
- {
- parent::__construct($message, $methodProphecy, $calls);
-
- $this->expectedCount = intval($count);
- }
-
- public function getExpectedCount()
- {
- return $this->expectedCount;
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsException.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsException.php
deleted file mode 100644
index 7a99c2d7..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsException.php
+++ /dev/null
@@ -1,32 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Exception\Prediction;
-
-use Prophecy\Prophecy\MethodProphecy;
-use Prophecy\Exception\Prophecy\MethodProphecyException;
-
-class UnexpectedCallsException extends MethodProphecyException implements PredictionException
-{
- private $calls = array();
-
- public function __construct($message, MethodProphecy $methodProphecy, array $calls)
- {
- parent::__construct($message, $methodProphecy);
-
- $this->calls = $calls;
- }
-
- public function getCalls()
- {
- return $this->calls;
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/MethodProphecyException.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/MethodProphecyException.php
deleted file mode 100644
index 1b03eaf4..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/MethodProphecyException.php
+++ /dev/null
@@ -1,34 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Exception\Prophecy;
-
-use Prophecy\Prophecy\MethodProphecy;
-
-class MethodProphecyException extends ObjectProphecyException
-{
- private $methodProphecy;
-
- public function __construct($message, MethodProphecy $methodProphecy)
- {
- parent::__construct($message, $methodProphecy->getObjectProphecy());
-
- $this->methodProphecy = $methodProphecy;
- }
-
- /**
- * @return MethodProphecy
- */
- public function getMethodProphecy()
- {
- return $this->methodProphecy;
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ObjectProphecyException.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ObjectProphecyException.php
deleted file mode 100644
index e345402e..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ObjectProphecyException.php
+++ /dev/null
@@ -1,34 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Exception\Prophecy;
-
-use Prophecy\Prophecy\ObjectProphecy;
-
-class ObjectProphecyException extends \RuntimeException implements ProphecyException
-{
- private $objectProphecy;
-
- public function __construct($message, ObjectProphecy $objectProphecy)
- {
- parent::__construct($message);
-
- $this->objectProphecy = $objectProphecy;
- }
-
- /**
- * @return ObjectProphecy
- */
- public function getObjectProphecy()
- {
- return $this->objectProphecy;
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ProphecyException.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ProphecyException.php
deleted file mode 100644
index 91573328..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ProphecyException.php
+++ /dev/null
@@ -1,18 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Exception\Prophecy;
-
-use Prophecy\Exception\Exception;
-
-interface ProphecyException extends Exception
-{
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallPrediction.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallPrediction.php
deleted file mode 100644
index b4787366..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallPrediction.php
+++ /dev/null
@@ -1,86 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Prediction;
-
-use Prophecy\Call\Call;
-use Prophecy\Prophecy\ObjectProphecy;
-use Prophecy\Prophecy\MethodProphecy;
-use Prophecy\Argument\ArgumentsWildcard;
-use Prophecy\Argument\Token\AnyValuesToken;
-use Prophecy\Util\StringUtil;
-use Prophecy\Exception\Prediction\NoCallsException;
-
-/**
- * Call prediction.
- *
- * @author Konstantin Kudryashov
- */
-class CallPrediction implements PredictionInterface
-{
- private $util;
-
- /**
- * Initializes prediction.
- *
- * @param StringUtil $util
- */
- public function __construct(StringUtil $util = null)
- {
- $this->util = $util ?: new StringUtil;
- }
-
- /**
- * Tests that there was at least one call.
- *
- * @param Call[] $calls
- * @param ObjectProphecy $object
- * @param MethodProphecy $method
- *
- * @throws \Prophecy\Exception\Prediction\NoCallsException
- */
- public function check(array $calls, ObjectProphecy $object, MethodProphecy $method)
- {
- if (count($calls)) {
- return;
- }
-
- $methodCalls = $object->findProphecyMethodCalls(
- $method->getMethodName(),
- new ArgumentsWildcard(array(new AnyValuesToken))
- );
-
- if (count($methodCalls)) {
- throw new NoCallsException(sprintf(
- "No calls have been made that match:\n".
- " %s->%s(%s)\n".
- "but expected at least one.\n".
- "Recorded `%s(...)` calls:\n%s",
-
- get_class($object->reveal()),
- $method->getMethodName(),
- $method->getArgumentsWildcard(),
- $method->getMethodName(),
- $this->util->stringifyCalls($methodCalls)
- ), $method);
- }
-
- throw new NoCallsException(sprintf(
- "No calls have been made that match:\n".
- " %s->%s(%s)\n".
- "but expected at least one.",
-
- get_class($object->reveal()),
- $method->getMethodName(),
- $method->getArgumentsWildcard()
- ), $method);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallTimesPrediction.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallTimesPrediction.php
deleted file mode 100644
index 31c6c575..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallTimesPrediction.php
+++ /dev/null
@@ -1,107 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Prediction;
-
-use Prophecy\Call\Call;
-use Prophecy\Prophecy\ObjectProphecy;
-use Prophecy\Prophecy\MethodProphecy;
-use Prophecy\Argument\ArgumentsWildcard;
-use Prophecy\Argument\Token\AnyValuesToken;
-use Prophecy\Util\StringUtil;
-use Prophecy\Exception\Prediction\UnexpectedCallsCountException;
-
-/**
- * Prediction interface.
- * Predictions are logical test blocks, tied to `should...` keyword.
- *
- * @author Konstantin Kudryashov
- */
-class CallTimesPrediction implements PredictionInterface
-{
- private $times;
- private $util;
-
- /**
- * Initializes prediction.
- *
- * @param int $times
- * @param StringUtil $util
- */
- public function __construct($times, StringUtil $util = null)
- {
- $this->times = intval($times);
- $this->util = $util ?: new StringUtil;
- }
-
- /**
- * Tests that there was exact amount of calls made.
- *
- * @param Call[] $calls
- * @param ObjectProphecy $object
- * @param MethodProphecy $method
- *
- * @throws \Prophecy\Exception\Prediction\UnexpectedCallsCountException
- */
- public function check(array $calls, ObjectProphecy $object, MethodProphecy $method)
- {
- if ($this->times == count($calls)) {
- return;
- }
-
- $methodCalls = $object->findProphecyMethodCalls(
- $method->getMethodName(),
- new ArgumentsWildcard(array(new AnyValuesToken))
- );
-
- if (count($calls)) {
- $message = sprintf(
- "Expected exactly %d calls that match:\n".
- " %s->%s(%s)\n".
- "but %d were made:\n%s",
-
- $this->times,
- get_class($object->reveal()),
- $method->getMethodName(),
- $method->getArgumentsWildcard(),
- count($calls),
- $this->util->stringifyCalls($calls)
- );
- } elseif (count($methodCalls)) {
- $message = sprintf(
- "Expected exactly %d calls that match:\n".
- " %s->%s(%s)\n".
- "but none were made.\n".
- "Recorded `%s(...)` calls:\n%s",
-
- $this->times,
- get_class($object->reveal()),
- $method->getMethodName(),
- $method->getArgumentsWildcard(),
- $method->getMethodName(),
- $this->util->stringifyCalls($methodCalls)
- );
- } else {
- $message = sprintf(
- "Expected exactly %d calls that match:\n".
- " %s->%s(%s)\n".
- "but none were made.",
-
- $this->times,
- get_class($object->reveal()),
- $method->getMethodName(),
- $method->getArgumentsWildcard()
- );
- }
-
- throw new UnexpectedCallsCountException($message, $method, $this->times, $calls);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallbackPrediction.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallbackPrediction.php
deleted file mode 100644
index 44bc782c..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallbackPrediction.php
+++ /dev/null
@@ -1,65 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Prediction;
-
-use Prophecy\Call\Call;
-use Prophecy\Prophecy\ObjectProphecy;
-use Prophecy\Prophecy\MethodProphecy;
-use Prophecy\Exception\InvalidArgumentException;
-use Closure;
-
-/**
- * Callback prediction.
- *
- * @author Konstantin Kudryashov
- */
-class CallbackPrediction implements PredictionInterface
-{
- private $callback;
-
- /**
- * Initializes callback prediction.
- *
- * @param callable $callback Custom callback
- *
- * @throws \Prophecy\Exception\InvalidArgumentException
- */
- public function __construct($callback)
- {
- if (!is_callable($callback)) {
- throw new InvalidArgumentException(sprintf(
- 'Callable expected as an argument to CallbackPrediction, but got %s.',
- gettype($callback)
- ));
- }
-
- $this->callback = $callback;
- }
-
- /**
- * Executes preset callback.
- *
- * @param Call[] $calls
- * @param ObjectProphecy $object
- * @param MethodProphecy $method
- */
- public function check(array $calls, ObjectProphecy $object, MethodProphecy $method)
- {
- $callback = $this->callback;
-
- if ($callback instanceof Closure && method_exists('Closure', 'bind')) {
- $callback = Closure::bind($callback, $object);
- }
-
- call_user_func($callback, $calls, $object, $method);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Prediction/NoCallsPrediction.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Prediction/NoCallsPrediction.php
deleted file mode 100644
index 46ac5bfc..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Prediction/NoCallsPrediction.php
+++ /dev/null
@@ -1,68 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Prediction;
-
-use Prophecy\Call\Call;
-use Prophecy\Prophecy\ObjectProphecy;
-use Prophecy\Prophecy\MethodProphecy;
-use Prophecy\Util\StringUtil;
-use Prophecy\Exception\Prediction\UnexpectedCallsException;
-
-/**
- * No calls prediction.
- *
- * @author Konstantin Kudryashov
- */
-class NoCallsPrediction implements PredictionInterface
-{
- private $util;
-
- /**
- * Initializes prediction.
- *
- * @param null|StringUtil $util
- */
- public function __construct(StringUtil $util = null)
- {
- $this->util = $util ?: new StringUtil;
- }
-
- /**
- * Tests that there were no calls made.
- *
- * @param Call[] $calls
- * @param ObjectProphecy $object
- * @param MethodProphecy $method
- *
- * @throws \Prophecy\Exception\Prediction\UnexpectedCallsException
- */
- public function check(array $calls, ObjectProphecy $object, MethodProphecy $method)
- {
- if (!count($calls)) {
- return;
- }
-
- $verb = count($calls) === 1 ? 'was' : 'were';
-
- throw new UnexpectedCallsException(sprintf(
- "No calls expected that match:\n".
- " %s->%s(%s)\n".
- "but %d %s made:\n%s",
- get_class($object->reveal()),
- $method->getMethodName(),
- $method->getArgumentsWildcard(),
- count($calls),
- $verb,
- $this->util->stringifyCalls($calls)
- ), $method, $calls);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Prediction/PredictionInterface.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Prediction/PredictionInterface.php
deleted file mode 100644
index f7fb06a9..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Prediction/PredictionInterface.php
+++ /dev/null
@@ -1,37 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Prediction;
-
-use Prophecy\Call\Call;
-use Prophecy\Prophecy\ObjectProphecy;
-use Prophecy\Prophecy\MethodProphecy;
-
-/**
- * Prediction interface.
- * Predictions are logical test blocks, tied to `should...` keyword.
- *
- * @author Konstantin Kudryashov
- */
-interface PredictionInterface
-{
- /**
- * Tests that double fulfilled prediction.
- *
- * @param Call[] $calls
- * @param ObjectProphecy $object
- * @param MethodProphecy $method
- *
- * @throws object
- * @return void
- */
- public function check(array $calls, ObjectProphecy $object, MethodProphecy $method);
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Promise/CallbackPromise.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Promise/CallbackPromise.php
deleted file mode 100644
index 5f406bf7..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Promise/CallbackPromise.php
+++ /dev/null
@@ -1,66 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Promise;
-
-use Prophecy\Prophecy\ObjectProphecy;
-use Prophecy\Prophecy\MethodProphecy;
-use Prophecy\Exception\InvalidArgumentException;
-use Closure;
-
-/**
- * Callback promise.
- *
- * @author Konstantin Kudryashov
- */
-class CallbackPromise implements PromiseInterface
-{
- private $callback;
-
- /**
- * Initializes callback promise.
- *
- * @param callable $callback Custom callback
- *
- * @throws \Prophecy\Exception\InvalidArgumentException
- */
- public function __construct($callback)
- {
- if (!is_callable($callback)) {
- throw new InvalidArgumentException(sprintf(
- 'Callable expected as an argument to CallbackPromise, but got %s.',
- gettype($callback)
- ));
- }
-
- $this->callback = $callback;
- }
-
- /**
- * Evaluates promise callback.
- *
- * @param array $args
- * @param ObjectProphecy $object
- * @param MethodProphecy $method
- *
- * @return mixed
- */
- public function execute(array $args, ObjectProphecy $object, MethodProphecy $method)
- {
- $callback = $this->callback;
-
- if ($callback instanceof Closure && method_exists('Closure', 'bind')) {
- $callback = Closure::bind($callback, $object);
- }
-
- return call_user_func($callback, $args, $object, $method);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Promise/PromiseInterface.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Promise/PromiseInterface.php
deleted file mode 100644
index 382537b4..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Promise/PromiseInterface.php
+++ /dev/null
@@ -1,35 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Promise;
-
-use Prophecy\Prophecy\ObjectProphecy;
-use Prophecy\Prophecy\MethodProphecy;
-
-/**
- * Promise interface.
- * Promises are logical blocks, tied to `will...` keyword.
- *
- * @author Konstantin Kudryashov
- */
-interface PromiseInterface
-{
- /**
- * Evaluates promise.
- *
- * @param array $args
- * @param ObjectProphecy $object
- * @param MethodProphecy $method
- *
- * @return mixed
- */
- public function execute(array $args, ObjectProphecy $object, MethodProphecy $method);
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnArgumentPromise.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnArgumentPromise.php
deleted file mode 100644
index a06724bc..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnArgumentPromise.php
+++ /dev/null
@@ -1,61 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Promise;
-
-use Prophecy\Exception\InvalidArgumentException;
-use Prophecy\Prophecy\ObjectProphecy;
-use Prophecy\Prophecy\MethodProphecy;
-
-/**
- * Return argument promise.
- *
- * @author Konstantin Kudryashov
- */
-class ReturnArgumentPromise implements PromiseInterface
-{
- /**
- * @var int
- */
- private $index;
-
- /**
- * Initializes callback promise.
- *
- * @param int $index The zero-indexed number of the argument to return
- *
- * @throws \Prophecy\Exception\InvalidArgumentException
- */
- public function __construct($index = 0)
- {
- if (!is_int($index) || $index < 0) {
- throw new InvalidArgumentException(
- 'Zero-based index expected as argument to ReturnArgumentPromise, but got %s.',
- $index
- );
- }
- $this->index = $index;
- }
-
- /**
- * Returns nth argument if has one, null otherwise.
- *
- * @param array $args
- * @param ObjectProphecy $object
- * @param MethodProphecy $method
- *
- * @return null|mixed
- */
- public function execute(array $args, ObjectProphecy $object, MethodProphecy $method)
- {
- return count($args) > $this->index ? $args[$this->index] : null;
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnPromise.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnPromise.php
deleted file mode 100644
index c7d5ac59..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnPromise.php
+++ /dev/null
@@ -1,55 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Promise;
-
-use Prophecy\Prophecy\ObjectProphecy;
-use Prophecy\Prophecy\MethodProphecy;
-
-/**
- * Return promise.
- *
- * @author Konstantin Kudryashov
- */
-class ReturnPromise implements PromiseInterface
-{
- private $returnValues = array();
-
- /**
- * Initializes promise.
- *
- * @param array $returnValues Array of values
- */
- public function __construct(array $returnValues)
- {
- $this->returnValues = $returnValues;
- }
-
- /**
- * Returns saved values one by one until last one, then continuously returns last value.
- *
- * @param array $args
- * @param ObjectProphecy $object
- * @param MethodProphecy $method
- *
- * @return mixed
- */
- public function execute(array $args, ObjectProphecy $object, MethodProphecy $method)
- {
- $value = array_shift($this->returnValues);
-
- if (!count($this->returnValues)) {
- $this->returnValues[] = $value;
- }
-
- return $value;
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Promise/ThrowPromise.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Promise/ThrowPromise.php
deleted file mode 100644
index 8007330a..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Promise/ThrowPromise.php
+++ /dev/null
@@ -1,91 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Promise;
-
-use Doctrine\Instantiator\Instantiator;
-use Prophecy\Prophecy\ObjectProphecy;
-use Prophecy\Prophecy\MethodProphecy;
-use Prophecy\Exception\InvalidArgumentException;
-use ReflectionClass;
-
-/**
- * Throw promise.
- *
- * @author Konstantin Kudryashov
- */
-class ThrowPromise implements PromiseInterface
-{
- private $exception;
-
- /**
- * @var \Doctrine\Instantiator\Instantiator
- */
- private $instantiator;
-
- /**
- * Initializes promise.
- *
- * @param string|\Exception $exception Exception class name or instance
- *
- * @throws \Prophecy\Exception\InvalidArgumentException
- */
- public function __construct($exception)
- {
- if (is_string($exception)) {
- if (!class_exists($exception)
- && 'Exception' !== $exception
- && !is_subclass_of($exception, 'Exception')) {
- throw new InvalidArgumentException(sprintf(
- 'Exception class or instance expected as argument to ThrowPromise, but got %s.',
- gettype($exception)
- ));
- }
- } elseif (!$exception instanceof \Exception) {
- throw new InvalidArgumentException(sprintf(
- 'Exception class or instance expected as argument to ThrowPromise, but got %s.',
- gettype($exception)
- ));
- }
-
- $this->exception = $exception;
- }
-
- /**
- * Throws predefined exception.
- *
- * @param array $args
- * @param ObjectProphecy $object
- * @param MethodProphecy $method
- *
- * @throws object
- */
- public function execute(array $args, ObjectProphecy $object, MethodProphecy $method)
- {
- if (is_string($this->exception)) {
- $classname = $this->exception;
- $reflection = new ReflectionClass($classname);
- $constructor = $reflection->getConstructor();
-
- if ($constructor->isPublic() && 0 == $constructor->getNumberOfRequiredParameters()) {
- throw $reflection->newInstance();
- }
-
- if (!$this->instantiator) {
- $this->instantiator = new Instantiator();
- }
-
- throw $this->instantiator->instantiate($classname);
- }
-
- throw $this->exception;
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php
deleted file mode 100644
index 426df322..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php
+++ /dev/null
@@ -1,437 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Prophecy;
-
-use Prophecy\Argument;
-use Prophecy\Prophet;
-use Prophecy\Promise;
-use Prophecy\Prediction;
-use Prophecy\Exception\Doubler\MethodNotFoundException;
-use Prophecy\Exception\InvalidArgumentException;
-use Prophecy\Exception\Prophecy\MethodProphecyException;
-
-/**
- * Method prophecy.
- *
- * @author Konstantin Kudryashov
- */
-class MethodProphecy
-{
- private $objectProphecy;
- private $methodName;
- private $argumentsWildcard;
- private $promise;
- private $prediction;
- private $checkedPredictions = array();
- private $bound = false;
-
- /**
- * Initializes method prophecy.
- *
- * @param ObjectProphecy $objectProphecy
- * @param string $methodName
- * @param null|Argument\ArgumentsWildcard|array $arguments
- *
- * @throws \Prophecy\Exception\Doubler\MethodNotFoundException If method not found
- */
- public function __construct(ObjectProphecy $objectProphecy, $methodName, $arguments = null)
- {
- $double = $objectProphecy->reveal();
- if (!method_exists($double, $methodName)) {
- throw new MethodNotFoundException(sprintf(
- 'Method `%s::%s()` is not defined.', get_class($double), $methodName
- ), get_class($double), $methodName, $arguments);
- }
-
- $this->objectProphecy = $objectProphecy;
- $this->methodName = $methodName;
-
- $reflectedMethod = new \ReflectionMethod($double, $methodName);
- if ($reflectedMethod->isFinal()) {
- throw new MethodProphecyException(sprintf(
- "Can not add prophecy for a method `%s::%s()`\n".
- "as it is a final method.",
- get_class($double),
- $methodName
- ), $this);
- }
-
- if (null !== $arguments) {
- $this->withArguments($arguments);
- }
-
- if (version_compare(PHP_VERSION, '7.0', '>=') && true === $reflectedMethod->hasReturnType()) {
- $type = (string) $reflectedMethod->getReturnType();
- $this->will(function () use ($type) {
- switch ($type) {
- case 'string': return '';
- case 'float': return 0.0;
- case 'int': return 0;
- case 'bool': return false;
- case 'array': return array();
-
- case 'callable':
- case 'Closure':
- return function () {};
-
- case 'Traversable':
- case 'Generator':
- // Remove eval() when minimum version >=5.5
- $generator = eval('return function () { yield; };');
- return $generator();
-
- default:
- $prophet = new Prophet;
- return $prophet->prophesize($type)->reveal();
- }
- });
- }
- }
-
- /**
- * Sets argument wildcard.
- *
- * @param array|Argument\ArgumentsWildcard $arguments
- *
- * @return $this
- *
- * @throws \Prophecy\Exception\InvalidArgumentException
- */
- public function withArguments($arguments)
- {
- if (is_array($arguments)) {
- $arguments = new Argument\ArgumentsWildcard($arguments);
- }
-
- if (!$arguments instanceof Argument\ArgumentsWildcard) {
- throw new InvalidArgumentException(sprintf(
- "Either an array or an instance of ArgumentsWildcard expected as\n".
- 'a `MethodProphecy::withArguments()` argument, but got %s.',
- gettype($arguments)
- ));
- }
-
- $this->argumentsWildcard = $arguments;
-
- return $this;
- }
-
- /**
- * Sets custom promise to the prophecy.
- *
- * @param callable|Promise\PromiseInterface $promise
- *
- * @return $this
- *
- * @throws \Prophecy\Exception\InvalidArgumentException
- */
- public function will($promise)
- {
- if (is_callable($promise)) {
- $promise = new Promise\CallbackPromise($promise);
- }
-
- if (!$promise instanceof Promise\PromiseInterface) {
- throw new InvalidArgumentException(sprintf(
- 'Expected callable or instance of PromiseInterface, but got %s.',
- gettype($promise)
- ));
- }
-
- $this->bindToObjectProphecy();
- $this->promise = $promise;
-
- return $this;
- }
-
- /**
- * Sets return promise to the prophecy.
- *
- * @see Prophecy\Promise\ReturnPromise
- *
- * @return $this
- */
- public function willReturn()
- {
- return $this->will(new Promise\ReturnPromise(func_get_args()));
- }
-
- /**
- * Sets return argument promise to the prophecy.
- *
- * @param int $index The zero-indexed number of the argument to return
- *
- * @see Prophecy\Promise\ReturnArgumentPromise
- *
- * @return $this
- */
- public function willReturnArgument($index = 0)
- {
- return $this->will(new Promise\ReturnArgumentPromise($index));
- }
-
- /**
- * Sets throw promise to the prophecy.
- *
- * @see Prophecy\Promise\ThrowPromise
- *
- * @param string|\Exception $exception Exception class or instance
- *
- * @return $this
- */
- public function willThrow($exception)
- {
- return $this->will(new Promise\ThrowPromise($exception));
- }
-
- /**
- * Sets custom prediction to the prophecy.
- *
- * @param callable|Prediction\PredictionInterface $prediction
- *
- * @return $this
- *
- * @throws \Prophecy\Exception\InvalidArgumentException
- */
- public function should($prediction)
- {
- if (is_callable($prediction)) {
- $prediction = new Prediction\CallbackPrediction($prediction);
- }
-
- if (!$prediction instanceof Prediction\PredictionInterface) {
- throw new InvalidArgumentException(sprintf(
- 'Expected callable or instance of PredictionInterface, but got %s.',
- gettype($prediction)
- ));
- }
-
- $this->bindToObjectProphecy();
- $this->prediction = $prediction;
-
- return $this;
- }
-
- /**
- * Sets call prediction to the prophecy.
- *
- * @see Prophecy\Prediction\CallPrediction
- *
- * @return $this
- */
- public function shouldBeCalled()
- {
- return $this->should(new Prediction\CallPrediction);
- }
-
- /**
- * Sets no calls prediction to the prophecy.
- *
- * @see Prophecy\Prediction\NoCallsPrediction
- *
- * @return $this
- */
- public function shouldNotBeCalled()
- {
- return $this->should(new Prediction\NoCallsPrediction);
- }
-
- /**
- * Sets call times prediction to the prophecy.
- *
- * @see Prophecy\Prediction\CallTimesPrediction
- *
- * @param $count
- *
- * @return $this
- */
- public function shouldBeCalledTimes($count)
- {
- return $this->should(new Prediction\CallTimesPrediction($count));
- }
-
- /**
- * Checks provided prediction immediately.
- *
- * @param callable|Prediction\PredictionInterface $prediction
- *
- * @return $this
- *
- * @throws \Prophecy\Exception\InvalidArgumentException
- */
- public function shouldHave($prediction)
- {
- if (is_callable($prediction)) {
- $prediction = new Prediction\CallbackPrediction($prediction);
- }
-
- if (!$prediction instanceof Prediction\PredictionInterface) {
- throw new InvalidArgumentException(sprintf(
- 'Expected callable or instance of PredictionInterface, but got %s.',
- gettype($prediction)
- ));
- }
-
- if (null === $this->promise) {
- $this->willReturn();
- }
-
- $calls = $this->getObjectProphecy()->findProphecyMethodCalls(
- $this->getMethodName(),
- $this->getArgumentsWildcard()
- );
-
- try {
- $prediction->check($calls, $this->getObjectProphecy(), $this);
- $this->checkedPredictions[] = $prediction;
- } catch (\Exception $e) {
- $this->checkedPredictions[] = $prediction;
-
- throw $e;
- }
-
- return $this;
- }
-
- /**
- * Checks call prediction.
- *
- * @see Prophecy\Prediction\CallPrediction
- *
- * @return $this
- */
- public function shouldHaveBeenCalled()
- {
- return $this->shouldHave(new Prediction\CallPrediction);
- }
-
- /**
- * Checks no calls prediction.
- *
- * @see Prophecy\Prediction\NoCallsPrediction
- *
- * @return $this
- */
- public function shouldNotHaveBeenCalled()
- {
- return $this->shouldHave(new Prediction\NoCallsPrediction);
- }
-
- /**
- * Checks no calls prediction.
- *
- * @see Prophecy\Prediction\NoCallsPrediction
- * @deprecated
- *
- * @return $this
- */
- public function shouldNotBeenCalled()
- {
- return $this->shouldNotHaveBeenCalled();
- }
-
- /**
- * Checks call times prediction.
- *
- * @see Prophecy\Prediction\CallTimesPrediction
- *
- * @param int $count
- *
- * @return $this
- */
- public function shouldHaveBeenCalledTimes($count)
- {
- return $this->shouldHave(new Prediction\CallTimesPrediction($count));
- }
-
- /**
- * Checks currently registered [with should(...)] prediction.
- */
- public function checkPrediction()
- {
- if (null === $this->prediction) {
- return;
- }
-
- $this->shouldHave($this->prediction);
- }
-
- /**
- * Returns currently registered promise.
- *
- * @return null|Promise\PromiseInterface
- */
- public function getPromise()
- {
- return $this->promise;
- }
-
- /**
- * Returns currently registered prediction.
- *
- * @return null|Prediction\PredictionInterface
- */
- public function getPrediction()
- {
- return $this->prediction;
- }
-
- /**
- * Returns predictions that were checked on this object.
- *
- * @return Prediction\PredictionInterface[]
- */
- public function getCheckedPredictions()
- {
- return $this->checkedPredictions;
- }
-
- /**
- * Returns object prophecy this method prophecy is tied to.
- *
- * @return ObjectProphecy
- */
- public function getObjectProphecy()
- {
- return $this->objectProphecy;
- }
-
- /**
- * Returns method name.
- *
- * @return string
- */
- public function getMethodName()
- {
- return $this->methodName;
- }
-
- /**
- * Returns arguments wildcard.
- *
- * @return Argument\ArgumentsWildcard
- */
- public function getArgumentsWildcard()
- {
- return $this->argumentsWildcard;
- }
-
- private function bindToObjectProphecy()
- {
- if ($this->bound) {
- return;
- }
-
- $this->getObjectProphecy()->addMethodProphecy($this);
- $this->bound = true;
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php
deleted file mode 100644
index 43dba46d..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php
+++ /dev/null
@@ -1,279 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Prophecy;
-
-use SebastianBergmann\Comparator\ComparisonFailure;
-use Prophecy\Comparator\Factory as ComparatorFactory;
-use Prophecy\Call\Call;
-use Prophecy\Doubler\LazyDouble;
-use Prophecy\Argument\ArgumentsWildcard;
-use Prophecy\Call\CallCenter;
-use Prophecy\Exception\Prophecy\ObjectProphecyException;
-use Prophecy\Exception\Prophecy\MethodProphecyException;
-use Prophecy\Exception\Prediction\AggregateException;
-use Prophecy\Exception\Prediction\PredictionException;
-
-/**
- * Object prophecy.
- *
- * @author Konstantin Kudryashov
- */
-class ObjectProphecy implements ProphecyInterface
-{
- private $lazyDouble;
- private $callCenter;
- private $revealer;
- private $comparatorFactory;
-
- /**
- * @var MethodProphecy[][]
- */
- private $methodProphecies = array();
-
- /**
- * Initializes object prophecy.
- *
- * @param LazyDouble $lazyDouble
- * @param CallCenter $callCenter
- * @param RevealerInterface $revealer
- * @param ComparatorFactory $comparatorFactory
- */
- public function __construct(
- LazyDouble $lazyDouble,
- CallCenter $callCenter = null,
- RevealerInterface $revealer = null,
- ComparatorFactory $comparatorFactory = null
- ) {
- $this->lazyDouble = $lazyDouble;
- $this->callCenter = $callCenter ?: new CallCenter;
- $this->revealer = $revealer ?: new Revealer;
-
- $this->comparatorFactory = $comparatorFactory ?: ComparatorFactory::getInstance();
- }
-
- /**
- * Forces double to extend specific class.
- *
- * @param string $class
- *
- * @return $this
- */
- public function willExtend($class)
- {
- $this->lazyDouble->setParentClass($class);
-
- return $this;
- }
-
- /**
- * Forces double to implement specific interface.
- *
- * @param string $interface
- *
- * @return $this
- */
- public function willImplement($interface)
- {
- $this->lazyDouble->addInterface($interface);
-
- return $this;
- }
-
- /**
- * Sets constructor arguments.
- *
- * @param array $arguments
- *
- * @return $this
- */
- public function willBeConstructedWith(array $arguments = null)
- {
- $this->lazyDouble->setArguments($arguments);
-
- return $this;
- }
-
- /**
- * Reveals double.
- *
- * @return object
- *
- * @throws \Prophecy\Exception\Prophecy\ObjectProphecyException If double doesn't implement needed interface
- */
- public function reveal()
- {
- $double = $this->lazyDouble->getInstance();
-
- if (null === $double || !$double instanceof ProphecySubjectInterface) {
- throw new ObjectProphecyException(
- "Generated double must implement ProphecySubjectInterface, but it does not.\n".
- 'It seems you have wrongly configured doubler without required ClassPatch.',
- $this
- );
- }
-
- $double->setProphecy($this);
-
- return $double;
- }
-
- /**
- * Adds method prophecy to object prophecy.
- *
- * @param MethodProphecy $methodProphecy
- *
- * @throws \Prophecy\Exception\Prophecy\MethodProphecyException If method prophecy doesn't
- * have arguments wildcard
- */
- public function addMethodProphecy(MethodProphecy $methodProphecy)
- {
- $argumentsWildcard = $methodProphecy->getArgumentsWildcard();
- if (null === $argumentsWildcard) {
- throw new MethodProphecyException(sprintf(
- "Can not add prophecy for a method `%s::%s()`\n".
- "as you did not specify arguments wildcard for it.",
- get_class($this->reveal()),
- $methodProphecy->getMethodName()
- ), $methodProphecy);
- }
-
- $methodName = $methodProphecy->getMethodName();
-
- if (!isset($this->methodProphecies[$methodName])) {
- $this->methodProphecies[$methodName] = array();
- }
-
- $this->methodProphecies[$methodName][] = $methodProphecy;
- }
-
- /**
- * Returns either all or related to single method prophecies.
- *
- * @param null|string $methodName
- *
- * @return MethodProphecy[]
- */
- public function getMethodProphecies($methodName = null)
- {
- if (null === $methodName) {
- return $this->methodProphecies;
- }
-
- if (!isset($this->methodProphecies[$methodName])) {
- return array();
- }
-
- return $this->methodProphecies[$methodName];
- }
-
- /**
- * Makes specific method call.
- *
- * @param string $methodName
- * @param array $arguments
- *
- * @return mixed
- */
- public function makeProphecyMethodCall($methodName, array $arguments)
- {
- $arguments = $this->revealer->reveal($arguments);
- $return = $this->callCenter->makeCall($this, $methodName, $arguments);
-
- return $this->revealer->reveal($return);
- }
-
- /**
- * Finds calls by method name & arguments wildcard.
- *
- * @param string $methodName
- * @param ArgumentsWildcard $wildcard
- *
- * @return Call[]
- */
- public function findProphecyMethodCalls($methodName, ArgumentsWildcard $wildcard)
- {
- return $this->callCenter->findCalls($methodName, $wildcard);
- }
-
- /**
- * Checks that registered method predictions do not fail.
- *
- * @throws \Prophecy\Exception\Prediction\AggregateException If any of registered predictions fail
- */
- public function checkProphecyMethodsPredictions()
- {
- $exception = new AggregateException(sprintf("%s:\n", get_class($this->reveal())));
- $exception->setObjectProphecy($this);
-
- foreach ($this->methodProphecies as $prophecies) {
- foreach ($prophecies as $prophecy) {
- try {
- $prophecy->checkPrediction();
- } catch (PredictionException $e) {
- $exception->append($e);
- }
- }
- }
-
- if (count($exception->getExceptions())) {
- throw $exception;
- }
- }
-
- /**
- * Creates new method prophecy using specified method name and arguments.
- *
- * @param string $methodName
- * @param array $arguments
- *
- * @return MethodProphecy
- */
- public function __call($methodName, array $arguments)
- {
- $arguments = new ArgumentsWildcard($this->revealer->reveal($arguments));
-
- foreach ($this->getMethodProphecies($methodName) as $prophecy) {
- $argumentsWildcard = $prophecy->getArgumentsWildcard();
- $comparator = $this->comparatorFactory->getComparatorFor(
- $argumentsWildcard, $arguments
- );
-
- try {
- $comparator->assertEquals($argumentsWildcard, $arguments);
- return $prophecy;
- } catch (ComparisonFailure $failure) {}
- }
-
- return new MethodProphecy($this, $methodName, $arguments);
- }
-
- /**
- * Tries to get property value from double.
- *
- * @param string $name
- */
- public function __get($name)
- {
- return $this->reveal()->$name;
- }
-
- /**
- * Tries to set property value to double.
- *
- * @param string $name
- * @param string $value
- */
- public function __set($name, $value)
- {
- $this->reveal()->$name = $this->revealer->reveal($value);
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecyInterface.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecyInterface.php
deleted file mode 100644
index 462f15a9..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecyInterface.php
+++ /dev/null
@@ -1,27 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Prophecy;
-
-/**
- * Core Prophecy interface.
- *
- * @author Konstantin Kudryashov
- */
-interface ProphecyInterface
-{
- /**
- * Reveals prophecy object (double) .
- *
- * @return object
- */
- public function reveal();
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecySubjectInterface.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecySubjectInterface.php
deleted file mode 100644
index 2d839585..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecySubjectInterface.php
+++ /dev/null
@@ -1,34 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Prophecy;
-
-/**
- * Controllable doubles interface.
- *
- * @author Konstantin Kudryashov
- */
-interface ProphecySubjectInterface
-{
- /**
- * Sets subject prophecy.
- *
- * @param ProphecyInterface $prophecy
- */
- public function setProphecy(ProphecyInterface $prophecy);
-
- /**
- * Returns subject prophecy.
- *
- * @return ProphecyInterface
- */
- public function getProphecy();
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Prophecy/Revealer.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Prophecy/Revealer.php
deleted file mode 100644
index 60ecdac8..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Prophecy/Revealer.php
+++ /dev/null
@@ -1,44 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Prophecy;
-
-/**
- * Basic prophecies revealer.
- *
- * @author Konstantin Kudryashov
- */
-class Revealer implements RevealerInterface
-{
- /**
- * Unwraps value(s).
- *
- * @param mixed $value
- *
- * @return mixed
- */
- public function reveal($value)
- {
- if (is_array($value)) {
- return array_map(array($this, __FUNCTION__), $value);
- }
-
- if (!is_object($value)) {
- return $value;
- }
-
- if ($value instanceof ProphecyInterface) {
- $value = $value->reveal();
- }
-
- return $value;
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Prophecy/RevealerInterface.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Prophecy/RevealerInterface.php
deleted file mode 100644
index ffc82bb6..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Prophecy/RevealerInterface.php
+++ /dev/null
@@ -1,29 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Prophecy;
-
-/**
- * Prophecies revealer interface.
- *
- * @author Konstantin Kudryashov
- */
-interface RevealerInterface
-{
- /**
- * Unwraps value(s).
- *
- * @param mixed $value
- *
- * @return mixed
- */
- public function reveal($value);
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Prophet.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Prophet.php
deleted file mode 100644
index ac649234..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Prophet.php
+++ /dev/null
@@ -1,134 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy;
-
-use Prophecy\Doubler\Doubler;
-use Prophecy\Doubler\LazyDouble;
-use Prophecy\Doubler\ClassPatch;
-use Prophecy\Prophecy\ObjectProphecy;
-use Prophecy\Prophecy\RevealerInterface;
-use Prophecy\Prophecy\Revealer;
-use Prophecy\Call\CallCenter;
-use Prophecy\Util\StringUtil;
-use Prophecy\Exception\Prediction\PredictionException;
-use Prophecy\Exception\Prediction\AggregateException;
-
-/**
- * Prophet creates prophecies.
- *
- * @author Konstantin Kudryashov
- */
-class Prophet
-{
- private $doubler;
- private $revealer;
- private $util;
-
- /**
- * @var ObjectProphecy[]
- */
- private $prophecies = array();
-
- /**
- * Initializes Prophet.
- *
- * @param null|Doubler $doubler
- * @param null|RevealerInterface $revealer
- * @param null|StringUtil $util
- */
- public function __construct(Doubler $doubler = null, RevealerInterface $revealer = null,
- StringUtil $util = null)
- {
- if (null === $doubler) {
- $doubler = new Doubler;
- $doubler->registerClassPatch(new ClassPatch\SplFileInfoPatch);
- $doubler->registerClassPatch(new ClassPatch\TraversablePatch);
- $doubler->registerClassPatch(new ClassPatch\DisableConstructorPatch);
- $doubler->registerClassPatch(new ClassPatch\ProphecySubjectPatch);
- $doubler->registerClassPatch(new ClassPatch\ReflectionClassNewInstancePatch);
- $doubler->registerClassPatch(new ClassPatch\HhvmExceptionPatch());
- $doubler->registerClassPatch(new ClassPatch\MagicCallPatch);
- $doubler->registerClassPatch(new ClassPatch\KeywordPatch);
- }
-
- $this->doubler = $doubler;
- $this->revealer = $revealer ?: new Revealer;
- $this->util = $util ?: new StringUtil;
- }
-
- /**
- * Creates new object prophecy.
- *
- * @param null|string $classOrInterface Class or interface name
- *
- * @return ObjectProphecy
- */
- public function prophesize($classOrInterface = null)
- {
- $this->prophecies[] = $prophecy = new ObjectProphecy(
- new LazyDouble($this->doubler),
- new CallCenter($this->util),
- $this->revealer
- );
-
- if ($classOrInterface && class_exists($classOrInterface)) {
- return $prophecy->willExtend($classOrInterface);
- }
-
- if ($classOrInterface && interface_exists($classOrInterface)) {
- return $prophecy->willImplement($classOrInterface);
- }
-
- return $prophecy;
- }
-
- /**
- * Returns all created object prophecies.
- *
- * @return ObjectProphecy[]
- */
- public function getProphecies()
- {
- return $this->prophecies;
- }
-
- /**
- * Returns Doubler instance assigned to this Prophet.
- *
- * @return Doubler
- */
- public function getDoubler()
- {
- return $this->doubler;
- }
-
- /**
- * Checks all predictions defined by prophecies of this Prophet.
- *
- * @throws Exception\Prediction\AggregateException If any prediction fails
- */
- public function checkPredictions()
- {
- $exception = new AggregateException("Some predictions failed:\n");
- foreach ($this->prophecies as $prophecy) {
- try {
- $prophecy->checkProphecyMethodsPredictions();
- } catch (PredictionException $e) {
- $exception->append($e);
- }
- }
-
- if (count($exception->getExceptions())) {
- throw $exception;
- }
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php
deleted file mode 100644
index 54d38321..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php
+++ /dev/null
@@ -1,185 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Exporting utility.
- *
- * This class is derived from the PHPUnit testing framework.
- *
- * @author Sebastiaan Stok
- * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License>
- */
-class ExportUtil
-{
- /**
- * Exports a value into 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 The value to export
- * @param integer $indentation The indentation level of the 2nd+ line
- *
- * @return string
- */
- public static function export($value, $indentation = 0)
- {
- return static::recursiveExport($value, $indentation);
- }
-
- /**
- * Converts an object to an array containing all of its private, protected
- * and public properties.
- *
- * @param object $object
- *
- * @return array
- */
- public static function toArray($object)
- {
- $array = array();
-
- foreach ((array) $object as $key => $value) {
- // 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];
- }
-
- $array[$key] = $value;
- }
-
- // Some internal classes like SplObjectStorage don't work with the
- // above (fast) mechanism nor with reflection
- // Format the output similarly to print_r() in this case
- if ($object instanceof SplObjectStorage) {
- foreach ($object as $key => $value) {
- $array[spl_object_hash($value)] = array(
- 'obj' => $value,
- 'inf' => $object->getInfo(),
- );
- }
- }
-
- return $array;
- }
-
- /**
- * Recursive implementation of export.
- *
- * @param mixed $value The value to export
- * @param integer $indentation The indentation level of the 2nd+ line
- * @param array $processedObjects Contains all objects that were already
- * rendered
- *
- * @return string
- */
- protected static function recursiveExport($value, $indentation, &$processedObjects = array())
- {
- if ($value === null) {
- return 'null';
- }
-
- if ($value === true) {
- return 'true';
- }
-
- if ($value === false) {
- return 'false';
- }
-
- if (is_string($value)) {
- // Match for most non printable chars somewhat taking multibyte chars into account
- if (preg_match('/[^\x09-\x0d\x20-\xff]/', $value)) {
- return 'Binary String: 0x' . bin2hex($value);
- }
-
- return "'" . str_replace(array("\r\n", "\n\r", "\r"), array("\n", "\n", "\n"), $value) . "'";
- }
-
- $origValue = $value;
-
- if (is_object($value)) {
- if ($value instanceof ProphecyInterface) {
- return sprintf('%s Object (*Prophecy*)', get_class($value));
- } elseif (in_array($value, $processedObjects, true)) {
- return sprintf('%s Object (*RECURSION*)', get_class($value));
- }
-
- $processedObjects[] = $value;
-
- // Convert object to array
- $value = self::toArray($value);
- }
-
- if (is_array($value)) {
- $whitespace = str_repeat(' ', $indentation);
-
- // There seems to be no other way to check arrays for recursion
- // http://www.php.net/manual/en/language.types.array.php#73936
- preg_match_all('/\n \[(\w+)\] => Array\s+\*RECURSION\*/', print_r($value, true), $matches);
- $recursiveKeys = array_unique($matches[1]);
-
- // Convert to valid array keys
- // Numeric integer strings are automatically converted to integers
- // by PHP
- foreach ($recursiveKeys as $key => $recursiveKey) {
- if ((string) (integer) $recursiveKey === $recursiveKey) {
- $recursiveKeys[$key] = (integer) $recursiveKey;
- }
- }
-
- $content = '';
-
- foreach ($value as $key => $val) {
- if (in_array($key, $recursiveKeys, true)) {
- $val = 'Array (*RECURSION*)';
- } else {
- $val = self::recursiveExport($val, $indentation + 1, $processedObjects);
- }
-
- $content .= $whitespace . ' ' . self::export($key) . ' => ' . $val . "\n";
- }
-
- if (strlen($content) > 0) {
- $content = "\n" . $content . $whitespace;
- }
-
- return sprintf(
- "%s (%s)",
- is_object($origValue) ? sprintf('%s:%s', get_class($origValue), spl_object_hash($origValue)) . ' Object' : 'Array', $content
- );
- }
-
- if (is_double($value) && (double)(integer) $value === $value) {
- return $value . '.0';
- }
-
- return (string) $value;
- }
-}
diff --git a/tests/vendor/phpspec/prophecy/src/Prophecy/Util/StringUtil.php b/tests/vendor/phpspec/prophecy/src/Prophecy/Util/StringUtil.php
deleted file mode 100644
index bb90156a..00000000
--- a/tests/vendor/phpspec/prophecy/src/Prophecy/Util/StringUtil.php
+++ /dev/null
@@ -1,89 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy\Util;
-
-use Prophecy\Call\Call;
-
-/**
- * String utility.
- *
- * @author Konstantin Kudryashov
- */
-class StringUtil
-{
- /**
- * Stringifies any provided value.
- *
- * @param mixed $value
- * @param boolean $exportObject
- *
- * @return string
- */
- public function stringify($value, $exportObject = true)
- {
- if (is_array($value)) {
- if (range(0, count($value) - 1) === array_keys($value)) {
- return '['.implode(', ', array_map(array($this, __FUNCTION__), $value)).']';
- }
-
- $stringify = array($this, __FUNCTION__);
-
- return '['.implode(', ', array_map(function ($item, $key) use ($stringify) {
- return (is_integer($key) ? $key : '"'.$key.'"').
- ' => '.call_user_func($stringify, $item);
- }, $value, array_keys($value))).']';
- }
- if (is_resource($value)) {
- return get_resource_type($value).':'.$value;
- }
- if (is_object($value)) {
- return $exportObject ? ExportUtil::export($value) : sprintf('%s:%s', get_class($value), spl_object_hash($value));
- }
- if (true === $value || false === $value) {
- return $value ? 'true' : 'false';
- }
- if (is_string($value)) {
- $str = sprintf('"%s"', str_replace("\n", '\\n', $value));
-
- if (50 <= strlen($str)) {
- return substr($str, 0, 50).'"...';
- }
-
- return $str;
- }
- if (null === $value) {
- return 'null';
- }
-
- return (string) $value;
- }
-
- /**
- * Stringifies provided array of calls.
- *
- * @param Call[] $calls Array of Call instances
- *
- * @return string
- */
- public function stringifyCalls(array $calls)
- {
- $self = $this;
-
- return implode(PHP_EOL, array_map(function (Call $call) use ($self) {
- return sprintf(' - %s(%s) @ %s',
- $call->getMethodName(),
- implode(', ', array_map(array($self, 'stringify'), $call->getArguments())),
- str_replace(GETCWD().DIRECTORY_SEPARATOR, '', $call->getCallPlace())
- );
- }, $calls));
- }
-}
diff --git a/tests/vendor/phpunit/php-code-coverage/.php_cs b/tests/vendor/phpunit/php-code-coverage/.php_cs
deleted file mode 100644
index 44bebf6a..00000000
--- a/tests/vendor/phpunit/php-code-coverage/.php_cs
+++ /dev/null
@@ -1,43 +0,0 @@
-files()
- ->in('src')
- ->in('tests')
- ->name('*.php');
-
-return Symfony\CS\Config\Config::create()
- ->level(\Symfony\CS\FixerInterface::NONE_LEVEL)
- ->fixers(
- array(
- 'duplicate_semicolon',
- 'empty_return',
- 'extra_empty_lines',
- 'join_function',
- 'list_commas',
- 'no_blank_lines_after_class_opening',
- 'no_empty_lines_after_phpdocs',
- 'phpdoc_indent',
- 'phpdoc_no_access',
- 'phpdoc_no_empty_return',
- 'phpdoc_no_package',
- 'phpdoc_params',
- 'phpdoc_scalar',
- 'phpdoc_to_comment',
- 'phpdoc_trim',
- 'return',
- 'self_accessor',
- 'single_quote',
- 'spaces_before_semicolon',
- 'spaces_cast',
- 'ternary_spaces',
- 'trim_array_spaces',
- 'unused_use',
- 'whitespacy_lines',
- 'align_double_arrow',
- 'align_equals',
- 'concat_with_spaces',
- 'short_array_syntax'
- )
- )
- ->finder($finder);
-
diff --git a/tests/vendor/phpunit/php-code-coverage/.travis.yml b/tests/vendor/phpunit/php-code-coverage/.travis.yml
index 8bceea85..5c23715f 100644
--- a/tests/vendor/phpunit/php-code-coverage/.travis.yml
+++ b/tests/vendor/phpunit/php-code-coverage/.travis.yml
@@ -1,10 +1,14 @@
language: php
php:
+ - 5.3.3
+ - 5.3
+ - 5.4
+ - 5.5
- 5.6
before_script:
- - COMPOSER_ROOT_VERSION=dev-master composer install --prefer-source
+ - COMPOSER_ROOT_VERSION=dev-master composer install --dev --prefer-source
script: vendor/bin/phpunit --configuration ./build/travis-ci.xml
diff --git a/tests/vendor/phpunit/php-code-coverage/CONTRIBUTING.md b/tests/vendor/phpunit/php-code-coverage/CONTRIBUTING.md
index 76a43458..40dbc25e 100644
--- a/tests/vendor/phpunit/php-code-coverage/CONTRIBUTING.md
+++ b/tests/vendor/phpunit/php-code-coverage/CONTRIBUTING.md
@@ -1 +1,5 @@
-Please refer to [https://github.com/sebastianbergmann/phpunit/blob/master/CONTRIBUTING.md](https://github.com/sebastianbergmann/phpunit/blob/master/CONTRIBUTING.md) for details on how to contribute to this project.
+Pull Requests for bug fixes should be made against the current release branch (2.0).
+
+Pull Requests for new features should be made against master.
+
+For further notes please refer to [https://github.com/sebastianbergmann/phpunit/blob/master/CONTRIBUTING.md](https://github.com/sebastianbergmann/phpunit/blob/master/CONTRIBUTING.md)
diff --git a/tests/vendor/phpunit/php-code-coverage/ChangeLog-2.2.md b/tests/vendor/phpunit/php-code-coverage/ChangeLog-2.2.md
deleted file mode 100644
index 353b6f65..00000000
--- a/tests/vendor/phpunit/php-code-coverage/ChangeLog-2.2.md
+++ /dev/null
@@ -1,56 +0,0 @@
-# Changes in PHP_CodeCoverage 2.2
-
-All notable changes of the PHP_CodeCoverage 2.2 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
-
-## [2.2.4] - 2015-10-06
-
-### Fixed
-
-* Fixed [#391](https://github.com/sebastianbergmann/php-code-coverage/pull/391): Missing `` tag
-
-## [2.2.3] - 2015-09-14
-
-### Fixed
-
-* Fixed [#368](https://github.com/sebastianbergmann/php-code-coverage/pull/368): Blacklists and whitelists are not merged when merging data sets
-* Fixed [#370](https://github.com/sebastianbergmann/php-code-coverage/issues/370): Confusing statistics for source file that declares a class without methods
-* Fixed [#372](https://github.com/sebastianbergmann/php-code-coverage/pull/372): Nested classes and functions are not handled correctly
-* Fixed [#382](https://github.com/sebastianbergmann/php-code-coverage/issues/382): Crap4J report generates incorrect XML logfile
-
-## [2.2.2] - 2015-08-04
-
-### Added
-
-* Reintroduced the `PHP_CodeCoverage_Driver_HHVM` driver as an extension of `PHP_CodeCoverage_Driver_Xdebug` that does not use `xdebug_start_code_coverage()` with options not supported by HHVM
-
-### Changed
-
-* Bumped required version of `sebastian/environment` to 1.3.2 for [#365](https://github.com/sebastianbergmann/php-code-coverage/issues/365)
-
-## [2.2.1] - 2015-08-02
-
-### Changed
-
-* Bumped required version of `sebastian/environment` to 1.3.1 for [#365](https://github.com/sebastianbergmann/php-code-coverage/issues/365)
-
-## [2.2.0] - 2015-08-01
-
-### Added
-
-* Added a driver for PHPDBG (requires PHP 7)
-* Added `PHP_CodeCoverage::setDisableIgnoredLines()` to disable the ignoring of lines using annotations such as `@codeCoverageIgnore`
-
-### Changed
-
-* Annotating a method with `@deprecated` now has the same effect as annotating it with `@codeCoverageIgnore`
-
-### Removed
-
-* The dedicated driver for HHVM, `PHP_CodeCoverage_Driver_HHVM` has been removed
-
-[2.2.4]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.2.3...2.2.4
-[2.2.3]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.2.2...2.2.3
-[2.2.2]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.2.1...2.2.2
-[2.2.1]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.2.0...2.2.1
-[2.2.0]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.1...2.2.0
-
diff --git a/tests/vendor/phpunit/php-code-coverage/ChangeLog-3.0.md b/tests/vendor/phpunit/php-code-coverage/ChangeLog-3.0.md
deleted file mode 100644
index af7eaeb1..00000000
--- a/tests/vendor/phpunit/php-code-coverage/ChangeLog-3.0.md
+++ /dev/null
@@ -1,24 +0,0 @@
-# Changes in PHP_CodeCoverage 3.0
-
-All notable changes of the PHP_CodeCoverage 3.0 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
-
-## [3.0.1] - 2015-10-06
-
-### Fixed
-
-* Fixed [#391](https://github.com/sebastianbergmann/php-code-coverage/pull/391): Missing `` tag
-
-## [3.0.0] - 2015-10-02
-
-### Changed
-
-* It is now mandatory to configure a whitelist
-
-### Removed
-
-* The blacklist functionality has been removed
-* PHP_CodeCoverage is no longer supported on PHP 5.3, PHP 5.4, and PHP 5.5
-
-[3.0.1]: https://github.com/sebastianbergmann/php-code-coverage/compare/3.0.0...3.0.1
-[3.0.0]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.2...3.0.0
-
diff --git a/tests/vendor/phpunit/php-code-coverage/README.md b/tests/vendor/phpunit/php-code-coverage/README.md
index 43dcb61b..6ca608a4 100644
--- a/tests/vendor/phpunit/php-code-coverage/README.md
+++ b/tests/vendor/phpunit/php-code-coverage/README.md
@@ -7,27 +7,16 @@
## Requirements
-PHP 5.6 is required but using the latest version of PHP is highly recommended
-
-### PHP 5
-
-[Xdebug](http://xdebug.org/) is the only source of raw code coverage data supported for PHP 5. Version 2.1.3 of Xdebug is required but using the latest version is highly recommended.
-
-### PHP 7
-
-[phpdbg](http://phpdbg.com/docs) is currently the only source of raw code coverage data supported for PHP 7. Once Xdebug has been updated for PHP 7 it, too, will be supported.
-
-### HHVM
-
-A version of HHVM that implements the Xdebug API for code coverage (`xdebug_*_code_coverage()`) is required.
+* PHP 5.3.3 is required but using the latest version of PHP is highly recommended
+* [Xdebug](http://xdebug.org/) 2.1.3 is required but using the latest version of Xdebug is highly recommended
## Installation
-To add PHP_CodeCoverage as a local, per-project dependency to your project, simply add a dependency on `phpunit/php-code-coverage` to your project's `composer.json` file. Here is a minimal example of a `composer.json` file that just defines a dependency on PHP_CodeCoverage 3.0:
+To add PHP_CodeCoverage as a local, per-project dependency to your project, simply add a dependency on `phpunit/php-code-coverage` to your project's `composer.json` file. Here is a minimal example of a `composer.json` file that just defines a dependency on PHP_CodeCoverage 2.0:
{
"require": {
- "phpunit/php-code-coverage": "^3"
+ "phpunit/php-code-coverage": "~2.0"
}
}
@@ -48,3 +37,4 @@ $writer->process($coverage, '/tmp/clover.xml');
$writer = new PHP_CodeCoverage_Report_HTML;
$writer->process($coverage, '/tmp/code-coverage-report');
```
+
diff --git a/tests/vendor/phpunit/php-code-coverage/composer.json b/tests/vendor/phpunit/php-code-coverage/composer.json
index 7c062282..23df5ba3 100644
--- a/tests/vendor/phpunit/php-code-coverage/composer.json
+++ b/tests/vendor/phpunit/php-code-coverage/composer.json
@@ -21,15 +21,15 @@
"irc": "irc://irc.freenode.net/phpunit"
},
"require": {
- "php": ">=5.6",
+ "php": ">=5.3.3",
"phpunit/php-file-iterator": "~1.3",
"phpunit/php-token-stream": "~1.3",
"phpunit/php-text-template": "~1.2",
- "sebastian/environment": "^1.3.2",
+ "sebastian/environment": "~1.0",
"sebastian/version": "~1.0"
},
"require-dev": {
- "phpunit/phpunit": "~5",
+ "phpunit/phpunit": "~4",
"ext-xdebug": ">=2.1.4"
},
"suggest": {
@@ -44,7 +44,7 @@
},
"extra": {
"branch-alias": {
- "dev-master": "3.0.x-dev"
+ "dev-master": "2.0.x-dev"
}
}
}
diff --git a/tests/vendor/phpunit/php-code-coverage/scripts/auto_append.php b/tests/vendor/phpunit/php-code-coverage/scripts/auto_append.php
new file mode 100644
index 00000000..6cd768d3
--- /dev/null
+++ b/tests/vendor/phpunit/php-code-coverage/scripts/auto_append.php
@@ -0,0 +1,5 @@
+stop();
+
+$writer = new PHP_CodeCoverage_Report_HTML;
+$writer->process($coverage, '/tmp/coverage');
diff --git a/tests/vendor/phpunit/php-code-coverage/scripts/auto_prepend.php b/tests/vendor/phpunit/php-code-coverage/scripts/auto_prepend.php
new file mode 100644
index 00000000..7a8887a5
--- /dev/null
+++ b/tests/vendor/phpunit/php-code-coverage/scripts/auto_prepend.php
@@ -0,0 +1,10 @@
+filter();
+
+$filter->addFileToBlacklist(__FILE__);
+$filter->addFileToBlacklist(dirname(__FILE__) . '/auto_append.php');
+
+$coverage->start($_SERVER['SCRIPT_FILENAME']);
diff --git a/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage.php b/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage.php
index 65dfea5f..5725917b 100644
--- a/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage.php
+++ b/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage.php
@@ -13,7 +13,13 @@
/**
* Provides collection functionality for PHP code coverage information.
*
- * @since Class available since Release 1.0.0
+ * @category PHP
+ * @package CodeCoverage
+ * @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-code-coverage
+ * @since Class available since Release 1.0.0
*/
class PHP_CodeCoverage
{
@@ -28,32 +34,32 @@ class PHP_CodeCoverage
private $filter;
/**
- * @var bool
+ * @var boolean
*/
private $cacheTokens = false;
/**
- * @var bool
+ * @var boolean
*/
private $checkForUnintentionallyCoveredCode = false;
/**
- * @var bool
+ * @var boolean
*/
private $forceCoversAnnotation = false;
/**
- * @var bool
+ * @var boolean
*/
private $mapTestClassNameToCoveredClassName = false;
/**
- * @var bool
+ * @var boolean
*/
private $addUncoveredFilesFromWhitelist = true;
/**
- * @var bool
+ * @var boolean
*/
private $processUncoveredFilesFromWhitelist = false;
@@ -67,36 +73,39 @@ class PHP_CodeCoverage
*
* @var array
*/
- private $data = [];
+ private $data = array();
/**
* @var array
*/
- private $ignoredLines = [];
-
- /**
- * @var bool
- */
- private $disableIgnoredLines = false;
+ private $ignoredLines = array();
/**
* Test data.
*
* @var array
*/
- private $tests = [];
+ private $tests = array();
/**
* Constructor.
*
- * @param PHP_CodeCoverage_Driver $driver
- * @param PHP_CodeCoverage_Filter $filter
- * @throws PHP_CodeCoverage_RuntimeException
+ * @param PHP_CodeCoverage_Driver $driver
+ * @param PHP_CodeCoverage_Filter $filter
+ * @throws PHP_CodeCoverage_Exception
*/
public function __construct(PHP_CodeCoverage_Driver $driver = null, PHP_CodeCoverage_Filter $filter = null)
{
if ($driver === null) {
- $driver = $this->selectDriver();
+ $runtime = new Runtime;
+
+ if ($runtime->isHHVM()) {
+ $driver = new PHP_CodeCoverage_Driver_HHVM;
+ } elseif ($runtime->hasXdebug()) {
+ $driver = new PHP_CodeCoverage_Driver_Xdebug;
+ } else {
+ throw new PHP_CodeCoverage_Exception('No code coverage driver available');
+ }
}
if ($filter === null) {
@@ -127,8 +136,8 @@ public function getReport()
public function clear()
{
$this->currentId = null;
- $this->data = [];
- $this->tests = [];
+ $this->data = array();
+ $this->tests = array();
}
/**
@@ -145,7 +154,7 @@ public function filter()
* Returns the collected code coverage data.
* Set $raw = true to bypass all filters.
*
- * @param bool $raw
+ * @param bool $raw
* @return array
* @since Method available since Release 1.1.0
*/
@@ -155,6 +164,12 @@ public function getData($raw = false)
$this->addUncoveredFilesFromWhitelist();
}
+ // We need to apply the blacklist filter a second time
+ // when no whitelist is used.
+ if (!$raw && !$this->filter->hasWhitelist()) {
+ $this->applyListsFilter($this->data);
+ }
+
return $this->data;
}
@@ -194,14 +209,14 @@ public function setTests(array $tests)
/**
* Start collection of code coverage information.
*
- * @param mixed $id
- * @param bool $clear
- * @throws PHP_CodeCoverage_InvalidArgumentException
+ * @param mixed $id
+ * @param boolean $clear
+ * @throws PHP_CodeCoverage_Exception
*/
public function start($id, $clear = false)
{
if (!is_bool($clear)) {
- throw PHP_CodeCoverage_InvalidArgumentException::create(
+ throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory(
1,
'boolean'
);
@@ -219,23 +234,23 @@ public function start($id, $clear = false)
/**
* Stop collection of code coverage information.
*
- * @param bool $append
- * @param mixed $linesToBeCovered
- * @param array $linesToBeUsed
+ * @param boolean $append
+ * @param mixed $linesToBeCovered
+ * @param array $linesToBeUsed
* @return array
- * @throws PHP_CodeCoverage_InvalidArgumentException
+ * @throws PHP_CodeCoverage_Exception
*/
- public function stop($append = true, $linesToBeCovered = [], array $linesToBeUsed = [])
+ public function stop($append = true, $linesToBeCovered = array(), array $linesToBeUsed = array())
{
if (!is_bool($append)) {
- throw PHP_CodeCoverage_InvalidArgumentException::create(
+ throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory(
1,
'boolean'
);
}
if (!is_array($linesToBeCovered) && $linesToBeCovered !== false) {
- throw PHP_CodeCoverage_InvalidArgumentException::create(
+ throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory(
2,
'array or false'
);
@@ -252,21 +267,21 @@ public function stop($append = true, $linesToBeCovered = [], array $linesToBeUse
/**
* Appends code coverage data.
*
- * @param array $data
- * @param mixed $id
- * @param bool $append
- * @param mixed $linesToBeCovered
- * @param array $linesToBeUsed
- * @throws PHP_CodeCoverage_RuntimeException
- */
- public function append(array $data, $id = null, $append = true, $linesToBeCovered = [], array $linesToBeUsed = [])
+ * @param array $data
+ * @param mixed $id
+ * @param boolean $append
+ * @param mixed $linesToBeCovered
+ * @param array $linesToBeUsed
+ * @throws PHP_CodeCoverage_Exception
+ */
+ public function append(array $data, $id = null, $append = true, $linesToBeCovered = array(), array $linesToBeUsed = array())
{
if ($id === null) {
$id = $this->currentId;
}
if ($id === null) {
- throw new PHP_CodeCoverage_RuntimeException;
+ throw new PHP_CodeCoverage_Exception;
}
$this->applyListsFilter($data);
@@ -289,28 +304,16 @@ public function append(array $data, $id = null, $append = true, $linesToBeCovere
return;
}
- $size = 'unknown';
$status = null;
if ($id instanceof PHPUnit_Framework_TestCase) {
- $_size = $id->getSize();
-
- if ($_size == PHPUnit_Util_Test::SMALL) {
- $size = 'small';
- } elseif ($_size == PHPUnit_Util_Test::MEDIUM) {
- $size = 'medium';
- } elseif ($_size == PHPUnit_Util_Test::LARGE) {
- $size = 'large';
- }
-
$status = $id->getStatus();
$id = get_class($id) . '::' . $id->getName();
} elseif ($id instanceof PHPUnit_Extensions_PhptTestCase) {
- $size = 'large';
- $id = $id->getName();
+ $id = $id->getName();
}
- $this->tests[$id] = ['size' => $size, 'status' => $status];
+ $this->tests[$id] = $status;
foreach ($data as $file => $lines) {
if (!$this->filter->isFile($file)) {
@@ -318,10 +321,8 @@ public function append(array $data, $id = null, $append = true, $linesToBeCovere
}
foreach ($lines as $k => $v) {
- if ($v == PHP_CodeCoverage_Driver::LINE_EXECUTED) {
- if (empty($this->data[$file][$k]) || !in_array($id, $this->data[$file][$k])) {
- $this->data[$file][$k][] = $id;
- }
+ if ($v == 1) {
+ $this->data[$file][$k][] = $id;
}
}
}
@@ -334,10 +335,6 @@ public function append(array $data, $id = null, $append = true, $linesToBeCovere
*/
public function merge(PHP_CodeCoverage $that)
{
- $this->filter->setWhitelistedFiles(
- array_merge($this->filter->getWhitelistedFiles(), $that->filter()->getWhitelistedFiles())
- );
-
foreach ($that->data as $file => $lines) {
if (!isset($this->data[$file])) {
if (!$this->filter->isFiltered($file)) {
@@ -361,18 +358,17 @@ public function merge(PHP_CodeCoverage $that)
}
$this->tests = array_merge($this->tests, $that->getTests());
-
}
/**
- * @param bool $flag
- * @throws PHP_CodeCoverage_InvalidArgumentException
+ * @param boolean $flag
+ * @throws PHP_CodeCoverage_Exception
* @since Method available since Release 1.1.0
*/
public function setCacheTokens($flag)
{
if (!is_bool($flag)) {
- throw PHP_CodeCoverage_InvalidArgumentException::create(
+ throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory(
1,
'boolean'
);
@@ -390,14 +386,14 @@ public function getCacheTokens()
}
/**
- * @param bool $flag
- * @throws PHP_CodeCoverage_InvalidArgumentException
+ * @param boolean $flag
+ * @throws PHP_CodeCoverage_Exception
* @since Method available since Release 2.0.0
*/
public function setCheckForUnintentionallyCoveredCode($flag)
{
if (!is_bool($flag)) {
- throw PHP_CodeCoverage_InvalidArgumentException::create(
+ throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory(
1,
'boolean'
);
@@ -407,13 +403,13 @@ public function setCheckForUnintentionallyCoveredCode($flag)
}
/**
- * @param bool $flag
- * @throws PHP_CodeCoverage_InvalidArgumentException
+ * @param boolean $flag
+ * @throws PHP_CodeCoverage_Exception
*/
public function setForceCoversAnnotation($flag)
{
if (!is_bool($flag)) {
- throw PHP_CodeCoverage_InvalidArgumentException::create(
+ throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory(
1,
'boolean'
);
@@ -423,13 +419,13 @@ public function setForceCoversAnnotation($flag)
}
/**
- * @param bool $flag
- * @throws PHP_CodeCoverage_InvalidArgumentException
+ * @param boolean $flag
+ * @throws PHP_CodeCoverage_Exception
*/
public function setMapTestClassNameToCoveredClassName($flag)
{
if (!is_bool($flag)) {
- throw PHP_CodeCoverage_InvalidArgumentException::create(
+ throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory(
1,
'boolean'
);
@@ -439,13 +435,13 @@ public function setMapTestClassNameToCoveredClassName($flag)
}
/**
- * @param bool $flag
- * @throws PHP_CodeCoverage_InvalidArgumentException
+ * @param boolean $flag
+ * @throws PHP_CodeCoverage_Exception
*/
public function setAddUncoveredFilesFromWhitelist($flag)
{
if (!is_bool($flag)) {
- throw PHP_CodeCoverage_InvalidArgumentException::create(
+ throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory(
1,
'boolean'
);
@@ -455,13 +451,13 @@ public function setAddUncoveredFilesFromWhitelist($flag)
}
/**
- * @param bool $flag
- * @throws PHP_CodeCoverage_InvalidArgumentException
+ * @param boolean $flag
+ * @throws PHP_CodeCoverage_Exception
*/
public function setProcessUncoveredFilesFromWhitelist($flag)
{
if (!is_bool($flag)) {
- throw PHP_CodeCoverage_InvalidArgumentException::create(
+ throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory(
1,
'boolean'
);
@@ -470,35 +466,19 @@ public function setProcessUncoveredFilesFromWhitelist($flag)
$this->processUncoveredFilesFromWhitelist = $flag;
}
- /**
- * @param bool $flag
- * @throws PHP_CodeCoverage_InvalidArgumentException
- */
- public function setDisableIgnoredLines($flag)
- {
- if (!is_bool($flag)) {
- throw PHP_CodeCoverage_InvalidArgumentException::create(
- 1,
- 'boolean'
- );
- }
-
- $this->disableIgnoredLines = $flag;
- }
-
/**
* Applies the @covers annotation filtering.
*
- * @param array $data
- * @param mixed $linesToBeCovered
- * @param array $linesToBeUsed
- * @throws PHP_CodeCoverage_UnintentionallyCoveredCodeException
+ * @param array $data
+ * @param mixed $linesToBeCovered
+ * @param array $linesToBeUsed
+ * @throws PHP_CodeCoverage_Exception_UnintentionallyCoveredCode
*/
private function applyCoversAnnotationFilter(array &$data, $linesToBeCovered, array $linesToBeUsed)
{
if ($linesToBeCovered === false ||
($this->forceCoversAnnotation && empty($linesToBeCovered))) {
- $data = [];
+ $data = array();
return;
}
@@ -528,7 +508,7 @@ private function applyCoversAnnotationFilter(array &$data, $linesToBeCovered, ar
}
/**
- * Applies the whitelist filtering.
+ * Applies the blacklist/whitelist filtering.
*
* @param array $data
*/
@@ -567,10 +547,10 @@ private function initializeFilesThatAreSeenTheFirstTime(array $data)
{
foreach ($data as $file => $lines) {
if ($this->filter->isFile($file) && !isset($this->data[$file])) {
- $this->data[$file] = [];
+ $this->data[$file] = array();
foreach ($lines as $k => $v) {
- $this->data[$file][$k] = $v == -2 ? null : [];
+ $this->data[$file][$k] = $v == -2 ? null : array();
}
}
}
@@ -581,7 +561,7 @@ private function initializeFilesThatAreSeenTheFirstTime(array $data)
*/
private function addUncoveredFilesFromWhitelist()
{
- $data = [];
+ $data = array();
$uncoveredFiles = array_diff(
$this->filter->getWhitelist(),
array_keys($this->data)
@@ -599,12 +579,12 @@ private function addUncoveredFilesFromWhitelist()
$uncoveredFiles
);
} else {
- $data[$uncoveredFile] = [];
+ $data[$uncoveredFile] = array();
$lines = count(file($uncoveredFile));
for ($i = 1; $i <= $lines; $i++) {
- $data[$uncoveredFile][$i] = PHP_CodeCoverage_Driver::LINE_NOT_EXECUTED;
+ $data[$uncoveredFile][$i] = -1;
}
}
}
@@ -627,8 +607,8 @@ private function processUncoveredFileFromWhitelist($uncoveredFile, array &$data,
if (!isset($data[$file]) &&
in_array($file, $uncoveredFiles)) {
foreach (array_keys($fileCoverage) as $key) {
- if ($fileCoverage[$key] == PHP_CodeCoverage_Driver::LINE_EXECUTED) {
- $fileCoverage[$key] = PHP_CodeCoverage_Driver::LINE_NOT_EXECUTED;
+ if ($fileCoverage[$key] == 1) {
+ $fileCoverage[$key] = -1;
}
}
@@ -640,31 +620,26 @@ private function processUncoveredFileFromWhitelist($uncoveredFile, array &$data,
/**
* Returns the lines of a source file that should be ignored.
*
- * @param string $filename
+ * @param string $filename
* @return array
- * @throws PHP_CodeCoverage_InvalidArgumentException
+ * @throws PHP_CodeCoverage_Exception
* @since Method available since Release 2.0.0
*/
private function getLinesToBeIgnored($filename)
{
if (!is_string($filename)) {
- throw PHP_CodeCoverage_InvalidArgumentException::create(
+ throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory(
1,
'string'
);
}
if (!isset($this->ignoredLines[$filename])) {
- $this->ignoredLines[$filename] = [];
-
- if ($this->disableIgnoredLines) {
- return $this->ignoredLines[$filename];
- }
-
- $ignore = false;
- $stop = false;
- $lines = file($filename);
- $numLines = count($lines);
+ $this->ignoredLines[$filename] = array();
+ $ignore = false;
+ $stop = false;
+ $lines = file($filename);
+ $numLines = count($lines);
foreach ($lines as $index => $line) {
if (!trim($line)) {
@@ -702,7 +677,7 @@ private function getLinesToBeIgnored($filename)
if (!$ignore) {
$start = $token->getLine();
- $end = $start + substr_count($token, "\n");
+ $end = $start + substr_count($token, "\n");
// Do not ignore the first line when there is a token
// before the comment
@@ -716,7 +691,7 @@ private function getLinesToBeIgnored($filename)
// A DOC_COMMENT token or a COMMENT token starting with "/*"
// does not contain the final \n character in its text
- if (isset($lines[$i-1]) && 0 === strpos($_token, '/*') && '*/' === substr(trim($lines[$i-1]), -2)) {
+ if (0 === strpos($_token, '/*') && '*/' === substr(trim($lines[$i-1]), -2)) {
$this->ignoredLines[$filename][] = $i;
}
}
@@ -726,13 +701,11 @@ private function getLinesToBeIgnored($filename)
case 'PHP_Token_TRAIT':
case 'PHP_Token_CLASS':
case 'PHP_Token_FUNCTION':
- /* @var PHP_Token_Interface $token */
-
$docblock = $token->getDocblock();
$this->ignoredLines[$filename][] = $token->getLine();
- if (strpos($docblock, '@codeCoverageIgnore') || strpos($docblock, '@deprecated')) {
+ if (strpos($docblock, '@codeCoverageIgnore')) {
$endLine = $token->getEndLine();
for ($i = $token->getLine(); $i <= $endLine; $i++) {
@@ -812,10 +785,10 @@ private function getLinesToBeIgnored($filename)
}
/**
- * @param array $data
- * @param array $linesToBeCovered
- * @param array $linesToBeUsed
- * @throws PHP_CodeCoverage_UnintentionallyCoveredCodeException
+ * @param array $data
+ * @param array $linesToBeCovered
+ * @param array $linesToBeUsed
+ * @throws PHP_CodeCoverage_Exception_UnintentionallyCoveredCode
* @since Method available since Release 2.0.0
*/
private function performUnintentionallyCoveredCodeCheck(array &$data, array $linesToBeCovered, array $linesToBeUsed)
@@ -842,7 +815,7 @@ private function performUnintentionallyCoveredCodeCheck(array &$data, array $lin
}
if (!empty($message)) {
- throw new PHP_CodeCoverage_UnintentionallyCoveredCodeException(
+ throw new PHP_CodeCoverage_Exception_UnintentionallyCoveredCode(
$message
);
}
@@ -856,11 +829,11 @@ private function performUnintentionallyCoveredCodeCheck(array &$data, array $lin
*/
private function getAllowedLines(array $linesToBeCovered, array $linesToBeUsed)
{
- $allowedLines = [];
+ $allowedLines = array();
foreach (array_keys($linesToBeCovered) as $file) {
if (!isset($allowedLines[$file])) {
- $allowedLines[$file] = [];
+ $allowedLines[$file] = array();
}
$allowedLines[$file] = array_merge(
@@ -871,7 +844,7 @@ private function getAllowedLines(array $linesToBeCovered, array $linesToBeUsed)
foreach (array_keys($linesToBeUsed) as $file) {
if (!isset($allowedLines[$file])) {
- $allowedLines[$file] = [];
+ $allowedLines[$file] = array();
}
$allowedLines[$file] = array_merge(
@@ -888,25 +861,4 @@ private function getAllowedLines(array $linesToBeCovered, array $linesToBeUsed)
return $allowedLines;
}
-
- /**
- * @return PHP_CodeCoverage_Driver
- * @throws PHP_CodeCoverage_RuntimeException
- */
- private function selectDriver()
- {
- $runtime = new Runtime;
-
- if (!$runtime->canCollectCodeCoverage()) {
- throw new PHP_CodeCoverage_RuntimeException('No code coverage driver available');
- }
-
- if ($runtime->isHHVM()) {
- return new PHP_CodeCoverage_Driver_HHVM;
- } elseif ($runtime->isPHPDBG()) {
- return new PHP_CodeCoverage_Driver_PHPDBG;
- } else {
- return new PHP_CodeCoverage_Driver_Xdebug;
- }
- }
}
diff --git a/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver.php b/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver.php
index 8635acef..fd2ead8e 100644
--- a/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver.php
+++ b/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver.php
@@ -11,28 +11,16 @@
/**
* Interface for code coverage drivers.
*
- * @since Class available since Release 1.0.0
+ * @category PHP
+ * @package CodeCoverage
+ * @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-code-coverage
+ * @since Class available since Release 1.0.0
*/
interface PHP_CodeCoverage_Driver
{
- /**
- * @var int
- * @see http://xdebug.org/docs/code_coverage
- */
- const LINE_EXECUTED = 1;
-
- /**
- * @var int
- * @see http://xdebug.org/docs/code_coverage
- */
- const LINE_NOT_EXECUTED = -1;
-
- /**
- * @var int
- * @see http://xdebug.org/docs/code_coverage
- */
- const LINE_NOT_EXECUTABLE = -2;
-
/**
* Start collection of code coverage information.
*/
diff --git a/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/HHVM.php b/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/HHVM.php
index a9d8f0ce..324a99f5 100644
--- a/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/HHVM.php
+++ b/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/HHVM.php
@@ -11,16 +11,46 @@
/**
* Driver for HHVM's code coverage functionality.
*
- * @since Class available since Release 2.2.2
+ * @category PHP
+ * @package CodeCoverage
+ * @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-code-coverage
+ * @since Class available since Release 1.3.0
* @codeCoverageIgnore
*/
-class PHP_CodeCoverage_Driver_HHVM extends PHP_CodeCoverage_Driver_Xdebug
+class PHP_CodeCoverage_Driver_HHVM implements PHP_CodeCoverage_Driver
{
+ /**
+ * Constructor.
+ */
+ public function __construct()
+ {
+ if (!defined('HHVM_VERSION')) {
+ throw new PHP_CodeCoverage_Exception('This driver requires HHVM');
+ }
+ }
+
/**
* Start collection of code coverage information.
*/
public function start()
{
- xdebug_start_code_coverage();
+ fb_enable_code_coverage();
+ }
+
+ /**
+ * Stop collection of code coverage information.
+ *
+ * @return array
+ */
+ public function stop()
+ {
+ $codeCoverage = fb_get_code_coverage(true);
+
+ fb_disable_code_coverage();
+
+ return $codeCoverage;
}
}
diff --git a/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/PHPDBG.php b/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/PHPDBG.php
deleted file mode 100644
index 2c39c8c8..00000000
--- a/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/PHPDBG.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.
- */
-
-/**
- * Driver for PHPDBG's code coverage functionality.
- *
- * @since Class available since Release 2.2.0
- * @codeCoverageIgnore
- */
-class PHP_CodeCoverage_Driver_PHPDBG implements PHP_CodeCoverage_Driver
-{
- /**
- * Constructor.
- */
- public function __construct()
- {
- if (PHP_SAPI !== 'phpdbg') {
- throw new PHP_CodeCoverage_RuntimeException(
- 'This driver requires the PHPDBG SAPI'
- );
- }
-
- if (!function_exists('phpdbg_start_oplog')) {
- throw new PHP_CodeCoverage_RuntimeException(
- 'This build of PHPDBG does not support code coverage'
- );
- }
- }
-
- /**
- * Start collection of code coverage information.
- */
- public function start()
- {
- phpdbg_start_oplog();
- }
-
- /**
- * Stop collection of code coverage information.
- *
- * @return array
- */
- public function stop()
- {
- static $fetchedLines = [];
-
- $dbgData = phpdbg_end_oplog();
-
- if ($fetchedLines == []) {
- $sourceLines = phpdbg_get_executable();
- } else {
- $newFiles = array_diff(
- get_included_files(),
- array_keys($fetchedLines)
- );
-
- if ($newFiles) {
- $sourceLines = phpdbg_get_executable(
- ['files' => $newFiles]
- );
- } else {
- $sourceLines = [];
- }
- }
-
- foreach ($sourceLines as $file => $lines) {
- foreach ($lines as $lineNo => $numExecuted) {
- $sourceLines[$file][$lineNo] = self::LINE_NOT_EXECUTED;
- }
- }
-
- $fetchedLines = array_merge($fetchedLines, $sourceLines);
-
- return $this->detectExecutedLines($fetchedLines, $dbgData);
- }
-
- /**
- * Convert phpdbg based data into the format CodeCoverage expects
- *
- * @param array $sourceLines
- * @param array $dbgData
- * @return array
- */
- private function detectExecutedLines(array $sourceLines, array $dbgData)
- {
- foreach ($dbgData as $file => $coveredLines) {
- foreach ($coveredLines as $lineNo => $numExecuted) {
- // phpdbg also reports $lineNo=0 when e.g. exceptions get thrown.
- // make sure we only mark lines executed which are actually executable.
- if (isset($sourceLines[$file][$lineNo])) {
- $sourceLines[$file][$lineNo] = self::LINE_EXECUTED;
- }
- }
- }
-
- return $sourceLines;
- }
-}
diff --git a/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php b/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php
index 5cbb0d03..3b331886 100644
--- a/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php
+++ b/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php
@@ -11,7 +11,13 @@
/**
* Driver for Xdebug's code coverage functionality.
*
- * @since Class available since Release 1.0.0
+ * @category PHP
+ * @package CodeCoverage
+ * @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-code-coverage
+ * @since Class available since Release 1.0.0
* @codeCoverageIgnore
*/
class PHP_CodeCoverage_Driver_Xdebug implements PHP_CodeCoverage_Driver
@@ -22,12 +28,12 @@ class PHP_CodeCoverage_Driver_Xdebug implements PHP_CodeCoverage_Driver
public function __construct()
{
if (!extension_loaded('xdebug')) {
- throw new PHP_CodeCoverage_RuntimeException('This driver requires Xdebug');
+ throw new PHP_CodeCoverage_Exception('This driver requires Xdebug');
}
if (version_compare(phpversion('xdebug'), '2.2.0-dev', '>=') &&
!ini_get('xdebug.coverage_enable')) {
- throw new PHP_CodeCoverage_RuntimeException(
+ throw new PHP_CodeCoverage_Exception(
'xdebug.coverage_enable=On has to be set in php.ini'
);
}
@@ -62,9 +68,11 @@ public function stop()
private function cleanup(array $data)
{
foreach (array_keys($data) as $file) {
- unset($data[$file][0]);
+ if (isset($data[$file][0])) {
+ unset($data[$file][0]);
+ }
- if ($file != 'xdebug://debug-eval' && file_exists($file)) {
+ if (file_exists($file)) {
$numLines = $this->getNumberOfLinesInFile($file);
foreach (array_keys($data[$file]) as $line) {
@@ -80,7 +88,7 @@ private function cleanup(array $data)
/**
* @param string $file
- * @return int
+ * @return integer
* @since Method available since Release 2.0.0
*/
private function getNumberOfLinesInFile($file)
diff --git a/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception.php b/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception.php
new file mode 100644
index 00000000..a960c08b
--- /dev/null
+++ b/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception.php
@@ -0,0 +1,24 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * Exception class for PHP_CodeCoverage component.
+ *
+ * @category PHP
+ * @package CodeCoverage
+ * @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-code-coverage
+ * @since Class available since Release 1.1.0
+ */
+class PHP_CodeCoverage_Exception extends RuntimeException
+{
+}
diff --git a/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/Exception.php b/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/Exception.php
deleted file mode 100644
index 9118a78b..00000000
--- a/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/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.
- */
-
-/**
- * Exception interface for PHP_CodeCoverage component.
- *
- * @since Interface available since Release 3.0.0
- */
-interface PHP_CodeCoverage_Exception
-{
-}
diff --git a/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/InvalidArgumentException.php b/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/InvalidArgumentException.php
deleted file mode 100644
index 68d072b6..00000000
--- a/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/InvalidArgumentException.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.
- */
-
-/**
- * @since Class available since Release 3.0.0
- */
-class PHP_CodeCoverage_InvalidArgumentException extends InvalidArgumentException implements PHP_CodeCoverage_Exception
-{
- /**
- * @param int $argument
- * @param string $type
- * @param mixed $value
- * @return PHP_CodeCoverage_InvalidArgumentException
- */
- public static function create($argument, $type, $value = null)
- {
- $stack = debug_backtrace(false);
-
- return new self(
- 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/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/RuntimeException.php b/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/RuntimeException.php
deleted file mode 100644
index bb6bc5ec..00000000
--- a/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/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 3.0.0
- */
-class PHP_CodeCoverage_RuntimeException extends RuntimeException implements PHP_CodeCoverage_Exception
-{
-}
diff --git a/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCode.php b/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCode.php
new file mode 100644
index 00000000..7f095038
--- /dev/null
+++ b/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCode.php
@@ -0,0 +1,24 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * Exception that is raised when code is unintentionally covered.
+ *
+ * @category PHP
+ * @package CodeCoverage
+ * @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-code-coverage
+ * @since Class available since Release 2.0.0
+ */
+class PHP_CodeCoverage_Exception_UnintentionallyCoveredCode extends PHP_CodeCoverage_Exception
+{
+}
diff --git a/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCodeException.php b/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCodeException.php
deleted file mode 100644
index 398276a3..00000000
--- a/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCodeException.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.
- */
-
-/**
- * Exception that is raised when code is unintentionally covered.
- *
- * @since Class available since Release 2.0.0
- */
-class PHP_CodeCoverage_UnintentionallyCoveredCodeException extends PHP_CodeCoverage_RuntimeException
-{
-}
diff --git a/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Filter.php b/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Filter.php
index 06297e5d..fce8461e 100644
--- a/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Filter.php
+++ b/tests/vendor/phpunit/php-code-coverage/src/CodeCoverage/Filter.php
@@ -9,18 +9,137 @@
*/
/**
- * Filter for whitelisting of code coverage information.
+ * Filter for blacklisting and whitelisting of code coverage information.
*
- * @since Class available since Release 1.0.0
+ * @category PHP
+ * @package CodeCoverage
+ * @author Sebastian Bergmann