Plugin Directory

Changeset 2010122


Ignore:
Timestamp:
01/10/2019 05:00:00 PM (7 years ago)
Author:
waughjai
Message:

Test in WordPress 5.0

Location:
waj-copyright-year
Files:
31 added
6 edited

Legend:

Unmodified
Added
Removed
  • waj-copyright-year/trunk/composer.lock

    r1963099 r2010122  
    99        {
    1010            "name": "waughj/test-hash-item",
    11             "version": "1.0.1",
     11            "version": "1.1.0",
    1212            "source": {
    1313                "type": "git",
    1414                "url": "https://github.com/waughjai/test-hash-item.git",
    15                 "reference": "ddf5cbc1cadb2342d3a725a062bfaa20b7404807"
    16             },
    17             "dist": {
    18                 "type": "zip",
    19                 "url": "https://api.github.com/repos/waughjai/test-hash-item/zipball/ddf5cbc1cadb2342d3a725a062bfaa20b7404807",
    20                 "reference": "ddf5cbc1cadb2342d3a725a062bfaa20b7404807",
     15                "reference": "5657dc1ac52e629acdd6ce57936acafc60b00394"
     16            },
     17            "dist": {
     18                "type": "zip",
     19                "url": "https://api.github.com/repos/waughjai/test-hash-item/zipball/5657dc1ac52e629acdd6ce57936acafc60b00394",
     20                "reference": "5657dc1ac52e629acdd6ce57936acafc60b00394",
    2121                "shasum": ""
    2222            },
     
    4848                "tests"
    4949            ],
    50             "time": "2018-10-23T18:46:38+00:00"
     50            "time": "2018-11-29T20:46:20+00:00"
    5151        }
    5252    ],
     
    14231423        },
    14241424        {
     1425            "name": "symfony/polyfill-ctype",
     1426            "version": "v1.10.0",
     1427            "source": {
     1428                "type": "git",
     1429                "url": "https://github.com/symfony/polyfill-ctype.git",
     1430                "reference": "e3d826245268269cd66f8326bd8bc066687b4a19"
     1431            },
     1432            "dist": {
     1433                "type": "zip",
     1434                "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19",
     1435                "reference": "e3d826245268269cd66f8326bd8bc066687b4a19",
     1436                "shasum": ""
     1437            },
     1438            "require": {
     1439                "php": ">=5.3.3"
     1440            },
     1441            "suggest": {
     1442                "ext-ctype": "For best performance"
     1443            },
     1444            "type": "library",
     1445            "extra": {
     1446                "branch-alias": {
     1447                    "dev-master": "1.9-dev"
     1448                }
     1449            },
     1450            "autoload": {
     1451                "psr-4": {
     1452                    "Symfony\\Polyfill\\Ctype\\": ""
     1453                },
     1454                "files": [
     1455                    "bootstrap.php"
     1456                ]
     1457            },
     1458            "notification-url": "https://packagist.org/downloads/",
     1459            "license": [
     1460                "MIT"
     1461            ],
     1462            "authors": [
     1463                {
     1464                    "name": "Symfony Community",
     1465                    "homepage": "https://symfony.com/contributors"
     1466                },
     1467                {
     1468                    "name": "Gert de Pagter",
     1469                    "email": "BackEndTea@gmail.com"
     1470                }
     1471            ],
     1472            "description": "Symfony polyfill for ctype functions",
     1473            "homepage": "https://symfony.com",
     1474            "keywords": [
     1475                "compatibility",
     1476                "ctype",
     1477                "polyfill",
     1478                "portable"
     1479            ],
     1480            "time": "2018-08-06T14:22:27+00:00"
     1481        },
     1482        {
    14251483            "name": "theseer/tokenizer",
    14261484            "version": "1.1.0",
     
    14641522        {
    14651523            "name": "webmozart/assert",
    1466             "version": "1.3.0",
     1524            "version": "1.4.0",
    14671525            "source": {
    14681526                "type": "git",
    14691527                "url": "https://github.com/webmozart/assert.git",
    1470                 "reference": "0df1908962e7a3071564e857d86874dad1ef204a"
    1471             },
    1472             "dist": {
    1473                 "type": "zip",
    1474                 "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a",
    1475                 "reference": "0df1908962e7a3071564e857d86874dad1ef204a",
    1476                 "shasum": ""
    1477             },
    1478             "require": {
    1479                 "php": "^5.3.3 || ^7.0"
     1528                "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9"
     1529            },
     1530            "dist": {
     1531                "type": "zip",
     1532                "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9",
     1533                "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9",
     1534                "shasum": ""
     1535            },
     1536            "require": {
     1537                "php": "^5.3.3 || ^7.0",
     1538                "symfony/polyfill-ctype": "^1.8"
    14801539            },
    14811540            "require-dev": {
     
    15101569                "validate"
    15111570            ],
    1512             "time": "2018-01-29T19:49:41+00:00"
     1571            "time": "2018-12-25T11:19:39+00:00"
    15131572        }
    15141573    ],
  • waj-copyright-year/trunk/readme.txt

    r1963099 r2010122  
    33Tags: copyright, year, footer, auto-update, new year
    44Requires at least: 4.9.8
    5 Tested up to: 4.9.8
    6 Stable tag: 1.0.0
     5Tested up to: 5.0.3
     6Stable tag: 1.0.1
    77Requires PHP: 7.0
    88License: GPLv2 or later
     
    3636== Example ==
    3737
    38 ````
    39 <?php
     38    <?php
    4039
    41 declare( strict_types = 1 );
    42 namespace MyTheme\FooterTemplate
    43 {
    44     use \WaughJ\CopyrightYear\CopyrightYear;
     40    declare( strict_types = 1 );
     41    namespace MyTheme\FooterTemplate
     42    {
     43        use \WaughJ\CopyrightYear\CopyrightYear;
    4544
    46     ?>
    47         <footer class="footer">
    48             <p>Copyright Jaimeson Waugh &copy; <?= new CopyrightYear( 2015, '-' ); ?>.</p>
    49         </footer>
    50     <?php
    51 }
    52 ````
     45        ?>
     46            <footer class="footer">
     47                <p>Copyright Jaimeson Waugh &copy; <?= new CopyrightYear( 2015, '-' ); ?>.</p>
     48            </footer>
     49        <?php
     50    }
    5351
    54 This will print the message, "Copyright Jaimeson Waugh © 2015-2018."
     52or
     53
     54    [copyright-year start="2015" divider="-"]
     55
     56This will print the message, `Copyright Jaimeson Waugh © 2015-2018.`
    5557
    5658
    5759== Changelog ==
    5860
     61= 1.0.1 =
     62* Test in WordPress version 5.0.
     63* Rename main PHP file to be consistent with plugin name.
     64
    5965= 1.0 =
    6066* Initial stable version.
  • waj-copyright-year/trunk/vendor/composer/installed.json

    r1963099 r2010122  
    22    {
    33        "name": "waughj/test-hash-item",
    4         "version": "1.0.1",
    5         "version_normalized": "1.0.1.0",
     4        "version": "1.1.0",
     5        "version_normalized": "1.1.0.0",
    66        "source": {
    77            "type": "git",
    88            "url": "https://github.com/waughjai/test-hash-item.git",
    9             "reference": "ddf5cbc1cadb2342d3a725a062bfaa20b7404807"
     9            "reference": "5657dc1ac52e629acdd6ce57936acafc60b00394"
    1010        },
    1111        "dist": {
    1212            "type": "zip",
    13             "url": "https://api.github.com/repos/waughjai/test-hash-item/zipball/ddf5cbc1cadb2342d3a725a062bfaa20b7404807",
    14             "reference": "ddf5cbc1cadb2342d3a725a062bfaa20b7404807",
     13            "url": "https://api.github.com/repos/waughjai/test-hash-item/zipball/5657dc1ac52e629acdd6ce57936acafc60b00394",
     14            "reference": "5657dc1ac52e629acdd6ce57936acafc60b00394",
    1515            "shasum": ""
    1616        },
     
    2121            "phpunit/phpunit": "6.*"
    2222        },
    23         "time": "2018-10-23T18:46:38+00:00",
     23        "time": "2018-11-29T20:46:20+00:00",
    2424        "type": "project",
    2525        "installation-source": "dist",
  • waj-copyright-year/trunk/vendor/waughj/test-hash-item/README.md

    r1963099 r2010122  
    2020TestHashItemClass: Tests if the hash has something for the key & is an member of a certain class. Takes 4 arguments, with the last 3 being the usual list, key, & fallback arguments & the 1st argument being the name o' the class to test for.
    2121
     22TestHashItemIsTrue: Tests if hash has something for the key & its value is truthy. Takes only list & key & only returns true or false.
     23
    2224Finally, TestHashItem has before the other 3 arguments a callable function argument to allow one to create a custom test to be run in addition to testing if the hash map contains the key.
  • waj-copyright-year/trunk/vendor/waughj/test-hash-item/src/TestHashItem.php

    r1963099 r2010122  
    66    function TestHashItemExists( array $list, string $key, $fallback = null )
    77    {
    8         return ( is_array( $list ) && isset( $list[ $key ] ) ) ? $list[ $key ] : $fallback;
     8        return ( array_key_exists( $key, $list ) ) ? $list[ $key ] : $fallback;
    99    }
    1010
     
    4848    }
    4949
     50    function TestHashItemIsTrue( array $list, string $key ) : bool
     51    {
     52        return TestHashItemExists( $list, $key ) && $list[ $key ];
     53    }
     54
    5055    function TestHashItem( callable $function, array $list, string $key, $fallback = null )
    5156    {
  • waj-copyright-year/trunk/vendor/waughj/test-hash-item/tests/TestHashItemTest.php

    r1963099 r2010122  
    99use function \WaughJ\TestHashItem\TestHashItemObject;
    1010use function \WaughJ\TestHashItem\TestHashItemClass;
     11use function \WaughJ\TestHashItem\TestHashItemIsTrue;
    1112
    1213class TestHashItemTest extends TestCase
     
    7273        $this->assertEquals( TestHashItemClass( 'Date', $list, 'date-obj', null ), null );
    7374    }
     75
     76    public function testItemIsTrue() : void
     77    {
     78        $switch1 = [ 'value' => true ];
     79        $switch2 = [ 'value' => 1 ];
     80        $switch3 = [ 'value' => 0 ];
     81        $switch4 = [ 'value' => 'afdafsaf' ];
     82        $switch5 = [ 'value' => '' ];
     83        $switch6 = [ 'value' => null ];
     84        $switch7 = [ 'value' => false ];
     85        $this->assertEquals( TestHashItemIsTrue( $switch1, 'value' ), true );
     86        $this->assertEquals( TestHashItemIsTrue( $switch2, 'value' ), true );
     87        $this->assertEquals( TestHashItemIsTrue( $switch3, 'value' ), false );
     88        $this->assertEquals( TestHashItemIsTrue( $switch4, 'value' ), true );
     89        $this->assertEquals( TestHashItemIsTrue( $switch5, 'value' ), false );
     90        $this->assertEquals( TestHashItemIsTrue( $switch6, 'value' ), false );
     91        $this->assertEquals( TestHashItemIsTrue( $switch7, 'value' ), false );
     92    }
    7493}
Note: See TracChangeset for help on using the changeset viewer.