Aargh, missed some files from the commit
This commit is contained in:
parent
53d8f4b77f
commit
80d9bc7d59
6 changed files with 55 additions and 57 deletions
|
@ -46,7 +46,7 @@
|
||||||
"laravel/dusk": "^5.0",
|
"laravel/dusk": "^5.0",
|
||||||
"mockery/mockery": "~1.0",
|
"mockery/mockery": "~1.0",
|
||||||
"nunomaduro/collision": "^3.0",
|
"nunomaduro/collision": "^3.0",
|
||||||
"phpunit/phpunit": "~7.0",
|
"phpunit/phpunit": "~8.0",
|
||||||
"symfony/thanks": "~1.0"
|
"symfony/thanks": "~1.0"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
|
|
69
composer.lock
generated
69
composer.lock
generated
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "03e9db9cb3e36994582fb18226301c2a",
|
"content-hash": "2337f94b0e6c7d9f3589283c1204c053",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "aws/aws-sdk-php",
|
"name": "aws/aws-sdk-php",
|
||||||
|
@ -6569,40 +6569,40 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-code-coverage",
|
"name": "phpunit/php-code-coverage",
|
||||||
"version": "6.1.4",
|
"version": "7.0.3",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
||||||
"reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d"
|
"reference": "0317a769a81845c390e19684d9ba25d7f6aa4707"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/807e6013b00af69b6c5d9ceb4282d0393dbb9d8d",
|
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/0317a769a81845c390e19684d9ba25d7f6aa4707",
|
||||||
"reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d",
|
"reference": "0317a769a81845c390e19684d9ba25d7f6aa4707",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"ext-dom": "*",
|
"ext-dom": "*",
|
||||||
"ext-xmlwriter": "*",
|
"ext-xmlwriter": "*",
|
||||||
"php": "^7.1",
|
"php": "^7.2",
|
||||||
"phpunit/php-file-iterator": "^2.0",
|
"phpunit/php-file-iterator": "^2.0.2",
|
||||||
"phpunit/php-text-template": "^1.2.1",
|
"phpunit/php-text-template": "^1.2.1",
|
||||||
"phpunit/php-token-stream": "^3.0",
|
"phpunit/php-token-stream": "^3.0.1",
|
||||||
"sebastian/code-unit-reverse-lookup": "^1.0.1",
|
"sebastian/code-unit-reverse-lookup": "^1.0.1",
|
||||||
"sebastian/environment": "^3.1 || ^4.0",
|
"sebastian/environment": "^4.1",
|
||||||
"sebastian/version": "^2.0.1",
|
"sebastian/version": "^2.0.1",
|
||||||
"theseer/tokenizer": "^1.1"
|
"theseer/tokenizer": "^1.1"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^7.0"
|
"phpunit/phpunit": "^8.0"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"ext-xdebug": "^2.6.0"
|
"ext-xdebug": "^2.6.1"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "6.1-dev"
|
"dev-master": "7.0-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
@ -6628,7 +6628,7 @@
|
||||||
"testing",
|
"testing",
|
||||||
"xunit"
|
"xunit"
|
||||||
],
|
],
|
||||||
"time": "2018-10-31T16:06:48+00:00"
|
"time": "2019-02-26T07:38:26+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-file-iterator",
|
"name": "phpunit/php-file-iterator",
|
||||||
|
@ -6821,16 +6821,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/phpunit",
|
"name": "phpunit/phpunit",
|
||||||
"version": "7.5.7",
|
"version": "8.0.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||||
"reference": "eb343b86753d26de07ecba7868fa983104361948"
|
"reference": "19cbed2120839772c4a00e8b28456b0c77d1a7b4"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/eb343b86753d26de07ecba7868fa983104361948",
|
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/19cbed2120839772c4a00e8b28456b0c77d1a7b4",
|
||||||
"reference": "eb343b86753d26de07ecba7868fa983104361948",
|
"reference": "19cbed2120839772c4a00e8b28456b0c77d1a7b4",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -6840,27 +6840,25 @@
|
||||||
"ext-libxml": "*",
|
"ext-libxml": "*",
|
||||||
"ext-mbstring": "*",
|
"ext-mbstring": "*",
|
||||||
"ext-xml": "*",
|
"ext-xml": "*",
|
||||||
|
"ext-xmlwriter": "*",
|
||||||
"myclabs/deep-copy": "^1.7",
|
"myclabs/deep-copy": "^1.7",
|
||||||
"phar-io/manifest": "^1.0.2",
|
"phar-io/manifest": "^1.0.2",
|
||||||
"phar-io/version": "^2.0",
|
"phar-io/version": "^2.0",
|
||||||
"php": "^7.1",
|
"php": "^7.2",
|
||||||
"phpspec/prophecy": "^1.7",
|
"phpspec/prophecy": "^1.7",
|
||||||
"phpunit/php-code-coverage": "^6.0.7",
|
"phpunit/php-code-coverage": "^7.0",
|
||||||
"phpunit/php-file-iterator": "^2.0.1",
|
"phpunit/php-file-iterator": "^2.0.1",
|
||||||
"phpunit/php-text-template": "^1.2.1",
|
"phpunit/php-text-template": "^1.2.1",
|
||||||
"phpunit/php-timer": "^2.1",
|
"phpunit/php-timer": "^2.1",
|
||||||
"sebastian/comparator": "^3.0",
|
"sebastian/comparator": "^3.0",
|
||||||
"sebastian/diff": "^3.0",
|
"sebastian/diff": "^3.0",
|
||||||
"sebastian/environment": "^4.0",
|
"sebastian/environment": "^4.1",
|
||||||
"sebastian/exporter": "^3.1",
|
"sebastian/exporter": "^3.1",
|
||||||
"sebastian/global-state": "^2.0",
|
"sebastian/global-state": "^3.0",
|
||||||
"sebastian/object-enumerator": "^3.0.3",
|
"sebastian/object-enumerator": "^3.0.3",
|
||||||
"sebastian/resource-operations": "^2.0",
|
"sebastian/resource-operations": "^2.0",
|
||||||
"sebastian/version": "^2.0.1"
|
"sebastian/version": "^2.0.1"
|
||||||
},
|
},
|
||||||
"conflict": {
|
|
||||||
"phpunit/phpunit-mock-objects": "*"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"ext-pdo": "*"
|
"ext-pdo": "*"
|
||||||
},
|
},
|
||||||
|
@ -6875,7 +6873,7 @@
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "7.5-dev"
|
"dev-master": "8.0-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
@ -6901,7 +6899,7 @@
|
||||||
"testing",
|
"testing",
|
||||||
"xunit"
|
"xunit"
|
||||||
],
|
],
|
||||||
"time": "2019-03-16T07:31:17+00:00"
|
"time": "2019-03-16T07:33:46+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/code-unit-reverse-lookup",
|
"name": "sebastian/code-unit-reverse-lookup",
|
||||||
|
@ -7190,23 +7188,26 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/global-state",
|
"name": "sebastian/global-state",
|
||||||
"version": "2.0.0",
|
"version": "3.0.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/global-state.git",
|
"url": "https://github.com/sebastianbergmann/global-state.git",
|
||||||
"reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4"
|
"reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4",
|
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4",
|
||||||
"reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4",
|
"reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.0"
|
"php": "^7.2",
|
||||||
|
"sebastian/object-reflector": "^1.1.1",
|
||||||
|
"sebastian/recursion-context": "^3.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^6.0"
|
"ext-dom": "*",
|
||||||
|
"phpunit/phpunit": "^8.0"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"ext-uopz": "*"
|
"ext-uopz": "*"
|
||||||
|
@ -7214,7 +7215,7 @@
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "2.0-dev"
|
"dev-master": "3.0-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
@ -7237,7 +7238,7 @@
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"global state"
|
"global state"
|
||||||
],
|
],
|
||||||
"time": "2017-04-27T15:39:26+00:00"
|
"time": "2019-02-01T05:30:01+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/object-enumerator",
|
"name": "sebastian/object-enumerator",
|
||||||
|
|
|
@ -6,6 +6,7 @@ use Tests\TestCase;
|
||||||
use Lcobucci\JWT\Builder;
|
use Lcobucci\JWT\Builder;
|
||||||
use App\Services\TokenService;
|
use App\Services\TokenService;
|
||||||
use Lcobucci\JWT\Signer\Hmac\Sha256;
|
use Lcobucci\JWT\Signer\Hmac\Sha256;
|
||||||
|
use App\Exceptions\InvalidTokenException;
|
||||||
|
|
||||||
class TokenServiceTest extends TestCase
|
class TokenServiceTest extends TestCase
|
||||||
{
|
{
|
||||||
|
@ -33,12 +34,11 @@ class TokenServiceTest extends TestCase
|
||||||
$this->assertSame($data, $validData);
|
$this->assertSame($data, $validData);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public function test_token_with_different_signing_key_throws_exception()
|
||||||
* @expectedException App\Exceptions\InvalidTokenException
|
|
||||||
* @expectedExceptionMessage Token failed validation
|
|
||||||
*/
|
|
||||||
public function test_token_with_different_singing_key_throws_exception()
|
|
||||||
{
|
{
|
||||||
|
$this->expectException(InvalidTokenException::class);
|
||||||
|
$this->expectExceptionMessage('Token failed validation');
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'me' => 'https://example.org',
|
'me' => 'https://example.org',
|
||||||
'client_id' => 'https://quill.p3k.io',
|
'client_id' => 'https://quill.p3k.io',
|
||||||
|
|
|
@ -8,6 +8,7 @@ use GuzzleHttp\HandlerStack;
|
||||||
use GuzzleHttp\Psr7\Response;
|
use GuzzleHttp\Psr7\Response;
|
||||||
use App\Services\BookmarkService;
|
use App\Services\BookmarkService;
|
||||||
use GuzzleHttp\Handler\MockHandler;
|
use GuzzleHttp\Handler\MockHandler;
|
||||||
|
use App\Exceptions\InternetArchiveException;
|
||||||
|
|
||||||
class BookmarksTest extends TestCase
|
class BookmarksTest extends TestCase
|
||||||
{
|
{
|
||||||
|
@ -32,11 +33,10 @@ class BookmarksTest extends TestCase
|
||||||
$this->assertEquals('/web/1234/example.org', $url);
|
$this->assertEquals('/web/1234/example.org', $url);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @expectedException App\Exceptions\InternetArchiveException
|
|
||||||
*/
|
|
||||||
public function test_archive_link_method_archive_site_error_exception()
|
public function test_archive_link_method_archive_site_error_exception()
|
||||||
{
|
{
|
||||||
|
$this->expectException(InternetArchiveException::class);
|
||||||
|
|
||||||
$mock = new MockHandler([
|
$mock = new MockHandler([
|
||||||
new Response(403),
|
new Response(403),
|
||||||
]);
|
]);
|
||||||
|
@ -46,11 +46,10 @@ class BookmarksTest extends TestCase
|
||||||
$url = (new BookmarkService())->getArchiveLink('https://example.org');
|
$url = (new BookmarkService())->getArchiveLink('https://example.org');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @expectedException App\Exceptions\InternetArchiveException
|
|
||||||
*/
|
|
||||||
public function test_archive_link_method_archive_site_no_location_exception()
|
public function test_archive_link_method_archive_site_no_location_exception()
|
||||||
{
|
{
|
||||||
|
$this->expectException(InternetArchiveException::class);
|
||||||
|
|
||||||
$mock = new MockHandler([
|
$mock = new MockHandler([
|
||||||
new Response(200),
|
new Response(200),
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -14,6 +14,7 @@ use GuzzleHttp\Handler\MockHandler;
|
||||||
use Illuminate\FileSystem\FileSystem;
|
use Illuminate\FileSystem\FileSystem;
|
||||||
use Illuminate\Support\Facades\Queue;
|
use Illuminate\Support\Facades\Queue;
|
||||||
use Jonnybarnes\WebmentionsParser\Parser;
|
use Jonnybarnes\WebmentionsParser\Parser;
|
||||||
|
use App\Exceptions\RemoteContentNotFoundException;
|
||||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||||
|
|
||||||
class ProcessWebMentionJobTest extends TestCase
|
class ProcessWebMentionJobTest extends TestCase
|
||||||
|
@ -29,11 +30,10 @@ class ProcessWebMentionJobTest extends TestCase
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @expectedException \App\Exceptions\RemoteContentNotFoundException
|
|
||||||
*/
|
|
||||||
public function test_for_exception_from_failure_to_get_webmention()
|
public function test_for_exception_from_failure_to_get_webmention()
|
||||||
{
|
{
|
||||||
|
$this->expectException(RemoteContentNotFoundException::class);
|
||||||
|
|
||||||
$parser = new Parser();
|
$parser = new Parser();
|
||||||
$mock = new MockHandler([
|
$mock = new MockHandler([
|
||||||
new Response(404),
|
new Response(404),
|
||||||
|
|
|
@ -66,22 +66,20 @@ class PlacesTest extends TestCase
|
||||||
$this->assertEquals(2, count(Place::all())); // still 2 places
|
$this->assertEquals(2, count(Place::all())); // still 2 places
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @expectedException InvalidArgumentException
|
|
||||||
* @expectedExceptionMessage Missing required name
|
|
||||||
*/
|
|
||||||
public function test_service_requires_name()
|
public function test_service_requires_name()
|
||||||
{
|
{
|
||||||
|
$this->expectException(\InvalidArgumentException::class);
|
||||||
|
$this->expectExceptionMessage('Missing required name');
|
||||||
|
|
||||||
$service = new PlaceService();
|
$service = new PlaceService();
|
||||||
$service->createPlaceFromCheckin(['foo' => 'bar']);
|
$service->createPlaceFromCheckin(['foo' => 'bar']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @expectedException InvalidArgumentException
|
|
||||||
* @expectedExceptionMessage Missing required longitude/latitude
|
|
||||||
*/
|
|
||||||
public function test_service_requires_latitude()
|
public function test_service_requires_latitude()
|
||||||
{
|
{
|
||||||
|
$this->expectException(\InvalidArgumentException::class);
|
||||||
|
$this->expectExceptionMessage('Missing required longitude/latitude');
|
||||||
|
|
||||||
$service = new PlaceService();
|
$service = new PlaceService();
|
||||||
$service->createPlaceFromCheckin(['properties' => ['name' => 'bar']]);
|
$service->createPlaceFromCheckin(['properties' => ['name' => 'bar']]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue