Skip to content

Commit

Permalink
Merge pull request #64 from duxthefux/laravel-8
Browse files Browse the repository at this point in the history
Added support for Laravel 8
  • Loading branch information
publiux authored Dec 14, 2020
2 parents 27e5b51 + 9d2d1f3 commit 686b75b
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 27 deletions.
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
],
"require": {
"php": ">=5.5.9",
"illuminate/support": "5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*|5.8.*|^6|^7",
"illuminate/config": "5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*|5.8.*|^6|^7",
"symfony/finder": "2.*|3.*|4.*|5.*",
"symfony/console": "2.*|3.*|4.*|5.*",
"illuminate/support": "^8",
"illuminate/config": "^8",
"symfony/finder": "^5",
"symfony/console": "^5",
"aws/aws-sdk-php": "~3.0"
},
"require-dev": {
"phpunit/phpunit": "~4.0",
"mockery/mockery": "0.9.3"
"phpunit/phpunit": "^9.0",
"mockery/mockery": "1.4.2"
},
"autoload": {
"classmap": [
Expand Down
18 changes: 9 additions & 9 deletions tests/Publiux/laravelcdn/AssetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function testInitReturningAssetObject()
]);

// check the returned object is of type Publiux\laravelcdn\Asset
assertEquals($result, $this->asset);
$this->assertEquals($result, $this->asset);
}

public function testIncludedDirectories()
Expand All @@ -52,7 +52,7 @@ public function testIncludedDirectories()

$result = $this->asset->getIncludedDirectories();

assertEquals($result, $dir);
$this->assertEquals($result, $dir);
}

public function testIncludedExtensions()
Expand All @@ -67,7 +67,7 @@ public function testIncludedExtensions()

$result = $this->asset->getIncludedExtensions();

assertEquals($result, $ext);
$this->assertEquals($result, $ext);
}

public function testIncludedPatterns()
Expand All @@ -82,7 +82,7 @@ public function testIncludedPatterns()

$result = $this->asset->getIncludedPatterns();

assertEquals($result, $pat);
$this->assertEquals($result, $pat);
}

public function testExcludedDirectories()
Expand All @@ -97,7 +97,7 @@ public function testExcludedDirectories()

$result = $this->asset->getExcludedDirectories();

assertEquals($result, $dir);
$this->assertEquals($result, $dir);
}

public function testExcludedFiles()
Expand All @@ -112,7 +112,7 @@ public function testExcludedFiles()

$result = $this->asset->getExcludedFiles();

assertEquals($result, $dir);
$this->assertEquals($result, $dir);
}

public function testExcludedExtensions()
Expand All @@ -127,7 +127,7 @@ public function testExcludedExtensions()

$result = $this->asset->getExcludedExtensions();

assertEquals($result, $dir);
$this->assertEquals($result, $dir);
}

public function testExcludedPatterns()
Expand All @@ -142,7 +142,7 @@ public function testExcludedPatterns()

$result = $this->asset->getExcludedPatterns();

assertEquals($result, $dir);
$this->assertEquals($result, $dir);
}

public function testExcludedHidden()
Expand All @@ -157,6 +157,6 @@ public function testExcludedHidden()

$result = $this->asset->getExcludeHidden();

assertEquals($result, $bol);
$this->assertEquals($result, $bol);
}
}
4 changes: 2 additions & 2 deletions tests/Publiux/laravelcdn/CdnFacadeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function testAssetIsCallingUrlGenerator()

$result = $this->facade->asset($this->asset_path);
// assert is calling the url generator
assertEquals($result, $this->asset_url);
$this->assertEquals($result, $this->asset_url);
}

public function testPathIsCallingUrlGenerator()
Expand All @@ -98,7 +98,7 @@ public function testPathIsCallingUrlGenerator()

$result = $this->facade->asset($this->path_path);
// assert is calling the url generator
assertEquals($result, $this->asset_url);
$this->assertEquals($result, $this->asset_url);
}

/**
Expand Down
6 changes: 3 additions & 3 deletions tests/Publiux/laravelcdn/CdnTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function testPushCommandReturnTrue()

$result = $this->cdn->push();

assertEquals($result, true);
$this->assertEquals($result, true);
}

/**
Expand Down Expand Up @@ -153,7 +153,7 @@ public function testPushCommand()
->andReturn(__DIR__.'/AwsS3ProviderTest.php');

// partial mock
$p_aws_s3_provider = M::mock('\Publiux\laravelcdn\Providers\AwsS3Provider[connect]',
$p_aws_s3_provider = M::mock('\Publiux\laravelcdn\Providers\AwsS3Provider[connect]',
[
$m_console,
$m_validator,
Expand Down Expand Up @@ -185,6 +185,6 @@ public function testPushCommand()

$result = $cdn->push();

assertEquals($result, true);
$this->assertEquals($result, true);
}
}
4 changes: 2 additions & 2 deletions tests/Publiux/laravelcdn/FinderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ public function testReadReturnCorrectDataType()

$result = $finder->read($asset_holder);

assertInstanceOf('Symfony\Component\Finder\SplFileInfo', $result->first());
$this->assertInstanceOf('Symfony\Component\Finder\SplFileInfo', $result->first());

assertEquals($result, new Collection($result->all()));
$this->assertEquals($result, new Collection($result->all()));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/Publiux/laravelcdn/ProviderFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function testCreateReturnCorrectProviderObject()

$provider = $this->provider_factory->create($configurations);

assertEquals($provider, $m_aws_s3);
$this->assertEquals($provider, $m_aws_s3);
}

/**
Expand Down
8 changes: 4 additions & 4 deletions tests/Publiux/laravelcdn/Providers/AwsS3ProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function testInitializingObject()

$awsS3Provider_obj = $this->p_awsS3Provider->init($configurations);

assertInstanceOf('Publiux\laravelcdn\Providers\AwsS3Provider', $awsS3Provider_obj);
$this->assertInstanceOf('Publiux\laravelcdn\Providers\AwsS3Provider', $awsS3Provider_obj);
}

public function testUploadingAssets()
Expand Down Expand Up @@ -131,7 +131,7 @@ public function testUploadingAssets()

$result = $this->p_awsS3Provider->upload(new Collection([$this->m_spl_file]));

assertEquals(true, $result);
$this->assertEquals(true, $result);
}

public function testUrlGenerator()
Expand Down Expand Up @@ -167,7 +167,7 @@ public function testUrlGenerator()

$result = $this->p_awsS3Provider->urlGenerator($this->path);

assertEquals($this->cdn_url, $result);
$this->assertEquals($this->cdn_url, $result);
}

public function testEmptyUrlGenerator()
Expand Down Expand Up @@ -203,6 +203,6 @@ public function testEmptyUrlGenerator()

$result = $this->p_awsS3Provider->urlGenerator($this->path);

assertEquals($this->path_url, $result);
$this->assertEquals($this->path_url, $result);
}
}

0 comments on commit 686b75b

Please sign in to comment.