8000 Fix AssetServiceProviderTest::testGenerateAssetUrl by skalpa · Pull Request #1510 · silexphp/Silex · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jul 4, 2018. It is now read-only.

Fix AssetServiceProviderTest::testGenerateAssetUrl #1510

Merged
merged 1 commit into from
May 2, 2017

Conversation

skalpa
Copy link
Contributor
@skalpa skalpa commented May 2, 2017

The test broke when symfony/symfony#22528 got merged.

I added one check without the starting slash (the returned path should be relative to base_path) and modified the expectation of the check with the starting slash (the returned path should not be relative).

There was 1 failure:

1) Silex\Tests\Provider\AssetServiceProviderTest::testGenerateAssetUrl
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'/whatever-makes-sense/foo.css?css2'
+'/foo.css?css2'

@skalpa skalpa force-pushed the fix-test-symfony-22528 branch from 8fb0423 to ce8e41b Compare May 2, 2017 00:46
@skalpa
Copy link
Contributor Author
skalpa commented May 2, 2017

I went too fast and the "fixed" test didn't work with 3.0 and 3.1.

Thus I just kept the test without the starting slash as the behavior of getUrl() in that case is the same from 2.7 to 3.3.

@fabpot
Copy link
Member
fabpot commented May 2, 2017

Thank you @skalpa.

@fabpot fabpot merged commit ce8e41b into silexphp:master May 2, 2017
fabpot added a commit that referenced this pull request May 2, 2017
This PR was merged into the 2.1.x-dev branch.

Discussion
----------

Fix AssetServiceProviderTest::testGenerateAssetUrl

The test broke when symfony/symfony#22528 got merged.

I added one check without the starting slash (the returned path should be relative to `base_path`) and modified the expectation of the check with the starting slash (the returned path should not be relative).

```
There was 1 failure:

1) Silex\Tests\Provider\AssetServiceProviderTest::testGenerateAssetUrl
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'/whatever-makes-sense/foo.css?css2'
+'/foo.css?css2'
```

Commits
-------

ce8e41b Fix AssetServiceProviderTest::testGenerateAssetUrl
@skalpa skalpa deleted the fix-test-symfony-22528 branch May 4, 2017 16:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0