X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fdrush%2Fdrush%2Ftests%2FoutputFormatUnitTest.php;fp=vendor%2Fdrush%2Fdrush%2Ftests%2FoutputFormatUnitTest.php;h=0000000000000000000000000000000000000000;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hp=b6055cc14d6986a9ecb11066b3982ecf6f3f73d5;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0;p=yaffs-website diff --git a/vendor/drush/drush/tests/outputFormatUnitTest.php b/vendor/drush/drush/tests/outputFormatUnitTest.php deleted file mode 100644 index b6055cc14..000000000 --- a/vendor/drush/drush/tests/outputFormatUnitTest.php +++ /dev/null @@ -1,166 +0,0 @@ -assertEquals($expected, trim(drush_format($data, array(), $format)), $name . ': '. $format); - } - - public function provider() { - $json = '{"a":{"b":2,"c":3},"d":{"e":5,"f":6}}'; - if (version_compare(phpversion(), '5.4.0', '>=')) { - $json = json_encode(json_decode($json), JSON_PRETTY_PRINT); - } - - return array( - array( - 'name' => 'String test', - 'format' => 'string', - 'data' => array('drush version' => '6.0-dev'), - 'expected' => '6.0-dev', - ), - array( - 'name' => 'List test', - 'format' => 'list', - 'data' => array('drush version' => '6.0-dev'), - 'expected' => '6.0-dev', - ), - array( - 'name' => 'Key-value test', - 'format' => 'key-value', - 'data' => array('drush version' => '6.0-dev'), - 'expected' => 'drush version : 6.0-dev', - ), -// array( -// 'name' => 'Table test', -// 'format' => 'table', -// 'data' => array( -// 'a' => array('b' => 2, 'c' => 3), -// 'd' => array('b' => 5, 'c' => 6), -// ), -// 'expected' => "b c -// 2 3 -// 5 6", -// ), - array( - 'name' => 'print-r test', - 'format' => 'print-r', - 'data' => array( - 'a' => array('b' => 2, 'c' => 3), - 'd' => array('b' => 5, 'c' => 6), - ), - 'expected' => "Array -( - [a] => Array - ( - [b] => 2 - [c] => 3 - ) - - [d] => Array - ( - [b] => 5 - [c] => 6 - ) - -)", - ), - array( - 'name' => 'json test', - 'format' => 'json', - 'data' => array( - 'a' => array('b' => 2, 'c' => 3), - 'd' => array('e' => 5, 'f' => 6), - ), - 'expected' => $json, - ), -// array( -// 'name' => 'key-value test 1d array', -// 'format' => 'key-value', -// 'data' => array( -// 'b' => 'Two B or ! Two B, that is the comparison', -// 'c' => 'I see that C has gone to Sea', -// ), -// 'expected' => "b : Two B or ! Two B, that is the comparison -// c : I see that C has gone to Sea", -// ), -// array( -// 'name' => 'key-value test 2d array', -// 'format' => 'key-value', -// 'data' => array( -// 'a' => array( -// 'b' => 'Two B or ! Two B, that is the comparison', -// 'c' => 'I see that C has gone to Sea', -// ), -// 'd' => array( -// 'e' => 'Elephants and electron microscopes', -// 'f' => 'My margin is too small', -// ) -// ), -// 'expected' => "a : Two B or ! Two B, that is the comparison -// I see that C has gone to Sea -// d : Elephants and electron microscopes -// My margin is too small", -// ), - array( - 'name' => 'export test', - 'format' => 'var_export', - 'data' => array( - 'a' => array('b' => 2, 'c' => 3), - 'd' => array('e' => 5, 'f' => 6), - ), - 'expected' => "array( - 'a' => array( - 'b' => 2, - 'c' => 3, - ), - 'd' => array( - 'e' => 5, - 'f' => 6, - ), -)", - ), -// array( -// 'name' => 'config test', -// 'format' => 'config', -// 'data' => array( -// 'a' => array('b' => 2, 'c' => 3), -// 'd' => array('e' => 5, 'f' => 6), -// ), -// 'expected' => "\$config[\"a\"] = array ( -// 'b' => 2, -// 'c' => 3, -//); -//\$config[\"d\"] = array ( -// 'e' => 5, -// 'f' => 6, -//);", -// ), - array( - 'name' => 'variables test', - 'format' => 'variables', - 'data' => array( - 'a' => array('b' => 2, 'c' => 3), - 'd' => array('e' => 5, 'f' => 6), - ), - 'expected' => "\$a[\"b\"] = 2; -\$a[\"c\"] = 3; -\$d[\"e\"] = 5; -\$d[\"f\"] = 6;", - ), - ); - } -}