Commit 5521a095 authored by dbourdere's avatar dbourdere 🤸
Browse files

Test pass

parent 4834d01a
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PhpIncludePathManager">
<include_path>
<path value="$PROJECT_DIR$/vendor/composer" />
<path value="$PROJECT_DIR$/vendor/phpdocumentor/type-resolver" />
<path value="$PROJECT_DIR$/vendor/phpdocumentor/reflection-docblock" />
<path value="$PROJECT_DIR$/vendor/phpdocumentor/reflection-common" />
<path value="$PROJECT_DIR$/vendor/sebastian/diff" />
<path value="$PROJECT_DIR$/vendor/sebastian/code-unit-reverse-lookup" />
<path value="$PROJECT_DIR$/vendor/webmozart/assert" />
<path value="$PROJECT_DIR$/vendor/sebastian/version" />
<path value="$PROJECT_DIR$/vendor/sebastian/object-enumerator" />
<path value="$PROJECT_DIR$/vendor/sebastian/recursion-context" />
<path value="$PROJECT_DIR$/vendor/sebastian/resource-operations" />
<path value="$PROJECT_DIR$/vendor/sebastian/object-reflector" />
<path value="$PROJECT_DIR$/vendor/sebastian/comparator" />
<path value="$PROJECT_DIR$/vendor/sebastian/global-state" />
<path value="$PROJECT_DIR$/vendor/sebastian/exporter" />
<path value="$PROJECT_DIR$/vendor/sebastian/environment" />
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-ctype" />
<path value="$PROJECT_DIR$/vendor/phpunit/phpunit" />
<path value="$PROJECT_DIR$/vendor/doctrine/instantiator" />
<path value="$PROJECT_DIR$/vendor/theseer/tokenizer" />
<path value="$PROJECT_DIR$/vendor/phpunit/php-token-stream" />
<path value="$PROJECT_DIR$/vendor/phpunit/php-text-template" />
<path value="$PROJECT_DIR$/vendor/phpunit/php-code-coverage" />
<path value="$PROJECT_DIR$/vendor/phpunit/phpunit-mock-objects" />
<path value="$PROJECT_DIR$/vendor/phpspec/prophecy" />
<path value="$PROJECT_DIR$/vendor/phar-io/version" />
<path value="$PROJECT_DIR$/vendor/phpunit/php-file-iterator" />
<path value="$PROJECT_DIR$/vendor/phpunit/php-timer" />
<path value="$PROJECT_DIR$/vendor/spatie/macroable" />
<path value="$PROJECT_DIR$/vendor/psr/http-message" />
<path value="$PROJECT_DIR$/vendor/phar-io/manifest" />
<path value="$PROJECT_DIR$/vendor/myclabs/deep-copy" />
</include_path>
</component>
<component name="PhpProjectSharedConfiguration" php_language_level="7" />
</project>
\ No newline at end of file
......@@ -2,8 +2,40 @@
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" packagePrefix="Spatie\Url\" />
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" packagePrefix="Spatie\Url\Test\" />
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" packagePrefix="Aboutgoods\Url\" />
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" packagePrefix="Aboutgoods\Url\Test\" />
<excludeFolder url="file://$MODULE_DIR$/vendor/composer" />
<excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/instantiator" />
<excludeFolder url="file://$MODULE_DIR$/vendor/myclabs/deep-copy" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phar-io/manifest" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phar-io/version" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpdocumentor/reflection-common" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpdocumentor/reflection-docblock" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpdocumentor/type-resolver" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpspec/prophecy" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-code-coverage" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-file-iterator" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-text-template" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-timer" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-token-stream" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/phpunit" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/phpunit-mock-objects" />
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/http-message" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/code-unit-reverse-lookup" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/comparator" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/diff" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/environment" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/exporter" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/global-state" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/object-enumerator" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/object-reflector" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/recursion-context" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/resource-operations" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/version" />
<excludeFolder url="file://$MODULE_DIR$/vendor/spatie/macroable" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-ctype" />
<excludeFolder url="file://$MODULE_DIR$/vendor/theseer/tokenizer" />
<excludeFolder url="file://$MODULE_DIR$/vendor/webmozart/assert" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
......
......@@ -2,17 +2,10 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="fae4539b-8642-4103-8eea-949e53ec2ed8" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/src/Exceptions/InvalidArgument.php" beforeDir="false" afterPath="$PROJECT_DIR$/src/Exceptions/InvalidArgument.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Helpers/Arr.php" beforeDir="false" afterPath="$PROJECT_DIR$/src/Helpers/Arr.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/QueryParameterBag.php" beforeDir="false" afterPath="$PROJECT_DIR$/src/QueryParameterBag.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Url.php" beforeDir="false" afterPath="$PROJECT_DIR$/src/Url.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/tests/QueryParameterBagTest.php" beforeDir="false" afterPath="$PROJECT_DIR$/tests/QueryParameterBagTest.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/php.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/php.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/url.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/url.iml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/tests/UrlBuildTest.php" beforeDir="false" afterPath="$PROJECT_DIR$/tests/UrlBuildTest.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/tests/UrlImmutableTest.php" beforeDir="false" afterPath="$PROJECT_DIR$/tests/UrlImmutableTest.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/tests/UrlMatchesTest.php" beforeDir="false" afterPath="$PROJECT_DIR$/tests/UrlMatchesTest.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/tests/UrlParseTest.php" beforeDir="false" afterPath="$PROJECT_DIR$/tests/UrlParseTest.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/tests/UrlQueryParametersTest.php" beforeDir="false" afterPath="$PROJECT_DIR$/tests/UrlQueryParametersTest.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/tests/UrlSegmentTest.php" beforeDir="false" afterPath="$PROJECT_DIR$/tests/UrlSegmentTest.php" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
......@@ -26,33 +19,79 @@
<component name="FileEditorManager">
<leaf>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Exceptions/InvalidArgument.php">
<entry file="file://$PROJECT_DIR$/src/Url.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="30">
<caret line="2" column="20" selection-start-line="2" selection-start-column="20" selection-end-line="2" selection-end-column="20" />
<state relative-caret-position="410">
<caret line="222" column="35" selection-start-line="222" selection-start-column="35" selection-end-line="222" selection-end-column="35" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/QueryParameterBag.php">
<entry file="file://$PROJECT_DIR$/tests/QueryParameterBagTest.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="300">
<caret line="20" column="9" lean-forward="true" selection-start-line="20" selection-start-column="9" selection-end-line="20" selection-end-column="9" />
<state relative-caret-position="90">
<caret line="7" column="41" selection-start-line="7" selection-start-column="41" selection-end-line="7" selection-end-column="41" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Helpers/Arr.php">
<entry file="file://$PROJECT_DIR$/tests/UrlSegmentTest.php">
<provider selected="true" editor-type-id="text-editor" />
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/tests/UrlQueryParametersTest.php">
<provider selected="true" editor-type-id="text-editor" />
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/tests/UrlParseTest.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1149" />
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/tests/UrlMatchesTest.php">
<provider selected="true" editor-type-id="text-editor" />
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/Url.php">
<entry file="file://$PROJECT_DIR$/tests/UrlBuildTest.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="410">
<caret line="222" column="35" lean-forward="true" selection-start-line="222" selection-start-column="35" selection-end-line="222" selection-end-column="35" />
<state relative-caret-position="225">
<caret line="35" column="4" selection-start-line="35" selection-start-column="4" selection-end-line="35" selection-end-column="4" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/composer.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="345">
<caret line="32" column="23" selection-start-line="32" selection-start-column="23" selection-end-line="32" selection-end-column="23" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/CONTRIBUTING.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor />
<second_editor />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/LICENSE.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor />
<second_editor />
</state>
</provider>
</entry>
......@@ -62,6 +101,7 @@
<component name="FindInProjectRecents">
<findStrings>
<find>Spatie\Url</find>
<find>VALID_SC</find>
</findStrings>
<replaceStrings>
<replace>Aboutgoods\Url</replace>
......@@ -76,9 +116,47 @@
<option value="$PROJECT_DIR$/src/Exceptions/InvalidArgument.php" />
<option value="$PROJECT_DIR$/src/QueryParameterBag.php" />
<option value="$PROJECT_DIR$/src/Url.php" />
<option value="$PROJECT_DIR$/composer.json" />
<option value="$PROJECT_DIR$/tests/UrlBuildTest.php" />
</list>
</option>
</component>
<component name="PhpWorkspaceProjectConfiguration" interpreter_name="PHP 7.2">
<include_path>
<path value="$PROJECT_DIR$/vendor/composer" />
<path value="$PROJECT_DIR$/vendor/phpdocumentor/type-resolver" />
<path value="$PROJECT_DIR$/vendor/phpdocumentor/reflection-docblock" />
<path value="$PROJECT_DIR$/vendor/phpdocumentor/reflection-common" />
<path value="$PROJECT_DIR$/vendor/sebastian/diff" />
<path value="$PROJECT_DIR$/vendor/sebastian/code-unit-reverse-lookup" />
<path value="$PROJECT_DIR$/vendor/webmozart/assert" />
<path value="$PROJECT_DIR$/vendor/sebastian/version" />
<path value="$PROJECT_DIR$/vendor/sebastian/object-enumerator" />
<path value="$PROJECT_DIR$/vendor/sebastian/recursion-context" />
<path value="$PROJECT_DIR$/vendor/sebastian/resource-operations" />
<path value="$PROJECT_DIR$/vendor/sebastian/object-reflector" />
<path value="$PROJECT_DIR$/vendor/sebastian/comparator" />
<path value="$PROJECT_DIR$/vendor/sebastian/global-state" />
<path value="$PROJECT_DIR$/vendor/sebastian/exporter" />
<path value="$PROJECT_DIR$/vendor/sebastian/environment" />
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-ctype" />
<path value="$PROJECT_DIR$/vendor/phpunit/phpunit" />
<path value="$PROJECT_DIR$/vendor/doctrine/instantiator" />
<path value="$PROJECT_DIR$/vendor/theseer/tokenizer" />
<path value="$PROJECT_DIR$/vendor/phpunit/php-token-stream" />
<path value="$PROJECT_DIR$/vendor/phpunit/php-text-template" />
<path value="$PROJECT_DIR$/vendor/phpunit/php-code-coverage" />
<path value="$PROJECT_DIR$/vendor/phpunit/phpunit-mock-objects" />
<path value="$PROJECT_DIR$/vendor/phpspec/prophecy" />
<path value="$PROJECT_DIR$/vendor/phar-io/version" />
<path value="$PROJECT_DIR$/vendor/phpunit/php-file-iterator" />
<path value="$PROJECT_DIR$/vendor/phpunit/php-timer" />
<path value="$PROJECT_DIR$/vendor/spatie/macroable" />
<path value="$PROJECT_DIR$/vendor/psr/http-message" />
<path value="$PROJECT_DIR$/vendor/phar-io/manifest" />
<path value="$PROJECT_DIR$/vendor/myclabs/deep-copy" />
</include_path>
</component>
<component name="ProjectFrameBounds" extendedState="6">
<option name="y" value="-2" />
<option name="width" value="1920" />
......@@ -114,6 +192,22 @@
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="Helpers" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="url" type="b2602c69:ProjectViewProjectNode" />
<item name="url" type="462c0819:PsiDirectoryNode" />
<item name="tests" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="url" type="b2602c69:ProjectViewProjectNode" />
<item name="url" type="462c0819:PsiDirectoryNode" />
<item name="vendor" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="url" type="b2602c69:ProjectViewProjectNode" />
<item name="url" type="462c0819:PsiDirectoryNode" />
<item name="vendor" type="462c0819:PsiDirectoryNode" />
<item name="bin" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
......@@ -139,6 +233,17 @@
</list>
</option>
</component>
<component name="RunManager">
<configuration name="UrlBuildTest" type="PHPUnitRunConfigurationType" factoryName="PHPUnit" temporary="true">
<TestRunner class="Aboutgoods\Url\Test\UrlBuildTest" file="$PROJECT_DIR$/tests/UrlBuildTest.php" scope="Class" />
<method v="2" />
</configuration>
<recent_temporary>
<list>
<item itemvalue="PHPUnit.UrlBuildTest" />
</list>
</recent_temporary>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
......@@ -149,28 +254,33 @@
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1553765456703</updated>
<workItem from="1553765457929" duration="226000" />
<workItem from="1553765457929" duration="644000" />
</task>
<servers />
</component>
<component name="TestHistory">
<history-entry file="UrlBuildTest - 2019.03.28 at 10h 40m 52s.xml">
<configuration name="UrlBuildTest" configurationId="PHPUnitRunConfigurationType" />
</history-entry>
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="226000" />
<option name="totallyTimeSpent" value="644000" />
</component>
<component name="ToolWindowManager">
<frame x="0" y="-2" width="1920" height="1082" extended-state="6" />
<editor active="true" />
<layout>
<window_info id="Favorites" side_tool="true" />
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.24866596" />
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.24866596" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info anchor="bottom" id="Docker" />
<window_info anchor="bottom" id="Database Changes" />
<window_info anchor="bottom" id="Version Control" />
<window_info anchor="bottom" id="Terminal" />
<window_info active="true" anchor="bottom" id="Terminal" visible="true" weight="0.32948583" />
<window_info anchor="bottom" id="Event Log" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" />
<window_info anchor="bottom" id="Run" order="2" />
<window_info anchor="bottom" id="Run" order="2" weight="0.32948583" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
......@@ -195,7 +305,7 @@
<entry file="file://$PROJECT_DIR$/src/QueryParameterBag.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="300">
<caret line="20" column="9" lean-forward="true" selection-start-line="20" selection-start-column="9" selection-end-line="20" selection-end-column="9" />
<caret line="20" column="9" selection-start-line="20" selection-start-column="9" selection-end-line="20" selection-end-column="9" />
</state>
</provider>
</entry>
......@@ -205,7 +315,58 @@
<entry file="file://$PROJECT_DIR$/src/Url.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="410">
<caret line="222" column="35" lean-forward="true" selection-start-line="222" selection-start-column="35" selection-end-line="222" selection-end-column="35" />
<caret line="222" column="35" selection-start-line="222" selection-start-column="35" selection-end-line="222" selection-end-column="35" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tests/QueryParameterBagTest.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="7" column="41" selection-start-line="7" selection-start-column="41" selection-end-line="7" selection-end-column="41" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tests/UrlSegmentTest.php">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/tests/UrlQueryParametersTest.php">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/tests/UrlParseTest.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1149" />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tests/UrlMatchesTest.php">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/composer.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="345">
<caret line="32" column="23" selection-start-line="32" selection-start-column="23" selection-end-line="32" selection-end-column="23" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/CONTRIBUTING.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor />
<second_editor />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/LICENSE.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor />
<second_editor />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tests/UrlBuildTest.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="225">
<caret line="35" column="4" selection-start-line="35" selection-start-column="4" selection-end-line="35" selection-end-column="4" />
</state>
</provider>
</entry>
......
......@@ -34,14 +34,6 @@ class UrlBuildTest extends TestCase
$this->assertEquals('https://spatie.be', (string) $url);
}
/** @test */
public function it_throws_an_exception_when_providing_an_invalid_url_scheme()
{
$this->expectException(InvalidArgument::class);
$this->expectExceptionMessage(InvalidArgument::invalidScheme('htps')->getMessage());
Url::create()->withScheme('htps');
}
/** @test */
public function it_can_build_a_url_with_a_user()
......
......@@ -32,15 +32,6 @@ class UrlParseTest extends TestCase
$this->assertEquals('mailto', $url->getScheme());
}
/** @test */
public function it_throws_an_exception_if_an_invalid_scheme_is_provided()
{
$this->expectException(InvalidArgument::class);
$this->expectExceptionMessage(InvalidArgument::invalidScheme('htps')->getMessage());
Url::fromString('htps://spatie.be');
}
/** @test */
public function it_can_parse_a_host()
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment