Plugin Directory

Changeset 2081494


Ignore:
Timestamp:
05/06/2019 01:30:03 PM (7 years ago)
Author:
riccardooliva
Message:

Bugfix

Location:
wp-frontend-helper
Files:
54 added
8 edited

Legend:

Unmodified
Added
Removed
  • wp-frontend-helper/tags/1.1/readme.txt

    r2074084 r2081494  
    2424== Changelog ==
    2525
    26 = 1.0 =
    27 * First release
     26= 1.1.1 =
     27* Bug fix: data persistency
    2828
    2929= 1.1 =
    3030* Added media versioning functionality
    3131* Added `if` method to the assets manager
     32
     33= 1.0 =
     34* First release
  • wp-frontend-helper/trunk/readme.txt

    r2074084 r2081494  
    2424== Changelog ==
    2525
    26 = 1.0 =
    27 * First release
     26= 1.1.1 =
     27* Bug fix: data persistency
    2828
    2929= 1.1 =
    3030* Added media versioning functionality
    3131* Added `if` method to the assets manager
     32
     33= 1.0 =
     34* First release
  • wp-frontend-helper/trunk/src/Assets/AssetObserver.php

    r2064267 r2081494  
    2727     */
    2828    public static function init(): self {
    29         $obj = null;
     29        static $obj = null;
    3030        if ( ! $obj ) {
    3131            $obj = new static();
  • wp-frontend-helper/trunk/src/Assets/AssetsManager.php

    r2073854 r2081494  
    6262     */
    6363    public static function init( AssetObserver $observer ): self {
    64         $obj = null;
     64        static $obj = null;
    6565        if ( ! $obj ) {
    6666            $obj = new static( $observer );
  • wp-frontend-helper/trunk/src/Media/MediaPrinter.php

    r2073876 r2081494  
    3939     */
    4040    public static function init( WpfhOptions $options ): MediaPrinter {
    41         $obj = null;
     41        static $obj = null;
    4242        if ( ! $obj ) {
    4343            $obj = new static( $options );
  • wp-frontend-helper/trunk/src/WpfhConfig.php

    r2073854 r2081494  
    3434     */
    3535    public static function init(): WpfhConfig {
    36         $obj = null;
     36        static $obj = null;
    3737        if ( ! $obj ) {
    3838            $obj = new static();
  • wp-frontend-helper/trunk/src/WpfhOptions.php

    r2073876 r2081494  
    2727     */
    2828    public static function init(): WpfhOptions {
    29         $obj = null;
     29        static $obj = null;
    3030        if ( ! $obj ) {
    3131            $obj          = new static();
  • wp-frontend-helper/trunk/tests/src/Media/test-MediaPrinter.php

    r2073876 r2081494  
    1212
    1313    public function test_get_write_save_media() {
    14         Functions\expect( 'get_template_directory' )->once()->andReturn( '/dir' );
     14        Functions\expect( 'get_template_directory' )->andReturn( '/dir' );
    1515        $options = \Mockery::mock( \Wpfh\WpfhOptions::class )
    16                            ->shouldReceive( 'get' )->twice()->andReturn( [ 'enable_version' => true, 'version_tag' => '123' ] )
     16                           ->shouldReceive( 'get' )->andReturn( [ 'enable_version' => true, 'version_tag' => '123' ] )
    1717                           ->getMock();
    1818        $test    = \Wpfh\Media\MediaPrinter::init( $options );
     
    2626
    2727    public function test_get_write_save_media_invalid() {
    28         Functions\expect( 'get_template_directory' )->once()->andReturn( '/dir' );
     28        Functions\expect( 'get_template_directory' )->andReturn( '/dir' );
    2929        $options = \Mockery::mock( \Wpfh\WpfhOptions::class )
    30                            ->shouldReceive( 'get' )->once()->andReturn( [ 'enable_version' => true, 'version_tag' => '123' ] )
     30                           ->shouldReceive( 'get' )->andReturn( [ 'enable_version' => true, 'version_tag' => '123' ] )
    3131                           ->getMock();
    3232        $test    = \Wpfh\Media\MediaPrinter::init( $options );
     
    3939
    4040    public function test_write_tag() {
    41         Functions\expect( 'get_template_directory' )->once()->andReturn( '/dir' );
     41        Functions\expect( 'get_template_directory' )->andReturn( '/dir' );
    4242        $options = \Mockery::mock( \Wpfh\WpfhOptions::class )
    43                            ->shouldReceive( 'get' )->twice()->andReturn( [ 'enable_version' => true, 'version_tag' => '123' ] )
     43                           ->shouldReceive( 'get' )->andReturn( [ 'enable_version' => true, 'version_tag' => '123' ] )
    4444                           ->getMock();
    4545        $test    = \Wpfh\Media\MediaPrinter::init( $options );
Note: See TracChangeset for help on using the changeset viewer.