1
0
mirror of https://github.com/danog/class-finder.git synced 2024-11-30 04:29:03 +01:00
Commit Graph

48 Commits

Author SHA1 Message Date
Hayden Pierce
eb27cbfe15 Add a unit test around FilesEntry::knowsNamespace 2018-10-21 15:22:52 -05:00
Hayden Pierce
161825c1ea Add more test cases 2018-10-21 15:14:26 -05:00
Hayden Pierce
bb063b32bb Add a unit test for FilesEntry; reset the index on items coming out of FilesEntry. 2018-10-21 15:07:00 -05:00
Hayden Pierce
7f187675fb Add test confirming that support must be enabled. 2018-10-21 14:30:53 -05:00
Hayden Pierce
6af0937964 Add a test case 2018-10-21 09:14:41 -05:00
Hayden Pierce
4a91665f3a Implement the mechanism that determines the classes in a file; implement FileEntry::knowsNamespace. 2018-10-20 20:57:53 -05:00
Hayden Pierce
77aa8b9460 Add some minimal test harness. 2018-09-29 13:27:19 -05:00
Hayden Pierce
5a9732f72d Update composer lock files.
PHP 5.3 couldn't install some new version of Symfony/yaml or something.
2018-09-22 15:24:53 -05:00
Hayden Pierce
4ecfb28c51 Add classmap unit tests; Fix namespace in PSR4Namespace test. 2018-09-16 11:52:28 -05:00
Hayden Pierce
c161c74a97 Add test confirming loading classes from a 3rd party packages works. 2018-09-11 20:26:46 -05:00
Hayden Pierce
8bf7e0fb4e Update test app to 0.2.0 2018-09-11 20:21:55 -05:00
Hayden Pierce
7f72d3f344 Add tests confirming isAcceptableNamespace is working correctly. 2018-09-09 16:14:36 -05:00
Hayden Pierce
f56e335fa5 Add tests confirming isAcceptableNamespace is working correctly. 2018-09-09 13:43:52 -05:00
Hayden Pierce
dcd38681b2 Improve countMatchingSegments to report matches segments for unacceptable matches. 2018-09-09 13:33:23 -05:00
Hayden Pierce
8b67568fcd Add failing unit test proving that countMatchingSegments is misbehaving 2018-09-09 12:47:24 -05:00
Hayden Pierce
45edfbdc56 Move tests that are specific to the PSR4 module to a new file 2018-09-08 21:06:40 -05:00
Hayden Pierce
f21e20df18 Add test covering that entirely unknown namespaces throw an exception. 2018-09-08 21:02:23 -05:00
Hayden Pierce
aa77f1f042 Since multiple autoloading strategies were checked, we can't point out that PSR4 is the problem. 2018-09-08 20:51:48 -05:00
Hayden Pierce
aeb1ce05cc Remove the exception that gets thrown when a bad namespace is specified.
Unknown namespaces are known to contain nothing.
2018-09-08 20:39:18 -05:00
Hayden Pierce
db36194aa1 Prevent PSR4 Finder from raise exceptions when a namespace isn't raised.
Technically, the namespace can exist and still lack registration.
2018-09-08 20:33:16 -05:00
Hayden Pierce
f92b617082 Add functionality to better determine if a namespace is known. Pull exception message out to top level, since other Finders may be aware of the namespace. 2018-09-08 15:41:58 -05:00
Hayden Pierce
0fd843fff3 start adding tests for classmap 2018-09-08 14:48:10 -05:00
Hayden Pierce
d1d350d304 Downgrade to PHPUnit 4.8.36 for backwards compatibility with PHP 5.3 2018-09-03 16:18:49 -05:00
Hayden Pierce
5fc9fa77eb Add composer.lock files. oops. 2018-09-02 19:34:21 -05:00
Hayden Pierce
329e2a6950 test for multiple directories multiple levels deep. 2018-09-02 19:18:44 -05:00
Hayden Pierce
083acd879a Fix first party, multiple directory namespace mapping for PSR4. 2018-09-02 19:12:15 -05:00
Hayden Pierce
88b389e489 Add test case for 3rd party root level namespaces; Add test case for 1st party multi namespaces (failing!) 2018-09-02 10:31:45 -05:00
Hayden Pierce
69ef5ca1f7 Add test cases confirming that 3rd party class loading works. 2018-09-02 10:11:34 -05:00
Hayden Pierce
c72ffabf40 Update haydenpierce/sandbox-app to 0.1.2 2018-09-02 10:04:16 -05:00
Hayden Pierce
169bedf289 Add error messages 2018-08-31 21:22:28 -05:00
Hayden Pierce
6902be8c37 Add test confirming that loading classes from composer is working. 2018-08-31 21:17:33 -05:00
Hayden Pierce
d037898a6e Add haydenpierce/sandbox-app 2018-08-31 21:17:04 -05:00
Hayden Pierce
6dbbd2c7ef Refactor Exception into a new directory 2018-08-18 11:12:43 -05:00
Hayden Pierce
4ccbaf74bb Refactor to move configuration stuff to a new class 2018-08-18 10:22:29 -05:00
Hayden Pierce
d335758e48 Add a test confirming that empty directories don't throw an exception. 2018-08-04 15:30:41 -05:00
Hayden Pierce
229edca220 Show a more helpful error message when a root a namespace is registered, but the child components point to a directory that doesn't exist. 2018-08-04 15:27:52 -05:00
Hayden Pierce
61528d7e87 Add a test that will add a more help error message. 2018-08-04 15:15:50 -05:00
Hayden Pierce
0328bd9501 Add a more helpful error message when composer.json is lost. 2018-08-04 15:05:51 -05:00
Hayden Pierce
07ea6a52ba Add failing test that demonstrating a missing composer.json file. 2018-08-04 14:58:00 -05:00
Hayden Pierce
531d9d02db Use correct path that composer will install. 2018-08-04 14:49:23 -05:00
Hayden Pierce
c1070db5cd Add failing test to improve error messages. 2018-08-04 14:43:50 -05:00
Hayden Pierce
93e95fec33 Make test app include the package from packagist.
This is done to allow the test app to autoloading classes because composer will
now autoload from the HaydenPierce/ClassFinder namespace.
2018-08-04 14:41:48 -05:00
Hayden Pierce
7f23741fd7 Use correct path that composer will install. 2018-08-04 11:03:21 -05:00
Hayden Pierce
90d821c6e8 Ensure that the test has a prank composer.json, like a real application would.
This is the result of discovering that ClassFinder will find it's own composer.json and use that
as the application root. Which is kind of hilarious.
2018-08-04 10:20:34 -05:00
Hayden Pierce
c3f06b56bd Change namespace from hpierce1102 to haydenpierce 2018-07-28 14:22:35 -05:00
Hayden Pierce
f4c2bf85e6 Fix a bug where a nested assumed namespace would get backwards and prevent classes from being found. 2018-07-28 11:42:51 -05:00
Hayden Pierce
93e08261b7 get test working. Note: working is not passing. 2018-07-21 16:36:21 -05:00
Hayden Pierce
d901b1171d Add a test app. 2018-07-21 10:26:01 -05:00