├── .editorconfig ├── .gitignore ├── .travis.yml ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── build.php ├── composer.json ├── dist └── zubr.php ├── phpunit.xml ├── src ├── abs.php.TODO ├── acos.php.TODO ├── acosh.php.TODO ├── addcslashes.php.TODO ├── addslashes.php.TODO ├── array_change_key_case.php ├── array_chunk.php ├── array_column.php ├── array_combine.php ├── array_count_values.php ├── array_diff.php.TODO ├── array_diff_assoc.php.TODO ├── array_diff_key.php.TODO ├── array_diff_uassoc.php.TODO ├── array_diff_ukey.php.TODO ├── array_fill.php ├── array_fill_keys.php ├── array_filter.php.TODO ├── array_flip.php ├── array_intersect.php.TODO ├── array_intersect_assoc.php.TODO ├── array_intersect_key.php.TODO ├── array_intersect_uassoc.php.TODO ├── array_intersect_ukey.php.TODO ├── array_key_exists.php ├── array_keys.php ├── array_map.php.TODO ├── array_merge.php.TODO ├── array_merge_recursive.php.TODO ├── array_multisort.php.TODO ├── array_pad.php.TODO ├── array_pop.php.TODO ├── array_product.php.TODO ├── array_push.php.TODO ├── array_rand.php.TODO ├── array_reduce.php.TODO ├── array_replace.php.TODO ├── array_replace_recursive.php.TODO ├── array_reverse.php.TODO ├── array_search.php.TODO ├── array_shift.php.TODO ├── array_slice.php.TODO ├── array_splice.php.TODO ├── array_sum.php.TODO ├── array_udiff.php.TODO ├── array_udiff_assoc.php.TODO ├── array_udiff_uassoc.php.TODO ├── array_uintersect.php.TODO ├── array_uintersect_uassoc.php.TODO ├── array_unique.php.TODO ├── array_unshift.php.TODO ├── array_values.php.TODO ├── array_walk.php.TODO ├── arsort.php.TODO ├── asin.php.TODO ├── asinh.php.TODO ├── asort.php.TODO ├── assert_options.php.TODO ├── atan.php.TODO ├── atan2.php.TODO ├── atanh.php.TODO ├── base64_decode.php.TODO ├── base64_encode.php.TODO ├── base_convert.php.TODO ├── basename.php.TODO ├── bin2hex.php.TODO ├── bindec.php.TODO ├── boolval.php.TODO ├── call_user_func.php.TODO ├── call_user_func_array.php.TODO ├── ceil.php.TODO ├── chop.php.TODO ├── chr.php.TODO ├── chunk_split.php.TODO ├── class_exists.php ├── convert_cyr_string.php.TODO ├── convert_uuencode.php.TODO ├── cos.php.TODO ├── cosh.php.TODO ├── count.php.TODO ├── count_chars.php.TODO ├── crc32.php.TODO ├── current.php.TODO ├── decbin.php.TODO ├── dechex.php.TODO ├── decoct.php.TODO ├── deg2rad.php.TODO ├── dirname.php.TODO ├── doubleval.php.TODO ├── end.php.TODO ├── escapeshellarg.php.TODO ├── exp.php.TODO ├── explode.php.TODO ├── expm1.php.TODO ├── file_get_contents.php.TODO ├── floatval.php.TODO ├── floor.php.TODO ├── fmod.php.TODO ├── get_html_translation_table.php.TODO ├── getenv.php.TODO ├── getrandmax.php.TODO ├── gettimeofday.php.TODO ├── gettype.php.TODO ├── hexdec.php.TODO ├── html_entities.php ├── html_entity_decode.php.TODO ├── htmlentities.php.TODO ├── htmlspecialchars.php.TODO ├── htmlspecialchars_decode.php.TODO ├── http_build_query.php.TODO ├── hypot.php.TODO ├── implode.php.TODO ├── in_array.php ├── inet_ntop.php.TODO ├── inet_pton.php.TODO ├── ini_get.php.TODO ├── ini_set.php.TODO ├── intval.php.TODO ├── ip2long.php.TODO ├── is_array.php.TODO ├── is_bool.php.TODO ├── is_callable.php.TODO ├── is_double.php.TODO ├── is_finite.php.TODO ├── is_float.php.TODO ├── is_infinite.php.TODO ├── is_int.php.TODO ├── is_integer.php.TODO ├── is_long.php.TODO ├── is_nan.php.TODO ├── is_null.php.TODO ├── is_numeric.php.TODO ├── is_object.php.TODO ├── is_real.php.TODO ├── is_scalar.php.TODO ├── is_string.php.TODO ├── join.php.TODO ├── key.php.TODO ├── krsort.php.TODO ├── ksort.php.TODO ├── lcfirst.php.TODO ├── lcg_value.php.TODO ├── levenshtein.php.TODO ├── localeconv.php.TODO ├── log.php.TODO ├── log10.php.TODO ├── log1p.php.TODO ├── long2ip.php.TODO ├── ltrim.php.TODO ├── max.php.TODO ├── md5.php.TODO ├── md5_file.php.TODO ├── metaphone.php.TODO ├── microtime.php.TODO ├── min.php.TODO ├── money_format.php.TODO ├── mt_getrandmax.php.TODO ├── mt_rand.php.TODO ├── natcasesort.php.TODO ├── natsort.php.TODO ├── next.php.TODO ├── nl2br.php.TODO ├── nl_langinfo.php.TODO ├── number_format.php.TODO ├── octdec.php.TODO ├── ord.php.TODO ├── pack.php.TODO ├── parse_str.php.TODO ├── parse_url.php ├── pathinfo.php.TODO ├── pi.php.TODO ├── pos.php.TODO ├── pow.php.TODO ├── prev.php.TODO ├── print_r.php.TODO ├── printf.php.TODO ├── quoted_printable_decode.php.TODO ├── quoted_printable_encode.php.TODO ├── quotemeta.php.TODO ├── rad2deg.php.TODO ├── rand.php.TODO ├── range.php.TODO ├── rawurldecode.php.TODO ├── rawurlencode.php.TODO ├── realpath.php.TODO ├── reset.php.TODO ├── round.php.TODO ├── rsort.php.TODO ├── rtrim.php.TODO ├── serialize.php.TODO ├── set_time_limit.php.TODO ├── setcookie.php.TODO ├── setlocale.php.TODO ├── setrawcookie.php.TODO ├── sha1.php.TODO ├── sha1_file.php.TODO ├── shuffle.php.TODO ├── similar_text.php.TODO ├── sin.php.TODO ├── sinh.php.TODO ├── sizeof.php.TODO ├── sort.php.TODO ├── soundex.php.TODO ├── sprintf.php.TODO ├── sqrt.php.TODO ├── sscanf.php.TODO ├── str_getcsv.php.TODO ├── str_ireplace.php.TODO ├── str_repeat.php.TODO ├── str_replace.php.TODO ├── str_rot13.php.TODO ├── str_shuffle.php.TODO ├── str_split.php.TODO ├── str_word_count.php.TODO ├── strchr.php.TODO ├── strcoll.php.TODO ├── strcspn.php.TODO ├── strip_tags.php.TODO ├── stripos.php.TODO ├── stripslashes.php.TODO ├── stristr.php.TODO ├── strnatcasecmp.php.TODO ├── strnatcmp.php.TODO ├── strpbrk.php.TODO ├── strpos.php.TODO ├── strptime.php.TODO ├── strrchr.php.TODO ├── strrev.php.TODO ├── strripos.php.TODO ├── strrpos.php.TODO ├── strspn.php.TODO ├── strstr.php.TODO ├── strtok.php.TODO ├── strtolower.php.TODO ├── strtoupper.php.TODO ├── strtr.php.TODO ├── strval.php.TODO ├── substr.php.TODO ├── substr_compare.php.TODO ├── substr_count.php.TODO ├── substr_replace.php.TODO ├── tan.php.TODO ├── tanh.php.TODO ├── trim.php.TODO ├── uasort.php.TODO ├── ucfirst.php.TODO ├── ucwords.php.TODO ├── uksort.php.TODO ├── uniqid.php.TODO ├── unserialize.php.TODO ├── urldecode.php.TODO ├── urlencode.php.TODO ├── usort.php.TODO ├── var_dump.php.TODO ├── var_export.php.TODO ├── version_compare.php.TODO ├── vprintf.php.TODO ├── vsprintf.php.TODO └── wordwrap.php.TODO ├── tests ├── AbsTest.php.TODO ├── AcosTest.php.TODO ├── AcoshTest.php.TODO ├── AddcslashesTest.php.TODO ├── AddslashesTest.php.TODO ├── ArrayChangeKeyCaseTest.php ├── ArrayChunkTest.php ├── ArrayColumnTest.php ├── ArrayCombineTest.php ├── ArrayCountValuesTest.php.TODO ├── ArrayDiffAssocTest.php.TODO ├── ArrayDiffKeyTest.php.TODO ├── ArrayDiffTest.php.TODO ├── ArrayDiffUassocTest.php.TODO ├── ArrayDiffUkeyTest.php.TODO ├── ArrayFillKeysTest.php.TODO ├── ArrayFillTest.php.TODO ├── ArrayFilterTest.php.TODO ├── ArrayFlipTest.php.TODO ├── ArrayIntersectAssocTest.php.TODO ├── ArrayIntersectKeyTest.php.TODO ├── ArrayIntersectTest.php.TODO ├── ArrayIntersectUassocTest.php.TODO ├── ArrayIntersectUkeyTest.php.TODO ├── ArrayKeyExistsTest.php.TODO ├── ArrayKeysTest.php.TODO ├── ArrayMapTest.php.TODO ├── ArrayMergeRecursiveTest.php.TODO ├── ArrayMergeTest.php.TODO ├── ArrayMultisortTest.php.TODO ├── ArrayPadTest.php.TODO ├── ArrayPopTest.php.TODO ├── ArrayProductTest.php.TODO ├── ArrayPushTest.php.TODO ├── ArrayRandTest.php.TODO ├── ArrayReduceTest.php.TODO ├── ArrayReplaceRecursiveTest.php.TODO ├── ArrayReplaceTest.php.TODO ├── ArrayReverseTest.php.TODO ├── ArraySearchTest.php.TODO ├── ArrayShiftTest.php.TODO ├── ArraySliceTest.php.TODO ├── ArraySpliceTest.php.TODO ├── ArraySumTest.php.TODO ├── ArrayUdiffAssocTest.php.TODO ├── ArrayUdiffTest.php.TODO ├── ArrayUdiffUassocTest.php.TODO ├── ArrayUintersectTest.php.TODO ├── ArrayUintersectUassocTest.php.TODO ├── ArrayUniqueTest.php.TODO ├── ArrayUnshiftTest.php.TODO ├── ArrayValuesTest.php.TODO ├── ArrayWalkTest.php.TODO ├── ArsortTest.php.TODO ├── AsinTest.php.TODO ├── AsinhTest.php.TODO ├── AsortTest.php.TODO ├── AssertOptionsTest.php.TODO ├── Atan2Test.php.TODO ├── AtanTest.php.TODO ├── AtanhTest.php.TODO ├── Base64DecodeTest.php.TODO ├── Base64EncodeTest.php.TODO ├── BaseConvertTest.php.TODO ├── BasenameTest.php.TODO ├── Bin2hexTest.php.TODO ├── BindecTest.php.TODO ├── BoolvalTest.php.TODO ├── CallUserFuncArrayTest.php.TODO ├── CallUserFuncTest.php.TODO ├── CeilTest.php.TODO ├── ChopTest.php.TODO ├── ChrTest.php.TODO ├── ChunkSplitTest.php.TODO ├── ClassExistsTest.php ├── ConvertCyrStringTest.php.TODO ├── ConvertUuencodeTest.php.TODO ├── CosTest.php.TODO ├── CoshTest.php.TODO ├── CountCharsTest.php.TODO ├── CountTest.php.TODO ├── Crc32Test.php.TODO ├── CurrentTest.php.TODO ├── DecbinTest.php.TODO ├── DechexTest.php.TODO ├── DecoctTest.php.TODO ├── Deg2radTest.php.TODO ├── DirnameTest.php.TODO ├── DoublevalTest.php.TODO ├── EndTest.php.TODO ├── EscapeshellargTest.php.TODO ├── ExpTest.php.TODO ├── ExplodeTest.php.TODO ├── Expm1Test.php.TODO ├── FileGetContentsTest.php.TODO ├── FloatvalTest.php.TODO ├── FloorTest.php.TODO ├── FmodTest.php.TODO ├── GetHtmlTranslationTableTest.php.TODO ├── GetenvTest.php.TODO ├── GetrandmaxTest.php.TODO ├── GettimeofdayTest.php.TODO ├── GettypeTest.php.TODO ├── HexdecTest.php.TODO ├── HtmlEntitiesTest.php ├── HtmlEntityDecodeTest.php.TODO ├── HtmlspecialcharsDecodeTest.php.TODO ├── HtmlspecialcharsTest.php.TODO ├── HttpBuildQueryTest.php.TODO ├── HypotTest.php.TODO ├── ImplodeTest.php.TODO ├── InArrayTest.php ├── InetNtopTest.php.TODO ├── InetPtonTest.php.TODO ├── IniGetTest.php.TODO ├── IniSetTest.php.TODO ├── IntvalTest.php.TODO ├── Ip2longTest.php.TODO ├── IsArrayTest.php.TODO ├── IsBoolTest.php.TODO ├── IsCallableTest.php.TODO ├── IsDoubleTest.php.TODO ├── IsFiniteTest.php.TODO ├── IsFloatTest.php.TODO ├── IsInfiniteTest.php.TODO ├── IsIntTest.php.TODO ├── IsIntegerTest.php.TODO ├── IsLongTest.php.TODO ├── IsNanTest.php.TODO ├── IsNullTest.php.TODO ├── IsNumericTest.php.TODO ├── IsObjectTest.php.TODO ├── IsRealTest.php.TODO ├── IsScalarTest.php.TODO ├── IsStringTest.php.TODO ├── JoinTest.php.TODO ├── KeyTest.php.TODO ├── KrsortTest.php.TODO ├── KsortTest.php.TODO ├── LcfirstTest.php.TODO ├── LcgValueTest.php.TODO ├── LevenshteinTest.php.TODO ├── LocaleconvTest.php.TODO ├── Log10Test.php.TODO ├── Log1pTest.php.TODO ├── LogTest.php.TODO ├── Long2ipTest.php.TODO ├── LtrimTest.php.TODO ├── MaxTest.php.TODO ├── Md5FileTest.php.TODO ├── Md5Test.php.TODO ├── MetaphoneTest.php.TODO ├── MicrotimeTest.php.TODO ├── MinTest.php.TODO ├── MoneyFormatTest.php.TODO ├── MtGetrandmaxTest.php.TODO ├── MtRandTest.php.TODO ├── NatcasesortTest.php.TODO ├── NatsortTest.php.TODO ├── NextTest.php.TODO ├── Nl2brTest.php.TODO ├── NlLanginfoTest.php.TODO ├── NumberFormatTest.php.TODO ├── OctdecTest.php.TODO ├── OrdTest.php.TODO ├── PackTest.php.TODO ├── ParseStrTest.php.TODO ├── ParseUrlTest.php ├── PathinfoTest.php.TODO ├── PiTest.php.TODO ├── PosTest.php.TODO ├── PowTest.php.TODO ├── PrevTest.php.TODO ├── PrintRTest.php.TODO ├── PrintfTest.php.TODO ├── QuotedPrintableDecodeTest.php.TODO ├── QuotedPrintableEncodeTest.php.TODO ├── QuotemetaTest.php.TODO ├── Rad2degTest.php.TODO ├── RandTest.php.TODO ├── RangeTest.php.TODO ├── RawurldecodeTest.php.TODO ├── RawurlencodeTest.php.TODO ├── RealpathTest.php.TODO ├── ResetTest.php.TODO ├── RoundTest.php.TODO ├── RsortTest.php.TODO ├── RtrimTest.php.TODO ├── SerializeTest.php.TODO ├── SetTimeLimitTest.php.TODO ├── SetcookieTest.php.TODO ├── SetlocaleTest.php.TODO ├── SetrawcookieTest.php.TODO ├── Sha1FileTest.php.TODO ├── Sha1Test.php.TODO ├── ShuffleTest.php.TODO ├── SimilarTextTest.php.TODO ├── SinTest.php.TODO ├── SinhTest.php.TODO ├── SizeofTest.php.TODO ├── SortTest.php.TODO ├── SoundexTest.php.TODO ├── SprintfTest.php.TODO ├── SqrtTest.php.TODO ├── SscanfTest.php.TODO ├── StrGetcsvTest.php.TODO ├── StrIreplaceTest.php.TODO ├── StrRepeatTest.php.TODO ├── StrReplaceTest.php.TODO ├── StrRot13Test.php.TODO ├── StrShuffleTest.php.TODO ├── StrSplitTest.php.TODO ├── StrWordCountTest.php.TODO ├── StrchrTest.php.TODO ├── StrcollTest.php.TODO ├── StrcspnTest.php.TODO ├── StripTagsTest.php.TODO ├── StriposTest.php.TODO ├── StripslashesTest.php.TODO ├── StristrTest.php.TODO ├── StrnatcasecmpTest.php.TODO ├── StrnatcmpTest.php.TODO ├── StrpbrkTest.php.TODO ├── StrposTest.php.TODO ├── StrptimeTest.php.TODO ├── StrrchrTest.php.TODO ├── StrrevTest.php.TODO ├── StrriposTest.php.TODO ├── StrrposTest.php.TODO ├── StrspnTest.php.TODO ├── StrstrTest.php.TODO ├── StrtokTest.php.TODO ├── StrtolowerTest.php.TODO ├── StrtoupperTest.php.TODO ├── StrtrTest.php.TODO ├── StrvalTest.php.TODO ├── SubstrCompareTest.php.TODO ├── SubstrCountTest.php.TODO ├── SubstrReplaceTest.php.TODO ├── SubstrTest.php.TODO ├── TanTest.php.TODO ├── TanhTest.php.TODO ├── TrimTest.php.TODO ├── UasortTest.php.TODO ├── UcfirstTest.php.TODO ├── UcwordsTest.php.TODO ├── UksortTest.php.TODO ├── UniqidTest.php.TODO ├── UnserializeTest.php.TODO ├── UrldecodeTest.php.TODO ├── UrlencodeTest.php.TODO ├── UsortTest.php.TODO ├── VarDumpTest.php.TODO ├── VarExportTest.php.TODO ├── VersionCompareTest.php.TODO ├── VprintfTest.php.TODO ├── VsprintfTest.php.TODO └── WordwrapTest.php.TODO └── utils └── stubs ├── README.md ├── composer.json ├── install.sh └── make.php /.editorconfig: -------------------------------------------------------------------------------- 1 | # This file is for unifying the coding style for different editors and IDEs 2 | # editorconfig.org 3 | 4 | # PHP PSR-2 Coding Standards 5 | # http://www.php-fig.org/psr/psr-2/ 6 | 7 | root = true 8 | 9 | [*.php] 10 | charset = utf-8 11 | end_of_line = lf 12 | insert_final_newline = true 13 | trim_trailing_whitespace = true 14 | indent_style = space 15 | indent_size = 4 16 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | 3 | php: 4 | - 7.0 5 | - 7.1 6 | - 7.2 7 | 8 | matrix: 9 | allow_failures: 10 | - php: 7.2 11 | fast_finish: true 12 | 13 | sudo: false 14 | 15 | cache: 16 | directories: 17 | - $HOME/.composer/cache 18 | 19 | before_install: 20 | - if [[ $TRAVIS_PHP_VERSION != 7.2 ]] ; then phpenv config-rm xdebug.ini; fi 21 | - travis_retry composer self-update 22 | 23 | install: 24 | - travis_retry composer install --no-interaction --prefer-dist --no-suggest 25 | 26 | script: 27 | - composer run-script phpunit 28 | - composer run-script phpcs 29 | - composer run-script build 30 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Pull requests that add functions must contain no more than a single function, and must include a reference to the related issue. 2 | 3 | For instance: 4 | 5 | Add `html_entities`, fixes #33 6 | 7 | See our [milestones](https://github.com/nkkollaw/php/milestones) and [issues](https://github.com/nkkollaw/php/issues) to get started. 8 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | ./tests/ 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/abs.php.TODO: -------------------------------------------------------------------------------- 1 | (acos(0.3) + '').substr(0, 17) 10 | [returns] => "1.266103672779499" 11 | ) 12 | */ 13 | class Acos extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\acos(/* put stuff here */); 19 | $expected = \acos(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/AcoshTest.php.TODO: -------------------------------------------------------------------------------- 1 | acosh(8723321.4) 10 | [returns] => 16.674657798418625 11 | ) 12 | */ 13 | class Acosh extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\acosh(/* put stuff here */); 19 | $expected = \acosh(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/AddslashesTest.php.TODO: -------------------------------------------------------------------------------- 1 | addslashes("kevin's birthday") 10 | [returns] => "kevin\\'s birthday" 11 | ) 12 | */ 13 | class Addslashes extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\addslashes(/* put stuff here */); 19 | $expected = \addslashes(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/ArrayCombineTest.php: -------------------------------------------------------------------------------- 1 | assertEquals($expected, $actual); 14 | } 15 | 16 | public function wrapperDataProvider() 17 | { 18 | return [ 19 | [[1,2,3], ['a', 'b', 'c']], 20 | [['a', 'b', 'c'], [1,2,3]], 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /tests/ArrayDiffTest.php.TODO: -------------------------------------------------------------------------------- 1 | array_diff(['Kevin', 'van', 'Zonneveld'], ['van', 'Zonneveld']) 10 | [returns] => {0:'Kevin'} 11 | ) 12 | */ 13 | class ArrayDiff extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\array_diff(/* put stuff here */); 19 | $expected = \array_diff(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/ArrayFlipTest.php.TODO: -------------------------------------------------------------------------------- 1 | array_flip( {a: 1, b: 1, c: 2} ) 10 | [returns] => {1: 'b', 2: 'c'} 11 | ) 12 | */ 13 | class ArrayFlip extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\array_flip(/* put stuff here */); 19 | $expected = \array_flip(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/ArrayKeyExistsTest.php.TODO: -------------------------------------------------------------------------------- 1 | array_key_exists('kevin', {'kevin': 'van Zonneveld'}) 10 | [returns] => true 11 | ) 12 | */ 13 | class ArrayKeyExists extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\array_key_exists(/* put stuff here */); 19 | $expected = \array_key_exists(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/ArrayKeysTest.php.TODO: -------------------------------------------------------------------------------- 1 | array_keys( {firstname: 'Kevin', surname: 'van Zonneveld'} ) 10 | [returns] => [ 'firstname', 'surname' ] 11 | ) 12 | */ 13 | class ArrayKeys extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\array_keys(/* put stuff here */); 19 | $expected = \array_keys(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/ArrayMapTest.php.TODO: -------------------------------------------------------------------------------- 1 | array_map( function (a){return (a * a * a)}, [1, 2, 3, 4, 5] ) 10 | [returns] => [ 1, 8, 27, 64, 125 ] 11 | ) 12 | */ 13 | class ArrayMap extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\array_map(/* put stuff here */); 19 | $expected = \array_map(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/ArrayProductTest.php.TODO: -------------------------------------------------------------------------------- 1 | array_product([ 2, 4, 6, 8 ]) 10 | [returns] => 384 11 | ) 12 | */ 13 | class ArrayProduct extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\array_product(/* put stuff here */); 19 | $expected = \array_product(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/ArrayPushTest.php.TODO: -------------------------------------------------------------------------------- 1 | array_push(['kevin','van'], 'zonneveld') 10 | [returns] => 3 11 | ) 12 | */ 13 | class ArrayPush extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\array_push(/* put stuff here */); 19 | $expected = \array_push(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/ArrayRandTest.php.TODO: -------------------------------------------------------------------------------- 1 | array_rand( ['Kevin'], 1 ) 10 | [returns] => '0' 11 | ) 12 | */ 13 | class ArrayRand extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\array_rand(/* put stuff here */); 19 | $expected = \array_rand(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/ArrayReduceTest.php.TODO: -------------------------------------------------------------------------------- 1 | array_reduce([1, 2, 3, 4, 5], function (v, w){v += w;return v;}) 10 | [returns] => 15 11 | ) 12 | */ 13 | class ArrayReduce extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\array_reduce(/* put stuff here */); 19 | $expected = \array_reduce(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/ArrayShiftTest.php.TODO: -------------------------------------------------------------------------------- 1 | array_shift(['Kevin', 'van', 'Zonneveld']) 10 | [returns] => 'Kevin' 11 | ) 12 | */ 13 | class ArrayShift extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\array_shift(/* put stuff here */); 19 | $expected = \array_shift(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/ArrayUnshiftTest.php.TODO: -------------------------------------------------------------------------------- 1 | array_unshift(['van', 'Zonneveld'], 'Kevin') 10 | [returns] => 3 11 | ) 12 | */ 13 | class ArrayUnshift extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\array_unshift(/* put stuff here */); 19 | $expected = \array_unshift(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/ArrayValuesTest.php.TODO: -------------------------------------------------------------------------------- 1 | array_values( {firstname: 'Kevin', surname: 'van Zonneveld'} ) 10 | [returns] => [ 'Kevin', 'van Zonneveld' ] 11 | ) 12 | */ 13 | class ArrayValues extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\array_values(/* put stuff here */); 19 | $expected = \array_values(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/ArrayWalkTest.php.TODO: -------------------------------------------------------------------------------- 1 | array_walk ([3, 4], function () {}, 'userdata') 10 | [returns] => true 11 | ) 12 | */ 13 | class ArrayWalk extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\array_walk(/* put stuff here */); 19 | $expected = \array_walk(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/AsinTest.php.TODO: -------------------------------------------------------------------------------- 1 | (asin(0.3) + '').substr(0, 17) 10 | [returns] => "0.304692654015397" 11 | ) 12 | */ 13 | class Asin extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\asin(/* put stuff here */); 19 | $expected = \asin(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/AsinhTest.php.TODO: -------------------------------------------------------------------------------- 1 | asinh(8723321.4) 10 | [returns] => 16.67465779841863 11 | ) 12 | */ 13 | class Asinh extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\asinh(/* put stuff here */); 19 | $expected = \asinh(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/AssertOptionsTest.php.TODO: -------------------------------------------------------------------------------- 1 | assert_options('ASSERT_CALLBACK') 10 | [returns] => null 11 | ) 12 | */ 13 | class AssertOptions extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\assert_options(/* put stuff here */); 19 | $expected = \assert_options(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/Atan2Test.php.TODO: -------------------------------------------------------------------------------- 1 | atan2(1, 1) 10 | [returns] => 0.7853981633974483 11 | ) 12 | */ 13 | class Atan2 extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\atan2(/* put stuff here */); 19 | $expected = \atan2(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/AtanTest.php.TODO: -------------------------------------------------------------------------------- 1 | atan(8723321.4) 10 | [returns] => 1.5707962121596615 11 | ) 12 | */ 13 | class Atan extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\atan(/* put stuff here */); 19 | $expected = \atan(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/AtanhTest.php.TODO: -------------------------------------------------------------------------------- 1 | atanh(0.3) 10 | [returns] => 0.3095196042031118 11 | ) 12 | */ 13 | class Atanh extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\atanh(/* put stuff here */); 19 | $expected = \atanh(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/BaseConvertTest.php.TODO: -------------------------------------------------------------------------------- 1 | base_convert('A37334', 16, 2) 10 | [returns] => '101000110111001100110100' 11 | ) 12 | */ 13 | class BaseConvert extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\base_convert(/* put stuff here */); 19 | $expected = \base_convert(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/CallUserFuncTest.php.TODO: -------------------------------------------------------------------------------- 1 | call_user_func('isNaN', 'a') 10 | [returns] => true 11 | ) 12 | */ 13 | class CallUserFunc extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\call_user_func(/* put stuff here */); 19 | $expected = \call_user_func(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/CeilTest.php.TODO: -------------------------------------------------------------------------------- 1 | ceil(8723321.4) 10 | [returns] => 8723322 11 | ) 12 | */ 13 | class Ceil extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\ceil(/* put stuff here */); 19 | $expected = \ceil(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/ChopTest.php.TODO: -------------------------------------------------------------------------------- 1 | chop(' Kevin van Zonneveld ') 10 | [returns] => ' Kevin van Zonneveld' 11 | ) 12 | */ 13 | class Chop extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\chop(/* put stuff here */); 19 | $expected = \chop(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/ChrTest.php.TODO: -------------------------------------------------------------------------------- 1 | chr(75) === 'K' 10 | chr(65536) === '\uD800\uDC00' 11 | [returns] => true 12 | true 13 | ) 14 | */ 15 | class Chr extends PHPUnit\Framework\TestCase 16 | { 17 | public function test() 18 | { 19 | $input = ['test1', 'tEsT2', 'TEST3']; 20 | $actual = \Zubr\chr(/* put stuff here */); 21 | $expected = \chr(/* put stuff here */); 22 | 23 | $this->assertEquals($expected, $actual); 24 | } 25 | } -------------------------------------------------------------------------------- /tests/ConvertUuencodeTest.php.TODO: -------------------------------------------------------------------------------- 1 | convert_uuencode("test\ntext text\r\n") 10 | [returns] => "0=&5S=`IT97AT('1E>'0-\"@\n`\n" 11 | ) 12 | */ 13 | class ConvertUuencode extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\convert_uuencode(/* put stuff here */); 19 | $expected = \convert_uuencode(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/CosTest.php.TODO: -------------------------------------------------------------------------------- 1 | Math.ceil(cos(8723321.4) * 10000000) 10 | [returns] => -1812718 11 | ) 12 | */ 13 | class Cos extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\cos(/* put stuff here */); 19 | $expected = \cos(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/CoshTest.php.TODO: -------------------------------------------------------------------------------- 1 | cosh(-0.18127180117607017) 10 | [returns] => 1.0164747716114113 11 | ) 12 | */ 13 | class Cosh extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\cosh(/* put stuff here */); 19 | $expected = \cosh(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/Crc32Test.php.TODO: -------------------------------------------------------------------------------- 1 | crc32('Kevin van Zonneveld') 10 | [returns] => 1249991249 11 | ) 12 | */ 13 | class Crc32 extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\crc32(/* put stuff here */); 19 | $expected = \crc32(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/CurrentTest.php.TODO: -------------------------------------------------------------------------------- 1 | var $transport = ['foot', 'bike', 'car', 'plane'] 10 | current($transport) 11 | [returns] => 'foot' 12 | ) 13 | */ 14 | class Current extends PHPUnit\Framework\TestCase 15 | { 16 | public function test() 17 | { 18 | $input = ['test1', 'tEsT2', 'TEST3']; 19 | $actual = \Zubr\current(/* put stuff here */); 20 | $expected = \current(/* put stuff here */); 21 | 22 | $this->assertEquals($expected, $actual); 23 | } 24 | } -------------------------------------------------------------------------------- /tests/DecoctTest.php.TODO: -------------------------------------------------------------------------------- 1 | decoct(15) 10 | [returns] => '17' 11 | ) 12 | Array 13 | ( 14 | [code] => decoct(264) 15 | [returns] => '410' 16 | ) 17 | */ 18 | class Decoct extends PHPUnit\Framework\TestCase 19 | { 20 | public function test() 21 | { 22 | $input = ['test1', 'tEsT2', 'TEST3']; 23 | $actual = \Zubr\decoct(/* put stuff here */); 24 | $expected = \decoct(/* put stuff here */); 25 | 26 | $this->assertEquals($expected, $actual); 27 | } 28 | } -------------------------------------------------------------------------------- /tests/Deg2radTest.php.TODO: -------------------------------------------------------------------------------- 1 | deg2rad(45) 10 | [returns] => 0.7853981633974483 11 | ) 12 | */ 13 | class Deg2rad extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\deg2rad(/* put stuff here */); 19 | $expected = \deg2rad(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/DoublevalTest.php.TODO: -------------------------------------------------------------------------------- 1 | doubleval(186) 10 | [returns] => 186.00 11 | ) 12 | */ 13 | class Doubleval extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\doubleval(/* put stuff here */); 19 | $expected = \doubleval(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/EscapeshellargTest.php.TODO: -------------------------------------------------------------------------------- 1 | escapeshellarg("kevin's birthday") 10 | [returns] => "'kevin\\'s birthday'" 11 | ) 12 | */ 13 | class Escapeshellarg extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\escapeshellarg(/* put stuff here */); 19 | $expected = \escapeshellarg(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/ExpTest.php.TODO: -------------------------------------------------------------------------------- 1 | exp(0.3) 10 | [returns] => 1.3498588075760032 11 | ) 12 | */ 13 | class Exp extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\exp(/* put stuff here */); 19 | $expected = \exp(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/ExplodeTest.php.TODO: -------------------------------------------------------------------------------- 1 | explode(' ', 'Kevin van Zonneveld') 10 | [returns] => [ 'Kevin', 'van', 'Zonneveld' ] 11 | ) 12 | */ 13 | class Explode extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\explode(/* put stuff here */); 19 | $expected = \explode(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/Expm1Test.php.TODO: -------------------------------------------------------------------------------- 1 | expm1(1e-15) 10 | [returns] => 1.0000000000000007e-15 11 | ) 12 | */ 13 | class Expm1 extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\expm1(/* put stuff here */); 19 | $expected = \expm1(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/FloorTest.php.TODO: -------------------------------------------------------------------------------- 1 | floor(8723321.4) 10 | [returns] => 8723321 11 | ) 12 | */ 13 | class Floor extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\floor(/* put stuff here */); 19 | $expected = \floor(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/FmodTest.php.TODO: -------------------------------------------------------------------------------- 1 | fmod(5.7, 1.3) 10 | [returns] => 0.5 11 | ) 12 | */ 13 | class Fmod extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\fmod(/* put stuff here */); 19 | $expected = \fmod(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/GetenvTest.php.TODO: -------------------------------------------------------------------------------- 1 | getenv('LC_ALL') 10 | [returns] => false 11 | ) 12 | */ 13 | class Getenv extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\getenv(/* put stuff here */); 19 | $expected = \getenv(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/GetrandmaxTest.php.TODO: -------------------------------------------------------------------------------- 1 | getrandmax() 10 | [returns] => 2147483647 11 | ) 12 | */ 13 | class Getrandmax extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\getrandmax(/* put stuff here */); 19 | $expected = \getrandmax(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/HexdecTest.php.TODO: -------------------------------------------------------------------------------- 1 | hexdec('that') 10 | [returns] => 10 11 | ) 12 | Array 13 | ( 14 | [code] => hexdec('a0') 15 | [returns] => 160 16 | ) 17 | */ 18 | class Hexdec extends PHPUnit\Framework\TestCase 19 | { 20 | public function test() 21 | { 22 | $input = ['test1', 'tEsT2', 'TEST3']; 23 | $actual = \Zubr\hexdec(/* put stuff here */); 24 | $expected = \hexdec(/* put stuff here */); 25 | 26 | $this->assertEquals($expected, $actual); 27 | } 28 | } -------------------------------------------------------------------------------- /tests/HypotTest.php.TODO: -------------------------------------------------------------------------------- 1 | hypot(3, 4) 10 | [returns] => 5 11 | ) 12 | Array 13 | ( 14 | [code] => hypot([], 'a') 15 | [returns] => null 16 | ) 17 | */ 18 | class Hypot extends PHPUnit\Framework\TestCase 19 | { 20 | public function test() 21 | { 22 | $input = ['test1', 'tEsT2', 'TEST3']; 23 | $actual = \Zubr\hypot(/* put stuff here */); 24 | $expected = \hypot(/* put stuff here */); 25 | 26 | $this->assertEquals($expected, $actual); 27 | } 28 | } -------------------------------------------------------------------------------- /tests/InetNtopTest.php.TODO: -------------------------------------------------------------------------------- 1 | inet_ntop('\x7F\x00\x00\x01') 10 | [returns] => '127.0.0.1' 11 | ) 12 | */ 13 | class InetNtop extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\inet_ntop(/* put stuff here */); 19 | $expected = \inet_ntop(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/IniGetTest.php.TODO: -------------------------------------------------------------------------------- 1 | ini_set('date.timezone', 'Asia/Hong_Kong') 10 | ini_get('date.timezone') 11 | [returns] => 'Asia/Hong_Kong' 12 | ) 13 | */ 14 | class IniGet extends PHPUnit\Framework\TestCase 15 | { 16 | public function test() 17 | { 18 | $input = ['test1', 'tEsT2', 'TEST3']; 19 | $actual = \Zubr\ini_get(/* put stuff here */); 20 | $expected = \ini_get(/* put stuff here */); 21 | 22 | $this->assertEquals($expected, $actual); 23 | } 24 | } -------------------------------------------------------------------------------- /tests/IsBoolTest.php.TODO: -------------------------------------------------------------------------------- 1 | is_bool(false) 10 | [returns] => true 11 | ) 12 | Array 13 | ( 14 | [code] => is_bool(0) 15 | [returns] => false 16 | ) 17 | */ 18 | class IsBool extends PHPUnit\Framework\TestCase 19 | { 20 | public function test() 21 | { 22 | $input = ['test1', 'tEsT2', 'TEST3']; 23 | $actual = \Zubr\is_bool(/* put stuff here */); 24 | $expected = \is_bool(/* put stuff here */); 25 | 26 | $this->assertEquals($expected, $actual); 27 | } 28 | } -------------------------------------------------------------------------------- /tests/IsDoubleTest.php.TODO: -------------------------------------------------------------------------------- 1 | is_double(186.31) 10 | [returns] => true 11 | ) 12 | */ 13 | class IsDouble extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\is_double(/* put stuff here */); 19 | $expected = \is_double(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/IsFloatTest.php.TODO: -------------------------------------------------------------------------------- 1 | is_float(186.31) 10 | [returns] => true 11 | ) 12 | */ 13 | class IsFloat extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\is_float(/* put stuff here */); 19 | $expected = \is_float(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/IsLongTest.php.TODO: -------------------------------------------------------------------------------- 1 | is_long(186.31) 10 | [returns] => true 11 | ) 12 | */ 13 | class IsLong extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\is_long(/* put stuff here */); 19 | $expected = \is_long(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/IsNanTest.php.TODO: -------------------------------------------------------------------------------- 1 | is_nan(NaN) 10 | [returns] => true 11 | ) 12 | Array 13 | ( 14 | [code] => is_nan(0) 15 | [returns] => false 16 | ) 17 | */ 18 | class IsNan extends PHPUnit\Framework\TestCase 19 | { 20 | public function test() 21 | { 22 | $input = ['test1', 'tEsT2', 'TEST3']; 23 | $actual = \Zubr\is_nan(/* put stuff here */); 24 | $expected = \is_nan(/* put stuff here */); 25 | 26 | $this->assertEquals($expected, $actual); 27 | } 28 | } -------------------------------------------------------------------------------- /tests/IsNullTest.php.TODO: -------------------------------------------------------------------------------- 1 | is_null('23') 10 | [returns] => false 11 | ) 12 | Array 13 | ( 14 | [code] => is_null(null) 15 | [returns] => true 16 | ) 17 | */ 18 | class IsNull extends PHPUnit\Framework\TestCase 19 | { 20 | public function test() 21 | { 22 | $input = ['test1', 'tEsT2', 'TEST3']; 23 | $actual = \Zubr\is_null(/* put stuff here */); 24 | $expected = \is_null(/* put stuff here */); 25 | 26 | $this->assertEquals($expected, $actual); 27 | } 28 | } -------------------------------------------------------------------------------- /tests/IsRealTest.php.TODO: -------------------------------------------------------------------------------- 1 | is_real(186.31) 10 | [returns] => true 11 | ) 12 | */ 13 | class IsReal extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\is_real(/* put stuff here */); 19 | $expected = \is_real(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/JoinTest.php.TODO: -------------------------------------------------------------------------------- 1 | join(' ', ['Kevin', 'van', 'Zonneveld']) 10 | [returns] => 'Kevin van Zonneveld' 11 | ) 12 | */ 13 | class Join extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\join(/* put stuff here */); 19 | $expected = \join(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/KeyTest.php.TODO: -------------------------------------------------------------------------------- 1 | var $array = {fruit1: 'apple', 'fruit2': 'orange'} 10 | key($array) 11 | [returns] => 'fruit1' 12 | ) 13 | */ 14 | class Key extends PHPUnit\Framework\TestCase 15 | { 16 | public function test() 17 | { 18 | $input = ['test1', 'tEsT2', 'TEST3']; 19 | $actual = \Zubr\key(/* put stuff here */); 20 | $expected = \key(/* put stuff here */); 21 | 22 | $this->assertEquals($expected, $actual); 23 | } 24 | } -------------------------------------------------------------------------------- /tests/LcfirstTest.php.TODO: -------------------------------------------------------------------------------- 1 | lcfirst('Kevin Van Zonneveld') 10 | [returns] => 'kevin Van Zonneveld' 11 | ) 12 | */ 13 | class Lcfirst extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\lcfirst(/* put stuff here */); 19 | $expected = \lcfirst(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/LcgValueTest.php.TODO: -------------------------------------------------------------------------------- 1 | var $rnd = lcg_value() 10 | var $result = $rnd >= 0 && $rnd <= 1 11 | [returns] => true 12 | ) 13 | */ 14 | class LcgValue extends PHPUnit\Framework\TestCase 15 | { 16 | public function test() 17 | { 18 | $input = ['test1', 'tEsT2', 'TEST3']; 19 | $actual = \Zubr\lcg_value(/* put stuff here */); 20 | $expected = \lcg_value(/* put stuff here */); 21 | 22 | $this->assertEquals($expected, $actual); 23 | } 24 | } -------------------------------------------------------------------------------- /tests/Log10Test.php.TODO: -------------------------------------------------------------------------------- 1 | log10(10) 10 | [returns] => 1 11 | ) 12 | Array 13 | ( 14 | [code] => log10(1) 15 | [returns] => 0 16 | ) 17 | */ 18 | class Log10 extends PHPUnit\Framework\TestCase 19 | { 20 | public function test() 21 | { 22 | $input = ['test1', 'tEsT2', 'TEST3']; 23 | $actual = \Zubr\log10(/* put stuff here */); 24 | $expected = \log10(/* put stuff here */); 25 | 26 | $this->assertEquals($expected, $actual); 27 | } 28 | } -------------------------------------------------------------------------------- /tests/Log1pTest.php.TODO: -------------------------------------------------------------------------------- 1 | log1p(1e-15) 10 | [returns] => 9.999999999999995e-16 11 | ) 12 | */ 13 | class Log1p extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\log1p(/* put stuff here */); 19 | $expected = \log1p(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/LogTest.php.TODO: -------------------------------------------------------------------------------- 1 | log(8723321.4, 7) 10 | [returns] => 8.212871815082147 11 | ) 12 | */ 13 | class Log extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\log(/* put stuff here */); 19 | $expected = \log(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/Long2ipTest.php.TODO: -------------------------------------------------------------------------------- 1 | long2ip( 3221234342 ) 10 | [returns] => '192.0.34.166' 11 | ) 12 | */ 13 | class Long2ip extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\long2ip(/* put stuff here */); 19 | $expected = \long2ip(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/LtrimTest.php.TODO: -------------------------------------------------------------------------------- 1 | ltrim(' Kevin van Zonneveld ') 10 | [returns] => 'Kevin van Zonneveld ' 11 | ) 12 | */ 13 | class Ltrim extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\ltrim(/* put stuff here */); 19 | $expected = \ltrim(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/Md5FileTest.php.TODO: -------------------------------------------------------------------------------- 1 | md5_file('test/never-change.txt') 10 | [returns] => 'bc3aa724b0ec7dce4c26e7f4d0d9b064' 11 | ) 12 | */ 13 | class Md5File extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\md5_file(/* put stuff here */); 19 | $expected = \md5_file(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/Md5Test.php.TODO: -------------------------------------------------------------------------------- 1 | md5('Kevin van Zonneveld') 10 | [returns] => '6e658d4bfcb59cc13f96c14450ac40b9' 11 | ) 12 | */ 13 | class Md5 extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\md5(/* put stuff here */); 19 | $expected = \md5(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/MtGetrandmaxTest.php.TODO: -------------------------------------------------------------------------------- 1 | mt_getrandmax() 10 | [returns] => 2147483647 11 | ) 12 | */ 13 | class MtGetrandmax extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\mt_getrandmax(/* put stuff here */); 19 | $expected = \mt_getrandmax(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/MtRandTest.php.TODO: -------------------------------------------------------------------------------- 1 | mt_rand(1, 1) 10 | [returns] => 1 11 | ) 12 | */ 13 | class MtRand extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\mt_rand(/* put stuff here */); 19 | $expected = \mt_rand(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/NextTest.php.TODO: -------------------------------------------------------------------------------- 1 | var $transport = ['foot', 'bike', 'car', 'plane'] 10 | next($transport) 11 | next($transport) 12 | [returns] => 'car' 13 | ) 14 | */ 15 | class Next extends PHPUnit\Framework\TestCase 16 | { 17 | public function test() 18 | { 19 | $input = ['test1', 'tEsT2', 'TEST3']; 20 | $actual = \Zubr\next(/* put stuff here */); 21 | $expected = \next(/* put stuff here */); 22 | 23 | $this->assertEquals($expected, $actual); 24 | } 25 | } -------------------------------------------------------------------------------- /tests/NlLanginfoTest.php.TODO: -------------------------------------------------------------------------------- 1 | nl_langinfo('DAY_1') 10 | [returns] => 'Sunday' 11 | ) 12 | */ 13 | class NlLanginfo extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\nl_langinfo(/* put stuff here */); 19 | $expected = \nl_langinfo(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/OctdecTest.php.TODO: -------------------------------------------------------------------------------- 1 | octdec('77') 10 | [returns] => 63 11 | ) 12 | */ 13 | class Octdec extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\octdec(/* put stuff here */); 19 | $expected = \octdec(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/PiTest.php.TODO: -------------------------------------------------------------------------------- 1 | pi(8723321.4) 10 | [returns] => 3.141592653589793 11 | ) 12 | */ 13 | class Pi extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\pi(/* put stuff here */); 19 | $expected = \pi(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/PosTest.php.TODO: -------------------------------------------------------------------------------- 1 | var $transport = ['foot', 'bike', 'car', 'plane'] 10 | pos($transport) 11 | [returns] => 'foot' 12 | ) 13 | */ 14 | class Pos extends PHPUnit\Framework\TestCase 15 | { 16 | public function test() 17 | { 18 | $input = ['test1', 'tEsT2', 'TEST3']; 19 | $actual = \Zubr\pos(/* put stuff here */); 20 | $expected = \pos(/* put stuff here */); 21 | 22 | $this->assertEquals($expected, $actual); 23 | } 24 | } -------------------------------------------------------------------------------- /tests/PowTest.php.TODO: -------------------------------------------------------------------------------- 1 | pow(8723321.4, 7) 10 | [returns] => 3.8439091680778995e+48 11 | ) 12 | */ 13 | class Pow extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\pow(/* put stuff here */); 19 | $expected = \pow(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/PrevTest.php.TODO: -------------------------------------------------------------------------------- 1 | var $transport = ['foot', 'bike', 'car', 'plane'] 10 | prev($transport) 11 | [returns] => false 12 | ) 13 | */ 14 | class Prev extends PHPUnit\Framework\TestCase 15 | { 16 | public function test() 17 | { 18 | $input = ['test1', 'tEsT2', 'TEST3']; 19 | $actual = \Zubr\prev(/* put stuff here */); 20 | $expected = \prev(/* put stuff here */); 21 | 22 | $this->assertEquals($expected, $actual); 23 | } 24 | } -------------------------------------------------------------------------------- /tests/PrintRTest.php.TODO: -------------------------------------------------------------------------------- 1 | print_r(1, true) 10 | [returns] => '1' 11 | ) 12 | */ 13 | class PrintR extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\print_r(/* put stuff here */); 19 | $expected = \print_r(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/PrintfTest.php.TODO: -------------------------------------------------------------------------------- 1 | printf("%01.2f", 123.1) 10 | [returns] => 6 11 | ) 12 | */ 13 | class Printf extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\printf(/* put stuff here */); 19 | $expected = \printf(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/QuotemetaTest.php.TODO: -------------------------------------------------------------------------------- 1 | quotemeta(". + * ? ^ ( $ )") 10 | [returns] => '\\. \\+ \\* \\? \\^ \\( \\$ \\)' 11 | ) 12 | */ 13 | class Quotemeta extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\quotemeta(/* put stuff here */); 19 | $expected = \quotemeta(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/Rad2degTest.php.TODO: -------------------------------------------------------------------------------- 1 | rad2deg(3.141592653589793) 10 | [returns] => 180 11 | ) 12 | */ 13 | class Rad2deg extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\rad2deg(/* put stuff here */); 19 | $expected = \rad2deg(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/RandTest.php.TODO: -------------------------------------------------------------------------------- 1 | rand(1, 1) 10 | [returns] => 1 11 | ) 12 | */ 13 | class Rand extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\rand(/* put stuff here */); 19 | $expected = \rand(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/ResetTest.php.TODO: -------------------------------------------------------------------------------- 1 | reset({0: 'Kevin', 1: 'van', 2: 'Zonneveld'}) 10 | [returns] => 'Kevin' 11 | ) 12 | */ 13 | class Reset extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\reset(/* put stuff here */); 19 | $expected = \reset(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/RtrimTest.php.TODO: -------------------------------------------------------------------------------- 1 | rtrim(' Kevin van Zonneveld ') 10 | [returns] => ' Kevin van Zonneveld' 11 | ) 12 | */ 13 | class Rtrim extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\rtrim(/* put stuff here */); 19 | $expected = \rtrim(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/SetTimeLimitTest.php.TODO: -------------------------------------------------------------------------------- 1 | set_time_limit(4) 10 | [returns] => undefined 11 | ) 12 | */ 13 | class SetTimeLimit extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\set_time_limit(/* put stuff here */); 19 | $expected = \set_time_limit(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/SetcookieTest.php.TODO: -------------------------------------------------------------------------------- 1 | setcookie('author_name', 'Kevin van Zonneveld') 10 | [returns] => true 11 | ) 12 | */ 13 | class Setcookie extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\setcookie(/* put stuff here */); 19 | $expected = \setcookie(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/SetlocaleTest.php.TODO: -------------------------------------------------------------------------------- 1 | setlocale('LC_ALL', 'en_US') 10 | [returns] => 'en_US' 11 | ) 12 | */ 13 | class Setlocale extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\setlocale(/* put stuff here */); 19 | $expected = \setlocale(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/SetrawcookieTest.php.TODO: -------------------------------------------------------------------------------- 1 | setrawcookie('author_name', 'Kevin van Zonneveld') 10 | [returns] => true 11 | ) 12 | */ 13 | class Setrawcookie extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\setrawcookie(/* put stuff here */); 19 | $expected = \setrawcookie(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/Sha1FileTest.php.TODO: -------------------------------------------------------------------------------- 1 | sha1_file('test/never-change.txt') 10 | [returns] => '0ea65a1f4b4d69712affc58240932f3eb8a2af66' 11 | ) 12 | */ 13 | class Sha1File extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\sha1_file(/* put stuff here */); 19 | $expected = \sha1_file(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/Sha1Test.php.TODO: -------------------------------------------------------------------------------- 1 | sha1('Kevin van Zonneveld') 10 | [returns] => '54916d2e62f65b3afa6e192e6a601cdbe5cb5897' 11 | ) 12 | */ 13 | class Sha1 extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\sha1(/* put stuff here */); 19 | $expected = \sha1(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/SinTest.php.TODO: -------------------------------------------------------------------------------- 1 | Math.ceil(sin(8723321.4) * 10000000) 10 | [returns] => -9834330 11 | ) 12 | */ 13 | class Sin extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\sin(/* put stuff here */); 19 | $expected = \sin(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/SinhTest.php.TODO: -------------------------------------------------------------------------------- 1 | sinh(-0.9834330348825909) 10 | [returns] => -1.1497971402636502 11 | ) 12 | */ 13 | class Sinh extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\sinh(/* put stuff here */); 19 | $expected = \sinh(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/SqrtTest.php.TODO: -------------------------------------------------------------------------------- 1 | sqrt(8723321.4) 10 | [returns] => 2953.5269424875746 11 | ) 12 | */ 13 | class Sqrt extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\sqrt(/* put stuff here */); 19 | $expected = \sqrt(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/StrRepeatTest.php.TODO: -------------------------------------------------------------------------------- 1 | str_repeat('-=', 10) 10 | [returns] => '-=-=-=-=-=-=-=-=-=-=' 11 | ) 12 | */ 13 | class StrRepeat extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\str_repeat(/* put stuff here */); 19 | $expected = \str_repeat(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/StrShuffleTest.php.TODO: -------------------------------------------------------------------------------- 1 | var $shuffled = str_shuffle("abcdef") 10 | var $result = $shuffled.length 11 | [returns] => 6 12 | ) 13 | */ 14 | class StrShuffle extends PHPUnit\Framework\TestCase 15 | { 16 | public function test() 17 | { 18 | $input = ['test1', 'tEsT2', 'TEST3']; 19 | $actual = \Zubr\str_shuffle(/* put stuff here */); 20 | $expected = \str_shuffle(/* put stuff here */); 21 | 22 | $this->assertEquals($expected, $actual); 23 | } 24 | } -------------------------------------------------------------------------------- /tests/StrSplitTest.php.TODO: -------------------------------------------------------------------------------- 1 | str_split('Hello Friend', 3) 10 | [returns] => ['Hel', 'lo ', 'Fri', 'end'] 11 | ) 12 | */ 13 | class StrSplit extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\str_split(/* put stuff here */); 19 | $expected = \str_split(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/StrcollTest.php.TODO: -------------------------------------------------------------------------------- 1 | strcoll('a', 'b') 10 | [returns] => -1 11 | ) 12 | */ 13 | class Strcoll extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\strcoll(/* put stuff here */); 19 | $expected = \strcoll(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/StriposTest.php.TODO: -------------------------------------------------------------------------------- 1 | stripos('ABC', 'a') 10 | [returns] => 0 11 | ) 12 | */ 13 | class Stripos extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\stripos(/* put stuff here */); 19 | $expected = \stripos(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/StrpbrkTest.php.TODO: -------------------------------------------------------------------------------- 1 | strpbrk('This is a Simple text.', 'is') 10 | [returns] => 'is is a Simple text.' 11 | ) 12 | */ 13 | class Strpbrk extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\strpbrk(/* put stuff here */); 19 | $expected = \strpbrk(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/StrposTest.php.TODO: -------------------------------------------------------------------------------- 1 | strpos('Kevin van Zonneveld', 'e', 5) 10 | [returns] => 14 11 | ) 12 | */ 13 | class Strpos extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\strpos(/* put stuff here */); 19 | $expected = \strpos(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/StrrchrTest.php.TODO: -------------------------------------------------------------------------------- 1 | strrchr("Line 1\nLine 2\nLine 3", 10).substr(1) 10 | [returns] => 'Line 3' 11 | ) 12 | */ 13 | class Strrchr extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\strrchr(/* put stuff here */); 19 | $expected = \strrchr(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/StrriposTest.php.TODO: -------------------------------------------------------------------------------- 1 | strripos('Kevin van Zonneveld', 'E') 10 | [returns] => 16 11 | ) 12 | */ 13 | class Strripos extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\strripos(/* put stuff here */); 19 | $expected = \strripos(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/StrtolowerTest.php.TODO: -------------------------------------------------------------------------------- 1 | strtolower('Kevin van Zonneveld') 10 | [returns] => 'kevin van zonneveld' 11 | ) 12 | */ 13 | class Strtolower extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\strtolower(/* put stuff here */); 19 | $expected = \strtolower(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/StrtoupperTest.php.TODO: -------------------------------------------------------------------------------- 1 | strtoupper('Kevin van Zonneveld') 10 | [returns] => 'KEVIN VAN ZONNEVELD' 11 | ) 12 | */ 13 | class Strtoupper extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\strtoupper(/* put stuff here */); 19 | $expected = \strtoupper(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/StrvalTest.php.TODO: -------------------------------------------------------------------------------- 1 | strval({red: 1, green: 2, blue: 3, white: 4}) 10 | [returns] => 'Object' 11 | ) 12 | */ 13 | class Strval extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\strval(/* put stuff here */); 19 | $expected = \strval(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/SubstrCompareTest.php.TODO: -------------------------------------------------------------------------------- 1 | substr_compare("abcde", "bc", 1, 2) 10 | [returns] => 0 11 | ) 12 | */ 13 | class SubstrCompare extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\substr_compare(/* put stuff here */); 19 | $expected = \substr_compare(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/TanTest.php.TODO: -------------------------------------------------------------------------------- 1 | Math.ceil(tan(8723321.4) * 10000000) 10 | [returns] => 54251849 11 | ) 12 | */ 13 | class Tan extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\tan(/* put stuff here */); 19 | $expected = \tan(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/TanhTest.php.TODO: -------------------------------------------------------------------------------- 1 | tanh(5.4251848798444815) 10 | [returns] => 0.9999612058841574 11 | ) 12 | */ 13 | class Tanh extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\tanh(/* put stuff here */); 19 | $expected = \tanh(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/UcfirstTest.php.TODO: -------------------------------------------------------------------------------- 1 | ucfirst('kevin van zonneveld') 10 | [returns] => 'Kevin van zonneveld' 11 | ) 12 | */ 13 | class Ucfirst extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\ucfirst(/* put stuff here */); 19 | $expected = \ucfirst(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/VarDumpTest.php.TODO: -------------------------------------------------------------------------------- 1 | var_dump(1) 10 | [returns] => 'int(1)' 11 | ) 12 | */ 13 | class VarDump extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\var_dump(/* put stuff here */); 19 | $expected = \var_dump(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/VprintfTest.php.TODO: -------------------------------------------------------------------------------- 1 | vprintf("%01.2f", 123.1) 10 | [returns] => 6 11 | ) 12 | */ 13 | class Vprintf extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\vprintf(/* put stuff here */); 19 | $expected = \vprintf(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/VsprintfTest.php.TODO: -------------------------------------------------------------------------------- 1 | vsprintf('%04d-%02d-%02d', [1988, 8, 1]) 10 | [returns] => '1988-08-01' 11 | ) 12 | */ 13 | class Vsprintf extends PHPUnit\Framework\TestCase 14 | { 15 | public function test() 16 | { 17 | $input = ['test1', 'tEsT2', 'TEST3']; 18 | $actual = \Zubr\vsprintf(/* put stuff here */); 19 | $expected = \vsprintf(/* put stuff here */); 20 | 21 | $this->assertEquals($expected, $actual); 22 | } 23 | } -------------------------------------------------------------------------------- /utils/stubs/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nkkollaw/stubs-util", 3 | "authors": [ 4 | { 5 | "name": "Niccolò Brogi", 6 | "email": "me@nbrogi.com" 7 | } 8 | ], 9 | "require": { 10 | "symfony/yaml": "^3.3", 11 | "ijortengab/parse-html": "^0.0.7", 12 | "nkkollaw/str-utils": "^1.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /utils/stubs/install.sh: -------------------------------------------------------------------------------- 1 | # clean up 2 | rm -v -r -f phpstorm-stubs locutus 3 | 4 | # clone repos 5 | git clone https://github.com/JetBrains/phpstorm-stubs.git 6 | git clone https://github.com/kvz/locutus.git 7 | 8 | # build Locutus 9 | npm install --prefix locutus 10 | npm run --prefix locutus build 11 | composer install 12 | echo "Done :-)" --------------------------------------------------------------------------------