Skip to content

Commit

Permalink
Merge pull request #1 from maciejkosiarski/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Maciej Kosiarski authored Mar 28, 2019
2 parents a05ecfa + d223048 commit 99da7bc
Show file tree
Hide file tree
Showing 8 changed files with 129 additions and 33 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/vendor/
/.idea/
/.idea/
/phpunit.xml
6 changes: 0 additions & 6 deletions Service/JwtKeeper.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,11 @@ class JwtKeeper
private $jwtProvider;

/**
* @throws \GuzzleHttp\Exception\GuzzleException
* @throws \MaciejKosiarski\JwtKeeperBundle\Exception\InvalidJwtContentException
* @throws \MaciejKosiarski\JwtKeeperBundle\Exception\JwtException
* @throws \MaciejKosiarski\JwtKeeperBundle\Exception\StorageFileNameException
* @throws \MaciejKosiarski\JwtKeeperBundle\Exception\StoreTokenException
* @throws \MaciejKosiarski\JwtKeeperBundle\Exception\UnexpectedTokenTypeException
*/
public function __construct(string $serviceUrl, string $username, string $password)
{
$this->jwtProvider = new JwtProvider($serviceUrl, $username, $password);
$this->provideJwt();
}

/**
Expand Down
24 changes: 0 additions & 24 deletions Tests/JwtConnectorTest.php

This file was deleted.

8 changes: 8 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,17 @@
"symfony/http-kernel": "^4.2",
"guzzlehttp/guzzle": "^6.3"
},
"require-dev": {
"symfony/phpunit-bridge": "^4.2"
},
"autoload" : {
"psr-4" : {
"MaciejKosiarski\\JwtKeeperBundle\\" : ""
}
},
"autoload-dev": {
"psr-4": {
"MaciejKosiarski\\JwtKeeperBundle\\Tests\\" : "tests/"
}
}
}
70 changes: 68 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutOutputDuringTests="true"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
failOnRisky="true"
failOnWarning="true"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
verbose="true"
>
<testsuites>
<testsuite name="Project Test Suite">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src</directory>
</whitelist>
</filter>
</phpunit>
11 changes: 11 additions & 0 deletions tests/JwtKeeperTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace MaciejKosiarski\JwtKeeperBundle\Tests;

class JwtKeeperTest extends \PHPUnit\Framework\TestCase
{
public function testGetToken()
{

}
}
12 changes: 12 additions & 0 deletions tests/JwtProviderTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace MaciejKosiarski\JwtKeeperBundle\Tests;

class JwtProviderTest extends \PHPUnit\Framework\TestCase
{

public function testGetToken()
{

}
}

0 comments on commit 99da7bc

Please sign in to comment.