-
-
Notifications
You must be signed in to change notification settings - Fork 79
Support for actively maintained PHP, Laravel, K8s versions #474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
693eb70
4d9e748
6052973
497740d
ebdc179
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ composer.phar | |
composer.lock | ||
.DS_Store | ||
.idea/ | ||
.phpunit.result.cache | ||
.phpunit.cache |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" backupStaticAttributes="false" colors="true" verbose="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Regenerated the configuration with |
||
<coverage> | ||
<include> | ||
<directory suffix=".php">src/</directory> | ||
</include> | ||
</coverage> | ||
<testsuites> | ||
<testsuite name="Renoki Co Test Suite"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
<php> | ||
<server name="APP_ENV" value="testing"/> | ||
</php> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" | ||
bootstrap="vendor/autoload.php" | ||
cacheDirectory=".phpunit.cache" | ||
failOnRisky="true" | ||
failOnWarning="true"> | ||
<testsuites> | ||
<testsuite name="Renoki Co Test Suite"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<php> | ||
<server name="APP_ENV" value="testing"/> | ||
</php> | ||
|
||
<source restrictNotices="true" restrictWarnings="true"> | ||
<include> | ||
<directory>src</directory> | ||
</include> | ||
</source> | ||
</phpunit> |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
|
||
namespace RenokiCo\PhpK8s\Test; | ||
|
||
use PHPUnit\Framework\Attributes\DataProvider; | ||
use RenokiCo\PhpK8s\Exceptions\KubeConfigBaseEncodedDataInvalid; | ||
use RenokiCo\PhpK8s\Exceptions\KubeConfigClusterNotFound; | ||
use RenokiCo\PhpK8s\Exceptions\KubeConfigContextNotFound; | ||
|
@@ -208,10 +209,8 @@ public function test_in_cluster_config() | |
K8sResource::setDefaultNamespace('default'); | ||
} | ||
|
||
/** | ||
* @dataProvider environmentVariableContextProvider | ||
*/ | ||
public function test_from_environment_variable(string $context = null, string $expectedDomain) | ||
#[DataProvider('environmentVariableContextProvider')] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was a requirement with latest stable PHPUnit |
||
public function test_from_environment_variable(?string $context, string $expectedDomain) | ||
{ | ||
$_SERVER['KUBECONFIG'] = __DIR__.'/cluster/kubeconfig.yaml::'.__DIR__.'/cluster/kubeconfig-2.yaml'; | ||
|
||
|
@@ -220,7 +219,7 @@ public function test_from_environment_variable(string $context = null, string $e | |
$this->assertSame("https://{$expectedDomain}:8443/?", $cluster->getCallableUrl('/', [])); | ||
} | ||
|
||
public function environmentVariableContextProvider(): iterable | ||
public static function environmentVariableContextProvider(): iterable | ||
{ | ||
yield [null, 'minikube']; | ||
yield ['minikube-2', 'minikube-2']; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes in this step are subjective and admittedly not necessary. Happy to change them back if you'd like. Though they're functionally equivalent.